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

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