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

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