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