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

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