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

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