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

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