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

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