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

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