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

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