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

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