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