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