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

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