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