查看: 1505|回复: 2

水面动态倒影,求解

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

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

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

×
[code][/code]4 m1 j/ G; F( a3 o* j2 A9 M1 d7 A
这个代码怎么用啊,有大神知道吗。我从国外找的。
. `* R# i& D  V) J0 {1 q# {http://galvs-scripts.com/2013/02/21/character-effects/
( ^0 j) ]  O, v% t是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
回帖
4
 楼主| 发表于 2014-6-25 11:32:43 | 显示全部楼层
  1. #------------------------------------------------------------------------------#
    ) |3 {( n9 A9 \( K/ P
  2. #  Galv's Character Effects
    * x  [0 P; R: Q
  3. #------------------------------------------------------------------------------#
    ! A) H6 Z9 {8 ~
  4. #  For: RPGMAKER VX ACE
    , E, j# B& N2 z3 r9 `8 p7 j$ g6 q3 H
  5. #  Version 2.1
    # ]/ t7 e' H- z* c) @
  6. #------------------------------------------------------------------------------#) c: p8 f1 W4 Y+ ^: W
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows4 X/ o0 k6 n) \6 K6 ]
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    / q! Z) J0 q! @7 f6 k2 A
  9. #                           - Fixed shadow facing bug. ~. S+ `2 W9 Y0 \
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows5 [* F. V5 ?% K) E+ K; s( p
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows- [$ I/ Y& |3 p4 K. N
  12. #  2013-02-22 - Version 1.7 - bug fixes
    ' C! \6 }! E. ?- a
  13. #  2013-02-22 - Version 1.6 - added icon effect
    : z  M+ v8 \- z+ a. u$ t
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps1 P% L: p1 L/ W! A7 S. r
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    ; F  q8 L3 y; H
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    7 g. w: a3 a/ U8 e$ P/ M0 r
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    4 E% X2 X( n7 |: H) L) S, I$ N
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    1 y9 j. ?2 ~" Y5 Q9 F- O  c; l% ?* v
  19. #  2013-02-21 - Version 1.0 - release
    ' b5 e) B) m" E  A! J3 k: Y
  20. #------------------------------------------------------------------------------#) Z- m* Y& S" v, U. B
  21. #  This script was made to provide some additional effects for characters such
    ) b" L% b: [0 e
  22. #  as events, followers and the player on the map.
    8 [5 ]( u$ I, ?# A5 U0 S7 x
  23. #  Currently it includes:
    ( B) Z  p( y& b1 m
  24. #
    6 X& |, d9 ]8 l( h  B; N7 p! t
  25. #  Shadows
    / t; c* r+ U8 s1 E
  26. #  Shadows that appear under player and events in a directions depending on( F2 i0 T$ K; I& |5 I( _. c
  27. #  a light source that you choose.# q* Y; U9 Q0 W8 n* {
  28. #/ N9 C- S. ^9 T. i# M' d8 x/ r
  29. #  Parallax Reflect, h$ z. x0 w  X
  30. #  Reflections that appear on the parallax layer for events and actors to be
    - J1 z+ O5 m, K, y
  31. #  used for things like reflections in the water or glass floor etc. To get
    # F$ \9 u+ b9 r' g4 l7 i* a
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    8 L# H# l$ c# e# G6 Q3 \
  33. #  partially transparent.
    & E0 L- ~9 W4 O' q  x
  34. #
    ' T* D# l- F2 G( i# ^
  35. #  Parallax Mirrors" V/ ?/ @2 _& R/ P" O+ ?
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    8 O6 n- D0 X' y, y' T* X9 T
  37. #  on a wall designated by a region. Both mirror and reflect effects can be: Z8 ~$ \$ s. k: r1 e1 ]8 _
  38. #  changed so actors and events can use different charsets for their reflections  E% V" l4 j% L5 F% o
  39. #+ B; Y7 L) q- |9 N/ y9 c3 T
  40. #------------------------------------------------------------------------------#$ f9 A% }6 {" J& q
  41.   4 [# m$ ?0 x+ X0 W; D+ [5 A  N

  42. % F) {/ u9 M5 A: m  z; v
  43. #------------------------------------------------------------------------------#
    ( x, X, J% E) W  U* J* G- k2 L  B' Z
  44. #  NEW - First event command as a COMMENT+ y& y) q8 t1 j. u# F
  45. #------------------------------------------------------------------------------#
    " J  p. d3 Q3 t* K4 R
  46. #  You can add a comment as the first event command on an event page to set if
    ! Q0 O  M5 x& T8 D
  47. #  that event has an icon, shadow or reflection active. The tags to use are  |6 @" q0 k4 k+ q
  48. #  below, all must be on the same line in the comment.
    # g# g' g" C% o! G+ i$ n
  49. #
    - z9 K7 W. {* y, M( g$ v
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    " T' B" T1 o. v0 ]! o
  51. # <shadow>           # set the event to display a shadow
    - X# _+ @$ E. M+ g! j
  52. # <reflect>          # set the event to display reflections7 G) W/ o. V& f
  53. #
    0 ^4 M3 A' e2 C* v$ t! v: w
  54. #------------------------------------------------------------------------------#
      y# _% |- r) T2 H& U3 n9 [
  55. #  EXAMPLE:0 g2 K2 y8 B) w" f
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    3 B" q. d, ~+ R# m/ L
  57. #------------------------------------------------------------------------------#
    % V( K: H7 p$ ~

  58. 3 F" ?. ]+ C: N9 B$ s

  59. - @5 r0 |2 O% n6 j* s
  60. #------------------------------------------------------------------------------#
    1 p+ V6 U3 |* b" i$ ~! p
  61. #  SCRIPT CALLS:  X, P1 s! C0 O; t+ s
  62. #------------------------------------------------------------------------------#$ s8 F) S) ?# ?7 B/ w
  63. #0 }/ M* Q+ {4 q! |% q
  64. #  char_effects(x,x,x,status). N( d5 E' N  q; Z  n/ g
  65. #, ~. C0 @6 L: w" V6 V! {
  66. #------------------------------------------------------------------------------#
    3 e+ N% P' B9 l" P8 ~- Y0 J
  67. #  # each effect can be true or false to enable/disable them during the game.
    9 C) W9 `+ s" {% M
  68. #  # you can change multiples of effects at once, x being the effect number6 J" F6 }2 g4 _
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    # Q% g# O' ~$ Q; q/ ^! a8 R& g) D
  70. #------------------------------------------------------------------------------#" R$ l6 n& _/ z, j/ E
  71. #  EXAMPLES:
    ( e; g( Z" p" w) T; L& M
  72. #  char_effects(0,true)              # turn reflections on( d/ x. h- ~* y$ p' c  J: B
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    9 l/ P) A& ?. ^/ K
  74. #  char_effects(1,3,false)           # turn shadows and icons off4 S6 a6 X5 V$ j# k2 R
  75. #------------------------------------------------------------------------------#" b" `. o5 v3 T5 y2 |
  76. #
    + e, C8 U& U. n/ ]. f) T
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    9 _# L( x( c3 ?
  78. #2 s& A/ f  V( Y) P5 C( e* q: |
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    3 n8 M3 f' Y$ u: m5 [( b$ z
  80. #
    2 r# ^9 w3 m( |% R! e
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    2 _) P3 i! B) A2 s; b
  82. #
    ' I3 x, }; {9 |& A9 P: V* l
  83. #------------------------------------------------------------------------------#9 d$ m2 k$ o8 B" r, |& j/ w
  84. #  EXAMPLES:8 y+ N6 l9 G  w9 ]- {9 p: w
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    3 O" x- Y$ L" V9 R
  86. #                                    # in position 2 of "Actor2" charset.
    & L& r& ]6 u" _! Z& y% s
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of- }; a4 @1 F. m) K% z& g
  88. #                                    # "Actor4" charset.: Q) t' k5 G, [( b
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of! i$ U3 T4 }8 y7 ^8 J
  90. #                                    # "Vehicle" charset.5 \0 u6 G$ o2 z! s, _6 O$ \
  91. #------------------------------------------------------------------------------#7 m1 [9 Z- n( Z
  92.   
    1 S% E/ R; q/ `* c  s! _) `
  93. #------------------------------------------------------------------------------#/ m, D% P' O: L6 y$ ?" d
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS  Y5 V* F3 a! A5 {
  95. #------------------------------------------------------------------------------#
    . v0 g, H* n- c3 X4 t6 w
  96. #8 M) r, h+ g; J! B- F2 ~' u
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    ' Y6 |# W% g2 A" \" f# t. G
  98. #                          # use this to specify for mirror and reflect.6 o' o% ^7 j, \3 g& V6 [! W: ?
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    * i5 b! O" I3 e, g
  100. #                          # to change all events use :all/ d1 E# m; Y: D" z
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    " {5 u, ~5 P8 K5 r
  102. #                          # it 0 for no icon.
    ; H! H0 k! p0 N. Y- ~( i
  103. #! u0 H3 w" T' u4 s9 X
  104. #------------------------------------------------------------------------------#
    5 ]3 ]9 \6 T8 ]! x4 V5 Z* j
  105. #  EXAMPLES:0 R9 B: G/ j# o& v! R. t# b) D: E5 Y
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    8 m' Y- ~% k  K9 M7 L4 N! ^
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
      }# Z( F8 `; G' t+ F. j
  108. #  reflect(:all,true)      # Turn all event reflections ON
    6 ?3 A% |; G# S7 ^
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear& V4 {/ x# u7 j
  110. #
    # d) q; {* X8 c9 w6 g5 q$ j
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering6 p5 y. Z- K7 E
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
      c" v- S4 s; Z. I/ |4 O* q
  113. #        should use these effects sparingly and only activate them on events
    4 Y' \$ c+ U* f7 d6 i# O5 e2 a$ |& \
  114. #        that require them.& a+ }# S* |) h( v4 e
  115. #------------------------------------------------------------------------------#
    3 k2 b0 H! |2 p! R( t6 Y% c0 ^- N* W
  116.   , B  N$ {; j# M9 j
  117. #------------------------------------------------------------------------------#
    2 t1 V; _; e4 G& J7 t( M( E
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES3 ?+ r* ]' I3 U3 U
  119. #------------------------------------------------------------------------------#+ T, X% n$ d+ r: v& ]. N- H
  120. #" i$ T. I0 J1 W) x, D0 q' G& m0 f# m: E
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default $ u4 @, Z2 m& T% C# `( h
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    ' [* ]5 s/ e: F; K' J/ z# s
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    , K* U9 n1 ~$ B. \# n$ j1 {
  124. #
    4 G$ J0 x; L+ C2 m3 w9 m0 H
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    $ N$ b0 [$ [. S
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    4 G  t- E  I: x
  127. #  v_icon(x,x,x,icon_id)- u  b7 D0 j$ n- l
  128. #
    & [( N/ U/ n8 d& E
  129. #------------------------------------------------------------------------------#, q, D+ \0 h3 g$ Z3 _& J8 d- K- {9 T% U
  130.   
    , t  X" P/ ]5 l4 |
  131. #------------------------------------------------------------------------------#
    9 F' O* ?# B4 ^; J+ f6 f
  132. #  SCRIPT CALLS for shadow options2 m0 g% d& I4 q- g. ]
  133. #------------------------------------------------------------------------------## W: t2 e: L) K2 ~  B, i1 L
  134. #. D: L& E  v9 `- U1 g* w+ e* x8 f
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    : W+ v. c- \9 B- d0 R6 ~
  136. #                              # light source number you wish to change (for
    9 H4 ^/ a3 S0 \1 c# Z
  137. #                              # more than one). These are reset on map change.
    7 X: h# H) S6 O/ Q  {9 j7 }
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.) p  r- f9 f2 T  K. E0 O' F+ p) Y" n
  139. #                              # This will need to be in parallel process if you( @' \2 X" y/ Z1 }5 N
  140. #                              # want it to be a moving light.
    3 W1 a! p) k: ]( j+ p; C4 q, y
  141. ## R: d( O/ R1 m
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below% A4 \' l* y( o$ k* t
  143. #
    , [  d( {) e. w+ I( `
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    % n$ I& m1 v7 I  b# e4 I
  145. #    # fade = amount shadow becomes more transparent the further away you are.5 b% a( {) T# M( S+ G7 v& D9 y# r
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.& r5 T# k" t" V5 E
  147. #( {5 {$ J9 E$ Y) X8 d8 J3 h: I! T) k
  148. #------------------------------------------------------------------------------#
    ! A; d! V; v! s' u. Y2 N
  149. #  EXAMPLE:
    $ n9 y" L9 w* |1 j
  150. #  shadow_options(80,10,false)    # This is the default setting.
    . j+ l7 D. _8 q: s  q2 B1 C
  151. #------------------------------------------------------------------------------#
    3 l  |' m8 R0 D5 s& G( q" n" G
  152.   7 A) _9 R; z  U. Z/ ?
  153. #------------------------------------------------------------------------------#) O; h* P5 }& z, l' v7 X
  154. #  SCRIPT CALLS for reflect options
    / u. y- a5 \/ F1 {! Q, V; _, N9 k
  155. #------------------------------------------------------------------------------#& @0 a6 F8 _# S8 E3 `. q8 q# N
  156. #
    ) D. t" i& `* Y
  157. #  reflect_options(wave_pwr) 1 X5 E* \/ @9 G* a# L
  158. #( T$ q+ A- K8 ~' y
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    4 J5 }0 Q$ C) m7 y2 d/ m
  160. #
    ; _$ A5 D& ^. i! X: a) a3 p
  161. #------------------------------------------------------------------------------#
    # \2 f  l! R* z
  162. #  EXAMPLE:
    ) z6 M% V  O2 w2 ~# a% f
  163. #  reflect_options(1) # Turn wave power to 19 C: F' l( s% U. `
  164. #------------------------------------------------------------------------------#) a5 n2 K+ D/ _* v
  165.   8 h# Z8 u" Z$ J+ R  A$ S) q
  166.   # F; `* T7 j" c* j1 _- M7 S
  167. #------------------------------------------------------------------------------#$ m+ h- z" d4 u3 x, R& W- o+ f
  168. #  NOTETAG for ACTORS
    * G% ^% H% `. N6 t2 x
  169. #------------------------------------------------------------------------------#
    ! v$ T1 v/ e  U) P2 y
  170. #% }: L5 K+ ]6 o4 l  f
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)% @% u4 ^# A4 X6 ^; F( q
  172. #
    " f  L8 O' N9 B3 ]
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections& q( c. f) S( x+ h+ C* X
  174. #                                  # and use the character in position 'pos'- d" L( X$ W9 P/ ?$ s7 O0 u8 ~! o
  175. #
    ) ]; h  |# _" j; x' b3 \
  176. #------------------------------------------------------------------------------#
    $ n! a4 J1 p4 M8 ]/ `  v& v
  177. #  EXAMPLES:
    3 i" [" a5 K$ A. I9 e4 z
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset5 Z/ ?5 s: _# y/ n/ P
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset, S' u5 y3 x: d7 F
  180. #------------------------------------------------------------------------------#+ ]- x3 J4 i5 ?* W* E* [
  181.   7 a0 Z4 z  [" T( G" Z" }  M. b
  182.   & a+ p. U6 A& r* h0 k6 L
  183. ($imported ||= {})["Galv_Character_Effects"] = true% z2 A  Y2 Z% V& z
  184. module Galv_CEffects# q  W0 T( I$ e/ K/ U+ I2 ]
  185.   
    7 f/ X3 V. L# ~1 \
  186. #------------------------------------------------------------------------------#  
    6 h2 U+ ?, C* W* w6 U2 W
  187. #  SETUP OPTIONS
    6 W5 Z* O9 F( i" M+ i- M. K( U
  188. #------------------------------------------------------------------------------#
    ( ]& O! ?, R) y1 A
  189.   
    5 {7 m# O  A$ ~( {( P
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    # a$ \& F8 b- u( Y4 Q' g" Q" D
  191.                         # region on the wall you want to make reflective (and7 ~( D8 {; E/ g& q$ h2 \; M1 b( t
  192.                         # then use tiles/mapping that make the parallax visible)
    2 ~  G8 e! L! o3 n5 J4 _
  193.   
    - w$ i, c3 @( @+ p, B7 P8 q
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters  v! R; J% \9 F) |0 `) i6 T
  195.     : b* S1 m, z: x
  196.   REFLECT_Z = -10       # Z level of reflections" b: a$ I+ |* U% T0 V
  197.   SHADOW_Z = 0          # Z level of shadows
    5 k. n/ l/ ^" J: S  s
  198.   
    # C8 p& V& o" l3 S$ P
  199. #------------------------------------------------------------------------------#  + X$ W: D7 C3 X# m* ]1 s# @4 E8 l
  200. #  END SETUP OPTIONS/ j( b& |" x! G# C
  201. #------------------------------------------------------------------------------#
    " Z5 j. J  y9 c
  202. end
    8 T  @: m- Y4 ~) z! P; u" b  i& T  @
  203.   
    8 F( j+ Z: r: T
  204.   
    7 w# U5 z+ Y$ n4 p# n- L. G

  205. 8 u0 r2 T1 R+ x. {- O8 M) d2 w

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

使用道具 举报

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

使用道具 举报

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

在本发帖返回顶部