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

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