查看: 1556|回复: 2

水面动态倒影,求解

[复制链接]
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
回帖
4
发表于 2014-6-25 11:31:39 | 显示全部楼层 |阅读模式

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

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

×
[code][/code]8 m; Q0 d2 E; a
这个代码怎么用啊,有大神知道吗。我从国外找的。
- k- M3 j5 H- T  N' I$ Fhttp://galvs-scripts.com/2013/02/21/character-effects/* i4 g% o/ E" g! g" s& i$ O  S5 B
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
回帖
4
 楼主| 发表于 2014-6-25 11:32:43 | 显示全部楼层
  1. #------------------------------------------------------------------------------#9 q/ d! W1 ^1 g- g# V/ @
  2. #  Galv's Character Effects1 p5 C4 t/ g% L  X
  3. #------------------------------------------------------------------------------#; O* f. b( @& K
  4. #  For: RPGMAKER VX ACE; ]& E  j0 S, ^6 k: p2 B& J+ M* ?
  5. #  Version 2.18 G* Y7 E) G/ C+ H
  6. #------------------------------------------------------------------------------#
    . |2 [6 f- W7 B
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    : ~3 G4 s# |* k- |  n3 ?( u# u& c1 n0 ~
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    3 z& R. I" ?7 h- P& p
  9. #                           - Fixed shadow facing bug
    9 w$ U( ^5 B* t3 c# e
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows7 V+ \. i( l+ o" X" X; h
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows/ M7 s- q' R& w$ ^2 O
  12. #  2013-02-22 - Version 1.7 - bug fixes$ G  r/ C% E# j5 X1 M! L' k- J
  13. #  2013-02-22 - Version 1.6 - added icon effect
    & f0 |# V; g+ N- N! D$ M
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    8 a2 B% _! H. Z" `
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles6 z. W! l% F7 S8 J/ D9 @1 A
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    0 j  Q  L  x2 O/ j  W
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    8 l& f: W: E# w, S8 Z$ D
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    & B% x5 {; V, `% G) H# D* U/ _
  19. #  2013-02-21 - Version 1.0 - release' S; ]( H4 l2 J3 p# W$ G
  20. #------------------------------------------------------------------------------#5 F* T* c' g: p) t% D+ @1 Z: D
  21. #  This script was made to provide some additional effects for characters such( w6 _* N' y3 B2 a% p/ ~+ p, H
  22. #  as events, followers and the player on the map.
    + n+ c  f5 J) `0 _; r
  23. #  Currently it includes:
      M$ b. c2 _* ]% K* K) n$ {9 n
  24. #1 P5 L2 ]: H% q
  25. #  Shadows
    " A' z7 v! ~/ `
  26. #  Shadows that appear under player and events in a directions depending on
    2 q) g0 F4 ?# }8 ~
  27. #  a light source that you choose.2 y+ @* t! a/ Q& h( @. ?0 l
  28. #
    2 W- r; E3 m+ e2 v
  29. #  Parallax Reflect! U. U; F; i( S1 ^
  30. #  Reflections that appear on the parallax layer for events and actors to be
    3 q! Y9 }% }; u7 l" z
  31. #  used for things like reflections in the water or glass floor etc. To get
    $ _: w/ ?3 Y2 i; V6 }' A( I
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    8 T- G2 Q3 E3 M& K( P( h- q/ u
  33. #  partially transparent.
    0 W. s$ V# _( {( C8 \, Y
  34. #2 c4 \2 I4 K' _" q9 J
  35. #  Parallax Mirrors
    % b: A1 U/ ]& N+ F9 V
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    / A$ |# p, o$ H% Q
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    ) N, a7 @1 _' T2 W# z3 d$ g7 `
  38. #  changed so actors and events can use different charsets for their reflections
    4 V% m# |( H6 |+ w
  39. #0 r' X1 |4 {0 h' |8 j$ k
  40. #------------------------------------------------------------------------------#1 W; m; @( I5 B: `! L/ I
  41.   
    7 Y7 [& L, k! h/ h7 @
  42. 3 B: r5 j) ~& z% L$ E5 p  U
  43. #------------------------------------------------------------------------------#: p1 H! j" Q8 }! ~& p% }
  44. #  NEW - First event command as a COMMENT0 ?! q1 o; b2 O. n3 N
  45. #------------------------------------------------------------------------------#* f. c& U' F. i4 C' ?) S
  46. #  You can add a comment as the first event command on an event page to set if
    # g/ F. t8 J: H/ L& ]; F* V1 M
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    5 A" i/ f, T' Y" S  S9 k
  48. #  below, all must be on the same line in the comment.1 L8 u- W" q3 n* Q
  49. #
    6 f! z/ i" i& z; f
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    * |% ]; e0 n$ G7 L, ~5 g( o
  51. # <shadow>           # set the event to display a shadow* G" y- L, K8 y# F* A# [
  52. # <reflect>          # set the event to display reflections
    : o! \& J& Q# H* z) R
  53. #
    ' a' V- s/ }8 R% }5 Z& k
  54. #------------------------------------------------------------------------------#
    8 l) W7 d$ q8 [# ~
  55. #  EXAMPLE:7 Y  ]0 ]6 k# f* r) F, w
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    : P# f2 k( R1 B. _
  57. #------------------------------------------------------------------------------#
    4 n4 @* C! t8 v6 N. S

  58. 1 w0 [. K2 S$ B$ Z# R* h1 w- ~2 r

  59. 1 ?7 W/ h6 K' l/ Y- G' H- _% _
  60. #------------------------------------------------------------------------------#
    % D/ T/ g8 ~; x# T: z
  61. #  SCRIPT CALLS:$ X- L6 ^% @3 @8 w9 i; [& P
  62. #------------------------------------------------------------------------------#
    $ U7 [. M( [6 o, Y5 ^: t) V
  63. #! a0 |) ^) K2 e& Q  G  y1 L$ P. a
  64. #  char_effects(x,x,x,status)
    ! V* L3 t0 E, b8 m% b  \3 e0 P
  65. #
    8 N4 o0 H% V& k9 S
  66. #------------------------------------------------------------------------------#
    ' _) i' ~" |* h8 |6 \  K1 _
  67. #  # each effect can be true or false to enable/disable them during the game.* P( Y8 z% N0 K' f* O: l' }
  68. #  # you can change multiples of effects at once, x being the effect number
    5 c$ ?" d" _' n# O! W7 c
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
      E4 n! J; {, ~' [
  70. #------------------------------------------------------------------------------#  z* f% B  L7 q1 T$ c: B5 o' M
  71. #  EXAMPLES:) A9 O9 O8 I( m! _$ B# f: y! p
  72. #  char_effects(0,true)              # turn reflections on/ ]$ X0 }4 ^4 i$ U: l
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    / Q6 A' b- Q0 w) `
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    5 I- L- a* Q, b. t/ G0 e' A
  75. #------------------------------------------------------------------------------#
    8 T/ O- X1 M' _0 e8 |& A
  76. #
      d  {; P; v' ^  \8 c
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    & I9 }3 U; m' j, [# w% y6 Z
  78. #; \/ O' l# Y* h: v6 H' K
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset+ i. I: ]7 r: Z: D, t. w- @. N
  80. #; H: b  N3 a! e2 l
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset. ^# j; L2 E8 K7 U" ^/ H" [" C
  82. #7 A3 Z6 t3 [- `- m- {2 S
  83. #------------------------------------------------------------------------------#
    $ _0 _$ ]* `% A7 g' @
  84. #  EXAMPLES:
    0 c; x! O1 p2 [0 ]
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    $ I; f6 _4 @/ d1 y! X1 W  f. n( |
  86. #                                    # in position 2 of "Actor2" charset." w% I& g( p% d8 s$ y! F6 x5 D
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of* n$ C7 r5 o1 z5 @( t% f$ }
  88. #                                    # "Actor4" charset.' v7 l4 F; ?  n/ N* `% \% L' A
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of- J4 x6 B2 L( b% I$ h7 }% e; z
  90. #                                    # "Vehicle" charset.
    + n4 X. w/ f3 n8 K5 u
  91. #------------------------------------------------------------------------------#- F" l8 Z$ q" U" _  V; J
  92.   
    0 [4 k. `- w8 n& C# \4 d0 m1 {. |
  93. #------------------------------------------------------------------------------#7 h# o  a, d8 l: p* Z: H
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    - F$ _2 x# X$ Y/ Q
  95. #------------------------------------------------------------------------------#1 T3 F: r( {5 }6 K1 ^) {) l' E
  96. #
    - H; O% |7 E# r( P! ^
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    & d* `' `" }2 U- F; Q5 n0 U. j
  98. #                          # use this to specify for mirror and reflect.* D/ I# C. e  n: I! l* Q! w# E/ L
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    $ B$ n) L- y! k6 x' `7 a
  100. #                          # to change all events use :all& s. |$ J0 T0 [( c- u
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make( k1 P+ s% h' P& J5 ^* F& u; @+ q
  102. #                          # it 0 for no icon.2 F0 }: L2 C. ~. h# C, F
  103. #: N' L- L( [) p# D& ?7 ]1 G3 F3 Q; l
  104. #------------------------------------------------------------------------------#
    # M+ V' S+ d* z* W
  105. #  EXAMPLES:6 V; Q# _# ?7 t5 C4 o% O
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    6 V+ K! P8 y8 t# E+ P5 d
  107. #  shadow(1,false)         # Turn event 1 shadow OFF/ G2 W# v5 ?7 G! u
  108. #  reflect(:all,true)      # Turn all event reflections ON; b. U) K# N! ~, n  k/ n' S; B. g
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear7 b: B: w8 Z6 [$ f  \% n
  110. #! k, N' Y& L. j9 O+ I' C! J
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering# w+ ]  v/ y" q' ~' j1 {
  112. #        a map. This is a design decision to try to keep lag to a minimum. You6 e- f7 N' }. Z5 Z) m& V( N
  113. #        should use these effects sparingly and only activate them on events
    : Z# Z( x2 E/ m8 c0 m- k
  114. #        that require them.
    - b: c( y& T: N; `6 L
  115. #------------------------------------------------------------------------------#
    4 F2 q' P$ _9 v9 y. l
  116.   
    ! T$ y2 L; [0 p" |
  117. #------------------------------------------------------------------------------#
    ! O: _' a/ P& G8 T$ |+ z, D
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    + y) E# [, j6 c/ ?! Q# n
  119. #------------------------------------------------------------------------------#& S& s* Z6 y  u$ K6 j0 B, H
  120. #
    8 s3 M' R3 v- g  z. N/ ]! m
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    + d. U0 m5 h4 m
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 6 |7 \- D1 I: m$ A
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    9 \- `& w1 }4 K# ^8 `; L
  124. ## {: O' }) @2 U: h
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    : B2 b& N. r' F% b/ p/ @$ f
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles." D. G, [- z4 C! r! ^8 D& ]3 a
  127. #  v_icon(x,x,x,icon_id)
    / X: z: x* o( K% b# G6 d
  128. #
    ) R5 M4 A, v2 o! C/ e8 E
  129. #------------------------------------------------------------------------------#6 g$ z# _! A1 q# L1 F
  130.   + v+ Z  \$ x! a  ]4 X# `7 C
  131. #------------------------------------------------------------------------------#
    , J& K! K! G7 V: o& S" A9 v
  132. #  SCRIPT CALLS for shadow options- |$ ~+ I  [9 ?# N/ c, [
  133. #------------------------------------------------------------------------------#" T& {" R& G! E* u- H$ `/ x
  134. #( N/ g3 x2 f# `
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the 5 k+ ]$ d" R+ ?3 D0 L
  136. #                              # light source number you wish to change (for; }5 b0 C& ]6 _2 A: I8 f
  137. #                              # more than one). These are reset on map change.
    . ~: W6 f, J& i' D9 y- ]
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.' Q9 n4 r% m9 ?# v% a2 ?9 k1 C( F
  139. #                              # This will need to be in parallel process if you
    + m/ O( @" M" h! f4 w# E. {5 b
  140. #                              # want it to be a moving light.
    + I% K" `* t: e0 N0 Y
  141. #
      s& p' l: m! w2 b& z- u
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below& B1 g4 ~$ g  c9 x5 z
  143. #
    9 M& F$ i! c/ K4 g7 ?
  144. #    # intensity = opacity when standing next to the light source (255 is black)2 r0 i& p# {5 W" T+ e' R
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    4 p0 t4 L" d* F4 u! I6 C# Q% `
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.3 Q3 @4 B+ L  G4 W; a' p
  147. #
    7 ^0 u3 t& _1 |
  148. #------------------------------------------------------------------------------#
    + u7 D# W; Q0 a3 Y$ h9 Z; k
  149. #  EXAMPLE:7 P$ d5 u- c* I  W9 D- S8 m9 o
  150. #  shadow_options(80,10,false)    # This is the default setting./ t/ |5 O; v& a7 L2 |1 Z! D! f
  151. #------------------------------------------------------------------------------#: {( O6 O; L5 w  T5 u% i9 j; i
  152.   7 r$ \5 A8 R, Q8 i
  153. #------------------------------------------------------------------------------#
    0 M. w( @% K, W
  154. #  SCRIPT CALLS for reflect options% y+ _( |3 z! X. ^
  155. #------------------------------------------------------------------------------#! }1 H8 {; ^3 @5 J' K/ \
  156. #
    6 r/ L) ?7 a' b9 b, q5 I0 y/ q" x
  157. #  reflect_options(wave_pwr) $ c/ N' R3 W! A
  158. #1 G' W( j! c5 ^& v. L, }
  159. #    # wave_pwr = how strong the wave movement is. 0 is off  l  {8 `! h4 e4 F4 U+ P, v
  160. #1 A0 G$ X' L3 N0 I( d
  161. #------------------------------------------------------------------------------#
    % c' w6 p2 t# W- ^% N$ V# G
  162. #  EXAMPLE:  W7 F7 \6 v5 L! @# t
  163. #  reflect_options(1) # Turn wave power to 1
    / I. S! r/ M% q9 y! n0 ^& z
  164. #------------------------------------------------------------------------------#, L  Y% r! g' d" [
  165.   ; W1 P9 @% r" j# h+ Y( f$ J
  166.   
    0 M  Q" M( F8 m
  167. #------------------------------------------------------------------------------#2 U" L, W- v8 _8 s: q; o
  168. #  NOTETAG for ACTORS' s; o, k6 a  B/ n# @9 j
  169. #------------------------------------------------------------------------------#
    ' P( p/ y" o+ w* ], r
  170. #3 H) N/ c. D; C* f
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    , A5 c. H6 z! W% y
  172. #
    ; \6 P$ w/ \. o4 Q  I7 p( r
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections) d& w1 V7 k7 T) `, {
  174. #                                  # and use the character in position 'pos'% ^( R7 e" v: A
  175. #
    8 C/ F. g$ H" {/ I& Z3 Y
  176. #------------------------------------------------------------------------------#3 Y+ |& G) W% |: m* W7 b1 W4 z" k
  177. #  EXAMPLES:3 t& x4 j. Q+ Z" s2 @4 @( Z
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    : o4 `, ^! j+ K  n; A, a- `& F
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    . b. @% Q9 D  p+ Z9 U5 Z0 H$ b
  180. #------------------------------------------------------------------------------#! c: O7 a; c$ _. f, {
  181.   $ {' w2 w* J3 d, c( _9 @
  182.   * l+ d3 [: H8 N+ l+ j
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    7 K7 B. Z7 r4 X- `
  184. module Galv_CEffects
    9 M! S1 z2 L6 V6 S( s$ d
  185.   2 T0 L0 e& Z) O5 y2 `* H
  186. #------------------------------------------------------------------------------#  
    % G, b8 r# T) a+ q" d2 ^' w
  187. #  SETUP OPTIONS+ B: j! g+ |+ d/ V" c( N) J4 L
  188. #------------------------------------------------------------------------------#
    . J: d" @, H4 W" V
  189.   
    ; M3 V9 s2 d) a4 d7 q
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    # }1 I3 X. g5 s
  191.                         # region on the wall you want to make reflective (and3 s: x, E% d7 `
  192.                         # then use tiles/mapping that make the parallax visible)
    - |+ t% v* t4 w* q- C, b. M2 m
  193.   . ]0 c& W4 Z: m/ P7 Q% Q. `
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    + Q, S  G# [4 }6 N
  195.    
    ! @: x. Y4 o$ |% B8 {& \9 S1 M
  196.   REFLECT_Z = -10       # Z level of reflections3 ]. Y5 P$ c! ^" c7 }0 ]
  197.   SHADOW_Z = 0          # Z level of shadows; B% N- p. m9 `4 N1 e
  198.   
    $ w# ~; P: L2 F2 l
  199. #------------------------------------------------------------------------------#  - v; l+ f% z3 ~
  200. #  END SETUP OPTIONS" \$ G7 |/ C; A; C
  201. #------------------------------------------------------------------------------#; h. m7 e6 |3 d2 ^0 i
  202. end
    ! Z2 Z; Z& M' \. V- P8 S! S4 t3 `, V
  203.   
    9 N1 q- x9 j7 S3 v
  204.   " c. m. P4 h/ T  m
  205. 0 ~) u" g! [) U7 t0 o% d: w
  206. : A" _0 m3 a: C
  207. class Game_Map
    ; j; ]3 t* D& }! v$ a! D
  208.   def do_icons(refresh = true)( ^0 b2 J2 k- o) |4 ~
  209.     @events.values.each { |e|9 g4 k2 U  R: a
  210.       next if !e.list/ V( Y/ z% T. \: b1 K8 e/ M& r
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/. N+ B7 N' Q2 y: t: a
  212.         e.icon = $1.to_i
    3 T# W' u2 p* v7 F4 a  |7 n5 P
  213.         e.icon_offset = [$2.to_i,$3.to_i]5 {: L5 E# j: g! o) O
  214.       else
    2 w2 D7 Q9 C4 e; k0 u5 L5 W8 u
  215.         e.icon = 0% C& {' Y! G3 s5 P6 b- P
  216.         e.icon_offset = [0,0]( i" V+ |1 Y+ z. v, ]
  217.       end
    ( s3 x! h% Y. W! l$ R  E
  218.     }; J, ], w$ a+ m  }. k% U
  219.     SceneManager.scene.spriteset.refresh_effects if refresh) v$ s% R1 M8 q$ i0 u+ g0 \6 R/ O9 Z
  220.   end1 A6 i7 Y8 s. E- Z" x0 F
  221.    & W0 b/ P4 q( [- _9 i7 r% y6 v
  222.    0 u! w9 R+ i0 C
  223.   def do_shadows(refresh = true)# f. {, w* r0 c3 x5 ?9 m
  224.     @events.values.each { |e|- W" L" ^# p+ p( c
  225.       next if !e.list
    0 Q5 F& w4 q. Z- [+ d, \% q
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/  c& Y6 n/ D4 W% n  `* P
  227.         e.shadow = true  Z% \! k- n1 X; z3 X
  228.       else
    % W5 K: ^2 F/ t6 c. \
  229.         e.shadow = false" J6 X8 J9 Y) T& e5 [
  230.       end
    / |6 {7 g/ d+ R& @0 I# o
  231.     }
    . r- `9 j' n: n2 V3 z5 v
  232.     SceneManager.scene.spriteset.refresh_effects if refresh( w" x) n' R% t
  233.   end% W7 @7 U- d( f
  234.    
    7 D. e6 l2 c, ~. Q) G  w
  235.   def do_reflects(refresh = true)
    $ y% D, t7 S, M1 Q1 K& e8 S4 j
  236.     @events.values.each { |e|
    / O. N7 D# y( c! ?* }6 Q  d
  237.       next if !e.list1 q% L+ {+ Y3 ]( C
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/+ C% e' a" Y$ ^7 ^9 x' `+ N" ~
  239.         e.reflect = true0 J8 T* Z) W' |: v% D8 X
  240.       else+ E" @3 j! ]8 J
  241.         e.reflect = false
    ' J7 Q! J( {7 L& S2 l2 G
  242.       end
    4 B3 S' A" `' V) u8 U
  243.     }; I9 _2 h" q0 t- ~+ d
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    ( z+ K8 ]# V4 ^5 q9 q
  245.   end- N8 X" P! j1 y5 i2 x+ U
  246.    ' {  C3 u& G( m) r& ]
  247.   def do_all_chareffects. U1 d" N0 W+ [% g5 q7 j
  248.     do_icons(false)
    4 H8 U- X- d( V( t0 z7 U
  249.     do_shadows(false)
    # ^# X! x' f9 g' \
  250.     do_reflects(false)
    . O; |4 U+ u, M8 W7 M- _
  251.   end6 g$ y7 |' g2 H. h/ Q5 _, F
  252.    % {3 ^: |! P" z$ G5 k3 ~
  253. end # Game_Map( j; Q4 a8 I% h# h
  254. ; j' C0 f+ N- u9 Q4 \/ v
  255. $ b4 g! @6 W+ t7 [/ @) K) I

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

使用道具 举报

梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
回帖
4
 楼主| 发表于 2014-6-25 11:35:49 | 显示全部楼层
记得口袋妖怪的池塘是有倒影的
回复

使用道具 举报

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本发帖返回顶部