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