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