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

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