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