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