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