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

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