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

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