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