设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1367|回复: 2
打印 上一主题 下一主题

水面动态倒影,求解

[复制链接]
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
跳转到指定楼层
1
发表于 2014-6-25 11:31:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
代码复制
  1.  

) D8 v0 n$ R4 H9 i) ^7 ?/ O1 k  |这个代码怎么用啊,有大神知道吗。我从国外找的。" S5 N3 |1 G- v) t$ L
http://galvs-scripts.com/2013/02/21/character-effects/
, X0 F0 o4 }  E: e1 Q是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    0 M* C8 R! ~9 _+ Q  Q- r  y
  2. #  Galv's Character Effects
    * G) b/ m% U; S0 V$ ~
  3. #------------------------------------------------------------------------------#
    ' m- s2 [/ k0 {8 Q7 g8 |6 G# G6 w$ E
  4. #  For: RPGMAKER VX ACE* E* B' Z2 K7 D) t6 w
  5. #  Version 2.18 `( L" d1 l$ Q: H4 r, \$ Y; ?
  6. #------------------------------------------------------------------------------#+ |& j0 ?4 A6 d2 J/ F
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    6 @: w6 Y5 U# X1 y! L) w9 O3 L" Y0 y
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    / D8 i% L( |6 e. p/ ^
  9. #                           - Fixed shadow facing bug
    6 t8 q8 d5 U& u# X6 F) K1 ~5 T: w& L
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    * Q7 o( R* J9 C2 S' ~  q  N) l
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows. D6 m9 x4 ^6 D* [
  12. #  2013-02-22 - Version 1.7 - bug fixes  |) z9 L, d/ k- }9 h, \
  13. #  2013-02-22 - Version 1.6 - added icon effect+ v5 P" l2 K" {) ~/ ?8 M
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    % K9 D4 [; h$ {4 I) y
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles2 U, W4 _, v* R) C# A
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks4 _/ E. |0 v! T- n/ q/ w
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)! a* s. f7 y% E+ R. f' ?
  18. #  2013-02-21 - Version 1.1 - updated flicker effect0 H4 r* l, q/ S6 j, ]) \$ c: U
  19. #  2013-02-21 - Version 1.0 - release6 `% B9 s' X. G5 O" V( S" U
  20. #------------------------------------------------------------------------------#
    ( ]6 t! d& T+ h- X" ?" I1 q
  21. #  This script was made to provide some additional effects for characters such: d0 l: d' P1 P- F% d
  22. #  as events, followers and the player on the map.
    : ?# {" z' }2 [: K7 r+ p' i9 F/ l. i# Q
  23. #  Currently it includes:
    ( F  W( y! _: t6 l2 W
  24. #
    * p: Z  i( l7 R4 Y
  25. #  Shadows! v& F4 [* J6 t* z) L: b& B8 U
  26. #  Shadows that appear under player and events in a directions depending on! Q2 L8 e/ [' q( ]
  27. #  a light source that you choose.
    2 D! U/ r* I& h8 i+ w5 }4 a5 e
  28. #
    1 G* l# a' o8 T6 Q( ?% J' i! {% x
  29. #  Parallax Reflect
    # B' s; w" p5 }- g
  30. #  Reflections that appear on the parallax layer for events and actors to be
    : [- D5 d8 m% e% I; Y+ K4 `
  31. #  used for things like reflections in the water or glass floor etc. To get% V0 A; s5 [  \
  32. #  effects like the demo, you need to edit the charset graphic to make the water+ e+ T% {5 P4 K7 {% }
  33. #  partially transparent.
    ! J2 y/ T( M# g$ R
  34. #- ^1 N1 ^7 S7 p
  35. #  Parallax Mirrors
    5 E; o/ H( q$ N( b* G& I- A" R! }
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    / B8 ?( o! v& v! O
  37. #  on a wall designated by a region. Both mirror and reflect effects can be* l. [" y+ S( h2 T9 ~3 ?
  38. #  changed so actors and events can use different charsets for their reflections" |# E% ~: \# }2 m; J0 M/ B- i" f6 H
  39. ## A+ `7 E4 L0 \
  40. #------------------------------------------------------------------------------#
    1 \$ T( B# h, T  v. Z
  41.   
    2 Y( ~; j6 y5 g8 n  l! {
  42. 1 A- A" h$ Q/ ], P
  43. #------------------------------------------------------------------------------#' a1 I6 C$ S& y% k' c
  44. #  NEW - First event command as a COMMENT
    3 x0 A% J: G. i
  45. #------------------------------------------------------------------------------#
    1 B( d6 _& _; i/ D0 k
  46. #  You can add a comment as the first event command on an event page to set if
    $ t9 f1 y7 ~6 B. _5 M3 M, V) }
  47. #  that event has an icon, shadow or reflection active. The tags to use are2 y. ~7 I0 I* R5 C* n) s
  48. #  below, all must be on the same line in the comment.
    5 H1 R  e/ Z1 X
  49. #$ o; H9 y5 ~$ E5 j( m
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    ( E1 x  ~3 }& z/ f  v; [
  51. # <shadow>           # set the event to display a shadow
    % o4 w6 A2 f1 R: G0 |
  52. # <reflect>          # set the event to display reflections( ?7 G8 |1 b+ m* g
  53. #
    7 W( Q, e  e$ P5 k4 t
  54. #------------------------------------------------------------------------------#. M9 K8 l1 M  l+ {/ g+ N
  55. #  EXAMPLE:) m# R$ R& k! ~6 Z. i
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event+ C* b' ~) w9 h( H; r
  57. #------------------------------------------------------------------------------#& m( r9 J" c& U( Z9 ~, \
  58. / T0 y$ z4 O* M& t/ a5 o  |4 ?
  59. 2 v; i0 G1 |3 p7 A+ D8 d" i
  60. #------------------------------------------------------------------------------#
    ! r& ?, z+ y& Q$ M4 f
  61. #  SCRIPT CALLS:( Q9 ]. G0 s& D9 |
  62. #------------------------------------------------------------------------------#
    : L# e% V: V! l8 U% N
  63. #
    ' @' n6 A. w& C
  64. #  char_effects(x,x,x,status)- ]- `; z2 U! X9 {. J! {* g
  65. #& Y2 l9 l& I! v1 J
  66. #------------------------------------------------------------------------------#
    7 ?# Q7 ^" d, e5 g
  67. #  # each effect can be true or false to enable/disable them during the game.: c$ \1 [" i5 k
  68. #  # you can change multiples of effects at once, x being the effect number
    7 b6 _, o: J' n! X0 n9 s1 z$ N/ Q
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons4 B$ i& I" g, s
  70. #------------------------------------------------------------------------------#
    5 n$ k# {) W* w$ i4 V& T: s
  71. #  EXAMPLES:
    % ]' k3 O& i6 c' \* E8 J
  72. #  char_effects(0,true)              # turn reflections on- p- F9 Z/ H$ U- ~
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    & R5 O. d- z& l5 r7 g2 K  G  P
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    ! A/ _, b- B1 u9 P) y
  75. #------------------------------------------------------------------------------#3 r% A: L/ n/ B4 a2 n# M4 p. C0 h
  76. #
    $ k' P1 W$ b6 j* ~; ?
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset" d# I8 G( }5 {7 G/ ]* \
  78. #' n/ k4 s* v; |5 W- ^& s
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset. Y' X; N8 Q% ]0 h6 s9 Z
  80. #& w9 ^- G8 s6 I8 v  M
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    8 G% V7 g0 g8 J1 Y/ a
  82. #
    - v% g9 l* [! G  B' u
  83. #------------------------------------------------------------------------------#
    " [0 M! A+ i9 v3 C
  84. #  EXAMPLES:
    + a. l9 o4 T/ H, |9 S: T, w( ~) f9 p
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite, k; L2 M" w9 D7 P% P
  86. #                                    # in position 2 of "Actor2" charset.
    / N1 O& V# H- _+ j
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    : [/ J4 A) b- y. J, c& i- T$ f8 l5 h
  88. #                                    # "Actor4" charset.& i4 E! i7 F& u6 L* _9 H
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    9 z; J- @, B2 S0 g2 |
  90. #                                    # "Vehicle" charset.
    3 m& F5 x% U9 \# x$ U* Y! l
  91. #------------------------------------------------------------------------------#% @2 i- A6 D- S/ q0 P" `, }2 c8 {
  92.   7 `+ o" v: V7 i2 r0 g. W
  93. #------------------------------------------------------------------------------#
    2 R7 u, y$ ^5 ~/ o5 Y
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    0 y( x6 ]- W* e2 v$ b5 ?2 E
  95. #------------------------------------------------------------------------------#
    $ N( ^) c1 l6 d
  96. #
    4 ~- K) E$ G4 d) v
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off( |) T9 a9 x* X* o( X$ U+ s) o
  98. #                          # use this to specify for mirror and reflect.
    6 f4 _2 k, m+ z4 P/ R0 i
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    8 _: r1 q$ b& q3 X' M2 D) Y! m7 j; l
  100. #                          # to change all events use :all; G0 t; d7 F% e
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    8 F, m5 T/ B4 O# q# {
  102. #                          # it 0 for no icon.
    / m/ ^5 n* i, D" J5 A
  103. #
    # v) Z' S: c# g
  104. #------------------------------------------------------------------------------#6 v# D2 x$ T  v+ g
  105. #  EXAMPLES:
    # E* |. w8 I$ @; ~) Q) d( ~4 a  ?
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON# L- B% S. O! D4 P, n0 A) l8 I
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    9 R- I( o+ _% I' `3 Q0 G; ~7 R
  108. #  reflect(:all,true)      # Turn all event reflections ON9 Z9 C8 ]- U! S% `1 H; K
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    ) L: U% Z: ]7 N8 E2 s6 H
  110. #0 d( K. S* |) ^
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering, F' s, ], X: c( G0 J
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    + R% r) i2 O6 v% R) F5 t8 {- |
  113. #        should use these effects sparingly and only activate them on events
    + V8 C; ~% Z# ?$ F/ A/ T- n$ Q2 ?5 ~
  114. #        that require them.
    , I, F; _: a# V5 Q7 K0 L4 B* O
  115. #------------------------------------------------------------------------------#2 a' B$ A! A/ X' |0 p7 f, G
  116.   
    ! A8 @& @- _" g# ?+ f9 ]
  117. #------------------------------------------------------------------------------#; `5 ~. H/ J4 e
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    , m# Y0 u0 ^! @( O; T
  119. #------------------------------------------------------------------------------#
    - ^. }6 N- B# Q- K7 C
  120. #
    3 ]4 m5 o& t' T6 Z& A0 j: P
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    - [# S7 w3 D9 ^  D/ S) b
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off : r$ e: |1 _; X" v) V0 \
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    0 c5 v. X" ]7 h4 ~2 \
  124. #
    / J( l! m9 g2 `  U% }- S# W. Y, p; O
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    & ]5 Z/ C% e" g& i/ P& \6 S7 i
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    ! S0 Q+ j- j2 j4 u2 ?- O
  127. #  v_icon(x,x,x,icon_id)9 _. Z! O+ |) d1 ^# ]9 B3 o
  128. #
    / s' [- o. ~- ^0 P' p
  129. #------------------------------------------------------------------------------#
    * d7 X$ A" \: ]7 K
  130.   
    1 t  q; F/ Z0 p  e6 x) l: |
  131. #------------------------------------------------------------------------------#0 T! r, z0 S3 l$ K5 ~2 R! @
  132. #  SCRIPT CALLS for shadow options2 `1 H+ j/ Q2 f+ w  n
  133. #------------------------------------------------------------------------------#3 e9 H/ g# ~" D  ?0 i
  134. #! |" n/ j2 f& _8 k. l, B
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the 5 i: N5 x, X: d+ n
  136. #                              # light source number you wish to change (for
    ! \4 \4 ~$ s$ ?( }) o& `: h, L+ z( M
  137. #                              # more than one). These are reset on map change.
    1 g7 p0 N! U9 n# P' p
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.5 t1 B5 A& t; X4 E% n7 \+ N
  139. #                              # This will need to be in parallel process if you
    % R( x+ G- G: g7 y: ?& h
  140. #                              # want it to be a moving light.# C/ e- n7 k& y5 J* z: ^) Y0 ?
  141. #
    6 W: j3 F- o) O
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below/ k) A4 _: P" }/ S% q
  143. #' C( Y1 ?3 _$ Q8 D  q; e$ R
  144. #    # intensity = opacity when standing next to the light source (255 is black)* V3 B4 w# {0 Z2 c
  145. #    # fade = amount shadow becomes more transparent the further away you are.  i( [% N3 r2 R5 _0 R. ^
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.( f* a8 x  Y$ C/ z
  147. #
    9 C- R* h% y0 |: w1 v
  148. #------------------------------------------------------------------------------#8 T- [1 p1 Q- n) K9 h  {" m$ Y
  149. #  EXAMPLE:6 [  W% I& s  H
  150. #  shadow_options(80,10,false)    # This is the default setting.
    8 Y- ~1 L" `" j  }$ x- i; m% @' c
  151. #------------------------------------------------------------------------------#
    . h) B- e1 D) e! T. u! k# q" O$ [
  152.   
      W. Y' v2 P9 d. g/ w. a
  153. #------------------------------------------------------------------------------#
    3 s. H- e" \+ l$ v- `; `% G+ k
  154. #  SCRIPT CALLS for reflect options2 b. `$ g; m, Z6 c8 H+ `
  155. #------------------------------------------------------------------------------#+ Q9 ~/ d: @) H# u: Q
  156. #/ p1 Y! O1 H+ B& K/ g  ?
  157. #  reflect_options(wave_pwr) ) }( M0 ^( }: M* X; j& b
  158. #
    ; x& y# ?( P$ C7 R  J: K
  159. #    # wave_pwr = how strong the wave movement is. 0 is off0 M2 X$ \/ Q* O" u% L
  160. #
    ' g4 a, ]" g8 v9 r/ `( w0 g
  161. #------------------------------------------------------------------------------#0 Y/ G% B8 n. @- p8 c
  162. #  EXAMPLE:& D9 F; P3 U5 z/ B* l1 g- W
  163. #  reflect_options(1) # Turn wave power to 1
    , ?7 q% h8 b0 k& m$ a1 t9 X- x8 d
  164. #------------------------------------------------------------------------------#) \! E+ s! l/ a' J
  165.   % [# n4 V5 r. l. b% Z1 i: {
  166.   " s* _3 \' g6 B/ X0 k1 k
  167. #------------------------------------------------------------------------------#
    ; g1 a) L6 Z7 S) ?* L! P' U& |
  168. #  NOTETAG for ACTORS0 o( \! [  M1 Q% s# ~) A
  169. #------------------------------------------------------------------------------#
    ! `% P) f: z8 `$ w! L! S) t* P" U
  170. #
    : z8 _$ p9 {+ Q3 Q2 l- e6 T6 g
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)3 T& |. C( \, O6 A7 O
  172. #
    / N  m) _1 \7 [# A
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    7 u: ], y$ ?+ E2 h, G' ^2 C
  174. #                                  # and use the character in position 'pos'
    8 a* G% Z* p! v1 G
  175. #
    " Z5 X/ |7 x2 V: \+ L) l6 ^
  176. #------------------------------------------------------------------------------#
    4 l7 ~! W/ ^4 K+ }+ o5 ^2 c+ G7 c$ J
  177. #  EXAMPLES:
    ) m* W2 _6 q  T0 `- ^- c
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset8 g. `- ?+ b5 R  b
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset) Y! g, c# L* e  O* m- |  A4 D
  180. #------------------------------------------------------------------------------#, K  P+ }7 {% W7 D0 \# H
  181.   * |. r, ^; @4 ^3 m, |
  182.   
    3 y+ {4 b+ g7 S
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    ! \$ k3 h7 }  w
  184. module Galv_CEffects
    ! s& H% O: c5 m" C! e
  185.   
    - M  T! N* ]$ C( g. u
  186. #------------------------------------------------------------------------------#  
    2 W) V; e1 M* N- H
  187. #  SETUP OPTIONS
    ( C3 x: O% l' ?) e
  188. #------------------------------------------------------------------------------#
    * {1 Z: t* Y+ F
  189.   
    % F2 \5 d; R& `9 \
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    * @+ q5 G/ d2 j/ L
  191.                         # region on the wall you want to make reflective (and
    6 q$ S$ ^/ Z% z/ |' X& e( }
  192.                         # then use tiles/mapping that make the parallax visible)
    ; j$ B) Z8 A7 x/ l
  193.   ; ?4 f/ d0 u: A
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters- M1 K' v. I. l) y1 Y+ }0 \: f; `
  195.    
    9 X/ r+ B4 c3 J$ q
  196.   REFLECT_Z = -10       # Z level of reflections8 o' Y% ?( n" u9 x
  197.   SHADOW_Z = 0          # Z level of shadows7 v( p$ {( w8 j9 G* Y1 K. g' P, o/ Y4 a
  198.   
    . t5 L- o2 q- t
  199. #------------------------------------------------------------------------------#  
    4 C. M, U; E5 u% O  q8 Y
  200. #  END SETUP OPTIONS5 A% O6 S1 Q; f! E
  201. #------------------------------------------------------------------------------#
    5 T; V; Z9 y7 m3 L2 j6 H% k2 n! I
  202. end
    7 Q2 Z/ O5 ?$ l# l# Z, `4 l0 l! O
  203.   4 I# j' N4 t9 }. h0 k
  204.   
    - p; e" {" U+ @2 Q/ H
  205. + a  I4 T8 @& i9 S' M) [
  206. : J: j7 L  L( \$ ]: s* c
  207. class Game_Map& ^/ P5 t0 ^9 l: w) Y2 \
  208.   def do_icons(refresh = true)
    0 E/ ]2 E8 J7 u
  209.     @events.values.each { |e|
    % ]1 Y4 z, H  t4 v( }
  210.       next if !e.list
    ; f6 w7 i7 s4 n  Y# i2 k
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    ' T6 t  P7 E! ^; [( J: |. c
  212.         e.icon = $1.to_i
    0 r" e8 L; Q( i+ E! D! y
  213.         e.icon_offset = [$2.to_i,$3.to_i], g" S3 @3 t3 e( M
  214.       else" ?3 H+ {4 b# Q4 t! _$ Y$ q. g
  215.         e.icon = 04 e8 ?2 N6 S. e
  216.         e.icon_offset = [0,0]
    , N. S0 ]5 c  {" ~
  217.       end4 k6 v/ B) h8 J
  218.     }
    3 e+ p8 ~1 V/ \0 @; @0 ^- d
  219.     SceneManager.scene.spriteset.refresh_effects if refresh# _* f2 Y6 T! v
  220.   end
    + ]* m. @/ W1 ~: B
  221.    
    , D# k3 P/ z8 o6 [
  222.    % l& [3 i+ r# V/ W" L  i; a7 q! Z4 T
  223.   def do_shadows(refresh = true)' ~( ~# F' S! K9 ?5 |2 m$ o9 i
  224.     @events.values.each { |e|
    ! u! \' i; g) L' V6 O
  225.       next if !e.list
    8 x2 q) J3 j7 O+ g
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    ) z. Z" m9 H, V
  227.         e.shadow = true
    ! M/ `' x/ G+ ~3 k( m* q# G. M8 C6 g! j
  228.       else& F. n( e% K- r
  229.         e.shadow = false
    ! e, J+ H6 E' ~# W  T  s. O
  230.       end. t6 F$ ]" t; m# u
  231.     }7 V& Y8 V6 n! L/ b
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    ) p% j1 X9 ?7 ~) I! O9 S
  233.   end, f5 [: {9 D& j! E; X; H$ }
  234.    
    , B" Z1 d5 G" O8 |+ ]1 Y/ i
  235.   def do_reflects(refresh = true)
    6 n# `' a+ p8 e- U; p
  236.     @events.values.each { |e|4 `. A# i  ]' w, ?
  237.       next if !e.list) R$ @. @/ t$ w& F# H- j
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    + u9 h* U( u8 X; d8 {: U( ~- [9 Q
  239.         e.reflect = true& B5 f6 X$ ?/ e- l
  240.       else
    5 \3 m5 v4 t# B5 d% x& w( K
  241.         e.reflect = false7 k* t0 W4 v8 T4 Y. X
  242.       end
    : F6 {* T# @/ p9 z& ?# ~$ t4 I
  243.     }
    6 }9 K( E- m! g* Q& m
  244.     SceneManager.scene.spriteset.refresh_effects if refresh; U  m! J7 u8 W" u1 u; c/ Z7 Y
  245.   end
      {# `" _- \4 B$ S2 s+ U3 {
  246.    3 e& L  G$ `. r5 G0 V8 E
  247.   def do_all_chareffects0 M! I! A2 t2 q- b
  248.     do_icons(false)4 ^6 [' b# h4 s
  249.     do_shadows(false)
    5 A! L2 d9 m. T) a6 L# V
  250.     do_reflects(false)
    ! E0 i1 d! l% J1 {# N: `
  251.   end
    ) I% T% e- ^7 T0 L& P* C/ [
  252.    
    . i# o- o9 ], [+ I) ]
  253. end # Game_Map6 R$ G( E1 s0 ?; U; h

  254. ) P- R: V( {; E. z% Y. N% F! ^  J

  255. / U. }1 ^7 w* @; K# A1 p
  256. 1 p* y4 G9 F. I' S
  257.   ! s& Y/ n& P) U0 b. j% B4 O1 b
  258. class Game_Interpreter" M7 Y  R' H( w1 j# X& Q- L
  259.    
    ! c  k3 H% _/ l
  260.   def remove_icon2 ~; ~( i# S) a; x
  261.     icon(@event_id,0)7 [( |3 n% V/ j' @4 w8 W8 o1 L$ _* o3 D
  262.   end' {. _: h; p. W0 X+ x
  263.   
    / X9 n' k% C# `* X# J# |! o5 _; t4 k; P
  264. #-----------------------------------#
    ; @9 u! Q, M( n) f9 \  f
  265. #  REFLECTIONS3 k+ Q# B- c  u2 _, _
  266. #-----------------------------------#
    7 v. o, ^& q" M) p$ `. p6 A
  267.   6 C- b2 H5 K! w* u1 F( A
  268.   # Add/Remove Reflections from selected events0 _+ f; r0 w7 u; [- H0 J- _/ W
  269.   def reflect(*args,status)6 R  S* j8 W' F- e
  270.     char_ids = [*args]* x" G8 k- K! t( f" y6 @* O
  271.     if char_ids == [:all]
    # N8 i; d  w! R
  272.       $game_map.events.values.each { |e| e.reflect = status }; w  [% E& S9 u2 z6 _2 G1 O
  273.     else( a( x1 ~2 b, E; G/ `$ ?
  274.       char_ids.each {|c| $game_map.events[c].reflect = status }
    3 `& t  N2 a2 D) X# i! u/ n
  275.     end
    9 F% @7 U! U2 t: _3 h! L
  276.     SceneManager.scene.spriteset.refresh_effects4 \; B6 G) B( O4 }7 w2 q# U* c! O$ U
  277.   end
    " `2 p* h4 o- [3 x
  278.    
    3 d" }4 C* e4 r, ^, A
  279.   # Change forever actor's reflect status
    8 z4 u4 ^, X+ Q/ T# e
  280.   def actor_reflect(actor_id,status)
      ^+ {! u, b' O/ |" z5 U9 U
  281.     $game_actors[actor_id].reflect = status
    2 a4 ?( c4 o4 K: n; a1 I
  282.     $game_player.refresh4 d3 M+ N# E* G/ ^
  283.   end
    8 o" j) d; y1 x- J
  284.     ; u2 R  p1 Q7 Y8 Z: e6 b' i  r: Z9 v
  285.   # Change forever vehicle's reflect status
    : |( X3 X$ l$ [4 k' r: ]
  286.   def v_reflect(*args,status)
    : R1 q4 _9 z# s
  287.     char_ids = [*args]( C  F! z8 n; d! }
  288.     if char_ids == [:all]
    ! \6 [: o4 j3 ~! C1 x- r- b9 l( i0 p
  289.       $game_map.vehicles.each { |v| v.reflect = status }5 H1 m( v, k$ C9 N2 q1 n3 Q
  290.     else
    3 g, _+ P7 D( r( |0 ]2 f) D
  291.       char_ids.each { |v| $game_map.vehicles[v].reflect = status }
    ; V% z0 z( b0 o+ x1 N, W: J
  292.     end
    $ d8 y* ?) l  e% U0 ?' {) ]
  293.     SceneManager.scene.spriteset.refresh_effects
    " R' Q* Q- n( D; ^9 b
  294.   end
    6 h( z8 O2 x) m0 F/ y$ P+ L
  295.   * u4 i# H. }. l3 Q
  296.   def reflect_options(*args)
    6 J. J* L" C9 V1 c. r2 ~
  297.     $game_map.reflect_options = [*args]# b) z, K+ ^1 I0 J4 B
  298.     SceneManager.scene.spriteset.refresh_effects9 j: A" l+ A* _, S! v
  299.   end' l: j# k1 m. l/ a# {( E7 z8 ^/ Z
  300.     2 l! D3 m" t. N) L5 [- V) f
  301.   # Actor reflect sprite change( f8 J. X9 h' T1 u! G- H
  302.   def reflect_sprite(actor_id,filename,pos)
    + E( Z" M5 ~' P" Z
  303.     $game_actors[actor_id].reflect_sprite = [filename,pos]  Z, a7 r3 o9 S% j
  304.     $game_player.refresh" w: i: v8 b' N; t+ w. k1 Z
  305.   end
    ; _! Q+ L$ t% w% @$ ^" D
  306.       n* Q' H$ O) m5 F0 u6 G$ H5 G
  307.   # Event reflect sprite change: W6 ~$ k" }0 \% }( T1 ?1 _: @1 Q
  308.   def reflect_esprite(event_id,filename,pos)4 {- S! E' `% T/ P4 F. y
  309.     $game_map.events[event_id].reflect_sprite = [filename,pos]
    : \" p1 E) ^6 n- b$ _; a
  310.     $game_map.events[event_id].reflect = true* i7 b& E5 s( r
  311.     SceneManager.scene.spriteset.refresh_characters, c6 H. @6 u1 ^7 J, W8 A
  312.   end5 U$ Z( u+ T/ a4 x+ O/ L$ j
  313.    
    ' @! T* b3 M( v! d2 `
  314.   # Vehicle reflect sprite change
    7 c6 \, Z9 a: H! ?
  315.   def reflect_vsprite(v_id,filename,pos)
    # h4 {, g7 y/ i6 h/ L2 A
  316.     $game_map.vehicles[v_id].reflect_sprite = [filename,pos]
    * ?: _/ }5 h9 N/ S* V3 q
  317.     SceneManager.scene.spriteset.refresh_characters! G9 D7 C" t+ ^
  318.   end4 r* ^% B5 Q5 M; P9 f2 p; Q, m7 j
  319.   2 x# o4 S9 ^. K1 K! B! N
  320. #-----------------------------------## |/ Q1 a' T6 `) l& w8 O
  321. #  SHADOWS3 g; {4 M8 V% _& P- `/ Y# X! {
  322. #-----------------------------------#
    . O7 ?) K6 `5 F& C) v' a  u( G
  323.   0 H  {  y  B0 \; j
  324.   # Add/Remove Shadows from selected characters
    . m9 k9 B( j" x& k) a
  325.   def shadow(*args,status)2 }' o2 M/ |7 Y
  326.     char_ids = [*args]  ], s5 `2 H% f- o
  327.     if char_ids == [:all]5 e% R; u/ A5 L# U
  328.       $game_map.events.values.each { |e| e.shadow = status }
    " f* C* G5 F( k5 |* K+ E8 P
  329.     else
    0 J! n( F+ k6 e4 a
  330.       char_ids.each {|c| $game_map.events[c].shadow = status }
    % ~) M6 y: J- f; T: ^
  331.     end6 e& b8 X3 O6 N7 H, R1 C+ j! n; @
  332.     SceneManager.scene.spriteset.refresh_effects+ B) z4 {9 A- A5 F8 }) O! r
  333.   end
    ' D$ X5 f1 t1 M6 K
  334.    
    ! B7 i$ n3 u( n: Q1 e
  335.   # Change player and follower shadows
    * P' q4 b3 Y4 J! G
  336.   def actor_shadows(status)
    & R2 Q. l3 O! Z4 c8 b6 {. K
  337.     $game_player.shadow = status% v  {7 g4 B8 |% l9 o' M, s
  338.     $game_player.followers.each { |f| f.shadow = status }, y/ M' M" X" y7 R* T+ c
  339.     SceneManager.scene.spriteset.refresh_effects4 i/ }0 b+ s; P! z7 z+ p$ J
  340.   end% E+ B- a' B# F! U; n+ D
  341.    
    5 k( M' i0 \: L
  342.   # Change vehicle's shadow status( _% S2 J% ~4 b+ f; u
  343.   def v_shadow(*args,status)  m5 a' n" L3 ~' R; A
  344.     char_ids = [*args]
    0 }2 @; S* ~: @5 X! W, A  X
  345.     if char_ids == [:all]2 N! N5 M; ~& [2 o8 ~; }+ ]
  346.       $game_map.vehicles.each { |v| v.shadow = status }
    & u- P# @" [8 K
  347.     else. \/ o5 G* u' p5 k/ r
  348.       char_ids.each { |v| $game_map.vehicles[v].shadow = status }: w: @+ `7 H' f+ d* t
  349.     end0 P4 |4 M7 X' _/ k  j# V8 E
  350.     SceneManager.scene.spriteset.refresh_effects
    $ B, E3 z; ?, x8 ^2 Q
  351.   end
    - Y, y5 A0 W* T; n- M
  352.     # Z( ~7 j7 H3 H5 Y
  353.   def shadow_options(*args)
    4 ]- @0 }' Y# c3 h
  354.     $game_map.shadow_options = [*args]% W5 Q, z& @1 G8 o" _
  355.     SceneManager.scene.spriteset.refresh_effects
    7 O2 X) T* [4 q+ R; p
  356.   end
    # U# l% X4 i5 k
  357.   ) h5 A5 A0 p( K; H6 Y7 F
  358.   def shadow_source(*args,shad_id)
    2 m, ~) |" H7 ], v
  359.     shadsource = [*args], W# _( |5 v9 B; m: V# R
  360.   ' Q2 y; [  C" `/ f) Q
  361.     if shadsource.count == 1
    ' w% C8 I& J, ]7 F! X: i( R
  362.       $game_map.light_source[shad_id] = [$game_map.events[shadsource[0]].real_x,
    ' Y6 f6 j% l; l
  363.         $game_map.events[shadsource[0]].real_y]3 C* R; k) z+ K7 F( f7 M
  364.     elsif shadsource.count > 11 n+ L  Q# n2 Y. p: T
  365.       $game_map.light_source[shad_id] = shadsource
    1 S" r8 E. U8 m7 P( v1 s
  366.     else9 x) \; j6 R& [; Z  D; T2 [
  367.       $game_map.light_source = []+ E7 d# c; `% x9 T5 V: B0 @: n
  368.     end0 T" b3 m# F4 [% g
  369.   end
    6 w! \1 r0 _; `' F+ l
  370.   
    5 N- M! t1 `2 d1 D/ j* x
  371.   
    % b& E1 b/ y! r2 ]2 ?) T
  372. #-----------------------------------#
    ) ^  w" j) ]  `/ ~! P
  373. #  ICONS. _1 ?2 o, q2 b, m# \( Q: [/ x  e. e
  374. #-----------------------------------#
    - S$ t6 {. }  ^
  375.   
    4 h  p" w" B5 e% r$ H2 O1 _# @
  376.   # Add/Remove Icons from selected events& S; P; R; H" a' w3 X& J6 U
  377.   def icon(*args,icon_id)
    0 m9 [1 b# j, e7 o2 z
  378.     char_ids = [*args]& ?6 V; b! b0 t( D/ |, V. A
  379.     if char_ids == [:all]. M- E2 Z3 I# b: s% [8 `& m- s& ~
  380.       $game_map.events.values.each { |e|7 G- H- n. u! ?4 N
  381.       if e.icon <= 01 R9 |& r3 Q$ @3 t
  382.         e.icon = nil
      Y" Y0 }& }+ k
  383.       else
    , `" g6 S- d# u4 ~& B; Q
  384.         e.icon = icon_id
    2 E( x# |" ~) f, u4 G7 V
  385.       end- C. ~5 ^/ Z% M0 S2 u) J5 g
  386.     }0 V$ ]: S" E" A1 I7 T, X2 T% T
  387.     else1 s4 G$ i. L1 H
  388.       char_ids.each {|c| $game_map.events[c].icon = icon_id }
    # S5 ~2 V5 z5 @# a9 n8 K
  389.     end, e+ t. Q4 m; ~6 S/ t: y1 I0 y- i
  390.     SceneManager.scene.spriteset.refresh_effects. p9 w; d( o0 ]9 v. I6 T
  391.   end9 r" e3 M# S) g4 C' j" h$ A
  392.     ; V4 v+ B, e# ]- z: z
  393.   # Change forever actor's icon
    - F! W0 F6 n# Q+ ~* S+ |
  394.   def actor_icon(actor_id,icon_id)
    + p& g. D: }/ Z1 t  O! J( a" S: g, c
  395.     $game_actors[actor_id].icon = icon_id  [3 r+ f: k9 D# m. E* f7 t9 Z( d" A
  396.     $game_player.refresh
    7 k3 }- z+ Z9 V; K8 S
  397.   end
    $ i$ I* i0 ^3 @% @
  398.    
    4 `) F" [9 P& ]9 ^
  399.   # Change forever vehicle's icon# `) e' ]2 P% Z; V: R
  400.   def v_icon(*args,icon_id)! U6 K: q7 X# S% u; V
  401.     char_ids = [*args]# X0 r% z% u5 H
  402.     if char_ids == [:all]
    8 p& C$ m) `5 I: q
  403.       $game_map.vehicles.each { |v| v.icon = icon_id }1 H1 J3 H7 O  h
  404.     else8 \1 m; X/ S5 f$ f6 ]# p
  405.       char_ids.each { |v| $game_map.vehicles[v].icon = icon_id }9 }2 E# ]; f- }; y* |$ c; _( H4 o
  406.     end. p5 k. |# ?) c" w
  407.     SceneManager.scene.spriteset.refresh_effects3 t5 V5 j5 w% u) T* C
  408.   end) a( }3 q$ |' a9 e) ?
  409.   1 p% h, F' a) m* V
  410. #-----------------------------------#5 W9 b! d0 a; O% R
  411. #  GENERAL
    ( z# ^  F6 x' f$ M. [/ f! w9 Q
  412. #-----------------------------------#3 ]& X9 E% M, z) E
  413.   5 `8 p7 W) ^2 {3 l7 A
  414.   # Turn on/off effects
    * f5 Q, \6 [& q; I* r
  415.     # 0 = reflect
    7 W" s$ t, h0 [+ I6 w* X! ~" P
  416.     # 1 = shadow& L7 R2 }8 m. m
  417.     # 2 = mirror$ Y% [  W( s4 w- C/ K
  418.     # 3 = icon
      s! Z' _8 \5 Q) ~8 L5 M5 r, g
  419.       ( c6 t5 t( P  r# B7 p( L; S/ o3 h4 E" G
  420.   def char_effects(*args,status)
    " e  f6 p7 b/ v8 N
  421.     [*args].each { |e| $game_map.char_effects[e] = status }8 ], w' R4 j6 L
  422.     SceneManager.scene.spriteset.refresh_effects
    9 c& n: @$ \' d% F' Y" |: j; y
  423.   end) A/ j/ R6 o7 q. L: B1 _- D6 \
  424.   - Y6 L) }  P, J: L/ j
  425.     4 A, D4 D# L: [4 X7 N" z# H' O
  426. end # Game_Interpreter
    0 v7 R$ i8 R1 Z! T
  427.   4 \6 R3 Y, x* F# N
  428.   
    / h0 D+ H7 z( S# J) `7 ~. |- L
  429. #-------------------------------------------------------------------------------
    * o! O# M$ J' i$ E& o% D
  430. #  Spriteset_Map
    . ~& e; |' Z+ L
  431. #-------------------------------------------------------------------------------
    9 q( y0 W1 \8 A  ~: [* d
  432.   
    / W- I2 k- [5 c, O4 @
  433. class Spriteset_Map$ t$ n2 i8 k2 W' [) A
  434.   alias galv_reflect_sm_initialize initialize
    0 x2 L: t. j2 i% H) |3 v
  435.   def initialize
    . m) D; W. K' n" r
  436.     create_effects
    ( X8 g* w9 T  O6 k
  437.     galv_reflect_sm_initialize% ~  U. D4 z( d% W) h0 s" y, n
  438.     refresh_characters" U* _2 X0 z4 e. x
  439.   end
    , C- d/ r) R1 ?" D) u2 q
  440.     ( e2 z, ^; r- N! ?# [! _
  441.   alias galv_reflect_sm_refresh_characters refresh_characters7 f( e' }2 F4 S" `5 j) l- p# Z" f
  442.   def refresh_characters
    - D/ F5 b" K- R' v  ?+ e" u) o
  443.     galv_reflect_sm_refresh_characters
    - s: a) z) N2 f# m# Q! n, ]& a5 t
  444.     create_effects
    * P+ x: G- ^8 V# P3 p+ S$ m
  445.   end
    1 M% p* t3 u# c" a! |3 F; X! F
  446.    
    . a% ~3 k' s1 K1 W
  447.   def refresh_effects
    + W4 V: m3 G% {. W9 e& s
  448.     dispose_effects( W$ S3 y+ \6 N) g4 a3 J' Z) x
  449.     create_effects2 Q4 \, }. W; |  o
  450.   end
    % f) i+ x  h# c3 ]; K1 q- y
  451.    
    $ \# n4 _. j9 g  a5 y# r
  452.   def create_effects4 ]6 z% B& W; q2 j: W0 a  z
  453.     @shadow_sprites = []' M; N: o! Z' X4 N& n5 u/ p
  454.     @reflect_sprites = []$ L  i* T' g' y6 z! M2 w% L
  455.     @mirror_sprites = []
    : e- z4 u* {4 |( p% S) ?
  456.     @icon_sprites = []
    3 t" y- m* e3 B$ \: x5 g
  457.       * E1 Q# Z  j' e0 y
  458.     # Do reflections* T) V0 n( H+ o) L
  459.     if $game_map.char_effects[0]- }& S! j: F, r2 G5 x! b
  460.       $game_map.events.values.each { |e|
    : [/ K/ ?. b/ q% D* L
  461.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, e)) if e.reflect
    - g- Y( i/ f, A
  462.       }0 L% W  e) M' A# y
  463.       $game_player.followers.each { |f|5 m3 V- R8 w7 q
  464.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, f)) if f.reflect
    ' `: z( E" d- e0 R: r. n% X! w9 i
  465.       }; d5 a9 t. u" ?
  466.       if $game_player.reflect" h! ]1 W) {8 o/ i7 z
  467.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, $game_player))
    + A! k" L. k3 S/ O% Z0 k& k
  468.       end: J# v) ]+ c) u9 s
  469.       $game_map.vehicles.each { |v|0 S+ A2 o  x: o& D5 ~
  470.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, v)) if v.reflect
    - ?: W  l& j# ]( X* ~+ Z7 ?
  471.       }3 Y: u9 @7 Y: r$ R( e$ b
  472.     end
    + y# v+ F  R9 h3 e# G, a
  473.       
    1 h; k- ~. i) d! _
  474.     # Do mirrors
    / A1 _8 F: R+ y7 o9 ]
  475.     if $game_map.char_effects[2]) C8 N) [2 q- J7 U( c
  476.       $game_map.events.values.each { |e|1 f6 R/ e* \* f5 K0 a
  477.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, e)) if e.reflect( \, u- y8 r* ^, X
  478.       }6 z0 l4 Y  b6 f& W
  479.       $game_player.followers.each { |f|
    # Q# e% O* D) P7 I8 F
  480.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, f)) if f.reflect
    ) _. F4 @. d" |- W6 \/ Q
  481.       }9 q. D: y. {$ x0 v! }$ m
  482.       if $game_player.reflect% U' H& {# \$ }
  483.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, $game_player))7 o8 |5 w; H6 C; n3 w
  484.       end2 U# G1 d3 R# G- j
  485.       $game_map.vehicles.each { |v|" K9 z- g, N4 L. G* W$ l! H
  486.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, v)) if v.reflect
    0 k1 h2 B8 ^% f9 M
  487.       }- `- ^1 h* U* [$ J( K1 |" R5 b- S
  488.     end$ }9 L6 w" K2 O5 i
  489.       
    4 E* r- m) H2 g1 o- D# Y! r
  490.     # Do Shadows
    0 \9 J8 C2 c4 u/ g5 Q4 T2 R
  491.     if $game_map.char_effects[1]" J' G$ @$ K0 p% h+ f6 C$ R3 S
  492.       return if $game_map.light_source.empty?6 @2 Q' c% H9 E) H( Q
  493.       $game_map.light_source.count.times { |s|
    / U, {8 j9 _+ \% L! T8 M" l
  494.         $game_map.events.values.each { |e|/ Y" g* N( `5 N( @) E, _
  495.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, e, s)) if e.shadow
    9 f2 C' H, b$ b6 Z! z: n
  496.         }
    7 a8 X" E8 {4 h$ n) x# x* Z
  497.         $game_player.followers.each { |f|4 [& l+ p7 }+ H& z3 `; S
  498.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, f, s)) if f.shadow
    7 v4 M& m. a: v, q5 x5 l
  499.         }# p& _7 w+ p1 }! R5 \# R
  500.         if $game_player.shadow0 _5 Q. h' w1 F* l, ~3 V
  501.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, $game_player, s))
    ; j5 J; [+ S6 v1 C7 W
  502.         end" g& L( U7 D' o: W$ C8 c) U
  503.         $game_map.vehicles.each { |v|9 n1 Y& E9 L6 W, Q+ C
  504.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, v, s)) if v.shadow
    ! K" T1 Q6 U$ x5 M  o+ s2 @
  505.         }
    , {0 O) C1 q! n# }  }6 k  h7 [4 ~
  506.       }4 g: j3 g5 i8 }2 ]" R. ~' V% u. m
  507.     end' \7 ?* o) z* {, p$ S& U
  508.       
    * ]/ V5 j$ U# Y# }" B1 r
  509.     # Do icons/ R; s, W2 x" k3 G2 d8 |
  510.     if $game_map.char_effects[3]4 b0 u+ z2 b# z
  511.       $game_map.events.values.each { |e|' f' ~' ]& k/ \4 C
  512.         @icon_sprites.push(Sprite_Icon.new(@viewport1, e)) if e.icon
    ; _/ _* G" B4 ^( x' d% N0 M3 r7 v' a3 Y
  513.       }2 W: }- o* s5 i2 ?3 v. X  D
  514.       $game_player.followers.each { |f|# U7 l% I1 V- z  X# F+ d2 f
  515.         @icon_sprites.push(Sprite_Icon.new(@viewport1, f)) if f.icon  f2 P! W  K2 m2 k+ J! p
  516.       }
    8 m3 L8 Z/ F" x
  517.       if $game_player.icon
    8 h5 a8 X) U. c! v7 ~
  518.         @icon_sprites.push(Sprite_Icon.new(@viewport1, $game_player))
    $ h/ _( [1 H$ v) C1 H" |4 k
  519.       end
    6 s8 T. R( c) X5 c" G6 e3 A
  520.       $game_map.vehicles.each { |v|
    6 z/ P7 X4 Z8 ?7 @
  521.         @icon_sprites.push(Sprite_Icon.new(@viewport1, v)) if v.icon, K; _7 x( Q: ?) C1 f; c
  522.       }$ M" Y* `+ Q. i4 g/ p0 |9 L3 C& ~
  523.     end
    ) y# [9 b% C& H6 S7 O
  524.   end. I% K8 X' L4 J! o" o
  525.    
    ' @5 o+ [6 Z4 F0 l7 _; f
  526.   alias galv_reflect_sm_update update. t8 r. T  A) E
  527.   def update5 a3 C/ Z5 q( [6 W0 v
  528.     galv_reflect_sm_update
    " k" N6 ^# N2 Z/ @( E/ `
  529.     @reflect_sprites.each {|s| s.update} if $game_map.char_effects[0]
    " Y% F0 E: x; v+ [% V
  530.     @mirror_sprites.each {|s| s.update} if $game_map.char_effects[2]
    + y# H6 d, f' L1 m  L
  531.     @shadow_sprites.each {|s| s.update} if $game_map.char_effects[1]
    * b2 k2 B1 O' h1 p6 R
  532.     @icon_sprites.each {|s| s.update} if $game_map.char_effects[3]
    9 F0 x9 Z8 _4 b: m2 r' t8 R
  533.   end
    5 J0 d* z$ z# d2 j9 M, z2 n: n
  534.   
    : F9 {% i8 C+ W" w
  535.   alias galv_reflect_sm_dispose_characters dispose_characters
    % @" c( Y9 I: n9 v* s$ R
  536.   def dispose_characters
    ' ]' M" I  b$ m- n9 i
  537.     galv_reflect_sm_dispose_characters
    ; V9 s/ b9 ]& H0 c- f: k6 C* y3 {1 K
  538.     dispose_effects9 {5 h0 l; t( |' r# z0 |
  539.   end
    ( c' I; y4 [& h+ O3 e- o
  540.    
    ! }4 W- ]) e' e: X% `
  541.   def dispose_effects
    $ i( n) j1 Y7 W2 c/ v
  542.     @reflect_sprites.each {|s| s.dispose}
    * O3 d0 w0 n5 @/ B4 v
  543.     @shadow_sprites.each {|s| s.dispose}8 V$ W9 v2 d8 k/ P6 n; f
  544.     @mirror_sprites.each {|s| s.dispose}, C! ]; G0 x+ F+ C7 E
  545.     @icon_sprites.each {|s| s.dispose}3 _7 |6 g: p6 P7 m8 L
  546.   end
    ; T" ~' b/ k, ?5 Y1 G
  547. end # Spriteset_Map6 U4 {" b+ c+ G* t1 H
  548.   ( L  e* c, l7 K8 j! |( z
  549.   
    3 K+ [' S, J3 m8 D  _
  550. #-------------------------------------------------------------------------------
    # T! O* ]4 H  C2 @! D
  551. #  Sprite_Reflect 4 O" n& E+ J) @3 K& x2 O( ?3 ^. z
  552. #-------------------------------------------------------------------------------  R- F- A  X: R" o5 t
  553.   
    7 X8 o* s( U, ?. h9 @/ L4 o- C
  554. class Sprite_Reflect < Sprite_Character1 W$ D, U* O( i( n" T
  555.   def initialize(viewport, character = nil)/ h* e  _4 a" R8 V% P/ _( M9 f
  556.     super(viewport, character)
    0 Q6 D. q# Z1 k7 R3 ?, h2 p/ I1 Z. p
  557.   end! I: N3 y6 A9 z! i
  558.   
    + `0 H8 t9 y+ Y9 g( M6 |  f8 I
  559.   def update( a# s$ u* m  A( H4 l5 G
  560.     super
    % C0 k0 G7 G5 @0 K
  561.   end- A; f4 k& m% d7 j
  562.     ) E& I: P( T) c, A; @8 Z' J  O
  563.   def update_balloon; end3 i/ ~- ]1 ?7 F$ [
  564.   def setup_new_effect; end+ k: x" X% b" `# h
  565.     $ y) J2 k4 [! v* ?
  566.   def set_character_bitmap
    - I) e# g, G, X- V
  567.     if @character.reflect_sprite
    / b  a. Y7 U( E" h( p- C& S, L
  568.       self.bitmap = Cache.character(@character.reflect_sprite[0])& p* N8 E& b) Y* ?6 X* I6 c
  569.     else
    9 {# w) p9 @- f! C1 f6 M
  570.       self.bitmap = Cache.character(@character_name)" l! {3 l$ \; x: M
  571.     end
    ( n  m4 S: J7 k; b, T
  572.     self.mirror = true: u5 Z6 p8 V8 J) C$ O3 Y
  573.     self.angle = 180
    ( o! w, d" ~" F' E
  574.     self.opacity = 2208 \! m+ s1 _4 {6 {4 E* ~, J
  575.     self.z = Galv_CEffects::REFLECT_Z
    8 Z7 ?2 t: z6 D3 C) a
  576.     self.wave_amp = $game_map.reflect_options[0]+ y4 K5 ]* S( Z, z& X' @
  577.       
    * f4 w4 X4 R7 T1 W! L% |
  578.     sign = @character_name[/^[\!\$]./]
    ; i* Z$ r2 J$ t4 O0 j
  579.     if sign && sign.include?(')
    " p/ |% q# ~# e2 H5 ]6 c
  580.       @cw = bitmap.width / 3
    8 b% w+ p0 S/ W0 [" B7 Q% V
  581.       @ch = bitmap.height / 4, d& @/ U% j' W: t$ x
  582.     else
    4 Y5 B. e% ]3 ^) q! f
  583.       @cw = bitmap.width / 122 N  n9 w8 {4 t: F- o. M4 n9 ?
  584.       @ch = bitmap.height / 8" [" z1 E$ ^) \- F" F. i2 D
  585.     end
    & [% }# }5 `* a! x+ a( F
  586.     self.ox = @cw / 2- x% y# y# s0 z  f/ b5 y$ ]$ ]' Z, f+ T
  587.     self.oy = @ch
    2 c# r( R* V! H8 t, M
  588.   end
    # [. ]! h2 x9 m+ ?
  589.   ) ^7 d9 ^+ q  @8 U$ X+ r
  590.   def update_position
    ) `  _) h3 q5 a* R' ~
  591.     self.x = @character.screen_x. M* O+ H+ f( ~5 F* D& G
  592.     jump = @character.jumping? ? @character.jump_height * 2 : 0
    * {1 P( m7 H6 w" W' x
  593.     alt = @character.altitude ? @character.altitude * 2 : 0
    + X# Z- s& a9 r; ^0 b; }9 F
  594.     self.y = @character.screen_y - 3 + jump + alt  t$ }; q  |. j. ^' |" E' ~
  595.   end7 y3 J9 t4 E" e8 B3 M
  596.   + m) `- n2 k, x9 `( A
  597.   def update_other
    ; ^; A  C( Z! ~% D% Y( Q
  598.     self.blend_type = @character.blend_type
    ; y# a) F( k( c" u8 {
  599.     self.visible = [email protected]
    6 `4 h' W/ t" F: U
  600.   end& }; l8 ^7 o2 Z% [& l* ~' E
  601.     : F! v4 Z$ {! I# Q. N
  602.   def update_src_rect
      k8 C7 M/ T) ?# B
  603.     if @character.reflect_sprite7 y3 ^6 m2 [$ G2 C) B) d5 P
  604.       index = @character.reflect_sprite[1]
    3 U, W/ L) `9 m- H/ L
  605.     else7 z' z9 G# x0 x) H$ X3 d8 m8 G
  606.       index = @character.character_index. m( H4 E% r0 ~* q, J1 k7 y; X0 F1 E
  607.     end( z: a2 `$ }' i
  608.     pattern = @character.pattern < 3 ? @character.pattern : 1
    4 e& Y7 x9 ?1 N* f
  609.     sx = (index % 4 * 3 + pattern) * @cw0 P2 s: h% H5 z
  610.     sy = (index / 4 * 4 + (@character.direction - 2) / 2) * @ch0 c2 z9 [! N: @1 k7 ]4 {
  611.     self.src_rect.set(sx, sy, @cw, @ch). M5 c, }6 B: p' y
  612.   end  |; p, T) d+ g% H
  613. end # Sprite_Reflect < Sprite_Character
    - _7 @, b6 d' P/ B
  614.   1 w- C; U7 G8 z
  615.   . f/ z5 \7 r) J" M% x* P- p) K5 `% s
  616. #-------------------------------------------------------------------------------6 r1 V9 T! A- u2 Z2 J
  617. #  Sprite_Mirror- k& x* {% T/ \$ [& V) V# M! U; ~
  618. #-------------------------------------------------------------------------------% |; F* {* U0 H: V2 W9 U
  619.   
    $ t* Q1 O8 ]0 \+ G% D( g6 Z% c
  620. class Sprite_Mirror < Sprite_Character
    , n% w; }3 q. W; K8 F6 X8 O6 q
  621.   def initialize(viewport, character = nil)
    1 C0 _+ i& W7 d2 @# q1 j# {1 R
  622.     @distance = 0( W2 G# F! w+ }" j! u5 v9 b
  623.     super(viewport, character)0 r" v8 B6 c4 ?& @6 a. u& V5 s2 }
  624.   end/ Z: j4 D' w2 a$ D7 ^( x
  625.   
    : G2 r& o$ @- b' \: L; e
  626.   def update& Y) h& r' o, z! m
  627.     super9 b, I# q4 @: r" s9 V" A
  628.   end# l& x& l) A$ Z
  629.    
    $ ~7 ~. _+ p" B- L$ b: o
  630.   def update_balloon; end$ D% D6 U, l- {' C9 V% e; s: d
  631.   def setup_new_effect; end
    ! J& u" P% }( X4 F, h5 ?: Y
  632.    
    ) t6 P, b( N/ o. H' Y% _: C6 Y2 Y' W( u- p
  633.   def set_character_bitmap- |9 T1 Y1 q0 t
  634.     if @character.reflect_sprite
    , Q9 I1 D: A  Z! s5 E) Y& U8 z
  635.       self.bitmap = Cache.character(@character.reflect_sprite[0])6 Z, j. t( |. W& M
  636.     else
    ) r( r7 V3 q4 p. e. X+ m
  637.       self.bitmap = Cache.character(@character_name). W5 g6 k4 c4 t7 f
  638.     end
    4 ?1 E+ a8 u$ Q1 j/ T4 ~, h$ g2 `1 S
  639.     self.mirror = true# @- W0 W6 z% Y2 Z5 I
  640.     self.opacity = 255
    / J$ I9 U6 a3 A! u# I
  641.     self.z = Galv_CEffects::REFLECT_Z( K; |8 E* C( d- J$ p
  642.       
    & Y8 c0 R5 d# N" {; A$ L
  643.     sign = @character_name[/^[\!\$]./]- `4 _" H! E- B$ |$ Z% d# O# M5 p& n$ O
  644.     if sign && sign.include?(')! j! [  R8 z/ ?
  645.       @cw = bitmap.width / 3! y9 [( ^1 v: V6 E* z' M& E7 m
  646.       @ch = bitmap.height / 4/ T9 x6 m9 r8 z* W7 N8 E* y# C4 |
  647.     else' n- \; J  H$ |- b& u$ M
  648.       @cw = bitmap.width / 12
    + t: U1 v; Y3 u! f: n6 q
  649.       @ch = bitmap.height / 8
    " @% t4 z) P4 |7 @7 ?( ~5 z
  650.     end
    - N8 g+ Q+ v8 q3 m# I
  651.     self.ox = @cw / 2
    2 a5 m( [+ N0 e! i, }
  652.     self.oy = @ch
    * V7 \! B$ H0 R! j( s4 ?# [/ _
  653.   end1 I, w/ U- ?( v: w& v
  654.   - G+ y  N# w4 w9 q. {7 Y
  655.   def update_src_rect2 o' e  d: G7 X0 ~8 z
  656.     if @character.reflect_sprite# u. U/ r: i+ F' Y
  657.       index = @character.reflect_sprite[1]3 E# [4 q: B! k+ j9 ?9 R: |$ Q
  658.     else
    - b; ]( P8 j) P& Z7 s# y2 q3 _
  659.       index = @character.character_index
    2 r4 \' ^! f9 A, s$ I, j0 V+ ^( ]
  660.     end
    9 R8 A" f# r2 c6 G
  661.     pattern = @character.pattern < 3 ? @character.pattern : 1& c2 C/ q# c  r% n2 }- I" ?% s
  662.     sx = (index % 4 * 3 + pattern) * @cw
    + p8 K7 z+ E9 a3 w! n
  663.     sy = (index / 4 * 4 + (10 - @character.direction - 2) / 2) * @ch
    % e  a# [* e4 }( {# a
  664.     self.src_rect.set(sx, sy, @cw, @ch)+ {9 f" V* z6 J- E8 W+ H
  665.   end$ p7 O7 z0 P! S* G- K  E7 {: H" ]- ?
  666.     3 }  K  F7 A& Z: @% L/ P
  667.   def get_mirror_y# s0 ]% R) F! a6 [
  668.     20.times {|i|
    6 ?- `5 A/ M3 r) B6 J2 T% C
  669.       if $game_map.region_id(@character.x, @character.y - i) == Galv_CEffects::MIRROR_REGION7 x9 |0 o5 g8 u0 W% W
  670.         @distance = (i - 1) * 0.05; b$ s- Y/ ~. Q4 ]# P* U1 ^
  671.         [url=home.php?mod=space&uid=502659]@DISPLAY[/url] = @character.y - i - $game_map.display_y + $game_map.height# {) P/ d' a/ f, n
  672.         self.opacity = 255" \4 H' H# o8 q+ u
  673.         return (@character.y - i + 1 - $game_map.display_y) * 32 - i * 4
    1 W/ E2 R8 w& O9 [
  674.       end7 n3 h3 A9 w( B* I  v' O
  675.     }0 I* k) m% s/ e8 [4 |, ~* {3 a+ a
  676.     self.opacity = 0
    $ e3 B8 i8 Q, ^- G- ]& n
  677.     return @ch
    9 l7 \% J* @$ x# ?& J
  678.   end
    2 |4 C  }5 O8 L
  679.    
    $ H3 Z) G! p! x
  680.   def update_position
    + A3 W  a( J/ w$ h5 I* Z5 A
  681.     self.x = @character.screen_x& K& U/ u, w4 N) n* F( F/ r- c
  682.     self.y = get_mirror_y - 6
    ; A4 s' O! N6 a2 v3 j( t0 j" S# i9 y
  683.     self.zoom_x = 1 - @distance! O7 z. H; [/ g7 A" u8 R1 m
  684.     self.zoom_y = 1 - @distance+ j. H% h# z  F: A4 K  N% f/ O
  685.   end
      u6 \: q& s2 V2 h3 \
  686.   - r" q; p9 E0 F/ H3 d& W9 n
  687.   def update_other! d4 w- j+ v% s) [5 D0 C$ ?* e9 h
  688.     self.blend_type = @character.blend_type$ D4 ]) k- K* R% R# N" L) ~
  689.     self.visible = [email protected]
    + E% Y/ V0 ^2 v& g8 t
  690.   end
    / B4 c8 j" c1 ~) S: k
  691. end # Sprite_Mirror < Sprite_Character
    8 E9 H* i' j$ E* s' y7 C3 ~
  692.   - X, I1 v$ O: @. p- k
  693.   1 M1 l4 C) ]" K
  694. #-------------------------------------------------------------------------------
    , J( r5 N) @- r, }( c) m
  695. #  Sprite_Shadow- }2 S2 r, q- e3 R# `6 b
  696. #-------------------------------------------------------------------------------
      [0 Y0 e8 H8 B7 C# _
  697.   
    1 S* B/ F. d- C( E# C
  698. class Sprite_Shadow < Sprite_Character* B6 G) O' E7 f8 n% x- s, t/ A' t! Y
  699.   def initialize(viewport, character = nil, source)9 B0 O. K0 z( B) X' O
  700.     [url=home.php?mod=space&uid=14094]@flicker[/url] = 09 z) M$ @) |: {6 B
  701.     @famount = 0  p6 p7 e0 u$ e' [( q) S/ n; {( f
  702.     @aamount = 0
    * h5 C# V- u3 t' n6 |- \2 g
  703.     [url=home.php?mod=space&uid=171370]@source[/url] = source6 u3 w& ?, V5 b
  704.     super(viewport, character)
      O' R' P6 I  r
  705.   end. I0 j# V( s! h: v: x" p
  706.    / |5 _' x4 l6 a  i/ k+ i+ r4 o+ j
  707.   def update_balloon; end
    # z4 T% [% X3 U* z& s: L
  708.   def setup_new_effect; end  R/ R1 A3 |# |/ K. Y: [: D% W
  709.   
    8 p8 p! X( v$ e* h
  710.   def update
    6 U7 s' l; t% g. k* u8 o" [0 h
  711.     super# n6 }" n( g/ g2 H7 [
  712.     update_bitmap
    ( A- @" p4 |# s; g' [- x4 N
  713.     update_src_rect' S4 `" l  E9 p6 w" j' l5 {
  714.     update_position4 r  W% V- E  W; }9 _% q
  715.     update_other
    & {8 K: g: F) ]! D4 q
  716.     update_facing# O. Z% v8 L3 o: U) m
  717.   end
    # w1 b4 t, l/ {# @, X: j$ V% t! a
  718.    
    , M5 |& n# c$ |) a
  719.   def set_character_bitmap
    2 C2 a# ~) L6 \
  720.     self.bitmap = Cache.character(@character_name)% X0 [' w  o% v0 ]3 V* N
  721.      
    ) F+ F' s4 F. ]! t4 @
  722.     self.color = Color.new(0, 0, 0, 255)
    . c% [/ t' M' w$ G& @0 f3 x/ [
  723.     self.z = Galv_CEffects::SHADOW_Z" P# B" S9 z3 n: S+ N
  724.     self.wave_amp = 1 if $game_map.shadow_options[2]
    3 B5 @& h" l2 m) F
  725.     self.wave_speed = 1000$ A! e- q  d3 R0 s2 L( a/ _
  726.       # i* F( E8 n% d9 n( `
  727.     sign = @character_name[/^[\!\$]./]( X/ [" |$ a  M0 g
  728.     if sign && sign.include?(')7 h3 a3 l4 i8 g1 ~3 L& H2 Y
  729.       @cw = bitmap.width / 3
    ( Y1 @7 @- l& Z( V
  730.       @ch = bitmap.height / 4/ p7 s. c- ~  `0 L  S1 K
  731.     else. m# Q6 X. c- |0 ~
  732.       @cw = bitmap.width / 12
    * _! b/ ?6 o" J  P% Y
  733.       @ch = bitmap.height / 8' l, D/ A1 @$ X- o- H4 _# n) d
  734.     end
    # t' H% X  \$ H+ B5 m! u% `
  735.     self.ox = @cw / 2
    & C/ H6 c* H, X- x6 G& W
  736.     self.oy = @ch
    2 ^6 x( y7 o$ @1 y4 q1 E  a4 L
  737.   end
    ; X  t. L4 `2 h4 J
  738.   
      A1 v3 x& K' p+ o# U0 k
  739.   def update_position/ Q! ?) v' Q$ B# O* C# g6 _: p
  740.     self.x = @character.screen_x
    ' e3 r' C/ x- ~; d! q0 m  X0 e% b8 x
  741.     self.y = @character.screen_y - 10, Q8 |" \7 l" N' A
  742.     get_angle/ y( S( i( _; N3 o1 M
  743.   end4 u3 D$ K" u, K1 y! Z
  744.    
    0 u( t% i8 p& p
  745.   def get_angle
    6 Y2 @5 s' h3 V0 m; T
  746.     x = $game_map.light_source[@source][0] - @character.real_x9 p0 O* P4 u0 ~
  747.     y = $game_map.light_source[@source][1] - @character.real_y
    . I7 ?4 N2 ~9 y. w8 ]
  748.     self.opacity = $game_map.shadow_options[0] - , F% Y0 Z5 U: z; H! k. F( t
  749.       Math::sqrt(x * x + y * y) * $game_map.shadow_options[1]
    ! {0 D. Z0 _  E- q7 P
  750.       
    : J+ P. v7 {) R7 Y; i
  751.     if x == 0 && y == 0 || self.opacity <= 0/ m" m7 l/ L( s$ {4 H& b
  752.       self.opacity = 0
    ' c& V! S! o; z+ r+ U
  753.     else / |% a7 f, ^, M
  754.       self.angle = Math::atan2(x, y) * 180 / Math::PI + @aamount, N" v; [2 |2 v; S  a% n
  755.     end
    * s6 T0 n9 b3 \5 R
  756.   end
    1 J0 b/ t, O. B( U. {. m5 M
  757.    ' q9 o/ i$ @3 Y1 w
  758.   def update_facing
    1 g" c! _) b9 }  M
  759.     if @character.y < $game_map.light_source[@source][1]
    7 W: l( \& g( s1 s& a  i
  760.       self.mirror = false( ?7 J' @4 O3 K1 i2 H+ T+ T; n: V
  761.     else
    . h2 |; C+ v0 T9 ^2 W0 }7 N
  762.       self.mirror = true$ E5 T9 O$ r6 Y, e  G. ~. u
  763.     end
    + F/ U# ]1 @! {
  764.   end, |) ~) y  ]' D1 Q8 Z
  765.     ; x1 l$ I5 D8 |/ K* P/ ]
  766.   def update_other
    4 R( M9 B5 g4 f
  767.     self.blend_type = @character.blend_type: Y6 B/ t; m' U' Z" ?4 q* r3 q
  768.     self.visible = [email protected]
    9 E* ]' Q7 r  o, ?* h( S$ n
  769.   end
    3 _- M( T6 L& N
  770. end # Sprite_Shadow < Sprite_Character/ q3 r1 x$ W6 X1 E: g
  771.   % W$ }- t1 _) k8 `* Q
  772.     n/ R5 ~8 n/ s7 o
  773. #-------------------------------------------------------------------------------
    . E! T) i4 R7 n% H; |1 n
  774. #  Sprite_Icon2 Z& i6 i, }7 Q6 d! U) n6 ?
  775. #-------------------------------------------------------------------------------
    4 j8 ]  z3 W1 C' z
  776.   / a7 }& D3 m2 i7 r/ J& M
  777. class Sprite_Icon < Sprite_Character4 r9 u& b! m6 g0 J4 b- V
  778.   def initialize(viewport, character = nil)
    % X  f0 t/ Y! ?( V( V
  779.     @icon_sprite ||= Sprite.new. U# W5 ~9 W7 x6 ]* Y( T
  780.     @icon_sprite.bitmap ||= Cache.system("Iconset")
    ) z" F6 C" A1 C  t
  781.     @icon = nil
    6 w% O) R8 o/ V* a
  782.     super(viewport, character)( i, J8 V7 |) v6 A
  783.   end; z; `7 H, M. W" J0 c
  784.   $ O1 F3 ~2 s8 M* D: b! E' f
  785.   def dispose& F" O- L! b! E! I& f
  786.     super
    4 n" f2 e) F8 L& O& W, G1 n) |# ~
  787.     if @icon_sprite1 |2 a$ M8 \' U, ~0 Y% K2 n0 q( E4 o
  788.       @icon_sprite.dispose" y% m. K; o7 h# p, w) J
  789.       @icon_sprite = nil$ s$ X  i8 ?; P6 n
  790.     end+ W/ Y& p  W+ o- V
  791.   end
    : s- x, Y* y1 K2 m& i! H( Y* [
  792.    
    . t# \5 [2 Z" e+ T, V8 Q
  793.   def update6 v3 t4 o* X% H! i% A9 L8 p" _
  794.     super
      r- M, s' T" k- J
  795.     update_icon+ b. D7 M5 u) j$ c7 O' f- F
  796.   end: X* l4 L/ C( C+ p: b. Q" \- F
  797.     : d  p! q) l- u) N8 O) p
  798.   def update_icon  F; a; U" b" B4 r# k  w$ C
  799.     return if [email protected]% O* O1 c8 U5 E7 D& X- f
  800.     draw_icon(@character.icon)
    3 J/ `/ |3 a# }; `0 c; U/ u& R
  801.   end# W+ ?( h4 V- u* `
  802.    
    & ?3 X. [, b( i. D3 `! N
  803.   def draw_icon(icon_index)# P5 P' p$ K  @; E1 T+ @* e
  804.     return if [email protected]?6 V2 t) n; p7 R, l! n
  805.     rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    - R' b2 v; z! a+ h& V6 p
  806.     @icon_sprite.src_rect  = rect2 v; [0 s. K3 G8 `  K: E
  807.     @icon = icon_index
    * }4 h8 ~/ D* @7 {
  808.   end
    % {. u) `4 K, e1 Z+ f; i
  809.    
    7 b( [" X8 Y0 A2 E$ M: I
  810.   def update_position
    : k8 n; p0 e* a1 x& a6 u
  811.     @icon_sprite.x = @character.screen_x - 12
    : A! ?8 }) r/ o  j" B
  812.     @icon_sprite.y = @character.screen_y + Galv_CEffects::ICON_OFFSET7 O/ R8 e: U0 [7 Z5 G- f- C
  813.   end
    + x" n- g/ ~( p, E/ K' v: S
  814.   
    4 g8 g' l3 G- B: P
  815.   def update_other
    0 f; f5 Q( _6 y6 F
  816.     self.blend_type = @character.blend_type1 s1 h9 C' H, r5 m5 W( z* ]
  817.     @icon_sprite.visible = [email protected]  j- x0 G. ]+ A7 A9 S0 i/ W
  818.   end
    5 Z( o, K9 Y+ K4 q- J5 T% B
  819. end # Sprite_Icon < Sprite_Character
    0 ]6 e5 H4 \& b- g/ C" F
  820.   
    % g+ k9 ?4 r  c' ~
  821.   
    $ f; k" c$ Q; h( @, b
  822. #-------------------------------------------------------------------------------
    ; \0 w1 N: m! H# ?5 h0 N) ~' @* `
  823. #  Other Stuff
    % K8 T) |8 B6 Z1 K, O' M
  824. #-------------------------------------------------------------------------------) k! W% [' \4 \+ Z) S) }& I
  825.   : j- W2 I% U) g; e0 I: m
  826.   
    : c9 }* l$ T/ A: Z+ _
  827. class Game_Character < Game_CharacterBase* n/ f9 l+ A% y, k/ U4 ~' |3 A1 ^3 N
  828.   attr_reader    :altitude
    $ i- ]: ?$ a3 v9 p* r/ u' e+ \
  829.   attr_accessor  :reflect
    1 ~# ~4 l1 J0 B9 G/ O( Z$ S
  830.   attr_accessor  :reflect_sprite7 Q% |  P  u$ S: m: t4 [+ B
  831.   attr_accessor  :shadow3 c( l4 T; }0 l1 I* f8 ^# E5 Y; i* `
  832.   attr_accessor  :icon
    / D* O/ V5 _9 a" E' u
  833.   attr_accessor  :icon_offset6 F9 R$ u) T# v4 p2 w, z; R
  834. end
    0 l4 B; S1 m& i2 a. G/ b4 z6 s* p
  835.   
    : m6 S* T( @7 q; Q* H% [+ L+ ^
  836.     O; h0 B8 Y  z7 d! R, I+ `# W+ \
  837. class Game_Event < Game_Character8 K7 k5 n9 x* k
  838.   alias galv_reflect_ge_initialize initialize4 B2 D9 r2 q; ]! Y
  839.   def initialize(map_id, event)4 |/ \4 i/ c" h8 S
  840.     @reflect = false% c7 Z6 W2 u9 ^, l& p
  841.     [url=home.php?mod=space&uid=31758]@Shadow[/url] = false6 ]. O8 E. x0 X9 D) F7 \
  842.     @icon_offset = [0,0]
    . h* j1 C0 X6 ]0 m. N. t
  843.     galv_reflect_ge_initialize(map_id, event)5 v$ m2 O" C& V6 P. P+ x
  844.   end
    % w  d+ }# y" c3 e' D) g
  845. end # Game_Event < Game_Character
    $ r: f% j/ h& s. ^# L7 P8 L/ u: i
  846.   1 T8 R+ T6 Y4 y. X
  847.   ( m/ p! ~" ?1 J( @
  848. class Game_Vehicle < Game_Character0 O. c1 v+ d. Y, c
  849.   attr_reader :map_id
    . N" P! {1 c$ K0 j
  850.    
    ( [2 f5 n+ y' g! R1 o& V
  851.   alias galv_reflect_gv_initialize initialize9 R& B! y% W7 a) n  {& U
  852.   def initialize(type)
    % ~$ v( u# ^5 [  p# W( w. Z
  853.     @reflect = true
    1 V2 q8 c2 p+ ^& \( O9 s$ \
  854.     @shadow = true; S. `: M- b. D& q7 x; e
  855.     @icon_offset = [0,0]
    5 A3 I2 W9 T1 [' G
  856.     galv_reflect_gv_initialize(type)& D4 u0 {( t# }" k5 {; y
  857.   end
    : o! z0 O1 p! T' {$ q9 k
  858. end # Game_Vehicle < Game_Character2 L( s% Y( L2 u: R2 u% ?! y. W
  859.   5 v4 M# n3 [  a8 M! x; L
  860.   " ^4 M$ C; G  ]
  861. class Game_Follower < Game_Character" }* q2 ^. c. L, |
  862.   alias galv_reflect_gf_initialize initialize
    7 y1 T5 ]! Y! D  ?, B. j9 Y$ B
  863.   def initialize(member_index, preceding_character)
    ' p: e7 M& v3 k& H
  864.     galv_reflect_gf_initialize(member_index, preceding_character)
    - [" r9 o0 P9 F) w, T
  865.     @reflect = true6 C. N1 _, Y/ y9 W, J8 J9 ]' |
  866.     @shadow = true
    ; i$ L4 X1 l# r3 U, x4 M. r2 k
  867.   end
    2 X' L  C5 m6 `' q
  868.     ; g9 B& y( f# G" u. G0 ^
  869.   alias galv_reflect_gf_refresh refresh
    6 ~- e* s. [! O
  870.   def refresh
    * F$ Q3 ~4 _! g
  871.     galv_reflect_gf_refresh
    5 }0 O7 _4 T0 e2 ^7 |, D' t6 _& O
  872.     return if actor.nil?
    , W# ~. k0 Q& M. m( ]8 t. P6 v
  873.     @reflect = actor.reflect
    . l4 R4 g, H! ]* {
  874.     @reflect_sprite = actor.reflect_sprite3 N- ^5 H1 y8 }* m  u
  875.     @icon = actor.icon0 P# }- A7 d& p# G1 y- {
  876.     if SceneManager.scene_is?(Scene_Map)- [( M$ g( A  i3 C4 }4 q
  877.       SceneManager.scene.spriteset.refresh_effects
    ) G0 p  P0 R7 d% L$ \# T9 j1 e
  878.     end+ I' H2 ]! S- v- b. w! K
  879.   end5 q& u4 H* o0 `; O( l( n6 u7 f
  880. end # Game_Follower < Game_Character
    4 F! ^6 K; Q7 B; q
  881.   8 h" M# A, F! R9 Q8 A
  882.   8 ~1 a% \9 P+ E, [% y9 N
  883. class Game_Player < Game_Character
    / h# x5 Q" h5 y* X4 ?9 Z7 b
  884.   alias galv_reflect_gp_initialize initialize
    3 n1 A, Q- i, z$ W. W
  885.   def initialize" @5 w% F" C7 ?
  886.     galv_reflect_gp_initialize$ q* c+ a) H" [% U" }$ Z
  887.     @reflect = true. W2 f& j8 L/ |
  888.     @shadow = true/ }# e4 o* z6 T. o
  889.   end4 a- D  ^: V* l( e6 e- {$ j
  890.     - {8 c4 x) h# D, l# b% d
  891.   alias galv_reflect_gp_refresh refresh4 Q1 U. t5 o7 n4 u$ W
  892.   def refresh: B; h) f- [8 `: L( h
  893.     galv_reflect_gp_refresh3 N3 P) t# j. H7 d9 G. @+ c7 z
  894.     @reflect = actor.reflect
    " s/ O' i8 s& [( Y) V9 ~4 E8 t
  895.     @reflect_sprite = actor.reflect_sprite( t- Z7 x! F" q: H8 ?
  896.     @icon = actor.icon: O) t# k2 ^3 v: w* p* {; T
  897.     if SceneManager.scene_is?(Scene_Map)
    + R) K7 X7 g( P) e3 D. Y
  898.       SceneManager.scene.spriteset.refresh_effects8 I$ m+ e* s" T& k
  899.     end. W# R+ G" ], r& h5 b9 X# e2 ]: G
  900.   end
    * l- a, m. z7 A5 F
  901. end # Game_Player < Game_Character5 o4 T# x6 U4 A% \& o+ j" f4 C/ |, J
  902.   ( H% r- u2 W* T
  903.   
    ' W# v. E; \/ z# ~
  904. class Scene_Map < Scene_Base
    * v5 F3 x4 K/ w+ Z
  905.   attr_accessor :spriteset. i, k( ?8 ?6 k/ p7 S
  906. end # Scene_Map! s! x! T2 V8 O+ \2 r1 L. A
  907.   & }" v8 T; a' p3 k0 @1 y. ]! M
  908.   * ]5 ?* f: H6 m: s/ c
  909. class Game_Map
    ! u/ A0 b9 E" T2 @2 s
  910.   attr_accessor :char_effects+ R6 _4 V  x% m) v: Y/ |" E
  911.   attr_accessor :light_source
    " s! T' s- W" A: `3 @& r- P
  912.   attr_accessor :shadow_options. s# R- S: X6 r5 j! e7 }# U
  913.   attr_accessor :reflect_options, V0 ^* g. f/ t8 k& t5 K
  914.     + w/ }$ w% l! z2 R9 e- c
  915.   alias galv_reflect_game_map_initialize initialize5 w  H/ t; t7 z' f* E" D
  916.   def initialize- u  N, x% ]& ]3 I. n1 D$ h7 L% f  b
  917.     @light_source = []( @$ I' W% W7 [6 B* t
  918.     @shadow_options = [80,10,false]
    ( ^; ^, s8 i8 ~; v8 {* f. L: I
  919.     @reflect_options = [0]
    1 B5 x7 `& K! V6 d0 I2 n+ h: \
  920.     @char_effects = [false,false,false,false]& r/ B) Q% H4 c- V) w0 p+ T
  921.     #[reflect,shadow,mirror,icon]
    - r# K. I  H/ v/ F
  922.     galv_reflect_game_map_initialize0 g3 ?, }; ?/ h8 a5 |7 B0 M6 @1 r
  923.   end
    & O' O: R* N/ p3 _: f& K
  924.    
    3 t+ @' C/ L9 u6 x
  925.       l. ?' Y+ `' p
  926.   alias galv_reflect_game_map_setup setup& T5 h0 m9 I; o) u+ C( s
  927.   def setup(map_id)
    0 \! e  }( N3 b+ R7 p) W- F
  928.     galv_reflect_game_map_setup(map_id)
    8 s9 e1 `0 n: g/ B, i$ y
  929.     reset_char_effects
    ! D3 y" N: V1 E
  930.     do_all_chareffects5 S3 T$ u8 h) I5 ]' F( t! z
  931.     if SceneManager.scene_is?(Scene_Map)
    : P9 D1 n% x' O& R$ D; b
  932.       SceneManager.scene.spriteset.refresh_effects) U$ C/ X  ?  p6 b
  933.     end
    + T! J  b! |: U+ T$ t0 c) W% r- F
  934.   end
    * E) E% T4 x' w: @/ y/ m
  935.    
    - `" {5 C! K: {) h9 e8 ^# T
  936.   def reset_char_effects
    . a- H" ~: X! F
  937.     @light_source = []$ m& g1 N' P" |
  938.     @events.values.each { |e|
    ( Y. I7 b/ s" M! e5 k
  939.       e.reflect = false
    ' B# S" \3 a( P) e
  940.       e.icon = nil }
    ; a% {4 }* l0 Y/ l4 N7 }3 t
  941.   end
    % }# |" W2 ?& |* K7 O" v
  942. end # Game_Map
    % o0 c( }6 ?3 t% U1 j. D) `
  943.   9 p) T1 B3 Y- G' N1 F) \
  944.   
    ! l: L* }; G5 u9 m  d* P1 D% v' q) Q0 U
  945. class Game_Actor < Game_Battler) D; E1 i* d# _% d. Z/ h& F9 c, z
  946.   attr_accessor :reflect2 _9 {. R( R4 v3 A( `- [
  947.   attr_accessor :reflect_sprite
    ( \9 _' H. A& [
  948.   attr_accessor :icon0 e1 j6 i4 g0 Y& x& H
  949.    
    - Q- i& \2 C% w5 N  q8 V5 m. r2 T  \  b
  950.   alias galv_reflect_game_actor_initialize initialize
    5 o! b8 R$ e6 ~( b+ ^) U1 T( T, \% c" }
  951.   def initialize(actor_id)8 Y* T8 b" r4 N. x8 y# v4 C8 O
  952.     galv_reflect_game_actor_initialize(actor_id)# P9 P5 T" F& l" n) v  L
  953.     @reflect = $data_actors[actor_id].reflect
    0 v' B& c& A. s. @: a6 Y4 y3 T
  954.     @reflect_sprite = $data_actors[actor_id].reflect_sprite
    : g, d! g( _% K9 d
  955.     @icon_offset = [0,0]% ~, L9 p( r  m+ N! T
  956.   end
    2 H7 `9 G' P3 j" g+ U# N( N) i3 M% j
  957. end # Game_Actor < Game_Battler
    . ?% E/ N' _& A' r3 R* S; Y
  958.   
      f* ^4 e# j. G! M8 s
  959.   - G8 I" u# O  j0 ^, g" C
  960. class RPG::Actor" ~- r+ H2 V0 _# ^7 X
  961.   def reflect_sprite
    9 {' f" K$ m9 l
  962.     if @reflect_sprite.nil?
    1 m3 g. A, S- X2 [" F8 @
  963.       if @note =~ /<reflect_sprite:[ ](.*),(.*)>/i
    , E" B# K3 v& M6 u$ T( X
  964.         @reflect_sprite = [$1.to_s,$2.to_i]9 [* D; _7 I' J$ i8 a2 ~9 I2 G( A
  965.       else
    " v% m8 C! N; v% Z) p  ~; a
  966.         @reflect_sprite = nil
    7 @- y( u3 g2 S
  967.       end5 }7 s6 h# ~6 w+ [* [
  968.     end# \" i$ X8 [) t( p" y5 |
  969.     @reflect_sprite
    % Q: }1 ~  R2 Q5 |
  970.   end
    / E# M7 U" ]4 J4 }
  971.   def reflect
    0 S$ ]: D- ?" R, Z) z
  972.     if @reflect.nil?
    / t/ b$ j# h5 {6 {7 {
  973.       if @note =~ /<no_reflect>/i
    * T4 X, h1 B3 x; a$ v
  974.         @reflect = false
    + C8 K* l5 `: d9 u$ O) ^
  975.       else
    . E9 {* N9 u$ {/ G
  976.         @reflect = true. ?% ^$ _+ D. K0 K
  977.       end
    , c) y  R9 S$ m* H9 M
  978.     end
    ) [+ F4 _/ Q) a! K1 V. {
  979.     @reflect# c" O8 G# e2 D1 E  d+ H
  980.   end. V% Q: V. K! V) ^: e7 A
  981. end # RPG::Actor
    ; _0 o9 ]* ~+ ~7 J
复制代码
回复 支持 反对

使用道具 举报

梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
3
 楼主| 发表于 2014-6-25 11:35:49 | 只看该作者
记得口袋妖怪的池塘是有倒影的
回复 支持 反对

使用道具 举报

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2026-6-5 07:42

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表