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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

& p  V: c7 j+ w* O这个代码怎么用啊,有大神知道吗。我从国外找的。
, q$ L# [; X9 H) A8 Q" \http://galvs-scripts.com/2013/02/21/character-effects/8 d1 n' o1 {1 |0 ~
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#0 P( Z8 G2 y4 y2 K2 }9 Q7 I
  2. #  Galv's Character Effects  x4 C; l9 Q: L8 q" T2 {& s
  3. #------------------------------------------------------------------------------#- f# P, \" D$ o2 m) G( j% i
  4. #  For: RPGMAKER VX ACE
    3 t7 k# P5 u1 Q- j
  5. #  Version 2.1
    & q' L" g9 c5 @/ T
  6. #------------------------------------------------------------------------------#  g- f; |# ?# W0 d% k% c
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    ( }1 {" S9 g$ u0 r, V
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects1 {& p: K7 T/ M$ [& \( a2 |( h( O$ L
  9. #                           - Fixed shadow facing bug& c3 w/ `3 H, u4 ]+ G: N
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    ' o8 S( V0 d  {, n, w
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    # l( W1 \& C6 T6 ~. b9 E1 X1 `" G
  12. #  2013-02-22 - Version 1.7 - bug fixes
    3 v' m2 N% W. z0 k4 {: V6 B
  13. #  2013-02-22 - Version 1.6 - added icon effect
    . v8 k5 R6 k9 P
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps: W/ c5 M6 U$ T; ~5 P
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles( m4 _8 c) h6 l* M( t
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    $ m1 U/ ?: q9 Q6 n9 R
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    / _- h* V5 S) h1 U. {' r& }
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
      D$ B. K1 [$ h  a( M( B- m. ?
  19. #  2013-02-21 - Version 1.0 - release. i! a( v1 ^5 Y# O
  20. #------------------------------------------------------------------------------#
    % O$ u8 H9 u) t4 u* o: m9 T
  21. #  This script was made to provide some additional effects for characters such
    8 G6 h% t! ?; d- @
  22. #  as events, followers and the player on the map.
    ) S/ l+ T+ m6 r/ o, f+ L, C. Y
  23. #  Currently it includes:
    % D. S9 _' A. O7 D$ l8 R7 t- t
  24. #- v& m0 B0 M: s( m- U# b  }& j0 Y, a8 |
  25. #  Shadows
    5 e& z) I" ?% N" H0 o. g# ]
  26. #  Shadows that appear under player and events in a directions depending on& E2 B6 A5 D; J5 r
  27. #  a light source that you choose.2 W3 g; a& X: P+ M
  28. #1 f5 ?7 d$ @. q$ Q4 ~' ], D" W
  29. #  Parallax Reflect  g8 J9 T2 H: z- [- q0 U
  30. #  Reflections that appear on the parallax layer for events and actors to be( w- C. w- v* {* x4 X
  31. #  used for things like reflections in the water or glass floor etc. To get# |2 ^. Z6 j, e' ^# p( z$ P6 ^0 E
  32. #  effects like the demo, you need to edit the charset graphic to make the water1 A0 g1 _4 M/ ]' b+ s
  33. #  partially transparent.
    8 [1 }8 V. O* K/ j! H% m9 i3 Z
  34. #
    8 [" E; `  L8 |
  35. #  Parallax Mirrors2 L% R0 D' X! a! T: R4 J" w
  36. #  Much like reflect but are instead actors and event are reflected in a mirror: w5 g& I# v9 k: O
  37. #  on a wall designated by a region. Both mirror and reflect effects can be1 w: L+ Y( Q0 Z- i% g' q
  38. #  changed so actors and events can use different charsets for their reflections3 {) Y& v) X$ \7 E2 }7 ]" ~
  39. #
    $ v- f  H$ b6 u# O
  40. #------------------------------------------------------------------------------#
    $ v& v$ ]4 c% f. z6 V
  41.   : h$ K- H5 T7 C- a
  42. 4 i& c' g; x% a/ l
  43. #------------------------------------------------------------------------------#
    2 z0 Z3 K" T( i6 c. F
  44. #  NEW - First event command as a COMMENT! M! }$ Z) _6 \+ l  d
  45. #------------------------------------------------------------------------------#0 l! k! l: D  k+ g" d& ^7 F
  46. #  You can add a comment as the first event command on an event page to set if
    2 r/ d. X5 h: P# ?/ b5 c
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    & d0 o# u- o* O% T# d; H( R
  48. #  below, all must be on the same line in the comment.
    5 {0 W. C3 p9 |2 M: b+ e4 ~
  49. #
    * E1 Z- [( E; q! v
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    - n* h- d. V, Y! L9 {
  51. # <shadow>           # set the event to display a shadow
    " a! R* N# d5 J
  52. # <reflect>          # set the event to display reflections' T6 j0 G' s( W
  53. #
    & o0 [! g( V2 R5 R: P/ S3 o3 B0 N
  54. #------------------------------------------------------------------------------#" n. l0 a8 [- i2 w+ d
  55. #  EXAMPLE:' z" }7 p9 V9 ~
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    2 P% t8 E1 X3 }* ^5 n+ W3 H
  57. #------------------------------------------------------------------------------#
    ! z# k& k, x5 I" U" ^, l8 X3 a
  58. ; g7 Y% e7 ~  T8 n" k" c* a5 o3 ^6 j

  59. : o! G! F9 V; T+ i
  60. #------------------------------------------------------------------------------#: F' ~- C! a9 ~! n
  61. #  SCRIPT CALLS:
    % k0 ]! @! p0 }6 i; G9 {/ Q! e
  62. #------------------------------------------------------------------------------#
    6 P; t' v+ m% ]. ^! x
  63. #' m" b7 r% t4 @! ^; T+ s) D
  64. #  char_effects(x,x,x,status)
    2 H6 j& B+ X# O$ ^$ J5 X
  65. #5 {" ?# J' l5 [2 }/ ^
  66. #------------------------------------------------------------------------------#
    2 I8 G/ E0 v! w- `3 q4 N  v3 O
  67. #  # each effect can be true or false to enable/disable them during the game.
    2 p- c. f. S0 `
  68. #  # you can change multiples of effects at once, x being the effect number& Q) Y6 y: v; `1 ?
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons' C* G, [- ]( i. Y6 @* J
  70. #------------------------------------------------------------------------------#8 {+ H0 S9 J; w
  71. #  EXAMPLES:
    0 _# a( H. K* u" q
  72. #  char_effects(0,true)              # turn reflections on0 r5 I+ ?# H; G, C+ v, B
  73. #  char_effects(0,2,true)            # turn reflections and mirror on( [- J& N* c/ Y9 q
  74. #  char_effects(1,3,false)           # turn shadows and icons off) I9 z0 y( g/ I1 }5 l
  75. #------------------------------------------------------------------------------#
    5 `$ W  m+ W7 N- g& }6 d
  76. #: k4 D! d2 Y1 _# h( X2 H: t
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    0 E+ r" q8 W  ?. i
  78. #
    * A/ y, L" d! r. C; |, X* q
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
      I3 W* R5 Q0 {# [4 G
  80. #: R& _" ^, G1 Z" g% Z
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset% ?2 Z( n2 B6 D: |4 F: l
  82. #5 S, U( q3 L( e$ p4 T
  83. #------------------------------------------------------------------------------#
    3 S, J& ]: s4 C( W/ j
  84. #  EXAMPLES:
    6 W1 X, {1 x4 ?* i' l
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite! d$ S7 G, ^1 ?9 @* l
  86. #                                    # in position 2 of "Actor2" charset.
    0 l% C, }/ K7 S6 P* T
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of, J2 ~% e) q" T! j2 p" S/ M
  88. #                                    # "Actor4" charset.
    ; t  ~: O) n$ m7 O# M8 o
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of# a; {9 m- L$ Z1 |" V: R
  90. #                                    # "Vehicle" charset.
    / |$ k& ~- K7 K5 Y9 h' l/ I- Z; r
  91. #------------------------------------------------------------------------------#
    7 \4 B# b) S( B* Q  q
  92.   0 g2 w1 G, E0 W+ m: ]- E. m2 C
  93. #------------------------------------------------------------------------------#
    , V2 _0 ]7 f* Y! U+ _+ R) }- N
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS& m, d6 |/ q% q, J' V
  95. #------------------------------------------------------------------------------#
    . v3 V" `. J, Z& o4 G5 d! \% \
  96. #
    2 `! V2 _! i0 f# j/ ^
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off" e+ ]( M, o& X/ u
  98. #                          # use this to specify for mirror and reflect.
    % C1 c3 g1 V) Y- L
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change2 D8 ~0 S5 C  H  O# w$ P
  100. #                          # to change all events use :all4 _% D3 ^" l4 ?
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make2 G& S7 v7 V% ]3 F
  102. #                          # it 0 for no icon.
    2 z$ }' A$ ~5 `, }( G) U- q
  103. #
    9 E, Y! z7 ~5 n9 o
  104. #------------------------------------------------------------------------------#
    : f; `( j4 q$ L
  105. #  EXAMPLES:6 Y. I8 P% @/ O
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON5 F: T; G3 ~& W6 Z+ U% ?
  107. #  shadow(1,false)         # Turn event 1 shadow OFF2 K4 b+ E5 v6 a& f6 m) y8 o  h
  108. #  reflect(:all,true)      # Turn all event reflections ON
      j/ _, b. W$ y  f
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear% x2 x# U1 O% G, \! ]7 L4 u
  110. #
    ( ^$ w5 }$ m8 }& Q
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering) x3 |8 ]$ _  ?
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    ! [1 {' C, L; B9 M8 w8 ^8 X
  113. #        should use these effects sparingly and only activate them on events8 ~  _( ^9 z% ~2 q( G4 i
  114. #        that require them." W, J7 Y) t& n& f' E, s. x3 @
  115. #------------------------------------------------------------------------------#% h4 {$ l5 ^4 A5 X8 F% A/ J
  116.   
    & i& h) k% C0 Q" m1 h8 T! t
  117. #------------------------------------------------------------------------------#
    ' M0 T9 N9 `. k  w
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES9 W# B* Y9 T) R$ `& j+ D
  119. #------------------------------------------------------------------------------#
    & x# m2 x$ t! g/ N: X: R
  120. #
    9 _5 k6 y9 \+ ]0 n1 Y& |" [9 a
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    2 W6 l( C; b: [/ b5 c
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 8 h" ?) {! J5 x2 f+ t5 U$ y
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    4 N( g" }: `; _8 y. O
  124. #
    ! b1 Z' ]! n; N7 i% ?
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects) R) L+ O, D( u: @6 j
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    9 s! z. J: \& [* m. A5 {' R# {0 u8 B
  127. #  v_icon(x,x,x,icon_id)2 F. S. B( ^# F, p( D' N' w; `/ O
  128. #
    ( }+ P5 p- @1 x3 K2 _) G
  129. #------------------------------------------------------------------------------#% }5 ]0 |8 R( k! h
  130.   
    ( [! ?, M' p8 T
  131. #------------------------------------------------------------------------------#
    0 K, J; p' g2 ^  O* z$ t
  132. #  SCRIPT CALLS for shadow options
    5 e$ W) e/ g; f6 c, z
  133. #------------------------------------------------------------------------------#1 [7 Z7 k2 x! P& m  k4 U1 E
  134. #* \- I& X' l% e8 g1 i
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    / J( Q+ n$ C- r* z5 q( P1 w
  136. #                              # light source number you wish to change (for
    , h; L7 ]% x! ^$ ?* Y* f  V+ }- n
  137. #                              # more than one). These are reset on map change.) V5 j8 j( E1 M6 q# G& k' @  \  u
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.: \7 {6 E  W) y4 l$ T
  139. #                              # This will need to be in parallel process if you
    ) V; t4 b" \, l1 p6 O. P
  140. #                              # want it to be a moving light.
    + {6 B7 J- O& G9 o
  141. #& }* F) U5 @3 G! `* e2 E
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below# _. i5 y- }3 o
  143. #7 h, a6 W( i8 D
  144. #    # intensity = opacity when standing next to the light source (255 is black)$ _# g8 c) M  @  @: t$ ]/ [6 f
  145. #    # fade = amount shadow becomes more transparent the further away you are.8 _4 o9 _; d' e; j! L& C- z
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    . h( _8 G5 d" ]6 s& Y' c
  147. #
    , z5 e" P  I7 H8 N
  148. #------------------------------------------------------------------------------#. O. P$ r% V$ y" A
  149. #  EXAMPLE:6 q- P8 v/ ?4 \; m+ H' d5 Q
  150. #  shadow_options(80,10,false)    # This is the default setting.
    3 S8 }+ X+ X. \, a
  151. #------------------------------------------------------------------------------#
    ; T+ a8 ]. e+ N7 P& {
  152.   
    # R9 n% ?  ^3 [: [. n8 J# k
  153. #------------------------------------------------------------------------------#
    ! Q6 i2 x. p- h& h
  154. #  SCRIPT CALLS for reflect options/ d+ r& b7 I* N  X& Q4 S
  155. #------------------------------------------------------------------------------#; B; @% @2 q) D. B- S" L- [
  156. #1 ]9 P) f9 W0 h4 }" b
  157. #  reflect_options(wave_pwr) : a* M. q' Y' y, r  t3 N# r
  158. #
    + k$ W& z2 P# [
  159. #    # wave_pwr = how strong the wave movement is. 0 is off4 n# n$ c/ K  U& e4 T* u
  160. #
    * G7 Q! c5 N+ ^; ~% ~
  161. #------------------------------------------------------------------------------#, H" _0 v: \$ G" n' k* {0 r8 P
  162. #  EXAMPLE:
    2 F, p3 z6 q) G5 V, I3 l5 E3 r
  163. #  reflect_options(1) # Turn wave power to 1
    & c5 S7 K6 L8 o) [
  164. #------------------------------------------------------------------------------#  |4 q' {& Q* \, [
  165.   ) J% `0 J* o' f
  166.   3 q$ v5 \$ H& g6 R
  167. #------------------------------------------------------------------------------#
    8 h, z/ I4 |- T+ v5 h8 I' u
  168. #  NOTETAG for ACTORS
    % p2 S9 t' F& c/ u7 I& V' t& v2 w
  169. #------------------------------------------------------------------------------#9 ?, ^* ^: F& t% ?/ v0 O
  170. #, |1 T! k* f. H0 C
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)( p) ?& D* x+ v# b0 R' q
  172. #
    ! ?" y* x/ T2 _' o$ Z
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    * ?1 k. R! h+ @0 r! N6 b( k, Q
  174. #                                  # and use the character in position 'pos'
    2 K% _8 {0 k2 i1 Y" V! @
  175. #) u4 ]2 M, c8 A
  176. #------------------------------------------------------------------------------#" R% F6 O9 q# h- t! {( W' L
  177. #  EXAMPLES:
    4 f/ h/ U* F0 @2 J! {
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset" T, S/ S# j/ q+ ~
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset: n5 k8 U) O. p7 r% U4 R
  180. #------------------------------------------------------------------------------#
    % s& _6 Y8 u. L6 o. K& R
  181.   + G  G  n3 m% S- Z
  182.   
    & m- e. n+ D" d! O  L; n
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    , y, |9 I5 O. M' e6 o3 i
  184. module Galv_CEffects. ^1 v9 Z" m1 ^& W2 b4 ]1 x
  185.   $ I2 g( T3 J3 O
  186. #------------------------------------------------------------------------------#  
    5 F2 c9 P6 b) [# U6 F
  187. #  SETUP OPTIONS
    2 P2 L; B: ^: P' W0 B. L
  188. #------------------------------------------------------------------------------#
    ( p" o: o  z2 W* ^) r. v
  189.   
    9 q$ ^) e) H' p* S/ i
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the9 t! P: e5 p* y, P$ h
  191.                         # region on the wall you want to make reflective (and
    1 k1 z" \7 [! ^, Z0 o
  192.                         # then use tiles/mapping that make the parallax visible)2 i3 S! W- o. ^- z& E% R
  193.   
      }  X$ A6 `' N
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters. u: P( s& K, e, b
  195.    
    ; V; R( S4 F0 [+ |7 |: t: h
  196.   REFLECT_Z = -10       # Z level of reflections
    $ q0 \% O4 ]5 {, b. v/ Y1 Z
  197.   SHADOW_Z = 0          # Z level of shadows
    / p8 v3 l- B% A: q0 i
  198.   
    , h1 I. q3 S- ~/ j1 j0 L
  199. #------------------------------------------------------------------------------#  
    / t& h* }- h$ ?; [- Y
  200. #  END SETUP OPTIONS
    6 n0 @% `6 V" e
  201. #------------------------------------------------------------------------------#+ q2 C( Y0 }1 b% \# G) ?
  202. end3 K# \7 z/ F2 T$ w
  203.   " J9 r1 ^6 j6 r: H
  204.   
    % U" \4 W4 `/ q. M* b# i- K

  205. / \( p& x5 m9 Q* e  U

  206.   `! A7 i0 P6 a" @# G8 Y9 Y7 ]9 B
  207. class Game_Map0 I+ t. v1 {0 }. \& ~2 P, u* A5 C
  208.   def do_icons(refresh = true)
    - y" j: @8 M6 l2 K, h- r1 |
  209.     @events.values.each { |e|
    & {* P# B9 Q- ]) ?. i' a0 e4 w7 ]
  210.       next if !e.list+ V$ g# k! C: d' ?6 ?8 B) d; X$ P
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/" d+ {* U! M  r& Y
  212.         e.icon = $1.to_i# K5 a+ C2 Y2 B* U2 e5 j
  213.         e.icon_offset = [$2.to_i,$3.to_i]2 x3 k( C7 f7 w9 t
  214.       else! Z$ k; j  v; ~
  215.         e.icon = 0/ k/ M) v0 r1 e: }
  216.         e.icon_offset = [0,0]
    5 ^+ a# S$ k% l( ^/ g  y: v
  217.       end
    ! R) F6 x9 Q: @
  218.     }: s/ _9 t6 q+ w/ D
  219.     SceneManager.scene.spriteset.refresh_effects if refresh0 T+ [8 @  d! V9 c9 H: v4 V
  220.   end
    " S! Y8 C9 o" K& X: Y5 m: B
  221.    ) G6 K- D. V- [: e9 ~" M9 X$ O* Z
  222.    1 L" w5 w3 ^2 y8 L, d: K/ o
  223.   def do_shadows(refresh = true)7 y8 I# \; ^/ I& |: k& f7 ?& `( x
  224.     @events.values.each { |e|" ]* ~! r5 t" S5 M
  225.       next if !e.list
    0 _7 D& L2 g+ e2 Z! _) Y
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/& H% B; t- w, o7 {! ]
  227.         e.shadow = true
    + i0 @: c+ X8 i; p' n: P) c; }
  228.       else
    & n6 w0 T' U2 ?; G2 ^" ^+ A
  229.         e.shadow = false
    1 O, V+ ^  y$ @/ F  N
  230.       end
    . |( ~2 Y) N7 s# b9 ~  o
  231.     }3 V4 ?, A4 g" E; n9 y
  232.     SceneManager.scene.spriteset.refresh_effects if refresh' l7 y0 \/ j8 b5 F
  233.   end, |2 J+ f. j2 V& O# U; g- ~% A
  234.    8 |3 j  x# c7 T- O( n. M# R5 w
  235.   def do_reflects(refresh = true)9 y0 p3 r) o) q+ a) m/ w4 e$ ^
  236.     @events.values.each { |e|
    # G( ]& b& b. Y, f6 i( v+ L
  237.       next if !e.list& G8 P: J1 Y: ~- K
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/( D1 |4 ]! \2 V/ U3 ]
  239.         e.reflect = true
    0 k* [2 O1 B$ \7 I+ c
  240.       else
    . o) j" T5 O0 Y* C
  241.         e.reflect = false7 T9 I+ U7 w: C7 [. D  K+ F
  242.       end
    + k/ J+ p, k: Q3 [
  243.     }
    % y1 r+ f! E% I% ?5 a3 [9 N0 c% }' r
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    7 `  U) c! `8 [
  245.   end  S0 o" `4 e: n4 N8 f  g. t
  246.      {# M/ E" {) A" H- D3 x  ?- d9 G
  247.   def do_all_chareffects. Y7 T: E+ ?1 k+ l9 x
  248.     do_icons(false)
    6 {* Y9 r0 T  D( h
  249.     do_shadows(false)
    . K& \$ P: U, l9 q! ?- ~* L
  250.     do_reflects(false)
    3 h/ v  z- }3 U2 b. l! h
  251.   end
    & O& e7 y9 I" Z: E- Q
  252.    : \. t. L4 x7 l$ b& j; O# r
  253. end # Game_Map
    ! a& W  d5 V& Y' G! b) v1 I

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-7-22 06:08

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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