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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

% B3 H! d; U* ?! `+ V9 k0 Z9 _这个代码怎么用啊,有大神知道吗。我从国外找的。0 |  B- D3 y7 c% B( \3 s( E
http://galvs-scripts.com/2013/02/21/character-effects/
( k. h) y6 r# Z% m是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#4 \3 N$ a+ a! P6 x% Q
  2. #  Galv's Character Effects
    ! k9 P! _% N# ^, a6 F
  3. #------------------------------------------------------------------------------#
    ; J3 B% X4 X0 R$ K; J% U; b( F& F
  4. #  For: RPGMAKER VX ACE7 W3 X* K) x0 V
  5. #  Version 2.14 E/ x8 l/ m& t' D3 q9 m- W
  6. #------------------------------------------------------------------------------#
    . d) V/ x; ?- o' J* n
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    ! A1 k  n  R1 _- A+ I/ z
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ; L% ?! ]1 L( c7 _( X7 c
  9. #                           - Fixed shadow facing bug+ ~* P& `: l7 v% V
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows0 W2 s3 j) H* j( Y7 \9 E
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
      B% U: w# o4 \7 U4 j$ _- w
  12. #  2013-02-22 - Version 1.7 - bug fixes. u3 m8 f" ~4 B, Q% B$ |
  13. #  2013-02-22 - Version 1.6 - added icon effect8 s. v# x9 \# {
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    1 L: O( {) q$ Y5 B
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
      \  i& y( C0 J$ {) Q
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    , _' n4 a* _- d" W2 n& k
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)7 k! X' ~& W# }3 K5 O. l( G) Y
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    , G5 f5 P( U7 s' I
  19. #  2013-02-21 - Version 1.0 - release# d( J- b( I- U: A/ s. f9 z, }
  20. #------------------------------------------------------------------------------#9 c- k  {5 {; b! J
  21. #  This script was made to provide some additional effects for characters such/ D0 _3 L' K) C: t9 e6 t' b
  22. #  as events, followers and the player on the map.
    - S" S6 M; x1 m" j' }* o( w
  23. #  Currently it includes:( y, f0 U& L+ ]+ u7 U
  24. #2 b  v# o2 T7 `4 W# J/ t, M
  25. #  Shadows
    , ^5 }: C% V0 |7 ^9 s! u1 W
  26. #  Shadows that appear under player and events in a directions depending on0 z1 X' }$ n2 D  H1 }
  27. #  a light source that you choose.! [: v) l8 |, L# e$ b
  28. #
    * T: y) O3 J( |1 o# u8 v
  29. #  Parallax Reflect3 V9 H) |: t; J2 _9 ~4 Q
  30. #  Reflections that appear on the parallax layer for events and actors to be
    ) y3 g4 T8 r( J1 j7 y, n: n
  31. #  used for things like reflections in the water or glass floor etc. To get
    7 a8 s/ i1 r- }4 F  Q7 o' Q
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    , C$ O: O  T( t- {! `$ C
  33. #  partially transparent.1 y* c' F' ^: m3 D9 o* }' f7 D
  34. #
    8 ~$ [; p2 x# e
  35. #  Parallax Mirrors
      L$ V6 v  x9 [6 x
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    & _% t) q6 N* h- r, d5 V
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    * G+ l. ?, q& h# Y
  38. #  changed so actors and events can use different charsets for their reflections
    $ e6 s& C. b+ d0 q0 {
  39. #
    . Y0 D3 G& Z& U. u8 p
  40. #------------------------------------------------------------------------------#
    % R- n. T! }, K" S' d: f$ n
  41.   
    : C* I+ h3 V, _  U, K1 e2 A( f+ z
  42. + q9 X6 j8 R/ b; T
  43. #------------------------------------------------------------------------------#
    3 }. d5 d5 C' L) N) s4 ?
  44. #  NEW - First event command as a COMMENT' S. @8 s5 }6 T5 W: F: T9 V
  45. #------------------------------------------------------------------------------#8 m3 \0 m: q% h( r7 j: ^5 y1 |+ Z
  46. #  You can add a comment as the first event command on an event page to set if
    - {* R0 d6 z" P5 ?. `
  47. #  that event has an icon, shadow or reflection active. The tags to use are3 z. x5 U$ N/ U) ]5 d; j( p2 ~
  48. #  below, all must be on the same line in the comment.
    ' \9 |  f7 J/ @
  49. #+ U3 D8 K) j/ H: [
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)8 z. ], ^8 v+ x* Q2 v6 f/ \% X
  51. # <shadow>           # set the event to display a shadow
    * v4 ^  I0 T" ^, U( [% @
  52. # <reflect>          # set the event to display reflections2 @% a' O2 I7 P/ ?8 G; s/ \
  53. #
      H5 T' q. I  `) T& U% R4 z: a2 D
  54. #------------------------------------------------------------------------------#
    . C3 A- r  b# M3 w' ?
  55. #  EXAMPLE:. R2 D/ D! Z# L1 s% `- [9 K
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event6 I, ~. U  n# \' p1 J; k4 G( Z
  57. #------------------------------------------------------------------------------#
    : j/ P8 z/ L" r, y4 @
  58.   Y; ^7 ], T; C& G
  59. " C9 \& r* F! _; j& _' |1 p
  60. #------------------------------------------------------------------------------#( _; ]; F' O: P
  61. #  SCRIPT CALLS:- d# }3 D' w) M  B8 {
  62. #------------------------------------------------------------------------------#7 Y) U) Z/ _  O3 q2 T
  63. #
    # x0 O9 ]' i' k
  64. #  char_effects(x,x,x,status)
    ; w/ ^# s, M: @: A; W5 S5 M
  65. #( _  U  T4 J3 k" x
  66. #------------------------------------------------------------------------------#5 u2 K  t0 q7 u4 b$ `3 q
  67. #  # each effect can be true or false to enable/disable them during the game.9 \$ J- ]1 y+ u7 d
  68. #  # you can change multiples of effects at once, x being the effect number
    * y& t9 k7 O5 s8 S/ e9 M
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons2 t! @7 v* F# f4 y+ Y
  70. #------------------------------------------------------------------------------#
    , O8 a4 o1 r" ^+ ~2 B
  71. #  EXAMPLES:/ \3 M1 g" O& L) z! o: E
  72. #  char_effects(0,true)              # turn reflections on% y2 _* K! v7 z. d! Z
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    / Y: _) I' ]. Z: n0 j
  74. #  char_effects(1,3,false)           # turn shadows and icons off* S9 n# e  d$ ~) F
  75. #------------------------------------------------------------------------------#  X( d& y" y9 F( `7 U% g
  76. #
    " U5 N& D+ G; {2 Y9 H
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset, b+ b: ?& y, G% b0 k
  78. #8 `5 k( o' j. @+ c4 m
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    ; x- A7 R6 J" o3 y4 z1 B. ?- O
  80. #
    , z, [' f+ ^* Q% x) ?- p
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset  R# S4 Y1 e# Z
  82. #
    # J8 q' s8 k5 L! H# d
  83. #------------------------------------------------------------------------------#& m! Y& G4 W! _5 h2 ?% `
  84. #  EXAMPLES:
    9 p1 N5 Q. \. L) ?9 }9 z
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite! g( n! i' D. Y. N- O4 u8 f
  86. #                                    # in position 2 of "Actor2" charset.
    ; S0 e. ~9 R# m4 F$ J0 s" {' F' V) b
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of! p0 }6 F8 f3 `: H9 _/ q
  88. #                                    # "Actor4" charset.& I$ T( O0 l& |4 s$ T
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    8 W! @6 o6 ^, u' B3 ?9 J8 w/ Z
  90. #                                    # "Vehicle" charset.
    / e1 v* M# `$ y' J' D2 i, m
  91. #------------------------------------------------------------------------------#
    7 R8 F9 X* v" s; U/ l  y% d
  92.   
    * X) m% q" U- }
  93. #------------------------------------------------------------------------------#
    1 i5 v: |5 x# s( M; ^1 b
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    & _1 U. |, n7 o, M9 {
  95. #------------------------------------------------------------------------------#+ n- B2 d1 i1 c, \
  96. #  H& T' x! }2 ~0 J6 Q: E/ g. q0 F
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off; ?  V# e+ H) x% c
  98. #                          # use this to specify for mirror and reflect.0 u7 Q0 u1 f- N! c8 ~6 h
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change4 s& A) x; l; Z6 C% q+ z! g8 y
  100. #                          # to change all events use :all
    4 m9 h7 B& ^! y( _+ b0 k
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make% p" p. U! ~/ a
  102. #                          # it 0 for no icon.& [; `5 z& w7 J% l  }7 A. d) @
  103. #% ~$ D$ k- b$ V! M8 a5 b
  104. #------------------------------------------------------------------------------#: J6 C/ H! i) Q9 v! M: I
  105. #  EXAMPLES:* U) a( d7 A1 e& ~# o
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    ) y9 m3 Y. {* N6 K5 ^
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    + H+ Y+ ?9 L& s
  108. #  reflect(:all,true)      # Turn all event reflections ON; _  u" W/ L. w
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear& U, D5 H: K/ d3 ?+ e4 V4 k% j+ k" \
  110. #
    + ~# h6 V0 ~) A" N7 B4 ~7 j- `
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering. h4 |8 U' B+ E* J* M3 w' A
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    " c. v+ B# k. w0 g  D, ~# ]
  113. #        should use these effects sparingly and only activate them on events. \9 @3 X8 o. c0 P; Y+ `' p
  114. #        that require them.7 d; G( @3 P4 @+ }$ \1 o7 ?; R
  115. #------------------------------------------------------------------------------#
    4 _2 _% {" Q8 h% @
  116.   
    - t. n% q! D# X& c+ B2 c/ G& D0 I
  117. #------------------------------------------------------------------------------#
    1 k% p6 ?+ K6 O4 j# b# i5 N" R
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    + d& Y- {9 ?' g, Y# H$ O* E
  119. #------------------------------------------------------------------------------#
    * p: z; M# a3 a( X1 ~% s( p, X) e
  120. #" i' Z! m  t& |* b+ f' R" }6 w
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default ! \/ _: x  k& X2 \; P4 H5 K
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    5 x' ?$ O- F& u7 u  c
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    $ B8 ^/ w7 N! o% C& l8 \
  124. #: T; W5 q4 ?: j. A) e# C
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    * m0 z: l$ H# N! K5 Z
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    6 N  F; I( t5 C/ ]# a3 K7 V3 B
  127. #  v_icon(x,x,x,icon_id)
    % `8 ]) {7 \& ~3 x1 S" N
  128. #
    ! q! v6 J( c* {& {, {
  129. #------------------------------------------------------------------------------#
    5 G1 }  x6 T$ ^- z
  130.   $ {  v. p8 A1 V
  131. #------------------------------------------------------------------------------#
    % N8 r. i  Y# D* w8 m3 a3 _
  132. #  SCRIPT CALLS for shadow options& U; U: {( M' @. s, f7 n9 ^
  133. #------------------------------------------------------------------------------#( x% W  B6 M; c! Y
  134. #
    ; a/ q3 M; I+ E5 u3 `; o
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    0 e6 F/ X2 i, @0 Z  t( k
  136. #                              # light source number you wish to change (for, D- D4 e) i- Y  @; V! Y
  137. #                              # more than one). These are reset on map change.
    5 H1 Z* c# a7 R/ S1 Y6 }
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
      h2 v) Q/ v4 }. y8 w0 W) k5 W; M
  139. #                              # This will need to be in parallel process if you
    2 l; k$ f3 z7 J. B! p
  140. #                              # want it to be a moving light.
    6 W+ I4 v: B6 r* A/ Z
  141. #% [6 s, @# P) d  C! }" W
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below8 Q5 L0 ~$ \1 `9 o7 k' @6 l$ e
  143. #/ X. A" I! w8 a& s3 J! E, m9 l: J+ x
  144. #    # intensity = opacity when standing next to the light source (255 is black)7 C4 z2 b* T, W. N- o
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    , e! c- b; N* y- I2 d" F
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.  x9 R) W7 r" G% T! k$ R# X
  147. #
    4 S: R+ Z# X' X/ q9 }& w) U
  148. #------------------------------------------------------------------------------#
    3 Q4 T( q- k. }5 q
  149. #  EXAMPLE:
    * p5 k: P* h/ P
  150. #  shadow_options(80,10,false)    # This is the default setting.
    ) r: a, O% _/ A) ?8 P# X, D
  151. #------------------------------------------------------------------------------#( U) V& g1 A, P& h1 ]
  152.   5 \( {$ N+ l0 l' k' ]& O! ]0 I# _
  153. #------------------------------------------------------------------------------#& W: _* e; T; u& l
  154. #  SCRIPT CALLS for reflect options4 Z, f* q; F% ~5 d
  155. #------------------------------------------------------------------------------#
    6 F$ m6 F' ]& [; @- _( N+ u0 g8 T
  156. #" T- b' u1 \8 g2 \( |
  157. #  reflect_options(wave_pwr) & m- P2 D+ K$ j% E- v6 K
  158. #% i* ~/ V4 b0 I' w; s
  159. #    # wave_pwr = how strong the wave movement is. 0 is off# V' ]$ A3 Q! L' W
  160. #
    , c4 L, h6 H+ F* b8 X) l, v& [( z
  161. #------------------------------------------------------------------------------#
    $ Q0 {" l/ i% _2 v
  162. #  EXAMPLE:
    6 I) O# j# f- B1 B6 W( z9 P2 _  p
  163. #  reflect_options(1) # Turn wave power to 1
    , e* e/ N! K9 K  u/ a# e
  164. #------------------------------------------------------------------------------#
    ! g) \: ~! c& `  d9 h
  165.   * a0 }8 ]8 x& b0 O0 i+ V+ t+ x
  166.   
    # }) r: W% W; H; [
  167. #------------------------------------------------------------------------------#2 e2 q  T* z- X
  168. #  NOTETAG for ACTORS
    3 N% h" F& L) `! A. J* J
  169. #------------------------------------------------------------------------------#; b0 V  h1 e) `# |# P
  170. #( f, _+ ~0 j; v) E/ F; _2 D6 n
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)6 r$ }  y0 U0 b' H4 p) M( t  Z
  172. #" Y- e4 L. Q: I# Z
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections! w3 ?, o8 ]( b" q2 A" m2 j  z
  174. #                                  # and use the character in position 'pos'
    # n4 b  K0 B- }% M
  175. #
    + x6 y( y1 T4 `' K
  176. #------------------------------------------------------------------------------#( h2 p6 R. Z, p4 |6 O) Y
  177. #  EXAMPLES:
    1 f+ u- ]3 r. Q( {
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    - ?: i  r1 R0 N3 I9 Z
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    $ l% l$ G) k) s; v2 a* F, \3 Y
  180. #------------------------------------------------------------------------------#! [0 D0 W( m$ F# ~- ^( {9 L0 @2 q5 b
  181.   8 R0 O8 N% F* i+ y2 t
  182.   0 c0 q1 B5 b5 @5 \* u# n
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    ) }+ `! x/ f! ^! n* e+ N
  184. module Galv_CEffects' `" n% C! d* ^7 v3 S/ _1 k- l& f
  185.   - \  o. f! m, ]1 x% u
  186. #------------------------------------------------------------------------------#  
    7 q, }/ |5 T! r; |" e. L
  187. #  SETUP OPTIONS
    . Y5 I7 j9 e, F7 ^2 A5 H
  188. #------------------------------------------------------------------------------#
    4 |1 A, U3 C3 \" K
  189.   
    8 k5 c. M" M# V' G  l
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    ) I4 r+ V+ o) Q7 T+ n8 {( U
  191.                         # region on the wall you want to make reflective (and
    8 F, a1 m, q: f7 p- l' A
  192.                         # then use tiles/mapping that make the parallax visible)# b8 F1 |0 r* o4 w8 l- }' A1 z4 k
  193.   
    % k5 x( s9 \% {- E8 Z" N
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters. I/ P! w% g2 A& b6 F
  195.     % b  a* A' \2 b5 O* o/ s
  196.   REFLECT_Z = -10       # Z level of reflections
    $ p" g, S6 m+ X% z
  197.   SHADOW_Z = 0          # Z level of shadows9 {' Z" W0 k8 i3 p
  198.   4 m. D  N' K1 z6 E" T
  199. #------------------------------------------------------------------------------#  
    4 J$ Y1 }$ ^% a5 H# m
  200. #  END SETUP OPTIONS6 e8 P2 D% N, P5 p3 j1 m
  201. #------------------------------------------------------------------------------#! W+ Z# A" X+ ~
  202. end8 R  R2 y7 Q9 t. W" F, i, k. \
  203.   
    / I3 q# f# U9 ^6 T
  204.   
    ) T2 X% P8 H6 T$ U2 l/ J1 r

  205. ; g9 `, g+ g& m9 H( v

  206. : b" l) Y+ e  d- ~1 \
  207. class Game_Map' \5 R: K& y2 j+ {- J* N' a% b& c/ x' y
  208.   def do_icons(refresh = true)1 E( x# n$ I. i
  209.     @events.values.each { |e|6 Y  B! s8 [( @( s# m3 j
  210.       next if !e.list
    : o2 Q1 y3 U9 i0 b' o$ q
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/( o) a3 ?" |, I4 A5 \
  212.         e.icon = $1.to_i: r1 L& @7 l9 S' u0 z
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    ) U. B# W/ p& d3 r
  214.       else
    7 P4 L& N: t. o5 A# _( C' o/ r
  215.         e.icon = 0
    / U% l- `, y- |& F3 V1 T- K
  216.         e.icon_offset = [0,0]
    7 D# H+ ?: z6 k0 T& X) a% g
  217.       end6 z0 k& c/ v4 A9 |' E
  218.     }
    ( n9 A. }# s1 J
  219.     SceneManager.scene.spriteset.refresh_effects if refresh/ a+ m5 |. R$ E
  220.   end; x. _$ G7 k5 x# [
  221.    / ]5 O' D! X  y3 b  x
  222.    8 |  H7 @9 k; x/ H6 Y5 k
  223.   def do_shadows(refresh = true)
    * C' P& Q9 H& r# C* M5 S
  224.     @events.values.each { |e|1 z) E" |# N# g1 _" H9 Q
  225.       next if !e.list
    : H7 F; K: w( A! u
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/8 g$ v) m  b( F+ S. S
  227.         e.shadow = true
    / T0 C. n+ }. v2 }  P. ]0 u: d
  228.       else, _0 x4 ?9 e4 l% R
  229.         e.shadow = false* n' J! a" P( H7 |5 r5 k% T5 R: M
  230.       end2 G& D; x. J" s, \( G
  231.     }
    4 p( |  X3 r1 c: Z
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    + J, t0 K6 Z3 r+ F
  233.   end+ _; h! K0 ^/ Z
  234.    * H* e* B8 `' T6 E9 d% u3 j0 Y
  235.   def do_reflects(refresh = true)6 S7 J/ E( k! S" \  J0 X# `
  236.     @events.values.each { |e|3 ^$ b5 A5 G- {" n
  237.       next if !e.list" l- S: E( r+ }6 z/ O* _
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/$ r+ \0 t' M2 C" t1 K& z, t
  239.         e.reflect = true, N& t7 K, k+ T. C
  240.       else' K/ f1 k3 d5 }4 {& o9 j
  241.         e.reflect = false
    9 C8 `, Y4 H  O3 l
  242.       end3 m+ }3 p8 @* I: L' f
  243.     }. K! D& }+ H( `; w% e
  244.     SceneManager.scene.spriteset.refresh_effects if refresh) I) U) b. S% F
  245.   end
    - q/ N- o: {4 K4 u
  246.    
    , i# P9 I6 i! o" V, v# b
  247.   def do_all_chareffects6 Z, W" ~# G* m  Z* Q
  248.     do_icons(false)+ L) T& l  ]0 C- H+ W9 q; i$ ^
  249.     do_shadows(false)
    ! A4 |/ R6 v& b& b. T/ ~5 R0 C
  250.     do_reflects(false)8 N. x1 M9 F) R6 ]$ X9 N
  251.   end
    # h" a2 h1 x: u- U* e3 T; _5 g* p
  252.    
    ( g/ C) g, {7 J1 F* K1 ^/ T1 h
  253. end # Game_Map2 c2 X8 W2 F5 o$ N

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-5-29 23:22

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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