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

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