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