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

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