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