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