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