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

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