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