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

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