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