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

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