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

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