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

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