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

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