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

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