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