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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

# l" s" [: F4 d4 _; L. s2 ^6 @这个代码怎么用啊,有大神知道吗。我从国外找的。/ D" l9 m) W% s" R
http://galvs-scripts.com/2013/02/21/character-effects/
* b: E$ [( i5 \$ M- |( s是关于动态倒影的
梦石
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. #------------------------------------------------------------------------------#9 s! c/ N# B! e6 S2 \4 d
  2. #  Galv's Character Effects
    ; X% k: V: w: k2 b3 L: `0 i6 I
  3. #------------------------------------------------------------------------------#
    4 K) i- O7 S! _" h4 S& y
  4. #  For: RPGMAKER VX ACE' I. s9 z2 |: g" S
  5. #  Version 2.1
    ! n+ G! z0 a2 m! |
  6. #------------------------------------------------------------------------------#* D: b$ g7 f# j  G
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows" L7 K5 }: I$ b
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ( k9 G9 ^1 }/ p0 i( Y  ^$ K
  9. #                           - Fixed shadow facing bug
    % M. w5 q7 u' m! L
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    - @6 O/ h: l3 w7 t; Y& n. c
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    ( _/ e% x% e% D7 T- J
  12. #  2013-02-22 - Version 1.7 - bug fixes: h! E0 d. t% a3 R3 Z
  13. #  2013-02-22 - Version 1.6 - added icon effect* S3 ^# Z& }- a4 S% A& b
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps) k9 u$ L1 b( ~
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    - Y9 t- C8 x- w0 T
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks  G' ~8 B3 K' A3 X2 P
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)3 Q' T" _9 h1 r
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    * V3 W2 [: }9 Z, q2 G/ t
  19. #  2013-02-21 - Version 1.0 - release7 |4 u6 X  z* Q( F* A5 _0 x0 Y
  20. #------------------------------------------------------------------------------#4 b  Q# B7 G( t1 D* Z& L2 `* @
  21. #  This script was made to provide some additional effects for characters such: g) M) T7 S' A+ x4 e# [: M
  22. #  as events, followers and the player on the map.
    3 ], d( O0 c0 J2 @2 C
  23. #  Currently it includes:" f" W& i% K+ H* b
  24. #+ A5 H0 p) W  X, u0 Z* i& b2 i
  25. #  Shadows
    % w8 @% U# y) T/ \* M
  26. #  Shadows that appear under player and events in a directions depending on3 I; V2 c* ^' O$ V
  27. #  a light source that you choose.
    9 n+ M8 f  ~$ U  r4 J' q
  28. #
    ( U; Y8 Q" L6 u9 P
  29. #  Parallax Reflect  q8 H; I- W, v8 L$ G( H! T9 V
  30. #  Reflections that appear on the parallax layer for events and actors to be
    2 T2 m9 D, m. Z9 h* `8 c! a" U
  31. #  used for things like reflections in the water or glass floor etc. To get
    : e1 W+ w6 R; @2 T5 @: K1 Y6 Q9 E
  32. #  effects like the demo, you need to edit the charset graphic to make the water/ l! }, O, i: o2 `2 z/ G% P
  33. #  partially transparent.3 A& j* E4 z) b( D- P2 f& }. R
  34. #
    : a+ K$ ?( T6 S3 H9 [6 }4 i: w6 D
  35. #  Parallax Mirrors
    ( f5 K1 a: E8 G; c
  36. #  Much like reflect but are instead actors and event are reflected in a mirror0 U( k1 M! r. f# h* h) S
  37. #  on a wall designated by a region. Both mirror and reflect effects can be; T; c0 o% Y0 O" o% N. p
  38. #  changed so actors and events can use different charsets for their reflections
    % ~, j8 ]# H, q* a) f
  39. #, F0 ^1 E$ q! c; m) p! z! }  z
  40. #------------------------------------------------------------------------------#
    ) U; S1 b* C4 |- T0 ^9 ?3 ?/ g
  41.   
    7 ]$ y1 o4 Q5 v% [1 [, O

  42. 4 `4 R0 C' |0 V, b- J, l
  43. #------------------------------------------------------------------------------#
    % q1 g" V7 Q7 G5 q' N( l) f
  44. #  NEW - First event command as a COMMENT# G2 T/ k) }; n
  45. #------------------------------------------------------------------------------#; f( }* \: ~2 F9 R
  46. #  You can add a comment as the first event command on an event page to set if! U9 k1 z4 H( m3 D! N
  47. #  that event has an icon, shadow or reflection active. The tags to use are4 B6 M$ i' k5 x( C2 i
  48. #  below, all must be on the same line in the comment.
    ) W6 n) l* z  a
  49. #2 G( t# a5 F! m  l2 {
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    . Z. w" j8 e; x2 _
  51. # <shadow>           # set the event to display a shadow" ?* d( j# z# s
  52. # <reflect>          # set the event to display reflections
    2 ]! C* u% F9 v% D3 l2 O
  53. ## H1 i4 ^& K. A. \5 @2 K( ?  {
  54. #------------------------------------------------------------------------------#
    3 x3 x2 }2 ?. {: d! w
  55. #  EXAMPLE:
    ' d# Z$ G: ~9 c
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    3 S. W/ ]& u0 g
  57. #------------------------------------------------------------------------------#  y- e! k6 t1 E9 l) I% r# M
  58. 0 R' i# f, G( u5 Y7 X) b4 L

  59. 8 A3 n9 }  o" O( ]5 p% a( c
  60. #------------------------------------------------------------------------------#  A# F% e1 L$ o! w( d3 b: J. H
  61. #  SCRIPT CALLS:
    3 n2 }6 P/ }. I+ m# d
  62. #------------------------------------------------------------------------------#
    3 K& Q' ]/ P' k
  63. #0 a1 T2 m; S( r3 d- w6 {
  64. #  char_effects(x,x,x,status)
      `& T4 ?0 Z, x: P3 X) s
  65. #: a4 L5 j' E3 L( G' j0 j/ b- b. i
  66. #------------------------------------------------------------------------------#* ^. M" O1 t' g7 g6 A8 `
  67. #  # each effect can be true or false to enable/disable them during the game.1 [' Q; M* V# ?# {# x! S5 v
  68. #  # you can change multiples of effects at once, x being the effect number
    ' `9 d, O# J; _7 }! I4 j$ h
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    ! m3 g# s; t/ p1 t
  70. #------------------------------------------------------------------------------#
    5 Q0 b# I3 o+ g! `( \
  71. #  EXAMPLES:, C# Q0 |: [+ v% b7 L
  72. #  char_effects(0,true)              # turn reflections on
    ! F, _0 H/ \4 [5 C
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    2 F% N# \6 K, H6 Q$ T% R  X9 Y
  74. #  char_effects(1,3,false)           # turn shadows and icons off: {" ]7 J! J; Z# e
  75. #------------------------------------------------------------------------------#4 l5 P' V: Y. L% t2 `
  76. #5 W9 G: P5 T9 b4 L1 B: n! P
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    2 O6 U! V) d* H' a! }
  78. #
    + W2 s# P5 Q8 N& d( F; B
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    7 Q: J. b3 E+ p
  80. #5 p9 C# Q# v, d
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    ) v* p# o+ S4 w& ^' y- S
  82. #
    1 N) Q/ O5 H3 h/ i& m0 t
  83. #------------------------------------------------------------------------------#9 a% g5 @* Y/ b. T
  84. #  EXAMPLES:
    7 @+ W0 y8 o6 n  K) {
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite$ D- W, v5 Y% U! e3 a& z
  86. #                                    # in position 2 of "Actor2" charset.; c: z5 d. O9 C2 A' [; T1 `( V6 E( ]
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    : u$ e) R" z9 a8 g# w( [: a
  88. #                                    # "Actor4" charset.
    8 s% x6 V$ M3 m. r& H) c
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of  Y& m. B5 @% e
  90. #                                    # "Vehicle" charset.
    1 s6 U& Y1 M& P! i% r7 n
  91. #------------------------------------------------------------------------------#
    ( J/ K. l5 v9 r; [. ~& j8 D
  92.   / e; H, w% ~. I# ~2 _
  93. #------------------------------------------------------------------------------#2 a% c1 H1 y5 r/ k6 @
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    ) K+ w: ]7 [5 A$ n) T" C
  95. #------------------------------------------------------------------------------#
    0 ^' ^, A7 f. H& S) u5 G
  96. #. d1 X( W, o# N4 r/ x& W( m
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off! o4 S% j, u9 t/ j* w
  98. #                          # use this to specify for mirror and reflect.. r! i; R% w6 v0 Z
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change1 `. q3 E0 i! K1 e( i. ?
  100. #                          # to change all events use :all7 u2 G  h$ m" n" @
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make/ `, o  K7 a( n! C
  102. #                          # it 0 for no icon.$ _2 ^# z2 _/ ^& ?0 `' _
  103. #" A; _( h8 Z6 O( a2 K0 a/ C+ q
  104. #------------------------------------------------------------------------------#
    3 k1 U* [* ?7 A. a
  105. #  EXAMPLES:
    ) \) b( U/ B7 T+ p+ q% {5 p! T
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON7 ~8 l, h$ {5 O& \
  107. #  shadow(1,false)         # Turn event 1 shadow OFF: t" n2 c" ]/ O" a8 A- b8 }
  108. #  reflect(:all,true)      # Turn all event reflections ON+ e% n& r, \0 S+ w! \: ^. u: f
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    2 ]$ n: E* M& m- c) V( q1 l
  110. #4 j# E, u. ~7 N+ h+ h
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    ' f9 O8 s* ]0 b# t" f* i
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    $ a: ?7 Q5 W1 G! A
  113. #        should use these effects sparingly and only activate them on events8 l7 t) U6 L# I  n
  114. #        that require them.
    ( l7 O9 I: Y* h0 C5 s- f
  115. #------------------------------------------------------------------------------#$ h1 {8 `+ B- @4 s9 Y
  116.   6 h) N& r* i. d3 l
  117. #------------------------------------------------------------------------------#! E7 L% n, z- [8 k; m& @
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES  L, G0 V6 b# A% n
  119. #------------------------------------------------------------------------------#5 L; `) w; N+ |- m) i9 g
  120. #" \* s; o3 @1 i: T( \
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 8 ~+ }* I0 c! w8 q5 ^
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    ! d; C3 ~# l! O. n% w7 ]3 U
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    ( v  Z# J' q5 y  K; G; b
  124. #
    / t8 K) `- E9 ~) y
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    0 @# r4 B' o0 S; Q) \
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    & U! h# n; F1 x% H2 ^
  127. #  v_icon(x,x,x,icon_id)) \9 J4 _7 S) q( {$ G6 t: x: X
  128. #
    2 `% T2 B* i1 c+ _( K" J- l5 G
  129. #------------------------------------------------------------------------------#
    5 p/ L' T: j+ a1 x0 d# T
  130.   / t( j- T. g- d/ L
  131. #------------------------------------------------------------------------------#
    0 _  N8 A$ Z1 \/ Y* E
  132. #  SCRIPT CALLS for shadow options3 a& I: \9 |" Z) w
  133. #------------------------------------------------------------------------------#
    : _, j+ H2 _3 C4 U
  134. #
    5 |; G7 g4 k- j  p
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    - d) ?( Y7 k2 E9 s: x) [4 h: P$ d
  136. #                              # light source number you wish to change (for
    ; c/ K) ]1 t6 W8 m! G6 q- o3 W0 b
  137. #                              # more than one). These are reset on map change.- t  ^. o4 w- v
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.# ~9 {3 n! U- W- O  K6 w8 L- r+ @; B! ]
  139. #                              # This will need to be in parallel process if you: C& o6 [! s$ U* l: p
  140. #                              # want it to be a moving light.9 q1 I2 J" {" a
  141. #
    . z7 P" Z2 c9 r3 v: q5 ?
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below3 y, R) d$ W4 q2 W+ z5 q3 p
  143. #
    - \8 s0 F; Q0 a. `/ o# e
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    8 j& Z- x3 L+ z( r' y' j/ Z8 @
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    ; l% `2 h0 v" G' v% s0 }1 W
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    . r" |" L" _3 C3 C" D0 ^% b- ~
  147. #
    " M& H- y) D1 |- G( U5 ?1 C
  148. #------------------------------------------------------------------------------#& i1 p. W$ Q& G
  149. #  EXAMPLE:
    : U0 c  \" L: F+ [
  150. #  shadow_options(80,10,false)    # This is the default setting.& k- x9 I: J, M( ~8 a
  151. #------------------------------------------------------------------------------#2 {+ `/ I# p2 L  m7 }" U
  152.   4 V2 O1 A0 V, j* t/ m
  153. #------------------------------------------------------------------------------#
    ' X) u8 `" C3 V- Q
  154. #  SCRIPT CALLS for reflect options3 @3 h( f$ i" j/ C  r
  155. #------------------------------------------------------------------------------#
    6 a+ Q% V" C9 ]- c! R+ {7 I
  156. #7 f$ i0 A4 v, a6 l/ Y
  157. #  reflect_options(wave_pwr)
    0 s2 c( F  Q. \) k" K. r
  158. #' Q5 |3 g7 L8 z& ~! t, `: V! R* V
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    $ E+ _; I; Z% S1 l- h0 `
  160. #
    ) {+ S( `0 D+ ?8 K. ]3 W
  161. #------------------------------------------------------------------------------#
    0 t/ T9 {$ l9 I' @& [+ K
  162. #  EXAMPLE:9 b* J4 Q9 ^. I# O. y, n' n& Q
  163. #  reflect_options(1) # Turn wave power to 1
    9 G- E/ }/ P4 C! P# F
  164. #------------------------------------------------------------------------------#9 v1 _8 a+ _3 V$ }: D1 H0 g
  165.   
    # {- {9 O2 Q: O% i; e5 l
  166.   
    1 v' B6 X- ~. a6 a( R/ Q/ I
  167. #------------------------------------------------------------------------------#
    ; T1 a9 U! {7 v3 m+ I2 c' L
  168. #  NOTETAG for ACTORS$ M# N' C# B2 p! ?! C7 m3 z1 L' x
  169. #------------------------------------------------------------------------------#
    7 [6 R$ H# h2 ?1 X. I8 Q
  170. #* U3 w7 |/ }, Y$ A1 R4 e
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)+ X  X" N2 E( W. f) f5 p8 g& e
  172. #
    3 N, l5 S, R$ E0 P3 E' ^: h
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    3 Q/ S6 c9 }: d
  174. #                                  # and use the character in position 'pos'
    - t0 e6 K5 S& J! w5 q4 D- l
  175. #
    % z9 S2 N  c/ h: @: M
  176. #------------------------------------------------------------------------------#! ]0 p2 ^7 l) U0 s+ x
  177. #  EXAMPLES:& d' R6 N! s# G) r( L" B; e( ~. S1 a
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    + j, s2 V  l2 j/ }" |% h, @4 x" _
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    ) X+ M8 E" u! ]8 [+ T  z$ |
  180. #------------------------------------------------------------------------------#4 d- d4 U* U& N; Y3 [% X$ W. F! W; W$ I
  181.   3 s  c: N4 y' m( ]7 g
  182.   
    $ B8 }6 e8 `# w
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    # d* l: Z& o- D' ~- D+ w& J
  184. module Galv_CEffects% v% g- {! }' k& F* N2 D, i
  185.   
    / Z1 h& f( W" Q: ]5 z* M) P/ X+ G5 R
  186. #------------------------------------------------------------------------------#  
    ! Q% _/ S! N  @2 J6 q3 @
  187. #  SETUP OPTIONS
    . u2 b2 n' H+ Q5 _, ^
  188. #------------------------------------------------------------------------------#$ |5 G7 Q% q: v- u2 Z7 x0 D
  189.   : I9 U* @; C& g  ?" i- M6 _
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    ' k- k2 l/ V; ]& m  ~4 e! B
  191.                         # region on the wall you want to make reflective (and4 i/ l  e+ N0 N8 o$ @4 N1 f
  192.                         # then use tiles/mapping that make the parallax visible)" Y, U& c; ~  a4 y
  193.   
    ' {" r+ G2 ?2 ^2 G
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    % P) x& N7 \/ C
  195.     4 y- M: g5 c; z) [+ ]
  196.   REFLECT_Z = -10       # Z level of reflections
    7 `% U" ~/ [4 u0 O% ]. R9 L# f$ ?
  197.   SHADOW_Z = 0          # Z level of shadows
    6 q5 ~; q$ ?4 s! e
  198.   
    1 g+ o. f2 B$ R5 q7 }/ k
  199. #------------------------------------------------------------------------------#  5 t, b+ E+ K% E6 n
  200. #  END SETUP OPTIONS$ i: n% e, w1 v
  201. #------------------------------------------------------------------------------#
    " x' l1 _7 c, x$ N  V+ P9 O2 I
  202. end
    * W1 j' D+ ~) q0 U- ^! _# g
  203.   ! c2 W/ G, s* |/ ^, [( x9 U
  204.   6 p5 i) Z7 m; |

  205. " A2 U9 U: h& A! q# }; `2 E

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

使用道具 举报

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

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

GMT+8, 2025-2-19 06:21

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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