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

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