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

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