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

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