查看: 1515|回复: 2

水面动态倒影,求解

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

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

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

×
[code][/code]- Z% C" J8 m7 S$ Z# Z4 E! ]
这个代码怎么用啊,有大神知道吗。我从国外找的。6 P- T( w5 e* z4 Q1 E+ \
http://galvs-scripts.com/2013/02/21/character-effects/' K4 y8 }9 `' D& O
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
回帖
4
 楼主| 发表于 2014-6-25 11:32:43 | 显示全部楼层
  1. #------------------------------------------------------------------------------#
      ^, @6 [6 C- u1 D1 v( `
  2. #  Galv's Character Effects
    . P! T6 T: U- u& [+ z* X
  3. #------------------------------------------------------------------------------#
    + a/ v+ x3 i& A/ Z9 G. j! h  d, g+ L
  4. #  For: RPGMAKER VX ACE
    6 p7 T' Z# u3 b! P% [
  5. #  Version 2.1
    5 H3 k0 }  \! ~3 Z" o+ f. i6 n: m5 j
  6. #------------------------------------------------------------------------------#; x' w2 {2 K( G, x
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows" G) K0 B; y7 G- H
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects% B$ S1 s! A7 R' p
  9. #                           - Fixed shadow facing bug
    & o# Q1 e& E/ z, H6 L6 P
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows; z+ h  d, B8 h2 o
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    ( d7 H7 E2 e8 a
  12. #  2013-02-22 - Version 1.7 - bug fixes, F- R8 N( w: l/ O) h  [; s
  13. #  2013-02-22 - Version 1.6 - added icon effect
    ; h. Z9 C: u6 K& f! k: R. S
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    4 D6 a  M  U5 S
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    ( ^: d  Y2 E3 e7 |2 w4 k: L
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    ; o& ]. H  q9 U" C0 u5 b2 t/ y
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    ! e0 H3 `1 ^0 f
  18. #  2013-02-21 - Version 1.1 - updated flicker effect+ a- j5 }1 `( e8 U
  19. #  2013-02-21 - Version 1.0 - release
    * H  E. [8 e1 C7 q! A* _2 D
  20. #------------------------------------------------------------------------------#
    0 F" X* t& [5 {4 C5 ?# D3 G1 Q. o
  21. #  This script was made to provide some additional effects for characters such
    + `4 G6 U8 m; X% @9 f
  22. #  as events, followers and the player on the map.
    * i# z+ c- I, B. o, }1 F5 l3 J
  23. #  Currently it includes:
    & n6 w3 P' d& s: Q& o; s
  24. #) X0 y! S1 H3 J; M4 f( N: x
  25. #  Shadows3 ^2 F- q, a% M, ^3 v
  26. #  Shadows that appear under player and events in a directions depending on9 h( Y$ z/ E3 D5 A
  27. #  a light source that you choose.  J0 B: J" j$ L. q" Y
  28. #$ d- }6 J9 |3 F! O0 h( R8 G
  29. #  Parallax Reflect' ~+ a. w& T* b
  30. #  Reflections that appear on the parallax layer for events and actors to be/ E  |5 N# r; w$ j3 i: ^3 ^' u
  31. #  used for things like reflections in the water or glass floor etc. To get1 Y! o5 y. p4 {1 e5 k) m8 e' Q
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    ' S, V# O5 W& m" U0 @5 t
  33. #  partially transparent.
    + P; i4 O5 V; W, T
  34. #* Q: T0 u$ T: u- y& `* L
  35. #  Parallax Mirrors
    , Z  \  ~" F! J; g2 K0 v9 a3 D
  36. #  Much like reflect but are instead actors and event are reflected in a mirror3 [- [4 d* @- p
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    6 n( d5 W# S4 g$ i" {: R% M
  38. #  changed so actors and events can use different charsets for their reflections2 J+ d* R5 f& j5 t, q( b
  39. #4 P4 }0 V: B* T# C7 d
  40. #------------------------------------------------------------------------------#6 i& x, Z' B( G9 F
  41.   1 E4 |6 v5 C2 o
  42. 3 g1 n5 p9 |: b! W. E3 c7 Z$ n" `
  43. #------------------------------------------------------------------------------#
      r/ J! q& Q8 f. _* O( Q" D9 c
  44. #  NEW - First event command as a COMMENT8 C& a5 O  d, r$ z+ ^. k
  45. #------------------------------------------------------------------------------#3 j8 V, z4 e3 d: l& @$ Z- H
  46. #  You can add a comment as the first event command on an event page to set if
    9 O2 ], J; g2 y7 @/ _
  47. #  that event has an icon, shadow or reflection active. The tags to use are3 _7 x+ y2 c2 T2 O
  48. #  below, all must be on the same line in the comment.
    + H! y2 s2 I' R
  49. #
    ; O# k2 B. s: p( X
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    - V7 Q! m9 K# l! s& G- }8 @
  51. # <shadow>           # set the event to display a shadow. I* B8 B, l) o% J7 d! m
  52. # <reflect>          # set the event to display reflections8 D6 K3 @- L. U+ b; v# b; v
  53. #
    7 e) p( B  W  l# q
  54. #------------------------------------------------------------------------------#- y9 x9 j2 m4 Y4 a- c/ b* u
  55. #  EXAMPLE:
    ' }8 i3 i7 M7 t" H2 Y
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    * K! b" `) l1 j0 |
  57. #------------------------------------------------------------------------------#
    / w0 j; \3 f" L) t8 I, U9 Z
  58. ! i2 u% u' F% j9 Q# s  F( s+ j! @2 }# U

  59. , ^" ]) C* m6 @
  60. #------------------------------------------------------------------------------#! C4 J- C  i4 O% t# ^0 A  l
  61. #  SCRIPT CALLS:
    & m5 q, Y2 M/ h4 l# f
  62. #------------------------------------------------------------------------------## d- r$ {# _. F/ T, E! P
  63. #
    + F1 b4 p3 ?. a% `( C- u0 m. `
  64. #  char_effects(x,x,x,status)' L+ h3 O+ v. q
  65. ## I. L7 E  ^6 |/ J/ i
  66. #------------------------------------------------------------------------------#
    7 M, B5 w. b' P, }
  67. #  # each effect can be true or false to enable/disable them during the game.
    8 q1 X. d+ k! B) O1 E
  68. #  # you can change multiples of effects at once, x being the effect number
      U1 B) \+ Y' A
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons( r% L1 ~* g' V& L3 e8 q
  70. #------------------------------------------------------------------------------#
    8 L  c* {3 N% O+ z& G& E
  71. #  EXAMPLES:
    ( D4 T2 c) k, \3 T
  72. #  char_effects(0,true)              # turn reflections on& l' w  }2 V) Y$ x
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    6 j, ~4 U" e' Q& T0 T, D
  74. #  char_effects(1,3,false)           # turn shadows and icons off$ t7 C- y# R' Y
  75. #------------------------------------------------------------------------------#
    , d# n5 V7 s9 ~- R, }
  76. #
    1 n3 V6 g4 D) r: p2 c& V
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset3 \: P+ W% B# q8 [% w4 A& N: z5 R# Y
  78. #+ y  v- E* Z, k0 O  u
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset+ m  r3 M+ y6 I& o+ O$ {1 ~; g& }
  80. #3 I) `% N! A. Y5 s0 _8 d& I! U% s
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    - ^' k1 k" e3 E7 f* Q7 y
  82. #& F4 ?* z) Y5 h. @7 v% ~8 ]% K
  83. #------------------------------------------------------------------------------#: s$ g0 R8 h# N) `+ b8 T9 @7 O
  84. #  EXAMPLES:
    7 x. x0 O6 Y3 |
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite8 p1 H6 r* r: r0 ~# P8 t' m" I. P7 L
  86. #                                    # in position 2 of "Actor2" charset.
      G4 E; D) I* ?" C+ P* S: B6 T, g  N1 a
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of* `; f6 G# Y/ V* h. K* a
  88. #                                    # "Actor4" charset.% w# r, D5 f; t0 c2 a5 S# M" Z
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    $ J/ S/ C' k, Q8 W8 F' P7 _  e
  90. #                                    # "Vehicle" charset.
    * _* E: j1 {; |. b' O( y2 C
  91. #------------------------------------------------------------------------------#
    & z! }8 w5 @$ {3 d4 ~+ `
  92.     Z( L9 _$ h' e
  93. #------------------------------------------------------------------------------#
    8 j4 n$ s3 n, s6 u$ y5 z
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    1 b1 ]( z9 g, l$ ^/ U8 b# X5 n3 S
  95. #------------------------------------------------------------------------------#) Z) d5 M3 h: _8 `/ @
  96. #
    3 d9 k% ?% A! J: K) i, q
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off5 r# ~# ?; o, j2 |0 g2 m7 R
  98. #                          # use this to specify for mirror and reflect.. A9 c( b% Y' z8 ^8 I7 z% c
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change3 {4 H9 I% {0 H/ D
  100. #                          # to change all events use :all' U, S! P0 V4 T! e' M% Y! X2 z% E
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make  J) H! {5 Y- D
  102. #                          # it 0 for no icon.  a/ _( \0 O# K2 Y! R
  103. #
    ( M5 R, x+ z- J
  104. #------------------------------------------------------------------------------#
    & z! n( r" C  J5 }* J" W
  105. #  EXAMPLES:
    + B) @/ x( A% p& h, A, r
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON3 A; W+ g4 F8 `
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    $ e) F) l# X+ v9 w
  108. #  reflect(:all,true)      # Turn all event reflections ON
    # J0 A; w, U+ r  _9 H* M: {7 y* @
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    8 ^' ?4 B$ Y: V- C$ [) O# O
  110. #$ o7 \, k! O$ F6 G+ n
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    5 E6 X; t2 C( E8 {' d# M: }, L
  112. #        a map. This is a design decision to try to keep lag to a minimum. You$ U$ \/ m$ y; y! ^
  113. #        should use these effects sparingly and only activate them on events
    / X; d# o) m3 B4 G" j
  114. #        that require them.8 F4 ?, p4 e( g4 o5 v
  115. #------------------------------------------------------------------------------#
    - W9 t5 s$ g1 m8 K
  116.   
    2 e5 Z& p, `9 K- J  b+ g# f
  117. #------------------------------------------------------------------------------#
    % Y, ]" b1 ^! Q* m! \" ^
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES& d  f" I8 J1 g' R7 [
  119. #------------------------------------------------------------------------------#
    1 ~' k6 T, A! i* j4 I& v" k
  120. #
    . P* Q7 J" T8 \2 ?
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default ! `/ {9 f: U! X) x- D; n0 [
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 9 d! [$ G) b  A! Y
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.0 n) \, w( K, @
  124. #$ L1 Y" J* a* K& G- s& ]/ C
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects, r% {  D- I# p$ `: ]% N& Q
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    # A# G* C$ T- u. ~, Z' ?; M
  127. #  v_icon(x,x,x,icon_id)0 E# Z) o; t- N& z2 W& s
  128. #
    5 F. I6 c7 n2 I% B
  129. #------------------------------------------------------------------------------#
    1 L$ f, K8 S0 K9 f
  130.   ; M) J2 x; t4 v  L+ c6 n! b7 _
  131. #------------------------------------------------------------------------------#7 M9 i1 D, p/ r! `( s9 I
  132. #  SCRIPT CALLS for shadow options( w! s) Q) i% d9 ~0 J
  133. #------------------------------------------------------------------------------#/ j; k0 V6 \( X' S' x* R
  134. #; `  h- U8 w3 r
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    + E$ ~; C+ j8 P# \% |' A4 _* `3 D
  136. #                              # light source number you wish to change (for
    $ x% j8 s9 r& e; s( s. P
  137. #                              # more than one). These are reset on map change.+ e5 Y1 |/ n" ]4 s
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    2 e4 v( F6 Z% _6 E
  139. #                              # This will need to be in parallel process if you
    / V& K9 T& t  c/ V8 y
  140. #                              # want it to be a moving light.$ c; r- O/ I- e2 H/ ^
  141. #" b% O8 q4 E0 I# Q2 C
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    4 R8 }9 z' y2 X$ _
  143. ## j4 ^( T; X& C2 X7 S1 {$ f
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    0 H) s$ q% i' t( J: P4 p
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    4 P  A0 o% J, q7 s8 ?) t3 t* e
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.9 x) j" j: ?  {" V5 z: ~
  147. #
    2 m/ F$ Y. U! A( e$ n
  148. #------------------------------------------------------------------------------#0 f. n( g; }- @( N
  149. #  EXAMPLE:
    : F5 R6 b  ]7 E) X. Q' }$ f
  150. #  shadow_options(80,10,false)    # This is the default setting.
    + o! p; a2 s5 D- c2 U: Z0 }9 K' p
  151. #------------------------------------------------------------------------------#
    # b) Z' K7 J: U' s, ^
  152.   9 y; N+ t3 j" L5 b, [
  153. #------------------------------------------------------------------------------#
    9 y2 V/ }+ }% r: r5 I" j0 K- e
  154. #  SCRIPT CALLS for reflect options& X5 `6 ~* \  x6 D  P+ H3 ~
  155. #------------------------------------------------------------------------------#
    % @: F9 b1 S  K9 O
  156. #2 y- G' N8 D- d, r: ]
  157. #  reflect_options(wave_pwr) ' Q, L1 U( E  N
  158. ## |) U+ B% H2 K7 o, R4 R! b
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    9 w3 h; w$ @. C3 Q3 h8 ]
  160. #
    / d% H" R. r3 q; \: G
  161. #------------------------------------------------------------------------------#
    8 n6 C1 F. @& d+ a, ~
  162. #  EXAMPLE:
    0 A/ ?9 Y! K: i+ w1 k: f& A
  163. #  reflect_options(1) # Turn wave power to 1
    2 v3 q# D# B: o- w% z# t
  164. #------------------------------------------------------------------------------#! b' w7 j8 F/ V* D9 w
  165.   
    # U& o$ M. e* W. ]% }  T) Q
  166.   
    ; o0 N6 x# p9 {- g2 Z: d5 v
  167. #------------------------------------------------------------------------------#9 X* O: c6 n$ n( ~& a8 G
  168. #  NOTETAG for ACTORS
    ) Y8 o6 k' j) H8 [1 ]8 ?
  169. #------------------------------------------------------------------------------#/ v# m$ J; H+ U
  170. #
    ; b3 U1 \* ^9 t& T4 H* o
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    # c7 n, N- r9 O
  172. #% q* E8 D  c1 }
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    ; J: @8 h& T9 n3 {: f7 A" e" d/ N
  174. #                                  # and use the character in position 'pos'
    9 J3 Z' v, @" q
  175. #4 w0 g2 F$ w% E. |- ~
  176. #------------------------------------------------------------------------------#, u) D0 m/ Y' G/ q3 q
  177. #  EXAMPLES:9 |9 B$ K, ]! r- g7 ~
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset' S% M) A$ h* Z4 o* W/ m; `; x
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset( d/ Z( U% y- Z6 y) [/ `
  180. #------------------------------------------------------------------------------#) f0 F7 ^4 U1 r: r2 ?
  181.   
    9 A( Q/ g; g  q$ o6 M$ ~" q
  182.   8 c0 a6 _2 q. V. V2 |
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    7 ]  I& M% F4 ^' i3 n
  184. module Galv_CEffects
    ' s! O. |8 w2 v+ r) G
  185.   " U' W' f: D0 y- m$ d0 h0 n( `$ y
  186. #------------------------------------------------------------------------------#  
    & o( H$ h: y: K+ F, k0 m) g
  187. #  SETUP OPTIONS
    ( }+ V* l2 S% y4 ?- l
  188. #------------------------------------------------------------------------------#
    2 w. m" ^" e# [. b  C" [/ F
  189.   ( k6 S" D8 O+ f! N8 ]! Y
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the; [3 T$ c+ B; ]# L; W6 u: B7 D
  191.                         # region on the wall you want to make reflective (and' p0 s& M5 r) q) h# \' h
  192.                         # then use tiles/mapping that make the parallax visible)
    6 S8 z& j. s& {
  193.   
    2 b  x! u' k; q3 t
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    ( ]: o- ^# X4 X
  195.     8 V5 e: c  u7 b4 `
  196.   REFLECT_Z = -10       # Z level of reflections
    ; d# h2 i4 t$ z+ p6 H
  197.   SHADOW_Z = 0          # Z level of shadows
    : s1 b. P1 u  J" @* `
  198.   
    7 T+ G( b0 T! T7 A. U% C
  199. #------------------------------------------------------------------------------#  
    # C' S; ?6 \2 C% `9 z5 i7 {
  200. #  END SETUP OPTIONS3 S0 N( R' Q8 W* T! U9 }) e* F0 V
  201. #------------------------------------------------------------------------------#
    - n0 O+ C! x7 q
  202. end1 M+ l: r: \. e2 g
  203.   : T$ g* x% e& l4 z8 q4 [
  204.   5 E: A: V, z, U. n
  205. * J, {( i1 f+ o3 o  Z
  206. ' g0 Q. G- s, S# |
  207. class Game_Map
    $ m) W7 s( r: s$ d+ J/ l  c
  208.   def do_icons(refresh = true)* w% G& u* w* K1 C& D/ Z$ Z
  209.     @events.values.each { |e|
    * r/ U  s' r# R- t# z$ _' y# Z  g1 u
  210.       next if !e.list
    , P# M! B$ F7 I. T0 m
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    1 q2 i9 G; b3 b& g! t  _, g
  212.         e.icon = $1.to_i3 k) A$ G9 z( J, H: [  K5 x
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    * Q" Q% f0 q( c' @5 T0 _& u% C6 [, W
  214.       else& C! X7 K( [: w) k, n  }! x4 Y
  215.         e.icon = 08 }4 M- v/ }, T- F9 M; ~
  216.         e.icon_offset = [0,0]
    + F# |) |& |) Q8 a! |, w
  217.       end
    3 O$ t  C, a$ i* F# l
  218.     }
    $ e8 [) G8 g. l+ N; C/ Y
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    # G3 l& `8 x" I3 f5 a- d
  220.   end
    # H2 P# T9 |5 g7 a1 ?4 ?  L
  221.    
      h4 Y+ {$ t* W
  222.    " J" D0 E7 S8 [& V, c; E" [
  223.   def do_shadows(refresh = true)
    9 W8 `7 H  r# a& K
  224.     @events.values.each { |e|
    ! ], y& C7 p0 V& g
  225.       next if !e.list0 T: ~: J% J; f& B1 X3 ?
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/! z+ v+ k) a) A8 g/ `1 ?: p
  227.         e.shadow = true
    $ V" Z1 k& a3 Z: ], B9 P* l" w
  228.       else2 l  T( Q) H7 C9 n9 l
  229.         e.shadow = false) T6 N; E) O( O7 t1 o/ e
  230.       end1 D1 n, v; L) N+ e) O
  231.     }
    + [/ y1 E1 ~  s2 E7 A# x
  232.     SceneManager.scene.spriteset.refresh_effects if refresh& C2 o% I  h# Q
  233.   end
    * W7 t- o, b* L6 W. e) f
  234.    ' ]% H9 y/ y* r. b4 |) |& U& H7 l
  235.   def do_reflects(refresh = true)! y; Q+ e7 l! _6 k( O4 V5 i
  236.     @events.values.each { |e|/ J! l' P+ @/ K0 k
  237.       next if !e.list. ^, w/ T$ x% C6 g0 P# o4 G$ T
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
      w" H9 P2 b' r% O1 h& c3 d, p
  239.         e.reflect = true
    9 b7 X# L3 q9 Z0 c, |' r: {
  240.       else
    4 `6 n4 Z  |+ `1 o+ ^3 F* ~5 x0 m
  241.         e.reflect = false
    3 H% _) k( P$ b, y
  242.       end
    : `1 h: ?6 _: O. a% R' L4 E
  243.     }+ e8 Q# z5 s6 t, i. i! N
  244.     SceneManager.scene.spriteset.refresh_effects if refresh1 o, R, H. ]  j& J7 [
  245.   end7 [% B# \+ |% ]1 |4 k' u
  246.    
    ) R% h) W( Z. @- f, r0 X
  247.   def do_all_chareffects
    % W, |% t/ @/ }  t, g! O, V
  248.     do_icons(false)6 R8 |8 y+ x# O0 Y2 d
  249.     do_shadows(false)  w2 t7 O! t! u( k  n: l
  250.     do_reflects(false)
    9 t9 I% V* }7 K" S- T% g
  251.   end# g/ ^  ?8 M, W& ?  v7 p: O. L
  252.    
    * m5 o: O8 M9 \1 O% s/ _& S1 L: @# m
  253. end # Game_Map) k: x' B$ A8 t& h3 K! X  b. D

  254. % W6 M4 i' w* i& p# J4 n

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

使用道具 举报

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

使用道具 举报

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

在本发帖返回顶部