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