赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 1673 |
最后登录 | 2016-3-27 |
在线时间 | 21 小时 |
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 21 小时
- 注册时间
- 2014-6-25
- 帖子
- 7
|
2楼

楼主 |
发表于 2014-6-25 11:32:43
|
只看该作者
- #------------------------------------------------------------------------------#, b/ c! r) P/ P8 b7 Q* u* E
- # Galv's Character Effects
8 N; O9 {% c8 o - #------------------------------------------------------------------------------#' W" T9 r# W. @9 O/ a0 N/ |) R5 n1 F4 v
- # For: RPGMAKER VX ACE
- q- m2 o! Q2 j% u G2 H( r; K7 v6 e - # Version 2.1
, ?8 U. c. Z2 w8 i9 e - #------------------------------------------------------------------------------#
8 M; d/ l( i( W- P6 u. c - # 2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
9 s' I5 f; Z9 f2 N* ^ - # 2013-12-07 - Version 2.0 - Added comments to more easily add event effects
" |- b* p3 p! m$ c2 V; `+ k - # - Fixed shadow facing bug
4 X, B+ t9 m! F* Q! T - # 2013-02-24 - Version 1.9 - added z level option for reflection and shadows( v4 g$ J$ E) f- L; s
- # 2013-02-23 - Version 1.8 - added multiple light sources for shadows' E$ E6 X. P/ ^9 E( |( k: n/ z, b
- # 2013-02-22 - Version 1.7 - bug fixes
, h3 ~4 R0 D+ {) N' y! W - # 2013-02-22 - Version 1.6 - added icon effect0 l" o1 o4 v7 I% M. q
- # 2013-02-22 - Version 1.5 - fixed mirror bug on large maps
" Z& g& y! g. S& C) o+ J* P% ~ - # 2013-02-22 - Version 1.4 - added effects to vehicles4 A0 X3 {$ L. x1 f, m
- # 2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
* l( F2 H4 Z" ?1 ] - # 2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
7 r, o( f2 Z) ~+ ?0 ]; k# A6 f - # 2013-02-21 - Version 1.1 - updated flicker effect
# y% A- A |$ s/ { - # 2013-02-21 - Version 1.0 - release
( A" O8 ~/ F* h1 ^% Y - #------------------------------------------------------------------------------#
' q6 B: l7 Z' d! v/ `( l' x - # This script was made to provide some additional effects for characters such
8 F% r+ S; F$ B" C1 N! V! A - # as events, followers and the player on the map." D5 ?8 R2 \# t5 U# p
- # Currently it includes:2 ] b- ]9 I1 D% W* W) H
- #
+ N0 S* {. q: g5 h+ I' O) H - # Shadows+ m: t( @8 r' D' J) L
- # Shadows that appear under player and events in a directions depending on
$ |$ D& }# k4 S6 [0 r# _ - # a light source that you choose.
9 D, H) G2 ~! F& s3 M( R9 Q - #1 ]3 z' U9 T4 Z8 I7 X' N) B0 n0 G
- # Parallax Reflect
; g1 ?% t6 P; L1 G - # Reflections that appear on the parallax layer for events and actors to be3 v7 l( z$ c- l" _! t5 V
- # used for things like reflections in the water or glass floor etc. To get
+ z! S/ Y" i! m, m - # effects like the demo, you need to edit the charset graphic to make the water
+ R+ @: s& V& \) ]+ B6 ~/ L4 X' ?7 A5 N - # partially transparent.
0 x! ~1 {1 [/ @1 p - # f" k# t9 z8 I) S) k# p; p1 p
- # Parallax Mirrors6 N/ |: Q( Y, N) h* y1 S1 p0 X
- # Much like reflect but are instead actors and event are reflected in a mirror! \! D. i, k: w3 h% M' `
- # on a wall designated by a region. Both mirror and reflect effects can be
. g$ d! `* H8 q$ k/ Z; o2 T - # changed so actors and events can use different charsets for their reflections+ u& E ]9 \! U# E/ o1 t7 _
- #- z; W# w l' S, i- l
- #------------------------------------------------------------------------------#
% b+ \- ]0 W. u+ P& ]0 [8 O - & a4 F. i/ T. W' D0 k$ ]
- ( C2 a4 m% S$ c. o" c1 L' A
- #------------------------------------------------------------------------------#
9 y' E2 x' W0 |0 o% ]9 b7 g - # NEW - First event command as a COMMENT1 t; s9 u+ d) V% I0 L
- #------------------------------------------------------------------------------#
x* f! O, t, f5 E, y) }* |) k - # You can add a comment as the first event command on an event page to set if
; y2 I7 `& H. g8 }0 H% G - # that event has an icon, shadow or reflection active. The tags to use are
5 m: m- K9 U* c8 R - # below, all must be on the same line in the comment.
% L7 I+ P: @* R4 A - ## a% T* Y5 |0 k) R
- # <icon:id,x,y> # set the event to display an icon (x,y position offset)
0 n5 \( K: _9 E( c2 u - # <shadow> # set the event to display a shadow" q% o* N* x& Q# g( {
- # <reflect> # set the event to display reflections. X0 G, y6 t+ Q$ _1 u
- #* U: U4 [' i/ Z2 X9 ~
- #------------------------------------------------------------------------------#3 E$ n8 o( E* k( |: z
- # EXAMPLE:3 m' n& j! S- u6 }
- # <icon:1,0,0><shadow><reflect> # to show reflect, shadow and icon 1 on event& L6 P/ Z% E: A5 T) _$ H1 {% Y
- #------------------------------------------------------------------------------#6 n, J) v* R0 x+ ?* x. e; W' X
- 3 n' {. G! {( K+ @! D
-
! r3 e2 U) C% l _* w7 Y - #------------------------------------------------------------------------------#, q* j8 Y; @ l4 R3 m% i
- # SCRIPT CALLS:
, k$ ?4 A( A/ H6 x8 l u - #------------------------------------------------------------------------------#
; q, h$ V3 b0 P7 y: `" A - #
' |" f, a: t H - # char_effects(x,x,x,status)
* M4 q! R/ E2 O& O! G - #; I8 [$ G/ t1 v S4 V- w& O& C F3 X
- #------------------------------------------------------------------------------#
7 @6 J. l* ?8 Z, F; \. g - # # each effect can be true or false to enable/disable them during the game.8 G, u; t/ U% n L3 K6 g1 M
- # # you can change multiples of effects at once, x being the effect number
. X! G# M0 [1 [, }2 J0 _ - # # 0 = reflect 1 = shadows 2 = mirror 3 = icons8 @, d& u1 i, n& B' q
- #------------------------------------------------------------------------------#
+ i1 ?6 U5 g* R. `. v - # EXAMPLES:4 g/ a- O( d6 s) m+ I6 B! m" U
- # char_effects(0,true) # turn reflections on+ _7 }# l" z0 c0 O* E1 v
- # char_effects(0,2,true) # turn reflections and mirror on
; V% F" W1 I" i9 h1 X7 t, ` - # char_effects(1,3,false) # turn shadows and icons off
8 k- d- v' `9 o. R$ p# J# u1 a - #------------------------------------------------------------------------------#
) K& \- }7 V- r# R* X% S - #
. {' }" i# }+ p2 o2 ~ - # reflect_sprite(actor_id,filename,pos) # Change actor's reflect charset
5 g! `. d. M5 F, Z - #( h4 V. U |' V& z
- # reflect_esprite(event_id,filename,pos) # Change event's reflect charset
3 X+ Y/ N8 r" ^ - #
; F# g( _! m8 ^& I' b4 w g8 k - # reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
6 d) q# o+ d/ r u9 \0 q) ^ - #, [' h: d6 p2 [$ Z1 q$ b) B3 f9 P1 }
- #------------------------------------------------------------------------------#
1 } `' t% R! Q3 e' a - # EXAMPLES:
9 m' o. z/ d+ v7 x; d' x# b' i1 C - # reflect_sprite(1,"Actor2",2) # change actor 1's charset to use sprite
: ~% }0 T; Q4 K$ Z - # # in position 2 of "Actor2" charset.- @ P3 y" k8 L/ @) E2 H
- # reflect_esprite(3,"Actor4",5) # event 3 will use sprite in position 5 of
$ y0 o3 G8 K% H ?. J - # # "Actor4" charset.
; J! l8 k6 a& Y9 i8 O - # reflect_vsprite(1,"Vehicle",5) # Ship will use sprite in position 5 of) C2 T* \; W6 v' @+ q, z" p
- # # "Vehicle" charset.
& H- `# i9 b- k- v - #------------------------------------------------------------------------------## E* h) [6 K ^9 y9 X
- 4 ~$ B; @2 J! @3 n: U1 z3 o
- #------------------------------------------------------------------------------#/ v" Z. X5 `( Z/ V' R7 E
- # SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
9 o1 P7 h2 r+ E+ L/ M* I7 g - #------------------------------------------------------------------------------#
& C3 B- b# S0 {+ T+ R - ## p: ]" Q$ i. P7 O" _* n6 [, i7 ~
- # reflect(x,x,x,status) # status can be true or false to turn on or off
- V+ ~7 K m: N( M$ z - # # use this to specify for mirror and reflect./ g, o1 @# @4 G' | E
- # shadow(x,x,x,status) # where x is the event ids you want to change
0 @$ K% {) H6 \( I. {% N - # # to change all events use :all f. g. O, X. w) {: e
- # icon(x,x,x,icon_id) # set which icon id to appear above character. Make' Q- W5 L% t2 P" Q3 X9 v
- # # it 0 for no icon.
O, v) [5 F8 ^& r( c5 r7 G0 F5 @: R - #
% ^, \4 F9 x. Y8 @ - #------------------------------------------------------------------------------#, n8 k) o0 B% H; @& d
- # EXAMPLES:0 U. S- B# L% C
- # reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
) C; c4 w: E9 c6 t% i, B% u - # shadow(1,false) # Turn event 1 shadow OFF
" n1 Y; S, p4 F. I3 W - # reflect(:all,true) # Turn all event reflections ON" S# H. T" ^3 j
- # icon(1,2,3,4,38) # Events 1,2,3 and 4 will have icon 38 appear
( K2 B/ P; d' {5 t3 k8 P g - #6 f# t4 I+ P1 f& X, P; K
- # NOTE: All events will default to NO shadows and NO reflections when entering/ a' }* w. D4 t3 b. o
- # a map. This is a design decision to try to keep lag to a minimum. You
$ K7 I/ M( }) K7 O - # should use these effects sparingly and only activate them on events) N( K+ O0 s: ^3 b% p2 f) U
- # that require them.
& m9 ~8 K- k4 l' P" l - #------------------------------------------------------------------------------#
/ S$ {0 V% B) l8 V; ~ - ; h) {) N6 U6 k; G" P6 g3 A
- #------------------------------------------------------------------------------#
3 C& X, a6 l4 I, b9 n e" G" f - # SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES8 w D: S$ k, }# T+ R
- #------------------------------------------------------------------------------#
5 s5 I# L$ i3 ]2 M - #
. W4 i; b$ l* Q& \& J - # actor_reflect(actor_id,status) # reflections and shadows are ON by default 8 f, u6 m8 z; q5 J
- # actor_shadow(actor_id,status) # for actors and vehicles. Turning them off - T( w" R% E9 Y
- # actor_icon(actor_id,icon_id) # or on will permanently change them.
! b* Q- `& `$ u3 H4 r - #: M$ `. w6 m" G
- # v_reflect(x,x,x,status) # use these v_ calls for changing vehicle effects! L8 i) ]1 p, T3 {
- # v_shadow(x,x,x,status) # on and off for vehicles.
# k; g$ k: _) { - # v_icon(x,x,x,icon_id)8 Q$ ]# s5 ]1 Z+ ~+ R' D8 i
- #" W/ E) h. K! U8 T7 E2 [
- #------------------------------------------------------------------------------#. ]& V" N* M* w+ N" b
-
- n, k8 s# ^& _ - #------------------------------------------------------------------------------#) h: N$ @( F& @3 [& Y8 Y3 D2 L+ I
- # SCRIPT CALLS for shadow options
7 n$ |( D+ U4 _ b4 w2 N. K - #------------------------------------------------------------------------------#7 j8 M9 [0 c3 v& n! d5 h3 g
- #( |$ {9 T8 x% E, B5 i/ q! T( H
- # shadow_source(x,y,id) # set the x,y location for the light. id is the 5 P- t. [) _7 b2 w4 O9 @
- # # light source number you wish to change (for& O7 w* ~" Q8 p' V) |
- # # more than one). These are reset on map change.
9 N( p! x, L& V7 z - # shadow_source(event_id,id) # use an event's x,y location for the light.
& }# W: d. }/ }4 Q - # # This will need to be in parallel process if you8 z3 I8 x% |: T
- # # want it to be a moving light.
/ S4 V( n& w1 H ]$ f - ## B* Z+ Y7 U) }4 v
- # shadow_options(intensity,fade,flicker) # descriptions below
v. m; l# p2 \ - #
. M& G# [9 V; C2 F+ ^, F - # # intensity = opacity when standing next to the light source (255 is black)
2 Y7 Y9 ?2 S u) X* P- M6 v' d8 e - # # fade = amount shadow becomes more transparent the further away you are.! B2 @* q `, e/ h6 P, R
- # # flicker = true or false. Shadows will flicker as if being cast by fire.
" w5 Z' U% A( I" _/ G! W% j( @& |+ ^ - #8 K1 L; m0 C* r5 Q
- #------------------------------------------------------------------------------# }6 \! M8 N, T* o2 G9 Q, P
- # EXAMPLE:
' E, w, B! a" E - # shadow_options(80,10,false) # This is the default setting./ n4 j- T' W; x; V- o
- #------------------------------------------------------------------------------#
5 Q, P6 I' i9 _7 U - 5 [8 } E: q7 Y: d( e
- #------------------------------------------------------------------------------#
* f, W; P# ~& o" c$ g) h# n - # SCRIPT CALLS for reflect options
( T% ^$ B% [& A: U( J1 f - #------------------------------------------------------------------------------#
* s' } T/ Y. ?# p- k! } - #
" h7 L4 U1 j y# F4 A9 ~ - # reflect_options(wave_pwr) u7 |9 e7 W4 r- ~4 O1 M9 v. T @4 C
- #
- m$ w# Y) V! t3 }4 ^ - # # wave_pwr = how strong the wave movement is. 0 is off! u3 v1 {* [/ W+ p. |! l# }
- #, t8 L. g$ Z4 R; z
- #------------------------------------------------------------------------------#( _1 s4 @$ ^8 H+ W
- # EXAMPLE:1 K, i( o. _8 {2 T4 p) |2 L1 V$ |
- # reflect_options(1) # Turn wave power to 1
$ d! p5 j6 N, E, }7 W0 G8 ?" ? - #------------------------------------------------------------------------------#" P% k) O( m4 R4 T6 u
- 1 b: N' Z- F( ~: L
-
7 o8 ^$ J* J+ g& B/ Z/ n A2 A( s" \ - #------------------------------------------------------------------------------#
5 [! N Z% @4 i! s$ {) s3 ~ - # NOTETAG for ACTORS) V/ M/ S! v3 `0 M6 w5 [, D$ R
- #------------------------------------------------------------------------------#* f: M7 c# X; h, y" ]% \# k
- #1 L- T9 _7 R0 ~+ D% t2 x6 U# F& ]; m
- # <no_reflect> # Actor will not have a reflection (for vampires of course!)
0 C6 V% m/ K# R8 q - #
9 p$ c3 N9 I: Z0 C/ ` - # <reflect_sprite: FileName,pos> # Actor will use this charset for reflections6 f& @# Y8 @. z4 h/ p- k
- # # and use the character in position 'pos'
0 N% X, N; u/ G; Y2 e% i - #
* _- K' z) ~8 M- F+ C0 E - #------------------------------------------------------------------------------#
) B h; e+ t$ } - # EXAMPLES:9 p/ O; H, z- i+ }/ C- Y" e
- # <reflect_sprite: Actor2,0> # The first character from Actor2 charset
: Y( y" N+ d! L" [1 }) @$ n - # <reflect_sprite: Actor3,7> # The last character from Actor2 charset
3 c2 G% b# C; h( Y& U& ~ - #------------------------------------------------------------------------------#$ R! g. X# Z7 ]' S" s) t6 X# L5 E5 r
- 4 J) M0 Y6 U+ q+ b2 {6 B3 X7 q) N
- $ H2 B Y. X6 U+ G4 ^
- ($imported ||= {})["Galv_Character_Effects"] = true: G; Q8 f! P9 j: u f
- module Galv_CEffects
- D* Q$ ]5 N; i( s -
5 E5 P8 s$ e9 E, C - #------------------------------------------------------------------------------#
$ T n4 s; s8 V* {$ ] - # SETUP OPTIONS
* o3 W+ w, C8 k+ X7 z( s - #------------------------------------------------------------------------------#
" N1 T o+ C* G- y -
: W8 T# N( I; o0 a; y1 G$ g - MIRROR_REGION = 1 # Region ID used to determine mirror walls. Paint the4 o0 k+ p( ?! d2 Q B, I% [2 T
- # region on the wall you want to make reflective (and
& V$ T# g$ X# A; G0 m2 @% M - # then use tiles/mapping that make the parallax visible) q( H* j* a/ Y8 k$ G0 d- `; Y" ^
- " G3 Q# { p W$ l
- ICON_OFFSET = -60 # Y offset for icons that are displayed above characters! R& Z) \! L1 n% E( ^
- 4 a3 ?( {7 L3 t0 w2 V/ L
- REFLECT_Z = -10 # Z level of reflections- Q# N- U: j5 h" I
- SHADOW_Z = 0 # Z level of shadows5 ~: o U7 q" E
-
& M. I0 y/ S) r, L# O/ [ - #------------------------------------------------------------------------------#
4 J/ H" r3 d7 L - # END SETUP OPTIONS
0 Z8 C! U, s) u - #------------------------------------------------------------------------------#/ z2 n, m- E' w8 |! n* b- r. P
- end. v" B! e5 L8 r& ~
-
1 t/ u" r2 B9 c/ f' q - 2 X p1 f; q* s+ G. Q. ?
- & f2 c8 g9 U* ~% {/ a- T) x
- * P- L/ |8 T# k# [
- class Game_Map2 ]5 F+ W. d' h
- def do_icons(refresh = true)
2 j' ^4 ~" \5 I/ _; Y. c" k - @events.values.each { |e|. k. y d, O/ N' e6 i
- next if !e.list
- n' L$ O' [# a t. b - if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
1 `' n# m; B) e; ~3 a! Q! w& W - e.icon = $1.to_i9 k7 M9 Q# T9 l2 b, c/ s
- e.icon_offset = [$2.to_i,$3.to_i]
) Z' S# G) l! y6 f# g - else9 T8 P [# C! N1 h9 P0 }
- e.icon = 0. c+ J! Q* C6 g. F- I/ o2 j& r
- e.icon_offset = [0,0]" ]: ~' c" I) e# m. `- u
- end+ N& M0 N7 l! f5 A& f) Z
- }
, z- Q9 N* H" J! T - SceneManager.scene.spriteset.refresh_effects if refresh; w1 R4 s$ q+ l1 s( |
- end9 D; v: n* ^' z6 F* l# l, y+ j
- " u a5 F+ x5 P
-
$ u- u: u. s; b: l4 } - def do_shadows(refresh = true): z8 \/ } |; n; P7 {- o5 Q
- @events.values.each { |e|
' ^) O" W& W" ?/ j: w - next if !e.list
& c! P; v+ P2 ]2 P. m: R3 U! f - if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
t" J& L" ~& ^7 x0 | - e.shadow = true# k( W4 k, c6 }+ c$ H6 ]2 t
- else
8 ]. ~- N+ i. T. @9 Z7 g - e.shadow = false
, c4 t! e" R. X7 e% {+ y$ h - end
- @) ]- s/ Q2 p' B- N% F: ? - }
( s2 n4 {( ]' z+ _/ @- v! | - SceneManager.scene.spriteset.refresh_effects if refresh
9 ?9 z% T H; n - end
1 c( o- b2 H! d) i$ \% S4 a. A - $ k1 Z/ |- q- r1 r) ~
- def do_reflects(refresh = true)
: T) H: h) d2 f0 X - @events.values.each { |e|
" y* [- F1 s8 } - next if !e.list
6 _* ~# j! A' S: y; } - if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
9 x) ?) N, o. a/ G- Q$ M$ K; l - e.reflect = true* ~5 l* \+ Y3 [& f
- else
2 E8 c# c9 W( c6 Q9 l* N# I - e.reflect = false
3 j$ [2 V9 m( C3 l9 Z4 B0 v/ i) L - end/ |. P6 p/ C& q2 ~- _$ r1 J! a2 X
- }
5 v+ D, q# e# }6 p7 j - SceneManager.scene.spriteset.refresh_effects if refresh0 O. A! `1 w: ~1 \2 w
- end& n9 E- u2 E6 v: m" A
-
: d( ^' L0 I6 T# u - def do_all_chareffects
& O4 s8 W! K6 L. u) P* P; R - do_icons(false)
$ Q5 R) B% A8 |% T# M - do_shadows(false)
; f3 c. d. v* l, B9 ? - do_reflects(false)
4 J6 v4 s/ Q8 \ - end- C& ]7 i! H7 j# h4 R
- ' ^9 }. L3 F* N' ?" o9 k+ h+ ?
- end # Game_Map/ J9 g3 \' `- c7 o: ^
- 1 ?8 O1 h @0 N1 {, @ `* N" J
-
/ l; l2 C: `% v8 @ o; [ -
& U% k5 }+ e) G" u& M& J- w4 I$ _ -
; p3 h2 t1 Z @; t8 i) l% f' W - class Game_Interpreter8 O9 @7 O) {+ r, {9 J, H
-
6 H9 w: \: y$ b: S& S x* Z - def remove_icon( N) U! W7 \3 q# K$ B! I+ E
- icon(@event_id,0)
& d" F* {3 w7 d0 D( m; r - end/ k7 z7 {& e2 H, m. u/ _
- , X0 i6 O2 k" `6 q9 `& x
- #-----------------------------------#" r) P2 u9 @5 ?* J. v
- # REFLECTIONS
$ w. J% _" ]1 j9 a - #-----------------------------------#
$ Z7 [- i& \5 S0 u4 @6 m - 3 r! u; p D! [' z' f, W$ z g
- # Add/Remove Reflections from selected events
7 o( Y' t: }7 f& K9 F b - def reflect(*args,status)
, ?/ p4 N8 l0 x$ K$ R1 i2 b: |7 t) q - char_ids = [*args]
, q8 B9 H# h2 {+ f9 ^ - if char_ids == [:all]
4 M0 g+ |, d1 \% {8 [; b - $game_map.events.values.each { |e| e.reflect = status }
9 } W' l1 }1 G! [: B. K k( Z! Q - else
: n7 \; q6 M' J; T5 G - char_ids.each {|c| $game_map.events[c].reflect = status }
: O ^& r1 R7 i5 ~4 Z3 u; f - end
$ p5 f: A/ R' f - SceneManager.scene.spriteset.refresh_effects
$ g, j5 I. }; K+ O3 |- p4 H - end. _% U7 s3 { K
- 7 ^1 ?. ~1 _2 _% r; D' n& Y0 x
- # Change forever actor's reflect status
! \; m. G: D# _+ f8 ?* c - def actor_reflect(actor_id,status)
6 j2 j: q4 T, T- Q/ z" w2 s$ G) ~/ M4 l8 z - $game_actors[actor_id].reflect = status
! x. Z0 j, R$ ]3 A - $game_player.refresh
2 I" \: i7 v( ^( m% D5 I( C- \ - end# p, M+ T# ?+ e- p: H5 V, X
- ) H* z7 ~& E' B" v/ I' H* ?* }
- # Change forever vehicle's reflect status
! t# H' S9 r4 f - def v_reflect(*args,status); E2 |6 M' K Y5 P- q5 A7 b
- char_ids = [*args]& C+ M2 r1 K$ F9 ?
- if char_ids == [:all]
. H& t$ p; n/ ~/ G: O* B/ D# B - $game_map.vehicles.each { |v| v.reflect = status }
9 W" `3 O1 y: U* ^" k9 Z - else
/ g0 k) u ]5 {# L! {" y - char_ids.each { |v| $game_map.vehicles[v].reflect = status }$ |6 `6 K |6 C9 I \# @
- end0 M& d! \7 F/ a6 o
- SceneManager.scene.spriteset.refresh_effects% ~, w0 _8 E# T8 f# J3 C2 X$ {
- end
, X% T3 K. K3 M; l6 ]) w* E! Y$ d - , P. ]7 Z" s, [5 ?" V4 d! T& d
- def reflect_options(*args)
$ e8 b/ Y, ^$ S1 e2 w6 T" p - $game_map.reflect_options = [*args]! A! e' W3 O) j& c$ Y3 V2 S$ I7 A
- SceneManager.scene.spriteset.refresh_effects/ k. i) S4 T: q; h8 A& i4 V
- end6 M8 n9 | s! Y6 U
- $ |" K" G, d* c
- # Actor reflect sprite change" L/ p5 }2 ~7 S% Z8 j) D; W/ M
- def reflect_sprite(actor_id,filename,pos)
: t2 X6 l, q! M& k - $game_actors[actor_id].reflect_sprite = [filename,pos]1 e- y1 J6 j U2 M# ~
- $game_player.refresh
1 V+ E, t' A: K" ^ - end
+ b) o: e, I3 v3 @6 |- k+ m4 p - , `$ ?9 j' m5 e6 I8 o
- # Event reflect sprite change
# w- V# L/ q: C8 I; m; q7 y+ A# Y - def reflect_esprite(event_id,filename,pos)
a! h% p Q: @9 Q- s6 H* P - $game_map.events[event_id].reflect_sprite = [filename,pos]. M; c0 o# M# j7 @5 P1 D
- $game_map.events[event_id].reflect = true5 b6 v0 J$ L* T+ _, x- ?: f
- SceneManager.scene.spriteset.refresh_characters
2 L$ P+ J( ]4 H& s; m% r - end5 E1 d* z6 P6 o2 M, J
-
# y% B- a6 A) l/ A9 T9 b3 g - # Vehicle reflect sprite change
p' J& q4 V% S4 I( X1 K4 _ - def reflect_vsprite(v_id,filename,pos)
' Q) w6 H2 X# h4 J, M* E) \ - $game_map.vehicles[v_id].reflect_sprite = [filename,pos]
- y+ e* `) o. e0 F% Z - SceneManager.scene.spriteset.refresh_characters
% q# s% ], P. y1 h - end
- ?3 z5 C* Y' k& B7 n - 2 s$ A! I7 f& ^& Q } T2 _
- #-----------------------------------#
9 a% V7 z% T9 D# U9 q - # SHADOWS
2 d Y. ]: N7 n' J; ~ - #-----------------------------------#
5 z( E$ z) b }8 Y' P" U - / u( e# F1 B. l: s: P: g
- # Add/Remove Shadows from selected characters
+ Z1 M- W9 C4 g6 U - def shadow(*args,status)
* D$ A) H( s0 C7 o - char_ids = [*args]
I- T5 {" r4 ^5 q; v: R - if char_ids == [:all]. W1 N% u* G* ^/ P0 M; m6 `
- $game_map.events.values.each { |e| e.shadow = status }
: p {' k1 X6 a: L - else) s# R$ r; f% U7 Z+ c& c& ?
- char_ids.each {|c| $game_map.events[c].shadow = status }
: i( x! M2 H% f0 T - end
6 r1 _* o% ~5 ]9 M2 w - SceneManager.scene.spriteset.refresh_effects5 h t' H4 h5 s6 V, s0 G! a
- end
+ l( r& G, [( M! D - " I6 N2 x0 G6 p4 E/ M
- # Change player and follower shadows! ]3 h2 [$ v" h+ y- Z- u
- def actor_shadows(status)
$ D* d8 A, I6 R* t0 c - $game_player.shadow = status
$ f# q& f9 q+ P0 B - $game_player.followers.each { |f| f.shadow = status }
7 C: V; A5 f) ~9 s# A - SceneManager.scene.spriteset.refresh_effects1 h; B; t9 ^5 E, w. `# t- \+ [/ i
- end
# x3 g% Z; r+ r" ]6 `- ~ - ) B8 F! ]/ X# n b
- # Change vehicle's shadow status9 h9 z9 ]/ f! Q. N. R
- def v_shadow(*args,status)
0 Q: g3 ^$ s* L" | - char_ids = [*args], r4 e; }2 E/ m6 w( v% Q4 J
- if char_ids == [:all]1 Q) q7 y! V0 `1 c
- $game_map.vehicles.each { |v| v.shadow = status }
) r# m1 Y2 ~1 s0 s/ \ - else
S( N' L3 B, f - char_ids.each { |v| $game_map.vehicles[v].shadow = status }
, s. B$ d, E6 G. u% W6 K) e - end
: R4 [* k8 Q& o5 M - SceneManager.scene.spriteset.refresh_effects+ `; Z6 a, r( W E. W0 R) l9 ~" N" \3 P3 x3 ~
- end$ _) ~3 j/ p/ P; t- ~/ M
- " X. _# r7 u+ d0 H- w# _. b) Z9 f
- def shadow_options(*args)
" D8 @. B! G% x - $game_map.shadow_options = [*args]" R5 h4 E4 d- ? S% c
- SceneManager.scene.spriteset.refresh_effects
1 P. l L$ Q2 Z+ u" T7 c - end) H0 c t* V. d& Q3 R4 a
-
- _5 v0 w% C$ u- R, W( z0 h - def shadow_source(*args,shad_id)
- m6 [# p) Z, X, c- Z6 G; U3 h6 ~ - shadsource = [*args]% W- z p' ]7 B3 o: \
- 9 h6 Y# t" p+ u' U! t. F
- if shadsource.count == 1! y) {: `9 h9 O1 y
- $game_map.light_source[shad_id] = [$game_map.events[shadsource[0]].real_x,
$ z$ m8 _ n Y; L0 M) J - $game_map.events[shadsource[0]].real_y]
2 E7 j4 }; b8 R2 ` - elsif shadsource.count > 1
# ~; I/ n( n2 W. B. N - $game_map.light_source[shad_id] = shadsource
& L) H0 i; E- X. Q9 K+ t! |5 j - else# n6 u( f- ]$ y7 a; E0 G! b
- $game_map.light_source = []
4 d1 Y" k y2 u( n7 W, { - end
4 F: H9 K. ?# I. L2 ? P - end! C6 j% @$ u# x
-
7 Y4 @) f: o+ P& K( q: l -
) o. B6 _) O0 m3 w - #-----------------------------------#; \! A# ]+ J5 Z/ u) o8 P" r, \ y
- # ICONS" v h9 m `: h' w0 Q
- #-----------------------------------#: i1 x- ^7 w' @, w1 {
-
/ X9 V( O9 x& M# j% d: Z - # Add/Remove Icons from selected events
: w9 F! a/ |0 U5 R7 c9 E - def icon(*args,icon_id)/ C# [7 q- V& z5 x1 ]& |; `
- char_ids = [*args]9 V; n6 t! U; u: v x0 {
- if char_ids == [:all]
) K' q) t# Z+ _& t @ - $game_map.events.values.each { |e|
: v2 q% Q0 t) {) m" ^ - if e.icon <= 0
6 j8 \% t9 U6 _# j* ]+ c( ~ - e.icon = nil
4 h, A: y" R; f# Y5 W$ x - else; Z3 ] x, \1 z; w x! O
- e.icon = icon_id2 G% U0 M* \/ { |$ `+ j
- end
4 l6 W4 s* n% O2 X7 w8 I0 V* s - }- G7 r/ O$ W' `& Y& ~5 g
- else/ ~; F; J8 Y6 D# {4 n7 C
- char_ids.each {|c| $game_map.events[c].icon = icon_id }
) U" |6 f: y7 w p1 W - end
. w6 G& Z! E+ A P& m - SceneManager.scene.spriteset.refresh_effects
4 C" O: H) ^$ a# G. B. x - end
! N& m, h- g, I5 o& w - 5 F; K: k$ L# ]- R2 u, I
- # Change forever actor's icon( |" x+ n1 _( t Z: y* P& @) X
- def actor_icon(actor_id,icon_id)- N. w, p: ]2 g! p) }4 y: ^
- $game_actors[actor_id].icon = icon_id* m" D$ Z: V; m
- $game_player.refresh
0 o* {+ b6 s: R1 j0 q) E1 } - end
6 N4 i, e; ~1 b: n8 f - ! y0 b, K4 A& n$ S
- # Change forever vehicle's icon- q3 v$ A3 @: q0 `) B, ~
- def v_icon(*args,icon_id)
) W6 Z! K/ q, n' T F. v - char_ids = [*args]/ [" F) g5 u f
- if char_ids == [:all]2 H- s) J+ i; E( O; z) b
- $game_map.vehicles.each { |v| v.icon = icon_id }
& T" _: f4 @/ W: Q, }" ~) a - else
9 Z; ~- O2 ?4 N - char_ids.each { |v| $game_map.vehicles[v].icon = icon_id }7 j7 H& |2 h o2 U/ I
- end
! C* K. q4 q* Z3 z& y1 j7 g - SceneManager.scene.spriteset.refresh_effects3 k' r3 V" d; o% U! Q
- end
/ I0 g, y( N* x+ ?* o% N - % N; q& Y0 V: |# m: ]5 ?
- #-----------------------------------#. t/ G5 G1 N+ f7 g+ E+ K6 H8 D! U
- # GENERAL, a$ q! o) V- |* Y
- #-----------------------------------#
6 O# A- M" x& }6 J' I$ \" U - 8 Y+ y: Y" e2 D
- # Turn on/off effects
/ Z$ K' z4 i/ n3 }" Y, C. R - # 0 = reflect, n1 s, j9 T1 i7 n
- # 1 = shadow$ o( `/ r# J! b. }, F' ]
- # 2 = mirror
; L# F- x( `- p: v" R7 R8 u$ u2 C- o - # 3 = icon
. A- D! R5 H+ w( L -
5 X Z1 V8 W, r6 ?1 F, d* c - def char_effects(*args,status)
# |7 K! g& @* ~4 }* R) o# ? - [*args].each { |e| $game_map.char_effects[e] = status }
0 B( Z; G: `: S5 A( z2 {, a - SceneManager.scene.spriteset.refresh_effects
# V; Y: q; y+ ^& Z* v5 b; T; ^. @ - end
$ A4 _& q* X7 j - # ]0 w. c k Z+ Q3 M: y
-
3 v, [7 _& ?# c6 ] - end # Game_Interpreter, q3 x, u) f* b; j6 o9 r
- - y3 D) Q7 O( _% r+ m; G4 ]
-
# f, i T5 ?9 Y. x3 I6 B6 r - #-------------------------------------------------------------------------------, o8 J2 Q: e6 w3 z2 k. _0 r, v; f
- # Spriteset_Map$ ]0 P. f4 d! [/ B9 G& P h
- #-------------------------------------------------------------------------------
2 M, M$ L/ I. G: w4 I9 f8 K, P -
$ |1 H0 d/ S' w - class Spriteset_Map
$ Z! E* L# a- U8 u* s - alias galv_reflect_sm_initialize initialize9 R: q. V. v/ Q. ?; Z+ o# l. [: C
- def initialize7 f5 p' O2 e, F* n0 {8 N6 l
- create_effects) t* c* C( G V9 O8 b- i3 z3 ]* q
- galv_reflect_sm_initialize
0 f, h3 u1 H! |% P/ h7 p6 K - refresh_characters
1 a p$ M! `! }& w" Y - end, e# R( e) c# V4 x( y# |5 c8 D
-
; |4 h4 c( T. K+ }6 K - alias galv_reflect_sm_refresh_characters refresh_characters$ M5 `# _( z) C" T' T
- def refresh_characters
, X* i2 H8 S8 A& b. \4 S - galv_reflect_sm_refresh_characters
' V; E# z; m; C b, V" Z - create_effects5 | l% y; A) X' d
- end
; B" R! y- d. W5 P! e+ W; C% b: g, G: ~ -
: F9 A3 t, g1 v" m8 ~- _ - def refresh_effects
% T4 p* p0 S* t- m( o+ A/ U& k - dispose_effects
7 z2 W, ~# c; F; \. W - create_effects
! a D( ^! q' G6 t( e1 K - end
F/ {% R1 X. J/ N' K9 E: q8 ]8 J -
& Z: z; D# f0 l4 \, ?) U% h - def create_effects# h( K' O* l# s
- @shadow_sprites = []
8 @; S+ w( {4 _, V' | - @reflect_sprites = []
J, L5 {% {* e" A: M3 W - @mirror_sprites = []
6 R& K/ ~, _8 L4 T# _0 f1 J; { - @icon_sprites = []
0 s1 I5 p; z% d9 J -
* i5 Z q3 `# Q - # Do reflections
" W8 O! b! b9 ^* U4 O$ }, Z - if $game_map.char_effects[0]% E0 j8 X) w/ O2 y
- $game_map.events.values.each { |e|
% a* u U$ X; T. o - @reflect_sprites.push(Sprite_Reflect.new(@viewport1, e)) if e.reflect0 h4 T+ }) C% i/ T: b
- }
8 h5 W: D3 I$ Y - $game_player.followers.each { |f|
I/ |4 b6 k! E8 Q% }0 L9 |, Q8 m - @reflect_sprites.push(Sprite_Reflect.new(@viewport1, f)) if f.reflect; i2 m' f( |& X6 `2 @/ Y8 N
- }
. ?) G0 K/ {- r6 z6 o - if $game_player.reflect
6 I: P( g' K8 N - @reflect_sprites.push(Sprite_Reflect.new(@viewport1, $game_player))
6 c0 f! I- z. I0 y4 r - end6 T. r' n2 a: h
- $game_map.vehicles.each { |v|5 V- d* W6 @. R6 H# H% N/ o; j
- @reflect_sprites.push(Sprite_Reflect.new(@viewport1, v)) if v.reflect. f8 c3 r+ Y. S6 B; r2 L% V
- }# ]5 `' _7 S; \3 r
- end
* }4 L7 n6 }7 R& ~1 c* x - ( O; ?; L* [; X9 ]
- # Do mirrors3 t) Z* p! S2 Q. n# O; e% i# f
- if $game_map.char_effects[2]% |. B, X' E3 ?9 ^. W( R
- $game_map.events.values.each { |e|
7 p% r& U$ k/ A% ]* z! ] - @mirror_sprites.push(Sprite_Mirror.new(@viewport1, e)) if e.reflect% a3 Z( k' n1 S# q/ v
- }, b, ^% K- _2 d) L; `! \- t5 n6 f
- $game_player.followers.each { |f|
; o, l# O1 E0 A' E- V3 h( Q- X6 ~/ E - @mirror_sprites.push(Sprite_Mirror.new(@viewport1, f)) if f.reflect
" L& T) v3 @4 B+ l% c3 J - }, n x" e6 d; l o. v% c
- if $game_player.reflect* u+ A8 P: X* Q# C$ _ f' l
- @mirror_sprites.push(Sprite_Mirror.new(@viewport1, $game_player))
Y+ w9 E1 V0 c: i( e( s6 X) n - end
M0 P+ M2 [8 \* y5 ?2 c0 }8 ] - $game_map.vehicles.each { |v|" Y4 a1 t" ?5 [
- @mirror_sprites.push(Sprite_Mirror.new(@viewport1, v)) if v.reflect
5 |: n0 I5 b0 \# A4 F - }
' _4 A9 N7 u: e2 z6 D5 o - end
5 J. X H. Z; c4 z3 d8 i7 F( P, ] - ) l$ Q0 D* p5 O
- # Do Shadows
& S/ Z9 I+ G& b- p) i- F - if $game_map.char_effects[1]( y: n R: |% m5 H
- return if $game_map.light_source.empty?
6 a8 u" q6 a2 J" [/ H - $game_map.light_source.count.times { |s|. f/ { t4 B6 N8 O
- $game_map.events.values.each { |e|7 D% |" I4 U% g" g: C( F, ?/ X- C
- @shadow_sprites.push(Sprite_Shadow.new(@viewport1, e, s)) if e.shadow
% U" l7 F, D6 G2 T7 ~. r - }2 H0 W% V* r$ l% J
- $game_player.followers.each { |f|
! P% N' K2 K) `) z4 }- z - @shadow_sprites.push(Sprite_Shadow.new(@viewport1, f, s)) if f.shadow% Y% p: L, }' T' J" c* z6 I; A
- }8 s2 X& k" _% A: H4 Y: y: H
- if $game_player.shadow
% X7 |. v7 [8 g9 `: ~" Y - @shadow_sprites.push(Sprite_Shadow.new(@viewport1, $game_player, s))9 D, Y5 v' q# O6 C& O
- end
; Z' A% N% L1 O H+ D# G' E+ ]. F1 g - $game_map.vehicles.each { |v|! K8 S0 x( F; j$ k j) i& S9 \+ y( P
- @shadow_sprites.push(Sprite_Shadow.new(@viewport1, v, s)) if v.shadow
9 d( w. `, {& t) a0 Z7 v5 g - }
/ x: ]+ q; c, w5 L; Q7 q - }
$ F* d! L* W3 D$ H: C$ \ - end
" ]" A6 | t8 h -
) z8 a) `3 G% _ - # Do icons
5 w1 D% L- b% O0 S# Y2 n - if $game_map.char_effects[3]
7 Z# o6 h) ~- l - $game_map.events.values.each { |e|: Q( |2 ^( k+ I2 h7 ]
- @icon_sprites.push(Sprite_Icon.new(@viewport1, e)) if e.icon
& w% Y: P1 X! ] - }
& y! Y! L5 M5 q7 X P5 l7 ` - $game_player.followers.each { |f|# u' a. b" f' S s
- @icon_sprites.push(Sprite_Icon.new(@viewport1, f)) if f.icon! ^5 h2 l" P' u! j
- }+ \# l; Q2 ^# m% T G
- if $game_player.icon; J+ ]/ i! {. M( X. h( h" N
- @icon_sprites.push(Sprite_Icon.new(@viewport1, $game_player))
, E1 m' j1 y1 B" l - end8 i6 ?( g" d0 U: X* G
- $game_map.vehicles.each { |v|, }7 B/ u" v" B
- @icon_sprites.push(Sprite_Icon.new(@viewport1, v)) if v.icon
7 }* @3 C- u6 ^% Z# M0 { - }, n3 M& b# u1 N$ h# s
- end
+ {0 k, E2 H8 D" P; m$ `3 X - end
5 O* Y6 M; P3 D2 k) t - 1 e* X: K+ R6 k8 o, `+ d/ ]. y
- alias galv_reflect_sm_update update
# T# T' q ~3 u6 }1 j/ t - def update! F" X' C% q j; R% w1 Q+ p
- galv_reflect_sm_update
5 W1 `. I" ^) _2 N6 J - @reflect_sprites.each {|s| s.update} if $game_map.char_effects[0]. w* S! i3 |0 C2 t/ J/ i
- @mirror_sprites.each {|s| s.update} if $game_map.char_effects[2]
* p5 R# s# d: { - @shadow_sprites.each {|s| s.update} if $game_map.char_effects[1]
' Z% m# a% t+ Y8 h. S - @icon_sprites.each {|s| s.update} if $game_map.char_effects[3]
: M& ]6 j8 s* y6 y! \" [ - end+ e8 y1 m2 S7 t0 X. f% N
-
# L( h( P9 s4 c$ @% g - alias galv_reflect_sm_dispose_characters dispose_characters" ^- [% B. N; C9 S
- def dispose_characters
2 s, Z2 R7 S! b; v - galv_reflect_sm_dispose_characters
! A8 L2 J x+ [# v9 g - dispose_effects% D. V5 }/ U f \$ ~- `1 u1 M
- end( F/ f+ ^' j6 G: p
-
- \" c, {3 o1 \( a( c - def dispose_effects
) Q/ V5 I8 I/ i' d7 S - @reflect_sprites.each {|s| s.dispose}
6 l1 Y2 b( D' }7 o# x ^ - @shadow_sprites.each {|s| s.dispose}% U0 a: Y( ~* i, {9 ^5 {6 G
- @mirror_sprites.each {|s| s.dispose}5 r2 j, M0 e% M, O) ]6 H! ~- ~& N
- @icon_sprites.each {|s| s.dispose}- [3 @# s# t" ]6 h6 x
- end7 E* C* c+ ~; t- `" Z
- end # Spriteset_Map0 p, m: v; `0 M
-
; ^% M9 m7 p" L0 ]2 d4 A7 g2 n -
$ d: ]2 n1 j5 i* n/ U - #-------------------------------------------------------------------------------
6 A% d6 N- I! X; ?" G - # Sprite_Reflect ' \3 t6 u5 W' J8 o4 B( y( ^4 {
- #-------------------------------------------------------------------------------* C3 U$ A+ h& k0 L3 n2 h2 S
- : [: u2 U4 d% D: U7 j
- class Sprite_Reflect < Sprite_Character
: X* t/ `( k: [9 V7 y - def initialize(viewport, character = nil)
% e w, d1 I6 G' ?0 L! s - super(viewport, character)
' a' j8 \9 a4 e" }0 | - end4 J0 m) }7 A( b2 Y: |7 M
-
! B1 m% d2 S% U1 D% _: ^5 s - def update! N& b& ~& Z! n8 W+ U6 Y! H7 M2 U
- super- Y0 Y0 K5 |( Z
- end
! Y6 ?( D- X% o7 ~! [+ J" m# { -
: k5 l% q0 S# o$ u" g; T - def update_balloon; end+ T: Z3 W; @+ f: G$ N/ f2 Z
- def setup_new_effect; end* k* w$ q) g. P+ b) {/ @$ c
-
6 [9 T& H3 f$ N. D5 b$ Q) m# H - def set_character_bitmap
/ d# c8 N$ S' Q; f- z' Q - if @character.reflect_sprite8 L- [% m4 z6 D9 `) n
- self.bitmap = Cache.character(@character.reflect_sprite[0])
' s& ~+ D: R: Q* V* \ - else
# B5 [, A L+ h) x/ H - self.bitmap = Cache.character(@character_name)7 q2 I3 n5 D" s1 t1 H8 n$ u0 K
- end2 y# ]2 `' b0 U' ?7 M/ h
- self.mirror = true
3 f/ B7 u3 d9 o. A6 S' N - self.angle = 180
3 L+ R- d, w. q, i, a - self.opacity = 220
4 p8 b+ G" f% g2 ~/ v - self.z = Galv_CEffects::REFLECT_Z
8 R- K" Z& ?+ X0 H) C) @ T - self.wave_amp = $game_map.reflect_options[0]0 ~, p8 Z1 Z3 }7 W/ p& p* M
-
- J2 y ~8 A; t# V0 ]% f7 c! [ - sign = @character_name[/^[\!\$]./]
; k% s K4 P/ q) L( }) E$ d - if sign && sign.include?(')
% l% y3 q i# O- h: i# d - @cw = bitmap.width / 3& y' W& ~8 I) N5 p: w
- @ch = bitmap.height / 4& i" s$ b% W3 F4 g) ^$ q. P
- else- N# y3 @, g: ^/ u
- @cw = bitmap.width / 12
: U0 S! S9 J, ]! x5 [: q - @ch = bitmap.height / 8
* j7 |- m4 o$ n( m. B - end
( v3 t7 m! I) R, X8 u7 I$ \- k9 U - self.ox = @cw / 2
; h2 f1 o* a! l - self.oy = @ch0 w4 Z5 ]* T) P/ ^$ V/ R2 c Z
- end
. w- Z! F( U, U6 _* ~ C, U -
& d+ ?1 W4 L! l8 R* r8 b - def update_position0 X& P5 G1 `0 e
- self.x = @character.screen_x7 C/ j1 K# Q; x; R: ]/ k: j' I" L# j
- jump = @character.jumping? ? @character.jump_height * 2 : 0$ |% p: _- z% D# |
- alt = @character.altitude ? @character.altitude * 2 : 03 u' Z) j4 P4 l5 t1 j2 B* m' b
- self.y = @character.screen_y - 3 + jump + alt
, L6 X( G3 n9 l" B, w - end
0 `! r+ k$ _" M! m, `6 [ - 8 d" e; g- {( ?# D0 U4 F
- def update_other
( F$ P: C. h- j% u) [ - self.blend_type = @character.blend_type1 _7 R1 H1 D5 H) v; e
- self.visible = [email protected]7 r* O0 z# D: ^# o* A4 I5 C
- end
; Q1 a2 }4 _6 \9 H# w -
7 F4 q+ ]4 h" [2 ~5 y - def update_src_rect
2 S* A% E" Q8 @! h7 V+ \ - if @character.reflect_sprite* R* y! f% N0 l0 F1 c* s& ~
- index = @character.reflect_sprite[1]% Z/ W2 p" p4 b* b! y2 J& Z& \. x' b
- else' R7 d+ `0 v3 l& c; X" Y4 x
- index = @character.character_index
9 @( d; z- {/ ^, N0 N - end* Z7 ^! U) @ K
- pattern = @character.pattern < 3 ? @character.pattern : 1
, h& l. @3 Z2 y2 |( |, ~ - sx = (index % 4 * 3 + pattern) * @cw/ H0 H/ ^9 _4 p, z" C; P. i. W7 Y
- sy = (index / 4 * 4 + (@character.direction - 2) / 2) * @ch
' d5 [0 j( F; a" L h - self.src_rect.set(sx, sy, @cw, @ch)6 H- E* d7 x, N2 D
- end
/ i/ }9 `2 n" }. B - end # Sprite_Reflect < Sprite_Character7 K6 m+ V* s8 J9 A3 P' K3 A
-
7 ~- @2 a5 d% ^6 K# T6 x/ w -
0 _5 {! P( q# n" i& p: `1 n: a - #-------------------------------------------------------------------------------
! x* D T. p/ c. i - # Sprite_Mirror
- j- g/ B% A4 ], m - #------------------------------------------------------------------------------- z1 u; S6 i& n
-
]9 x! Y2 f U, K - class Sprite_Mirror < Sprite_Character+ c5 C6 n% [+ X: Y, k
- def initialize(viewport, character = nil)
7 P" D! ]5 u" L - @distance = 0
1 d e- c2 v3 q - super(viewport, character)
2 V+ m5 P8 B/ { U/ y! I" F - end" `; y9 {4 N' c0 z, g* |+ v! N
-
1 b) Y7 U: z3 C& _. ], G+ ^" Q: h - def update
) \8 V2 G# S$ t) j, [6 ~/ C - super+ S/ J U+ a0 Z& z# y* o
- end
3 m( ]: |: W5 @ - E1 v6 I+ I0 ^, z; b
- def update_balloon; end+ J9 i) ^% d& K, Y* ^( A
- def setup_new_effect; end
0 ` B' a* a4 U1 W/ i8 o' G - 0 Q* M! X7 Z5 I
- def set_character_bitmap
9 w2 b/ e4 H8 h0 r& `1 f, C - if @character.reflect_sprite
( Z" d* s4 Q( n# {. C - self.bitmap = Cache.character(@character.reflect_sprite[0])
5 h/ p _' |& h) P. p9 U( k - else
( t7 s1 E1 c! n - self.bitmap = Cache.character(@character_name)
9 L* c& r+ q+ o# n - end) z5 L7 |( O0 ]2 p( p; e, T
- self.mirror = true) R! }8 w$ [7 i, Z7 H D1 X
- self.opacity = 255! g/ L1 e$ T' Q% w
- self.z = Galv_CEffects::REFLECT_Z/ c% `2 S. J6 l8 p9 N
- ' L- _) ~: M# ~/ `! f
- sign = @character_name[/^[\!\$]./]
" K) }! w" j+ o/ M# v - if sign && sign.include?(')
2 `) P- \4 W% \% d - @cw = bitmap.width / 3
3 ~9 Y! q7 y* t& M; C9 h; N2 z - @ch = bitmap.height / 44 u9 X+ T. \% i% H7 H6 O- U; x
- else
1 v. O) {$ |& @ v9 P% T7 s - @cw = bitmap.width / 12- T( L- x3 j7 B) Q
- @ch = bitmap.height / 8
9 K! j+ j- R5 F8 F+ p' @3 c, \/ l - end
8 a" j! n$ p5 h! I - self.ox = @cw / 2
. M6 [1 Y% u3 `: c W1 H9 ` - self.oy = @ch- E) Z6 [6 @3 A5 I
- end3 w _/ G# T, I" ^( e
-
8 O# @ K! C1 y) z0 F - def update_src_rect
* t* y) Y6 ?+ m K - if @character.reflect_sprite
# Y& b1 V3 B; L2 x7 { - index = @character.reflect_sprite[1]% R: Z; P( c9 X: B1 q
- else
& V- K6 Q, [ \! y+ A - index = @character.character_index" C" l0 D; w1 \8 E1 H
- end* d: ?3 R2 ?9 R: B& X# ]
- pattern = @character.pattern < 3 ? @character.pattern : 1 B+ _! g. `: s* E
- sx = (index % 4 * 3 + pattern) * @cw- b3 m) X' |- @, R w
- sy = (index / 4 * 4 + (10 - @character.direction - 2) / 2) * @ch/ O& ^5 |5 c5 m. O; b+ f; j6 W0 L5 ^
- self.src_rect.set(sx, sy, @cw, @ch)
; Q2 Q, q; V7 n - end
3 r% h# ]' M2 U -
0 G/ d# I+ ]- K- P+ ]% H3 \6 t - def get_mirror_y
, H+ E- f: V Y4 x0 n4 U% G - 20.times {|i|
2 @6 n, P* q: A- q6 @# d( b; [% ` - if $game_map.region_id(@character.x, @character.y - i) == Galv_CEffects::MIRROR_REGION
4 w# [- r) Y, e% o6 {4 ]' T - @distance = (i - 1) * 0.05
, L" P, A; L* m0 a! ~/ Z* S - [url=home.php?mod=space&uid=502659]@DISPLAY[/url] = @character.y - i - $game_map.display_y + $game_map.height
9 O/ U L' M d - self.opacity = 2552 n7 G4 S+ `( `4 x) j4 V3 A
- return (@character.y - i + 1 - $game_map.display_y) * 32 - i * 47 r" b2 b+ O7 ~
- end I" s9 g. k d6 S
- }
! @) e2 W0 O$ x; [/ R( v' R: W - self.opacity = 0- h( [7 k3 B5 i$ B1 y, |: W* K
- return @ch" x& h7 T. D E6 a
- end
( {$ V; I7 s( m) W) Y8 ~- e/ \1 d4 N - # [$ Z( e; B) |
- def update_position
" m: z4 U8 _7 I7 D3 v - self.x = @character.screen_x5 |# i ^+ ~9 _% M
- self.y = get_mirror_y - 67 e+ |7 ]* g6 A% O2 r4 S# U4 R: \
- self.zoom_x = 1 - @distance, N+ ]" u1 z0 _! S9 c L
- self.zoom_y = 1 - @distance9 K5 G' `+ E. S% a* h! F& W
- end
( B: J) w8 D0 j( [7 o7 K1 D& c# m; A: U -
% {7 ^* \0 J0 ~2 [: I0 f - def update_other+ f& ?+ |1 ^5 z9 [' i/ m5 ~1 B3 u
- self.blend_type = @character.blend_type
$ B2 R2 v4 o% Q" N - self.visible = [email protected]- D o2 n" O( O
- end7 ?: C! J0 Y) I9 E
- end # Sprite_Mirror < Sprite_Character6 R1 n- Y4 t2 d
- : D2 y4 l' k* a( ], Q' U, {7 _
- ( }* Q0 l2 N& \/ u
- #-------------------------------------------------------------------------------
3 {+ B8 [. u) O- N. _1 z0 W - # Sprite_Shadow' Q$ X( u( i3 j. }# Y6 ~$ \0 \
- #-------------------------------------------------------------------------------# H4 w6 m( x- h) g3 x
- 8 p! n" t5 @2 t' w$ A6 l+ l6 m
- class Sprite_Shadow < Sprite_Character# @( K! b: E1 d0 o2 p/ h
- def initialize(viewport, character = nil, source)3 k9 S, O6 s5 o; ^
- [url=home.php?mod=space&uid=14094]@flicker[/url] = 0% Z( w5 R, M, r. x. J: |# W
- @famount = 08 n' ^+ z6 U5 a; U- p6 m w9 S
- @aamount = 0
- j l& t2 d+ a; z" ? - [url=home.php?mod=space&uid=171370]@source[/url] = source
0 |9 w& ~2 ^2 Y/ _- _1 E - super(viewport, character)% J& N& ^9 z5 h, d8 J. e( F
- end& @3 m9 E* m( e5 n: R
- 5 u+ c# l; ~2 l1 b
- def update_balloon; end
9 R0 k3 r, _8 S3 }- i - def setup_new_effect; end0 U% W2 ?6 b# H) O$ Q6 ^- I
-
( K) O8 t/ S+ N5 V: Q @0 h/ k; F - def update5 s/ y3 J; H6 P# \: D
- super
; F( B" A/ ?% n- Z1 i - update_bitmap' a% }& u1 B2 L
- update_src_rect2 S# d5 x! y. a; @8 w, q
- update_position
& ]$ v1 g3 s0 q# ^; w- [ - update_other$ n9 A. J6 m4 a7 Q* e) i9 g
- update_facing8 B2 k* t- i4 K9 H& y
- end
0 x; C1 ]" {7 [. h -
. \* v: x( ~* T3 ]& d$ O - def set_character_bitmap
) r! M2 a" }9 {0 ?1 J3 p - self.bitmap = Cache.character(@character_name)
* X- l% l" J- `+ [7 C8 V - 4 n0 r8 a# |( \! `% S
- self.color = Color.new(0, 0, 0, 255)
/ S( W" { d- m% T: x" p - self.z = Galv_CEffects::SHADOW_Z
0 R# `! {) k6 d6 Y4 g) ?& l - self.wave_amp = 1 if $game_map.shadow_options[2]; a' Q5 b+ A$ r" B$ m; W) {
- self.wave_speed = 1000# o4 d7 @: l0 y8 |" o* \: S! C: ^
-
8 y4 x G5 M1 i5 |7 i9 j6 P3 i - sign = @character_name[/^[\!\$]./]9 p' {4 u0 D! l; b' E7 `) m, s
- if sign && sign.include?(')7 j O. q; O, F s
- @cw = bitmap.width / 38 ?/ t- [& {8 u% {: o6 h0 Q& {3 D
- @ch = bitmap.height / 4" [: |; W8 M! q( X! i& J- H
- else0 ?9 P4 [. f" e% `2 ^
- @cw = bitmap.width / 12$ H7 X; o# I0 |9 W* W
- @ch = bitmap.height / 8
6 w5 J2 x/ ?1 h# U2 q - end
8 r% g" g6 r- @! Y3 |* E3 { - self.ox = @cw / 28 d4 r/ _ h5 C6 F* {% M. o: \
- self.oy = @ch
! U( S; g: Z/ |1 ?( z* k7 I. J - end2 P$ U( M! Z) y
-
' ~; k0 m/ r5 x' w9 n9 n% f - def update_position/ C, Q# ?9 r [6 v" _) j
- self.x = @character.screen_x
. h5 `9 J+ ^( ~8 j0 U; t- e - self.y = @character.screen_y - 10
! X) U3 F, w$ q2 F3 d- g v - get_angle
' Z8 A- v# h9 p2 o - end
( r, o- V0 Y; Q, n2 k7 t8 n - # v8 @- B; M) s. ?- }
- def get_angle z- n2 Q# `/ Y/ |9 @- @
- x = $game_map.light_source[@source][0] - @character.real_x
5 }1 ]# w1 P6 ]( } - y = $game_map.light_source[@source][1] - @character.real_y% f, o( J9 Y4 S3 y" m! T
- self.opacity = $game_map.shadow_options[0] -
+ n1 U" \6 X. c - Math::sqrt(x * x + y * y) * $game_map.shadow_options[1]
% R* K3 \9 O0 C4 [' | - * @3 N0 C- h# K8 d: L
- if x == 0 && y == 0 || self.opacity <= 0
; F4 G! Y$ u& `; k. E - self.opacity = 01 q0 v: e( A) ]2 |( x; H4 C6 \
- else ; t; i6 F1 I, n& D4 C7 u0 p/ S
- self.angle = Math::atan2(x, y) * 180 / Math::PI + @aamount
5 d* o( G" J' J9 z$ l) T9 A' { - end
5 f) J& q" t, `/ u _ - end; ?: H$ X' i9 B( M
- $ c' K1 G% H0 x
- def update_facing3 i8 `+ Y! p4 p$ i0 H4 }
- if @character.y < $game_map.light_source[@source][1]7 ^& t5 U& ^( ~! T
- self.mirror = false0 c! ^% r- u/ x* P
- else
7 g9 |2 p9 v2 b) ^8 t! r) l2 j, S9 F - self.mirror = true' y6 O* p, s5 ~+ n/ E% C
- end: D- u4 P% K+ l0 c: K( O* z+ E
- end
4 q" B9 q) l2 q: y - + ^4 i% p% D" b2 ]' }! N: R. a
- def update_other* R/ O0 J9 O2 c0 S. V
- self.blend_type = @character.blend_type6 L6 a6 e- ~) W Z) V7 ?+ r
- self.visible = [email protected]
) f: x8 f# {* G7 M- ~8 n8 c - end( N- s0 W! j0 i7 ~9 v3 }: z
- end # Sprite_Shadow < Sprite_Character
4 }8 ?' V" q. U* n -
- I; P, W9 i% d- m4 j9 Z' k# n -
e2 \8 b) e e# `+ x) y3 D - #-------------------------------------------------------------------------------
* A1 o* J: z9 _3 P - # Sprite_Icon$ R8 R, O: {# c: ?. p
- #-------------------------------------------------------------------------------7 f3 k8 w2 P, _% v
- ' t W. Z' _% }
- class Sprite_Icon < Sprite_Character% [+ z# \8 v% }7 u
- def initialize(viewport, character = nil)2 _$ m' {; Z n3 o4 X
- @icon_sprite ||= Sprite.new
- ]0 a/ v2 n2 R, j6 }% K7 _+ y - @icon_sprite.bitmap ||= Cache.system("Iconset")
7 e4 A2 j1 [( `& r7 n1 z - @icon = nil
4 {! s$ B! H+ G, ~- ]- k& `; v - super(viewport, character)0 j' q* ~. {: T# l
- end
& j. t+ W* `. I+ V9 E, p- ` -
7 b) ?$ S7 y2 E - def dispose
5 N/ X5 O7 c+ l) G h/ K( k; ^; ` - super
( W- L8 ?, q! H; b5 g! O: S, Z4 x7 B - if @icon_sprite
' c P& j" C3 L1 Z; e - @icon_sprite.dispose t8 y* F& K# R
- @icon_sprite = nil1 B M/ t. f/ E7 u7 [% }$ h
- end, v% b/ W5 |7 b, z! X! ]' i' K
- end
( w" Z. [5 E* d) l - 5 h; V) l" _5 W) ?
- def update4 e* h- X* C' V+ X2 F( T5 N
- super3 e: C0 ~% y! D, M% T
- update_icon# z' E/ a8 z, G$ P; e+ }
- end
; j3 A& ]& l) g, F' o% b/ I! V -
2 p+ O# _0 v& ^2 p/ g - def update_icon% D4 S, W" r" e* ]2 W- \. w
- return if [email protected]2 T" y6 E$ r! ?6 r$ ?. \6 f
- draw_icon(@character.icon)" X& c6 @' A6 g) l4 Y: S; O
- end- r* x) Q& a9 c% G1 k; N) @" E% K
-
' F1 R$ G4 i3 C - def draw_icon(icon_index)
! ~4 Q! S: K4 e" L! d b - return if [email protected]?
4 x( d8 V5 s. T7 R - rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)' y7 K! P* ~5 a( V& s
- @icon_sprite.src_rect = rect3 n2 K! u" \; I
- @icon = icon_index3 d4 M! [& C* s7 Z
- end
4 M3 d4 w6 p0 {9 H+ W - ' Y g8 k0 I4 ], r5 r( ~" s
- def update_position
; Q' m6 M8 Q( O7 E* k% e - @icon_sprite.x = @character.screen_x - 12
* I Q7 q$ q! U% u: }# V2 ^ - @icon_sprite.y = @character.screen_y + Galv_CEffects::ICON_OFFSET& U; t2 T' |5 t1 b" e
- end
; u# Q( o& u8 S0 F( W - : {( y1 ?* ?. p2 Q" m1 A9 C0 T) J O7 U
- def update_other; \ H3 j5 }$ K
- self.blend_type = @character.blend_type- U9 a7 {8 e. _+ p3 U4 ]3 h$ a% j
- @icon_sprite.visible = [email protected]1 x5 h) s6 }4 P3 p
- end* _, r/ ?# [3 L% U: q3 ^0 @
- end # Sprite_Icon < Sprite_Character
/ D7 F& @7 }8 j) r5 v - 2 j7 ]7 a+ f3 Y9 @8 v8 b" {
-
3 w" O* D, [1 F7 U - #-------------------------------------------------------------------------------
, v& k: z1 X- ~* D - # Other Stuff
/ q1 G6 V: N. b8 X3 Q6 a: k/ X9 O - #-------------------------------------------------------------------------------' m u5 \" _9 {: B/ D* ~+ }
- " N4 I/ d% i+ w2 v0 J8 ]
-
" [, F1 N9 e9 v2 o" y- W - class Game_Character < Game_CharacterBase
5 }/ K7 f( _0 \, ^+ [. n( L - attr_reader :altitude$ ?: X# w# I% D i- s( c3 _/ n
- attr_accessor :reflect; o1 P' C5 q) R+ E
- attr_accessor :reflect_sprite
. E6 z# b) P; L4 @( L - attr_accessor :shadow$ @+ Z: [0 I- I' A
- attr_accessor :icon
" k% V" O! {+ k3 L- J* e* m - attr_accessor :icon_offset; c9 A( n, `( [! W
- end
6 \# [/ b4 ~+ ?0 C' f& l - " i! F/ n# C5 d3 z3 e: Y' e
-
+ D' J$ b0 @! e9 F - class Game_Event < Game_Character
$ L5 |7 C0 \: L8 z1 v - alias galv_reflect_ge_initialize initialize
: x$ c2 N7 g! b& n7 e8 b - def initialize(map_id, event)
. U' r6 t- N& a8 T% B% a* R$ l# c - @reflect = false) j* U/ n. J" r* B$ E0 G5 l
- [url=home.php?mod=space&uid=31758]@Shadow[/url] = false
! H- w1 b/ A/ N. F3 [- M" @ - @icon_offset = [0,0]; c+ ?0 z+ L7 k5 J" V
- galv_reflect_ge_initialize(map_id, event)
* i! B6 [0 J$ N! O - end0 `3 S' d" }+ n# K# v
- end # Game_Event < Game_Character
/ m( F, Q |2 c) ]0 @ - 1 s+ \0 ]8 ^, `, p6 g$ x. y, ?0 @
- ! L/ [/ v o& B0 [
- class Game_Vehicle < Game_Character+ p& ~( W) B5 X" C6 z3 z+ `5 @4 |
- attr_reader :map_id
0 P* W2 t% r: N -
" N E. c/ ? p. ]; V# ^; _ - alias galv_reflect_gv_initialize initialize/ I5 F: f4 V3 C% {
- def initialize(type)4 f' j' t( F% f' K, G5 Q, I" P' u. K
- @reflect = true
$ J' B' H( V, V' H4 g - @shadow = true
% @( d. A& ~2 U: L2 X - @icon_offset = [0,0]' Y1 Z0 F0 {- f) D1 w% r" X
- galv_reflect_gv_initialize(type) K" _" r5 N8 p8 V& w4 m
- end
4 j7 a, {" u ?: R - end # Game_Vehicle < Game_Character
) Z! A. N* H o$ Y3 z( G - $ q Y, A2 Q9 h) r
- 1 v: Z" r+ T0 @2 _; ^. w ~/ q
- class Game_Follower < Game_Character
) S" ] i/ F+ k- n, t$ c - alias galv_reflect_gf_initialize initialize. g% V; z$ m, o
- def initialize(member_index, preceding_character)
" ?) D4 i! v6 U7 D; Q4 p - galv_reflect_gf_initialize(member_index, preceding_character)
5 Z& V9 M1 g0 w0 I- p+ S& P. d& `! [% O - @reflect = true
' h& ^7 P. I) n( B/ [0 v9 w( J( N - @shadow = true
3 V, p( U3 q. | - end* |; Q% m* e4 M& I" z
- " c3 s) O: m5 j7 _2 {9 c) [
- alias galv_reflect_gf_refresh refresh& j2 e# {+ z# }" M% c9 L# x
- def refresh; c( N! B% U6 @* X: b, S
- galv_reflect_gf_refresh
- [; Z( `+ a. W0 G5 B( u$ G - return if actor.nil?9 C6 |/ x3 L# g, n
- @reflect = actor.reflect t# G! d; a# z* ?
- @reflect_sprite = actor.reflect_sprite
2 t2 p/ J( X0 t - @icon = actor.icon
& {0 W j5 y; s! ? - if SceneManager.scene_is?(Scene_Map)
0 G; {$ j2 p8 T6 w1 Z3 ~ - SceneManager.scene.spriteset.refresh_effects
9 [+ n, p0 v$ K( j) C - end
) C3 F, } |. H4 M - end
( e S' \6 }% g; P! O6 y7 _ - end # Game_Follower < Game_Character
5 O4 j, f, J- G3 ^$ A3 p @ - 3 G# F/ l) }: b! o' R
-
$ j6 q% T! @1 o6 l - class Game_Player < Game_Character
* ^* V; f" {; [5 ^ - alias galv_reflect_gp_initialize initialize
& `) s% j" }# i. K - def initialize
/ @# f! x% V" r" C6 V9 q - galv_reflect_gp_initialize
4 V$ W8 @2 q% A - @reflect = true) A, C2 @. T+ X
- @shadow = true! J9 k0 H0 C8 ^) o
- end
( Y& B' i L- b5 ^! u) w - . E7 ^8 Q0 o5 P: `$ t
- alias galv_reflect_gp_refresh refresh9 x' N( q& s9 Q
- def refresh
0 u& \$ U+ P! y9 n& ]6 D - galv_reflect_gp_refresh1 T) f$ X1 q0 l6 N
- @reflect = actor.reflect
+ w4 d) r" v1 A2 O, D - @reflect_sprite = actor.reflect_sprite
) V8 ^3 x# s. k$ s5 i - @icon = actor.icon
1 f/ S; n) c. ]4 f7 b - if SceneManager.scene_is?(Scene_Map)0 ?6 r/ Z9 e# |5 M& F' ~* x
- SceneManager.scene.spriteset.refresh_effects3 {7 k# F6 _6 i
- end
+ W0 _% |, ^& f; B7 W! K - end6 u/ k! h% N0 B( Y' C: U
- end # Game_Player < Game_Character5 i" y1 d* q0 f0 s" O9 y1 v9 t2 X
-
. t) n9 U# h! j* |4 A3 v7 p - % Y9 V3 E; @; u" ?+ B
- class Scene_Map < Scene_Base' F R$ G: ^; @) K" _( E
- attr_accessor :spriteset
6 ]8 J+ b1 J) G$ G5 z2 |! M4 { - end # Scene_Map
- f' A+ {' Q1 Q7 t5 s- o - 2 S, E; F7 Q9 e% |. d
- 4 K2 ]3 J' E. f
- class Game_Map+ i, |0 E! q6 a7 \- _
- attr_accessor :char_effects! U3 k0 w" }! e( g5 R, ?
- attr_accessor :light_source
/ H' K1 k2 r1 o1 p- T# O - attr_accessor :shadow_options
+ d( a/ m- d/ w& O - attr_accessor :reflect_options
' y. j3 c8 n3 K3 m) \+ o - 0 z d9 V# V3 _. n. z' P7 ~
- alias galv_reflect_game_map_initialize initialize+ |# @& ~, c5 Q8 e- ^ y
- def initialize
) M' o g7 B Q7 {; N5 {: ]4 Z - @light_source = []
8 a4 K" [) a9 U' l/ S$ S' E( K - @shadow_options = [80,10,false]: |2 B6 r2 f! i+ ~3 m/ T7 w3 P% H
- @reflect_options = [0]
6 d# F5 Q. i; }5 `" M7 x0 x9 q7 \- D: E6 E - @char_effects = [false,false,false,false]4 a3 _9 a8 K* @' s, Q. R3 z7 }
- #[reflect,shadow,mirror,icon]3 D# |3 B1 S a9 Q7 @
- galv_reflect_game_map_initialize
2 q# \6 F3 K# f5 Y, D9 x ?4 M - end
3 q# \7 W8 }0 ?+ I+ p+ m -
2 }. f, F3 C2 t: F3 R -
* L4 [' U1 d- N+ d - alias galv_reflect_game_map_setup setup
) [/ `: V" c+ @; v7 P - def setup(map_id)" K {8 G1 k, a9 q+ Q i
- galv_reflect_game_map_setup(map_id)% |) A/ V8 D$ m- ?
- reset_char_effects
6 y: W% {% w3 A) i9 t - do_all_chareffects
# k/ v$ M/ p: e3 o- m - if SceneManager.scene_is?(Scene_Map)7 S7 O6 N$ H3 I9 H0 u2 r8 ~
- SceneManager.scene.spriteset.refresh_effects
% u5 U; E, \7 v$ q - end' E1 S; H3 ?2 \; X( O
- end& }1 ^" a' ^# p
-
* a0 G: J1 j/ k& {) @ - def reset_char_effects1 ~' L3 s" G: e" }0 t
- @light_source = []
2 f" x( r6 ]2 i; h - @events.values.each { |e|8 E( Z+ C1 V N* H
- e.reflect = false7 Q8 _- W3 B( ]" x; d' L3 m7 r
- e.icon = nil }
" J+ y8 ?2 K* N* p/ F; p( n - end7 H% g C; [( E/ c- Q! k
- end # Game_Map
; U6 D, E* L& \. i, {$ R - 7 Y7 k1 i7 a; E+ E1 R& ?" G# J
-
' t/ r/ J, K0 l$ P6 z/ r - class Game_Actor < Game_Battler
y& t5 b$ f2 Q' M! H - attr_accessor :reflect# i( M9 q) X' C: Z0 H
- attr_accessor :reflect_sprite+ [% i7 J( Y2 P7 z: S
- attr_accessor :icon2 p# N2 R; T* I; W: J8 T0 v l
- 7 Q0 d8 ?0 Y% r+ m
- alias galv_reflect_game_actor_initialize initialize
0 H5 P- G8 d4 y% Z8 ?8 d; x - def initialize(actor_id)
- n. E9 X7 a9 O - galv_reflect_game_actor_initialize(actor_id)
& B, u& U6 E) f! T6 ~$ c - @reflect = $data_actors[actor_id].reflect
R2 H2 u9 V. ]6 D5 {/ u8 J( E - @reflect_sprite = $data_actors[actor_id].reflect_sprite
* F. u& h% E9 H: H - @icon_offset = [0,0]
# H% Y. _1 s8 T- k- _ - end
: K) G1 G9 B1 }6 j - end # Game_Actor < Game_Battler+ |" Q5 M' J8 h/ T2 ?' G
-
! s- {9 {7 |3 E5 L -
N- ?% _+ G3 Q" h, K - class RPG::Actor
5 X& l& p. |% D5 r: ^ - def reflect_sprite O6 t% L* x. T& r4 n& h& u
- if @reflect_sprite.nil?3 n+ ~: e& @$ E0 v, g' e
- if @note =~ /<reflect_sprite:[ ](.*),(.*)>/i0 e) M3 N% ~4 [2 H# c
- @reflect_sprite = [$1.to_s,$2.to_i]' H- c7 I& P$ Z
- else" ?5 a& y& _% e0 L: a
- @reflect_sprite = nil8 Q) Y* G4 M/ ~/ U
- end
- |3 e# W- ?) U+ i" D; |, B - end
6 l9 I7 v# N: y& ^ - @reflect_sprite. U. s6 {0 C) L, }; f
- end
+ n- }& H' h1 u' O$ |3 @ - def reflect! W2 K h( ~+ q2 a; V7 w
- if @reflect.nil?
* n; U, T& `' j. k4 O# A - if @note =~ /<no_reflect>/i/ c/ R: b8 {) I* h$ D& n& y% Y
- @reflect = false4 R; p U3 [" r( F p9 b: Y0 k
- else/ h$ K4 I, ]4 K8 ?& V
- @reflect = true
/ Y( u$ J1 i4 w. N* F) l& D" ~ - end
) B, P1 t% N7 d+ [/ |$ @ - end9 `6 P! G r) N+ }& K$ `
- @reflect
+ m; F4 [( C* c% j& f6 L - end0 j* n5 F( m- X) Y6 s( L
- end # RPG::Actor$ `! s& D2 y+ p; ^$ J) ?
复制代码 |
|