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