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

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