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

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