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

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