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

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