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

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