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

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