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

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