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

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