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