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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
( i" t2 N0 f0 F2 r
这个代码怎么用啊,有大神知道吗。我从国外找的。
& C) ]3 E) y- d) Khttp://galvs-scripts.com/2013/02/21/character-effects/  ~1 \0 v! s1 e# u$ q2 g4 Q: p1 c) u$ {
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#7 e/ v) U* q. R- [0 d. Y* k
  2. #  Galv's Character Effects7 A0 N/ ]' p) s6 E; C& |
  3. #------------------------------------------------------------------------------#0 C/ A1 G& g0 O# {( J9 G& ]3 }
  4. #  For: RPGMAKER VX ACE
    * j  g2 R9 E$ B, `6 C7 w
  5. #  Version 2.1
    0 F3 u: Y' G# z; r1 Z' {( q5 t/ A
  6. #------------------------------------------------------------------------------#0 a$ J9 ]; ^' |
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows) l5 X4 m; D2 b2 e+ D
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ( J7 z4 e/ P8 R/ z3 L$ P
  9. #                           - Fixed shadow facing bug
    0 f" ~0 Z) K$ \. ?* K! [; j# X
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    + P5 @4 G* D$ e! W6 m- A
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    * b2 N* u8 |6 q4 _1 f# ?
  12. #  2013-02-22 - Version 1.7 - bug fixes
    ; d" O: Y% s% N. `2 Y8 V+ e
  13. #  2013-02-22 - Version 1.6 - added icon effect3 Y5 q0 H" Q. P; J! U
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps! y" s% f" B. r; Z0 |& R! E
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles& _8 Y: N' K+ `4 V6 {
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    % f& \) F- r; ?/ c8 P2 f4 i
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)4 n0 e3 H- p; W7 `" H
  18. #  2013-02-21 - Version 1.1 - updated flicker effect: E* l: P( O! T; `6 M$ l- f* Y
  19. #  2013-02-21 - Version 1.0 - release7 X5 w+ ^9 ?7 X- V# k/ @2 l* G
  20. #------------------------------------------------------------------------------#3 r6 Y; \) I% R1 s% H
  21. #  This script was made to provide some additional effects for characters such& ^2 G4 K( e( x! c9 W" R1 [* c
  22. #  as events, followers and the player on the map.
    ; n0 H1 {1 u% i! k3 W
  23. #  Currently it includes:
    5 |9 r9 s7 I) D9 \" v5 I8 z
  24. #( S9 @' @: h/ c
  25. #  Shadows
    & n* W9 r7 H( |. Y/ c3 z
  26. #  Shadows that appear under player and events in a directions depending on
      Q2 h2 A2 m" v; K! S& y+ y2 g
  27. #  a light source that you choose.
      k) _; j$ a' s
  28. #
    8 R8 J5 m( N* N6 r9 [
  29. #  Parallax Reflect4 x  n. X# n# j- s" Z) b" s* E: h
  30. #  Reflections that appear on the parallax layer for events and actors to be
    ( ^/ N: x* ~( D8 Q
  31. #  used for things like reflections in the water or glass floor etc. To get
      G1 `8 m) `& h4 O
  32. #  effects like the demo, you need to edit the charset graphic to make the water+ v4 N( x4 V. i2 |" }4 }& v2 g7 N
  33. #  partially transparent.
    6 U2 T8 t: K+ ~
  34. #, e$ ], F7 U9 x8 g6 }# g
  35. #  Parallax Mirrors
      ?" u5 r7 n* ]( g
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    ! s$ @% C% Q5 }( j7 |
  37. #  on a wall designated by a region. Both mirror and reflect effects can be0 ?# }& |/ s) F2 N8 w
  38. #  changed so actors and events can use different charsets for their reflections
    - p" A0 o) }3 H, ~3 q
  39. #8 x8 e) r5 p$ i- C. _/ n0 g
  40. #------------------------------------------------------------------------------#
    # j  w7 g/ Y& W
  41.   
    4 f1 Q) ?  W) Z( C
  42.   E# Y  `! }+ X, v/ B/ f
  43. #------------------------------------------------------------------------------#
    5 p4 \/ f, V1 A9 `/ O
  44. #  NEW - First event command as a COMMENT3 b1 k; v4 ?; n, v& _& |1 N
  45. #------------------------------------------------------------------------------#
    3 C+ N1 R: ]3 y2 H. }. @+ m) H
  46. #  You can add a comment as the first event command on an event page to set if
    6 M% U7 p2 l: W, @* H3 O' r4 j* D
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    6 E: @4 H3 W( |4 l; u% f
  48. #  below, all must be on the same line in the comment.' X( K! y# p: @* B3 L
  49. #
    : E2 o  B3 @0 w
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)) N3 K& n! q. B9 x. F) f
  51. # <shadow>           # set the event to display a shadow
    ; {1 g5 q& i' i  W
  52. # <reflect>          # set the event to display reflections
    2 [5 B1 y* }& I9 D+ I
  53. #
    + C% Z7 N, [- }8 Z6 d* |
  54. #------------------------------------------------------------------------------#
    ; x, o, g) C$ w, y+ e
  55. #  EXAMPLE:
    ( i7 z  O% `0 l. X& Z2 P6 M
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event% @$ b$ t: o( L2 V8 Y% [
  57. #------------------------------------------------------------------------------#" _6 u: y' \  m3 }. o3 J$ V' G( p& R

  58. & i* Q+ G/ g" S7 n+ G

  59. 3 R8 u/ Y3 }# A
  60. #------------------------------------------------------------------------------#, ^6 g9 J* N% D% q: e/ p
  61. #  SCRIPT CALLS:
    " G( {2 i3 Z' ?3 E! U' _* C
  62. #------------------------------------------------------------------------------#! n& {, M) I$ g8 \3 j7 u" j! @
  63. #
    ) E' ]; Z8 t9 _) m
  64. #  char_effects(x,x,x,status)! W$ ^3 i- X% W$ ?! s
  65. #+ |( k& T0 O. S. Z
  66. #------------------------------------------------------------------------------#
    # t6 v2 P; K/ y0 Y8 k
  67. #  # each effect can be true or false to enable/disable them during the game.0 t( h8 ?: K" B* u! ]& K5 G7 R/ U
  68. #  # you can change multiples of effects at once, x being the effect number. r9 z+ s8 i& o. r
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons" o3 {2 A! H' @, L& u: y
  70. #------------------------------------------------------------------------------#
    " y& t6 M) ]( }9 I. U+ b+ \% T
  71. #  EXAMPLES:
    : u4 z% |6 G6 x" J3 [2 Q. I
  72. #  char_effects(0,true)              # turn reflections on! o" A8 U( w0 a. h: H
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    + E. \4 N- w; P( T' j+ ^0 Z
  74. #  char_effects(1,3,false)           # turn shadows and icons off5 L+ d( n* T$ D/ c0 A( W0 f
  75. #------------------------------------------------------------------------------#+ k1 A1 {$ K- U  U) e
  76. #
    ' y" e2 D3 O# o3 J' R  {
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset( I8 i- f  A# ]3 T. Q) A
  78. #
    - m. f' S7 M- {( `7 W
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset* u- w% O& n* D6 [) S
  80. #0 P/ D% @7 r/ s/ w4 z9 Y7 `
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset& Z* _3 u% [. x* |3 y
  82. #
    ' n6 h# X  g8 A+ ~% }
  83. #------------------------------------------------------------------------------#
    5 h) S7 f8 `' M$ _. t
  84. #  EXAMPLES:6 Y: m/ K! y+ b* f3 i0 Z
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite/ G* Y6 J  I1 R) T8 ~, ~; [
  86. #                                    # in position 2 of "Actor2" charset.3 N; v  j1 \: K6 @7 ~: A
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    1 ~5 d  _( a% T' X3 E4 Y
  88. #                                    # "Actor4" charset.
    / [0 K& @5 X" Y
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    . L$ `3 s+ V# _1 |8 M* w% Y& F
  90. #                                    # "Vehicle" charset.& i* `& k7 y4 H3 e% B5 X. T. v
  91. #------------------------------------------------------------------------------#0 I/ ^( \  _/ \5 g
  92.   
    : @" _" p9 l) i$ c% p& L
  93. #------------------------------------------------------------------------------#
    8 A  c' N" z* D# T" N
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    & z$ H. c. p* x) W
  95. #------------------------------------------------------------------------------#
    % d9 ?" B8 I0 K4 p% f
  96. #' e6 m1 a0 T2 }( p3 j0 Q7 k* o! z
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off2 _& H4 S( R9 B7 ?; _
  98. #                          # use this to specify for mirror and reflect.
    ! O& l% T" I& K6 x$ |: T2 @8 r
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change8 u5 c" C5 J9 W+ G9 H% P5 J
  100. #                          # to change all events use :all
    - ?2 U( f+ T& ~: C% d; A, ]( s
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make' x9 T. C) o. b  @' P
  102. #                          # it 0 for no icon.; h; a6 u  y+ L0 |4 _
  103. #
    $ R- M. L* C9 d4 |0 c5 x
  104. #------------------------------------------------------------------------------#
    % n6 b1 q9 b8 l! V, f+ \5 U* o
  105. #  EXAMPLES:
    $ V2 \: U: ^9 \+ P  m2 ~
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    1 F! v5 Z; k9 @7 A) P
  107. #  shadow(1,false)         # Turn event 1 shadow OFF4 L. `) D& d( _* [+ V1 b
  108. #  reflect(:all,true)      # Turn all event reflections ON
    % k1 o) ?1 K( d0 X
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear+ i6 P' `1 [1 j# c4 m# {- E
  110. #
    , D  h' g; n0 m0 I- ?
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    2 _7 |, _9 O  W' Z% R1 q9 Q7 G) f
  112. #        a map. This is a design decision to try to keep lag to a minimum. You, l, W0 `7 N' L
  113. #        should use these effects sparingly and only activate them on events
    ; n8 b( J; f; D! w5 ^4 W
  114. #        that require them.1 A$ l( [/ @0 `( _
  115. #------------------------------------------------------------------------------#
    9 p! q4 y  D, a- G
  116.   $ k( J; X: V, q# r. a
  117. #------------------------------------------------------------------------------#
    % T4 F8 e# B! t) S
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    ( T. l* }3 \* x  Y
  119. #------------------------------------------------------------------------------#
    ; D, o! M: d# u
  120. #& U; i) v1 ~# r0 t% p
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default ' B1 U! e# o* G$ N1 j+ ~
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off " f8 D- f6 v, ^6 [
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    2 |% D: R" y* W: s3 m+ A, T$ o
  124. #4 a- |' y: m" J5 `4 _) R
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects+ Y' M2 q9 ~+ s; ]& D+ U
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    ( [+ n1 E4 \% g1 t2 c
  127. #  v_icon(x,x,x,icon_id)
    . F+ y9 q- Z% G. I) ~' I  @" ^4 K
  128. #
    ! ?$ ]' G5 j- C* p1 |3 o
  129. #------------------------------------------------------------------------------#
    ( m' \  ]0 [+ Y; q
  130.   
      J! l! c# ~3 n% e+ q
  131. #------------------------------------------------------------------------------#
    & L, _  b& f* c8 s" Z* X8 U9 p
  132. #  SCRIPT CALLS for shadow options3 o+ l& F: r* X: R
  133. #------------------------------------------------------------------------------#
    7 |0 q) Q3 H! X4 q8 @
  134. #
    # K) K, T5 b( T; _9 C' D
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    ! F% K: a* |; L1 o$ [
  136. #                              # light source number you wish to change (for
    ' p, |$ ?7 E- t
  137. #                              # more than one). These are reset on map change.
    9 G' L3 a) ], q! H9 M
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.) C7 s- E) }. x
  139. #                              # This will need to be in parallel process if you. O# ^: l. S$ F  n$ I/ {* S3 w
  140. #                              # want it to be a moving light.
    ! Z$ t' ?( s8 S0 O
  141. #- m7 @* V3 f) t- u
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    # b6 [! r0 L1 _2 Q/ E2 [4 t3 R2 A
  143. #
    5 |" r/ `  m( c. f0 h" w; S7 }
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    * L$ R$ K: q; S8 Q! v7 t" b3 L
  145. #    # fade = amount shadow becomes more transparent the further away you are.: D0 ]) D0 m. ?( b
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.: v! b9 ]/ x7 Q2 \2 k# n* e) \
  147. #% H) Y0 H" ~4 N
  148. #------------------------------------------------------------------------------#3 Z5 Y( h( U( Z% f1 P1 l, Y
  149. #  EXAMPLE:
    3 I- E4 R4 [9 H! d: P7 T
  150. #  shadow_options(80,10,false)    # This is the default setting./ a) \4 m% ~: C, L( v$ k+ n- a" I
  151. #------------------------------------------------------------------------------#
    " g) G2 c+ B5 c* c# t  k
  152.   & D7 j7 [! O7 B; D' Z
  153. #------------------------------------------------------------------------------#$ q/ e+ y1 \7 V. _% g% A: K
  154. #  SCRIPT CALLS for reflect options0 \* C7 s3 y- [  v
  155. #------------------------------------------------------------------------------#) Z1 S* i+ z0 O9 l4 J
  156. #
    $ R: @/ V# n& r/ W4 G( Y
  157. #  reflect_options(wave_pwr)
    8 ?& |) g' N5 A  A7 L" G9 L. k0 a
  158. #
    8 b5 b- V0 P0 O6 e! P& z+ g
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    ) f0 q- D" [5 y. i  F' F
  160. #
    ; w- F; l9 j7 o
  161. #------------------------------------------------------------------------------#; O' F, U, e9 a9 o
  162. #  EXAMPLE:8 A" |" r2 e# M
  163. #  reflect_options(1) # Turn wave power to 1
    5 H2 f: Z* v! D" D. _( n
  164. #------------------------------------------------------------------------------#7 c8 p" f2 ?3 m9 C% K  \; N- Q# D: F
  165.   
    / m* r" f6 V  G0 i# z: M
  166.   
    ! P) F0 k) P3 Q, D
  167. #------------------------------------------------------------------------------#
    9 `5 Z! {! }! Q$ E* J* A2 b: a: k# D
  168. #  NOTETAG for ACTORS
    9 h% s# }. B5 `; `! P$ [
  169. #------------------------------------------------------------------------------#
    ) E6 _; }0 y' h- _1 `9 A
  170. #6 t$ u' a. c! {4 B  `
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    3 n" l( V/ T' K# _
  172. #
    6 P3 [1 o% T; N0 T! B. p: h
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    ( ]5 Q3 F2 V7 u, o& u. Z1 _6 f6 r4 r
  174. #                                  # and use the character in position 'pos'
    ' N, f) w( @* ~1 C. R, f9 J9 o
  175. #
    " @3 a* P* d' |( a1 V* g2 I3 p: e
  176. #------------------------------------------------------------------------------#/ D1 U, S4 ~4 D# o
  177. #  EXAMPLES:4 N/ O! d2 j; ]" R9 @8 u) L
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset+ F$ l! K  j, S
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    - o+ s0 h( p& _3 r5 X- _$ H9 V
  180. #------------------------------------------------------------------------------#; w, o- ]' Z1 H% J; b9 \: W& R
  181.   
    - \4 \  C( J: {1 b! \8 W
  182.   
    & G* o9 X) n0 x' @4 d( b
  183. ($imported ||= {})["Galv_Character_Effects"] = true8 v  g. l& }8 i' ~) g8 l
  184. module Galv_CEffects& \% I( B3 U: P) T- H
  185.   : `4 ]8 s, J% ]' v1 l. B! E
  186. #------------------------------------------------------------------------------#  
    0 A( ^7 j3 t( V1 p7 I3 O) D
  187. #  SETUP OPTIONS
    ( ^# i8 y4 b7 A/ r* c
  188. #------------------------------------------------------------------------------#
    # [' R% i/ w+ X
  189.   . W, Y% l% _- x* K) B* G: g
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    1 h% z3 A+ c$ C7 E3 d" _! y
  191.                         # region on the wall you want to make reflective (and0 X% q( n: W! r% S
  192.                         # then use tiles/mapping that make the parallax visible)
    4 V3 R0 ~7 j5 e) w. j3 Z0 e
  193.   
    4 j# ^: q) g. B1 M% s% G, U' R  [- k
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    ' v: u3 f- T$ c. z- R6 C
  195.    
    1 `" t7 u, g7 d  Q& N* `9 Y- C0 b
  196.   REFLECT_Z = -10       # Z level of reflections) m3 l8 a" Y+ ?+ z" s- v
  197.   SHADOW_Z = 0          # Z level of shadows4 P3 g* N. H& d, @  Q* K& Q# R
  198.   ; `$ \) x6 t# D% U0 j/ a0 i0 U1 }
  199. #------------------------------------------------------------------------------#  ; t! z; @: t7 ]1 h: F2 `+ _6 t5 E
  200. #  END SETUP OPTIONS
    0 U/ x7 B( H2 e
  201. #------------------------------------------------------------------------------#
    : N; J. v9 L  _1 @
  202. end9 u- t/ O3 Z# f) J
  203.     Q+ \) q- j/ V  z$ i! F
  204.   
    : _: T: o5 y$ p

  205. 9 W9 s) e! }6 Z- @, A0 t" F
  206. 8 a7 f; o& t6 J, H: U3 }
  207. class Game_Map( J3 M. R; _+ m) S  `
  208.   def do_icons(refresh = true)9 g/ U- y* {; X- N/ z* n6 x( N- V
  209.     @events.values.each { |e|
    # O6 P- H5 ?4 d1 R8 e; a1 q& j
  210.       next if !e.list( H$ W" r8 q, o0 O" t+ u- E
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    / I' z/ y% C" {0 g4 @* f) k0 y# N
  212.         e.icon = $1.to_i
    3 Q) ?9 e( N2 O, A: ~5 w! U
  213.         e.icon_offset = [$2.to_i,$3.to_i]9 w0 J+ Q3 S/ b- G
  214.       else
      t0 G  x! o% U' z- N$ Q3 h
  215.         e.icon = 0
    % `) a6 R) j! b$ ?6 q4 {
  216.         e.icon_offset = [0,0]1 C) c  N& u6 v) O5 h
  217.       end  ^) S& H) O3 C8 x6 D
  218.     }; o7 B/ e' v5 Z( W& V/ a0 O* x( t
  219.     SceneManager.scene.spriteset.refresh_effects if refresh7 N( q0 ~2 B$ k$ ]
  220.   end
    3 I8 p8 Q1 @4 H+ g) J( p
  221.    
    / C4 A0 |1 N3 G: y$ h) P% d; ]( j
  222.    $ @4 P( u+ g. A+ s% l: O* ?6 L  e
  223.   def do_shadows(refresh = true)# ]) C& H+ ]9 a+ _6 b
  224.     @events.values.each { |e|
    ; k9 ^  d5 }0 H, R! H
  225.       next if !e.list
      {, K- w  a2 }* h: j7 N
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    $ D4 ~9 W+ Z% A) ~* d: g7 f
  227.         e.shadow = true% ?- h' n' W! ?' L0 f1 t
  228.       else
    : I* c. L+ ^3 p6 c4 I3 ^- B0 Q
  229.         e.shadow = false
    2 q; K  J% [& B8 V
  230.       end
    - Y" U  p3 K0 k5 b) {: S& C
  231.     }
      |( s; M- [+ i0 n* E1 m
  232.     SceneManager.scene.spriteset.refresh_effects if refresh  ]  r9 [/ ]$ I- @( x$ R5 L
  233.   end
    4 I' X# k; n; Y: p5 ?- C: {! D
  234.      l9 l. L/ t% d, K! [( N
  235.   def do_reflects(refresh = true)
    8 X' w- C/ l5 @2 c# m$ V! B
  236.     @events.values.each { |e|( B# y1 Y0 \* e* I$ n4 @2 n
  237.       next if !e.list& h  Q  u+ p+ a
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    6 \9 }& b9 k' d* V" _
  239.         e.reflect = true
    6 e2 a4 L+ j( F* n6 s$ s9 i
  240.       else; R) ]; T  J2 B* V. }4 i+ w
  241.         e.reflect = false( _" v, T" |) I4 N- @, p
  242.       end
    + m/ Q% d9 ^7 i9 H6 a
  243.     }
    7 H; p6 Q4 Z, a9 d6 U$ J6 d( _6 b
  244.     SceneManager.scene.spriteset.refresh_effects if refresh# x& m* A- O* \; T  x
  245.   end% `; ^' l) J- B0 K# r( u
  246.    
    : U; V2 J+ Q- K3 M* Q5 _" ^
  247.   def do_all_chareffects
    9 x( P( ~/ s( l; g
  248.     do_icons(false)
    . b/ j1 ]% V& d# T( ^
  249.     do_shadows(false)9 H9 ^% O8 W6 Y  E& J2 i0 q
  250.     do_reflects(false)/ I0 l6 ]& }( k1 L! r( F* ?* m
  251.   end& W/ x4 N; G( y- ~! x
  252.    0 u4 l. A* _; F2 U& E
  253. end # Game_Map
    / k4 o) }9 V5 j

  254. 4 `9 @  u. v7 r( a4 Z
  255. & Z0 C* T# c- _/ l+ c% {

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-6-4 17:11

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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