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

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