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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

7 y" B6 g2 C* }$ K. J9 B: D4 Q这个代码怎么用啊,有大神知道吗。我从国外找的。% c) Q' G9 k8 ^* T& |
http://galvs-scripts.com/2013/02/21/character-effects/
) t6 e, J- e, o4 H4 s- n是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
3
 楼主| 发表于 2014-6-25 11:35:49 | 只看该作者
记得口袋妖怪的池塘是有倒影的
回复 支持 反对

使用道具 举报

梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#2 n3 S) b+ K% M2 `. f
  2. #  Galv's Character Effects/ q: @* t4 K6 b* I0 o  @) ~
  3. #------------------------------------------------------------------------------#  A) D- E: @7 i0 N" X3 `/ t
  4. #  For: RPGMAKER VX ACE
    - w5 w0 R2 t' E" O( W8 t
  5. #  Version 2.1" {( \# R; o1 x) w
  6. #------------------------------------------------------------------------------#* V0 i8 l/ \( d' g% e
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows1 ^6 [; J( m$ o8 h8 z2 u' `
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    % s! n; P/ m1 `0 [4 j
  9. #                           - Fixed shadow facing bug! Z' b% Y: }0 a% g) i
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows1 W# Y" k: b7 z% Y
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    ' _5 V% Y) P0 G* m, r' G( u) o
  12. #  2013-02-22 - Version 1.7 - bug fixes* I9 g( F2 Q+ E4 K. Z% C) Q5 ^. w
  13. #  2013-02-22 - Version 1.6 - added icon effect( o- e9 [: t9 H' ?* x. X
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps- M, K1 P1 t: q, `+ H0 u) Q
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles& i0 a2 C9 G. r, i- z" E$ [! S: V
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks6 f, I5 ~# |8 T8 N' X) f: x, S' H
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)+ e: `3 N& X2 p7 e
  18. #  2013-02-21 - Version 1.1 - updated flicker effect/ H: t/ k) p% |" I6 v' D
  19. #  2013-02-21 - Version 1.0 - release+ z9 B! ~& f/ c" ^
  20. #------------------------------------------------------------------------------#5 y* a. ?! H; @
  21. #  This script was made to provide some additional effects for characters such2 o" |% F& N6 ^( K9 F" k
  22. #  as events, followers and the player on the map.% _) @* r' z+ |$ Q" f8 [! V6 B
  23. #  Currently it includes:( H4 i( Y! f7 j& _1 b3 Y  V
  24. #
    ! ]; [7 w$ s6 o
  25. #  Shadows
    8 W5 ?4 E6 K" X
  26. #  Shadows that appear under player and events in a directions depending on5 g! _! T5 J' W+ Z4 F
  27. #  a light source that you choose.
    3 C1 ]: [: w1 x; `
  28. #
    4 z. M8 X) `+ u# E& |
  29. #  Parallax Reflect
    4 D$ c$ F" `$ H: L! ~( j, v' s
  30. #  Reflections that appear on the parallax layer for events and actors to be
    & u" {% c: E! x, F6 C; s; {, s
  31. #  used for things like reflections in the water or glass floor etc. To get
    3 C! b0 e- X8 U
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    " x4 r! N$ T! R  Z. i  n0 O
  33. #  partially transparent.
    * L5 [" l& ^. t8 d! _7 x
  34. #
    5 g5 y9 m7 n1 \  M' Y* F
  35. #  Parallax Mirrors
    . B# I; G+ Q$ d0 @. _" w' I( `
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    . w! ^% r! u" J' b1 Z+ ?
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    - M6 n  {$ @, }7 J  |" E( a
  38. #  changed so actors and events can use different charsets for their reflections
    3 o+ R6 V: M$ ~: g2 [
  39. #
    $ G# |7 Y. }! m+ }' v
  40. #------------------------------------------------------------------------------#
    4 ]6 A3 j5 T8 N" ]  a- ]
  41.   
    : _! p4 g/ x! q( T) Y1 X

  42. & O* }2 U4 j( f' b( O4 Y: o. M
  43. #------------------------------------------------------------------------------#
    ; J, o; ~5 S, s( d- O% t0 D
  44. #  NEW - First event command as a COMMENT0 U; T2 c! [: t2 T6 S
  45. #------------------------------------------------------------------------------#
    * [. Q0 I7 C5 K
  46. #  You can add a comment as the first event command on an event page to set if
    * x! k5 S3 ]0 s5 r
  47. #  that event has an icon, shadow or reflection active. The tags to use are5 ?7 f( l' S! W
  48. #  below, all must be on the same line in the comment.
      |* G+ x: R1 x$ ~) i
  49. #
    ) j  D$ y  N0 c. O8 U9 q
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    1 d0 T  c" m6 c
  51. # <shadow>           # set the event to display a shadow' F9 v, ?7 ~6 T% j" s
  52. # <reflect>          # set the event to display reflections, H& D! ~; g: \! g$ @+ q
  53. #
    , x( m6 ^5 `4 f9 w$ e0 v; z* ~2 l/ O
  54. #------------------------------------------------------------------------------#/ c1 m8 m+ M8 r6 _  |, \
  55. #  EXAMPLE:
    % n2 c3 T7 `9 \. M  q: O4 F
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event7 o1 d$ x: N& ]2 l6 P, ]
  57. #------------------------------------------------------------------------------#6 Z4 }) j" [4 K7 w" T" C% o% Z  F" A1 D

  58. , _6 v4 y5 [- F! P
  59. 4 s6 e5 O7 q$ a! S0 N& o! e
  60. #------------------------------------------------------------------------------#
    4 L* ]3 |0 P& }2 T+ I0 P
  61. #  SCRIPT CALLS:
    : M0 ?4 P. R  u9 B' j, c
  62. #------------------------------------------------------------------------------#, ~, I: d5 Y* B
  63. #
    * E9 p3 p" b3 A! m0 W% U% r7 c
  64. #  char_effects(x,x,x,status)% h  Q; d6 F9 q) v/ t9 F0 g7 A
  65. #/ W; @8 g+ g& I
  66. #------------------------------------------------------------------------------#  O6 I) {: t! X( _: G  m, G
  67. #  # each effect can be true or false to enable/disable them during the game.4 L2 |# o# j% D/ R7 @/ p; ~0 p0 @% K
  68. #  # you can change multiples of effects at once, x being the effect number1 l1 b' `2 t, D$ i% F: ?7 c0 d6 y
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    3 j3 a1 g& i$ ^& m7 z
  70. #------------------------------------------------------------------------------#$ x% g- O) J9 m0 Q0 J
  71. #  EXAMPLES:
    ; A) D; J7 {" D# l  m7 F5 p
  72. #  char_effects(0,true)              # turn reflections on
    % j. c2 H$ q& u) a" E2 e. p
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    / r% R" E' V& |  R3 ]* H% K
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    . y5 Y/ r! q, |5 j- J# r; u
  75. #------------------------------------------------------------------------------#; d5 q" Y% s) b! U
  76. ## z4 s1 W3 H2 S+ [: V# W
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    : t! p' v( b( A: c4 o* a3 j
  78. #6 I  P& h# Q' x% O# o6 f
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    . y+ s) b' L. \, [
  80. #0 H7 L3 e6 T' e
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    % @! V1 d% o% i
  82. #
    * h( I$ ~, n, L
  83. #------------------------------------------------------------------------------#& ^# V$ K9 k, d8 {
  84. #  EXAMPLES:0 E3 L+ m9 ^8 T7 {. F; o% ?) u
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    : U* W$ r! @4 S, O$ Q
  86. #                                    # in position 2 of "Actor2" charset.% L  U5 z( K; p% H: s% a
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    1 p! l: G7 Y: ?. j6 b
  88. #                                    # "Actor4" charset.
    $ b3 K9 o% j0 c7 i
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of. b5 o" Z- E. R* E# n
  90. #                                    # "Vehicle" charset.
    8 S0 m' S  i. z
  91. #------------------------------------------------------------------------------#8 X% ?* d. A& D9 h& b  h
  92.   ( ~6 u9 V8 Q9 c8 D! N+ G; ^
  93. #------------------------------------------------------------------------------#; o! y. w/ ]5 d- c
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    9 m$ |% s9 [- `5 x/ L& D
  95. #------------------------------------------------------------------------------#
    # M; g" o: U9 y7 C: D
  96. #
    ) }/ f/ v3 X6 I+ m
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off3 R5 y+ T3 {$ P4 J( r6 s/ D  S& z
  98. #                          # use this to specify for mirror and reflect.
    ! {/ }/ \! Y5 K( g0 j4 V; X
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change6 n2 x9 C; A- a' m, p5 g3 l; o
  100. #                          # to change all events use :all
    / q4 Y" F: ]2 w9 u: @6 t; B6 J
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    1 T: [8 S. l* o9 k
  102. #                          # it 0 for no icon.9 {8 V# @8 g+ G* F7 c: }! u9 m
  103. #/ x6 w+ P2 k$ N6 d
  104. #------------------------------------------------------------------------------#8 H. ?! H8 [" t  T
  105. #  EXAMPLES:
    2 l" n! |" q/ ?) \$ ?& j7 Q
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    4 `& ]9 q1 |  n6 z5 m
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    : s" w2 T8 B% p  }1 u  c% {2 s
  108. #  reflect(:all,true)      # Turn all event reflections ON6 _0 s) u" q" Z/ K! i
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear: P" z# \* V- |  E" N! S
  110. #" k7 k% p! C* x; v' x! \
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    . G7 p* w+ _, ^- ^" w8 o  f& A
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    ) ^0 }. _. F8 v2 [! G! o% m% t
  113. #        should use these effects sparingly and only activate them on events* t' w) t# T) y- X
  114. #        that require them.
    9 Y; K" p( n+ X2 J- f* ?9 g! Z9 i. u
  115. #------------------------------------------------------------------------------#
    6 }0 |  z2 I6 f5 c) h
  116.   0 k9 `' v) l' G1 F: k1 j9 v/ D& [! N* F
  117. #------------------------------------------------------------------------------#( K7 E/ e" h/ @' u/ q
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES2 Y' H/ o3 `/ W" s1 z
  119. #------------------------------------------------------------------------------#$ v( R# |; o. |! W- b
  120. #9 a9 f, |. g, g
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default / [- X) r7 b9 O) [- N1 [
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    ! ?" `) L/ k( A9 W4 G! ^* a
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    9 j' i  Z  L8 C2 o1 X) A% }
  124. #
    : W6 L  b! |5 }5 }, A2 Y- C
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    9 M) Z. I7 v- S
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    & g% S# E# R# G/ [. G
  127. #  v_icon(x,x,x,icon_id)
    . {. P# |- E: b) D0 Q
  128. #
    ' F! S3 A9 v% Q, t! X7 E5 F) O; `+ o- {
  129. #------------------------------------------------------------------------------#1 U5 M! x5 K) i% x: H1 R) Y
  130.   
    ; x6 l/ k, z5 B  u3 \( i
  131. #------------------------------------------------------------------------------#
    7 S1 k- m- H, l9 |. |# Z
  132. #  SCRIPT CALLS for shadow options2 |. X$ q: o) l# x/ A$ t
  133. #------------------------------------------------------------------------------#0 S, h% r# f, L# [# j8 L
  134. #6 L8 `- n6 d* k6 r) e  q
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    2 {; C+ C! q: }) J$ k# i2 Y
  136. #                              # light source number you wish to change (for& l# o/ c, o2 x
  137. #                              # more than one). These are reset on map change.
    ( K/ U" J5 t1 {) m
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    ) E+ ~' x5 O6 i: f( [
  139. #                              # This will need to be in parallel process if you7 J: j# P$ S2 f2 a- V2 ~- f$ j
  140. #                              # want it to be a moving light.4 |6 u5 P/ d$ X5 A
  141. #6 o. ^+ B2 ]! B3 R% q
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    9 {2 [1 v) F% j/ |1 L
  143. #6 P$ q9 _7 B7 y: P! X
  144. #    # intensity = opacity when standing next to the light source (255 is black)' |' Z, s2 n5 P* `8 @
  145. #    # fade = amount shadow becomes more transparent the further away you are.# Z& ]. Z- Q! k& b. X
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.4 t3 J- P* P  K0 ]4 {4 p
  147. #- |3 M  J& J. k6 M8 s) n3 M" s
  148. #------------------------------------------------------------------------------#
    ' R6 f+ x5 \* f- H8 H( n
  149. #  EXAMPLE:
    . v! @+ D( l& A7 X" }
  150. #  shadow_options(80,10,false)    # This is the default setting.
    ! w- f0 }. S  F( L) o+ D- F* e( K
  151. #------------------------------------------------------------------------------#) y& X; P2 t/ z! y% g9 h) i2 n
  152.   
    : `- t2 V% R; X6 D& N
  153. #------------------------------------------------------------------------------#+ z1 r- E( \# e6 Y# J: `3 j
  154. #  SCRIPT CALLS for reflect options+ @) k2 K+ v& I6 n$ U
  155. #------------------------------------------------------------------------------#- ^  o/ S" ~4 |8 H; ~$ e: J* U$ ~3 w( T
  156. #
      m7 o& G. b4 d) K, w
  157. #  reflect_options(wave_pwr)
    ' A2 ~/ r. m) L. k) ]2 }9 g3 o
  158. #
    1 o& J: z) D8 a, }1 ^( _( k- O
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    ( d. c1 h. X: Z+ `2 G0 a: N
  160. #
    ' z* W8 O- J; s8 _0 Y+ ]9 |( |
  161. #------------------------------------------------------------------------------#" E1 n5 B5 N# ~: Z- Q5 x" a
  162. #  EXAMPLE:
    1 }3 S/ x6 U. q  x) B, P/ z
  163. #  reflect_options(1) # Turn wave power to 1
    3 j7 ^. b, B$ ~- U
  164. #------------------------------------------------------------------------------#7 Y0 T& g9 ~$ ]" B( l# t: f" C+ x
  165.   4 {  y  v+ ?7 t% B& I  I
  166.   
    # E! V. W4 F9 w2 [+ S
  167. #------------------------------------------------------------------------------#- P8 b! J: b6 r  ?1 A
  168. #  NOTETAG for ACTORS
    % H$ Y, |, o1 C2 R8 f* I% P
  169. #------------------------------------------------------------------------------#9 [! ]6 G7 }7 N
  170. #9 J1 `. H7 n9 K- _+ P" l
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    ; i+ y. R9 l% X/ C: f/ s
  172. #3 [8 a9 z8 Z9 ]6 X- e0 w- J, g
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    + l6 T7 r. g! A1 g
  174. #                                  # and use the character in position 'pos'- G" V0 L2 ?' p
  175. #2 H! P+ C6 J: W
  176. #------------------------------------------------------------------------------#
    - W' U7 H$ T& L, m2 a" }8 \6 V
  177. #  EXAMPLES:
    ) o3 \: S- b6 r+ x; G
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    ! P' i/ b5 m% ?6 |' s2 B) O. Z
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
      V, l7 Q. i4 b
  180. #------------------------------------------------------------------------------#
    0 `5 t0 x* Y) X& f0 C
  181.   & I3 y( X# I* Z, m
  182.   4 r/ j8 Q4 `3 O5 _, a5 g7 \
  183. ($imported ||= {})["Galv_Character_Effects"] = true8 S' Z/ C/ Q. P! a/ F, t
  184. module Galv_CEffects2 h# L3 v" Y6 ~0 t4 V
  185.   & F( Z1 o: q! U/ R9 t( g- k' b
  186. #------------------------------------------------------------------------------#  ( |  V& c5 T( {6 f; u& m% w
  187. #  SETUP OPTIONS
    ! N9 z6 p* c- |& N
  188. #------------------------------------------------------------------------------#, }8 x/ Q' x( L' G
  189.   2 w2 i+ b; K- W9 Q0 `
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    % @( ]& ]3 N& H, c
  191.                         # region on the wall you want to make reflective (and
    9 Q: S6 R/ X, l$ M
  192.                         # then use tiles/mapping that make the parallax visible)( _- S+ c3 k% e! w. z, [
  193.   
    . v7 v8 n% [+ C# f5 C. O) V0 b
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    & A" g* z7 s. a% A" S
  195.     2 ]$ k6 k; v' f; Y% ?2 @3 v
  196.   REFLECT_Z = -10       # Z level of reflections
    * |9 Y6 M3 u, w5 Q' ~1 |( ~
  197.   SHADOW_Z = 0          # Z level of shadows
    : y* D' S/ |3 [5 c" @3 M
  198.   6 G+ n, |  y7 C
  199. #------------------------------------------------------------------------------#  ; t9 r8 j3 a& S- S! b( W) |1 ^
  200. #  END SETUP OPTIONS
    ( G2 D2 M  F0 a
  201. #------------------------------------------------------------------------------#9 A" J* U: D2 h: ~2 o; R
  202. end
    " n! }5 o5 S( Q% y1 R7 d
  203.   ) P  K) @9 Z" Y/ ]
  204.   " N% C* ~3 ~' h, _

  205. . H% }; L; e& j; G. V& S! z; z
  206. 3 B0 j' O. i7 Z# k+ ^: J8 h
  207. class Game_Map
    6 ]- x* O2 s8 |; o. Q- N
  208.   def do_icons(refresh = true), S6 M$ d7 {- O9 v0 t
  209.     @events.values.each { |e|
    : o" u" c$ w; p% Z% x% Q
  210.       next if !e.list6 f7 I. v$ ?0 `( \* a1 j
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    ( g& X" r0 E( @. H
  212.         e.icon = $1.to_i+ c3 c( b& W- v, ]$ l
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    6 m4 C2 x6 P8 U% D5 q9 \' I0 I
  214.       else& }: l- a' K2 [
  215.         e.icon = 01 }" _0 `' R" F2 R. a
  216.         e.icon_offset = [0,0]: M$ C% }+ Z) U
  217.       end, R. M- R$ @' \
  218.     }1 l. p4 ^& x4 O+ A0 `
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    # a$ {/ L0 e* I$ {
  220.   end
    $ s9 X1 S) b5 k; @* t6 r
  221.    
    . c" r7 _: N+ v8 O
  222.    
    ; i- M3 R3 g1 T; t. ?; u( S$ ?
  223.   def do_shadows(refresh = true)! I0 W% y' v$ ~9 y- s. e, L
  224.     @events.values.each { |e|
    % u* ~0 t* C( S* U1 M
  225.       next if !e.list, K' C2 ~3 ~2 L0 m" e+ A" d
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/$ H$ t3 ~. o7 P3 e5 s5 p* @. j
  227.         e.shadow = true4 g  ?/ H- s( Y+ \( V2 [  |  M
  228.       else
    4 z8 E9 y( s: X1 u  `* e5 ?5 j
  229.         e.shadow = false7 i- W6 ]1 Z5 z
  230.       end
    , K/ b' r2 M' c0 K. |0 w
  231.     }
    2 q1 n8 {9 v$ W. x
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    ) o( z+ b+ X! v9 c8 C! v) T
  233.   end* N# h7 F5 G* t
  234.    
    0 t" e1 f; C6 L' t
  235.   def do_reflects(refresh = true)
    $ Q. h: ]2 }( _5 u& y5 B3 Z3 C
  236.     @events.values.each { |e|
      u- H5 `: E1 i( W  I2 Y
  237.       next if !e.list
    + [4 j) u' |8 k9 g  a
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/& k' j, X  U2 a6 p' b2 K
  239.         e.reflect = true
    9 m  v  H5 }- q; G
  240.       else
    9 W# E9 C% ]9 c3 @  h
  241.         e.reflect = false" R4 C8 h; n0 O& H. {
  242.       end
    ! |$ L: G$ P; ~& u9 N' p0 b: j
  243.     }
    ! ]8 q2 _8 c; {0 j
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    4 b+ d% u6 I* K! E
  245.   end# e$ f* t+ u5 {
  246.    
    6 y0 s$ e- p7 a$ F0 {
  247.   def do_all_chareffects
    ! n7 t  L: Q3 E! [
  248.     do_icons(false)# z4 E# t" h! c" c( f& ~
  249.     do_shadows(false)
    6 e9 \& N" i: G/ V# P  f% H
  250.     do_reflects(false)
    : J: f: {7 {% q: Y3 I
  251.   end( h/ e5 v9 P4 B
  252.    
    # W; X  [$ L/ ]+ X6 @, N
  253. end # Game_Map/ F' ?* Q3 R$ l
  254. 8 M- V& P, I. x0 Y

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

使用道具 举报

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

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

GMT+8, 2025-7-19 10:02

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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