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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

$ ~& w9 ~; _1 n. o这个代码怎么用啊,有大神知道吗。我从国外找的。6 @- t) h" {3 v: T  G5 O, P- Z, \- M
http://galvs-scripts.com/2013/02/21/character-effects/- r! o5 C8 k5 |0 a; g6 d3 P; O
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    & y1 u+ b# ~; ]  ^) P
  2. #  Galv's Character Effects* n: T+ T1 k- w
  3. #------------------------------------------------------------------------------#
    + |9 K+ o2 I, w: `8 l
  4. #  For: RPGMAKER VX ACE
    % C9 m6 q* H5 X5 U+ m: |+ W
  5. #  Version 2.1
    ' T/ t3 P4 U' j8 R* M5 ^; M
  6. #------------------------------------------------------------------------------#; w$ T# Q: z" K/ z+ z6 K5 |
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows* V4 U+ I' f+ c
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects7 ^& D5 j: x4 a3 s: S# E
  9. #                           - Fixed shadow facing bug4 O" x5 ?& k- E% T" q. }
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    9 {0 }, Z) T" X4 A4 i
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows; _% j1 }! U. f  _5 ]2 A
  12. #  2013-02-22 - Version 1.7 - bug fixes
    0 K" K, A# H) B& d2 P
  13. #  2013-02-22 - Version 1.6 - added icon effect
    : U) x5 Z) H2 m4 }. b: p" x
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    + N' ?! C2 k' u0 S7 E1 n
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    & I7 k, T+ o6 M/ N' P
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks. i& k( q$ I7 Y, W9 S
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    $ }9 M$ J4 @  f, w) V% A9 d, ]' O  P
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    , g+ ?$ n/ Q8 o4 |
  19. #  2013-02-21 - Version 1.0 - release; C; S5 I0 V  u! f1 c
  20. #------------------------------------------------------------------------------#
    ) [) `, B7 \: @6 ^" R
  21. #  This script was made to provide some additional effects for characters such
    % }' l' d& N& U7 ^2 k* R6 _
  22. #  as events, followers and the player on the map.: `6 ^1 m$ g7 N  D, x, g
  23. #  Currently it includes:- n" f/ _0 q* E# D0 N" U
  24. #9 n4 ~0 T& i! u; W) v
  25. #  Shadows
    ; F/ V! ~% k) L/ S( B+ R( T
  26. #  Shadows that appear under player and events in a directions depending on
    3 |, A% {) L$ M
  27. #  a light source that you choose.
    , Q$ l" r4 f' J* k
  28. #
    6 G6 V  I; V) A, S! ^
  29. #  Parallax Reflect
    7 _8 g* t. g+ y+ L
  30. #  Reflections that appear on the parallax layer for events and actors to be
    * J( ?- e) |5 A6 h  P
  31. #  used for things like reflections in the water or glass floor etc. To get& D- M* o# n  O$ q( }9 F# j' \
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    2 L, Q+ O: Z* C  F7 `5 c% ~5 S
  33. #  partially transparent.- u, X& y; t0 L. |
  34. #4 W+ ]# T7 m/ K( _
  35. #  Parallax Mirrors
    % n3 d& j! K6 [: x$ a3 v
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    6 {* |, I8 M; C3 a7 t
  37. #  on a wall designated by a region. Both mirror and reflect effects can be& z, C+ q& Y9 K5 W# R2 R, P
  38. #  changed so actors and events can use different charsets for their reflections" ]2 p# u0 u( k9 d) w
  39. #
    , S5 H: x+ U' t! g
  40. #------------------------------------------------------------------------------#" O3 W& z% @0 ^& U
  41.   ! C0 B  Z6 R+ G0 c1 a% C

  42. % D7 F7 l9 P" U' s, G0 W
  43. #------------------------------------------------------------------------------#' o* N0 P6 s* t; G) s
  44. #  NEW - First event command as a COMMENT
      Y/ J/ {7 J( [$ H+ T7 C0 ]  W; ]
  45. #------------------------------------------------------------------------------#
    + M- A% {, `  ^  T) A! ^
  46. #  You can add a comment as the first event command on an event page to set if
    ! K7 i; Y( I% o- B/ F/ ^: B
  47. #  that event has an icon, shadow or reflection active. The tags to use are& M' }0 z# B0 d( ?8 J4 |
  48. #  below, all must be on the same line in the comment.* K/ B4 U% f  b
  49. #* w- U3 ]; y, v, B/ P8 q( H- o$ V
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)8 e- u# a) A# z9 V: `. _  P
  51. # <shadow>           # set the event to display a shadow7 O' G3 i/ f6 b9 S* W+ ~: T# s3 n
  52. # <reflect>          # set the event to display reflections. d- F: g8 G9 y
  53. #
    ( A+ D) K& N  w0 E2 T, B2 h- H
  54. #------------------------------------------------------------------------------#1 q8 I: a8 o( W) a
  55. #  EXAMPLE:! G5 @0 E0 c6 P  O8 q/ q2 @
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    " Z/ U) z! F: A3 E
  57. #------------------------------------------------------------------------------#
    % l$ G: q' A3 i/ S8 I
  58. $ t5 w- i+ `- s' P' ?/ K
  59. 7 m0 ?" j9 m% i* a0 ]3 v
  60. #------------------------------------------------------------------------------#0 o  v' k* f4 r9 J" v/ V0 U5 X
  61. #  SCRIPT CALLS:
    0 q0 U3 ^2 p# ^: k* y2 V; ], |, Y
  62. #------------------------------------------------------------------------------#
    ' R+ O: j1 @. K! u" c$ q
  63. #
    , v& O$ s% e2 X; x# j+ q
  64. #  char_effects(x,x,x,status)
    ( t4 T4 I: J- f+ V
  65. #
    . B6 J% P6 G6 _) S4 b) F/ H
  66. #------------------------------------------------------------------------------#
    + h" i6 l$ @, j  u9 P
  67. #  # each effect can be true or false to enable/disable them during the game.& p0 C) m5 N; T5 s( _1 s; Y9 e
  68. #  # you can change multiples of effects at once, x being the effect number, K' p+ R5 e+ w
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons, D& g6 f! W8 ~1 y  F* _' k) k0 q
  70. #------------------------------------------------------------------------------#
    ! x$ h7 n% K! `1 T  r4 t* Y- K
  71. #  EXAMPLES:8 x' B6 O* f) n3 \
  72. #  char_effects(0,true)              # turn reflections on2 P" M- x, R! Q6 I0 W# i
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    1 s# n6 w- Z3 u& T
  74. #  char_effects(1,3,false)           # turn shadows and icons off0 n) p2 r$ W+ u' E) u' n
  75. #------------------------------------------------------------------------------#
    6 q; U" x6 r  O- |' Z
  76. #
    . _5 {5 u' ^% z. Z
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    % M5 U8 E! T  ]& f
  78. #
    / N9 D$ k7 F; U8 d$ }  N
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset- ?, f0 Q% I$ B; w& n% B
  80. #
    " Q# b) Y6 k3 o1 m, l
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset1 r$ e3 A& K1 V" a4 ?
  82. #6 \7 M2 f  Z! d# a) _% s, h- p
  83. #------------------------------------------------------------------------------#9 y" J0 n  l) a
  84. #  EXAMPLES:
    , ^, N5 t  r, e
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite/ q0 R/ H" v) m5 m, M6 N* a
  86. #                                    # in position 2 of "Actor2" charset.
    9 c+ \. ]6 k: t4 n' N
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    - W7 z7 _; G' }% J& p8 \5 [
  88. #                                    # "Actor4" charset.
    + O% O/ q$ Z- m2 Q! a  `: h
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    ( }! Q: e* v. S; ?: D
  90. #                                    # "Vehicle" charset.  l/ ~( L0 G) W9 C/ ~: s- ~$ w
  91. #------------------------------------------------------------------------------#" P7 X& e8 u- y* G+ }+ d4 ^
  92.   ( Z  T2 t# C7 V% R2 u
  93. #------------------------------------------------------------------------------#, c0 e, U8 y) f( d% D* e
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS) c" m9 Y$ b, q! b9 r' _- X$ Y% X2 a+ m
  95. #------------------------------------------------------------------------------#0 o. Q  L; Q$ w$ m
  96. #, t+ D! Y3 e, y' ~' x2 J
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    ( W5 [! d# U( \+ n
  98. #                          # use this to specify for mirror and reflect.' \1 Q* N  C$ @0 D( P
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change  L9 W6 [# [. T3 I5 ?$ u
  100. #                          # to change all events use :all
    5 ?* [2 _, v# u1 H2 F$ D! y! }
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make" ~' J3 X, n9 L& o6 f  E4 u/ q
  102. #                          # it 0 for no icon.
    : D' b0 E4 ^" }; M+ T
  103. #: U4 V$ U4 q6 @% W: R1 V! w! M7 L
  104. #------------------------------------------------------------------------------#/ y' ?+ W( p5 a
  105. #  EXAMPLES:8 P6 w5 a  F! d: E( G
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON. [+ q$ K8 X* N: ]
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    . I/ ]+ C' l; F' Q4 H/ ?* |7 C
  108. #  reflect(:all,true)      # Turn all event reflections ON4 X3 T  `0 u4 C* m( M. W8 v
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    8 @2 F! w4 J9 Q! l! N8 [- Q
  110. #
    & z8 s$ U0 g7 `. d3 r; A' a
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
      X  a/ P$ o  y) [7 w
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    / s5 t/ B6 B" R) I* U, ]9 T
  113. #        should use these effects sparingly and only activate them on events
    " X4 n; `" u" v$ `; e- s9 u
  114. #        that require them.
    + S6 G. o4 v0 a1 G, f* S
  115. #------------------------------------------------------------------------------#. s* G9 s! A0 t; `4 Z# a& \1 o$ h; r
  116.   
    - ?( W& n- ~; W# R: U, s7 \  K8 }# t( N
  117. #------------------------------------------------------------------------------#
    ) {5 a* @2 `2 @5 F/ J4 v. e
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    & K; t9 H$ \. G) E7 f, A0 ~) n
  119. #------------------------------------------------------------------------------#3 J( t8 }9 {8 Q* U5 k: P  i9 F
  120. #
    5 C& J* _; Y3 I3 ]0 }
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 0 g. J) B* |5 o+ `  z5 ^( e  u
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    9 I  o7 L. `: X4 S$ |4 `# p
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.. s0 _  u2 D" Q, c
  124. #5 N9 P! L7 P1 c. c
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects/ P+ U3 C* L) b
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    ! ?/ B# V/ m7 o
  127. #  v_icon(x,x,x,icon_id)
    . @) J* F1 Y# }% e! W! v6 p
  128. #' w3 ~' P& y2 ?0 O- U, @$ o
  129. #------------------------------------------------------------------------------#, Z0 d6 D1 w/ }
  130.   
    % L& w) I" l" P1 [% s$ g
  131. #------------------------------------------------------------------------------#
    6 w. k. e! F/ s& y! u
  132. #  SCRIPT CALLS for shadow options
    $ n+ ^+ r- `' T% C0 V% z# B% T
  133. #------------------------------------------------------------------------------#( F6 d1 {: f0 R: v
  134. #! P$ E, j; ?7 Z
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the % p8 h& I5 n! g( ?0 d0 v6 Y
  136. #                              # light source number you wish to change (for
    , g9 f+ ]  U: s
  137. #                              # more than one). These are reset on map change.
    6 F, C6 d4 d/ ]
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.; i: Q( B9 X$ P8 q3 ]3 U! {+ ]
  139. #                              # This will need to be in parallel process if you
    ! M4 I3 k+ B. `2 d( `. D+ |/ P! V# N
  140. #                              # want it to be a moving light.- @1 X  z# C& j% h' |* j7 e3 R2 o% ^: w
  141. #. n! ^2 y) d& j; H/ ^0 }
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    " V: u; B* h- n
  143. #
    8 ~/ x% q# L0 L4 F; G9 X
  144. #    # intensity = opacity when standing next to the light source (255 is black)8 G( N! R* x5 P7 i( |
  145. #    # fade = amount shadow becomes more transparent the further away you are./ q3 Q( c' v, I" x: d2 x+ Q  W
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    " Y' F5 Y5 X1 ~$ P, y
  147. #+ v8 ?  D  V3 `5 Z' f1 ]
  148. #------------------------------------------------------------------------------#
    , a+ `3 Y' S5 g" g" |
  149. #  EXAMPLE:
    2 y0 r! M) {) R7 d+ l$ D& F- W
  150. #  shadow_options(80,10,false)    # This is the default setting.8 Y1 H- `/ r8 j; Z8 l
  151. #------------------------------------------------------------------------------#
      x) }7 U0 N# m1 ^5 a4 s/ [
  152.   0 N+ ]. w1 A7 T# W. }" p; N
  153. #------------------------------------------------------------------------------#
    $ {* K: l9 ]& L. x. w. t! P
  154. #  SCRIPT CALLS for reflect options
    8 A( l3 c- J, j% N
  155. #------------------------------------------------------------------------------#. n9 K; K5 j4 X$ r
  156. #; M# c* F" A$ a  N* p
  157. #  reflect_options(wave_pwr)
    ' f% \# y% E( x
  158. #$ J- g( @2 ]% h8 B* Y1 O
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    / ?  l+ h+ H$ n# {# `( R
  160. #
    ( N2 @: |1 ~0 L, P6 A
  161. #------------------------------------------------------------------------------#
    8 Q3 [6 C1 Y+ v- B
  162. #  EXAMPLE:
    9 S- q7 o% n8 c
  163. #  reflect_options(1) # Turn wave power to 1, m( j7 ]& z4 D( o- b
  164. #------------------------------------------------------------------------------#
    5 ^5 p# o  R$ X/ t. e" u" I
  165.   
    ! G2 G1 n3 u2 x0 b, y
  166.   4 \; B* {( S0 l$ f
  167. #------------------------------------------------------------------------------#
    4 o, w7 t! P5 U- F- g5 F# ^
  168. #  NOTETAG for ACTORS/ V! [; N$ n/ c3 Y( E
  169. #------------------------------------------------------------------------------#& B! `  r2 r+ n, O3 e  y
  170. #
      ^( G% \/ o1 R; u* V
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)' t. Q$ K" h" ]! |" z8 A
  172. #/ v! M* c/ v2 d7 a- X0 ^, U
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections: t/ ]2 k! S* {) }! O
  174. #                                  # and use the character in position 'pos': N( h2 ?  }- N
  175. #& Y+ g, E* q; F7 v% o
  176. #------------------------------------------------------------------------------#2 }+ X0 g. s: P: m# B1 {5 \
  177. #  EXAMPLES:/ h: M5 l6 c$ l
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    . S- e# r0 a; w6 b" E
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    8 v( D! l4 P. M* e) f* U5 _' \) d; T6 |
  180. #------------------------------------------------------------------------------#
    2 b& k) R' F3 }# f' k  O  j; i
  181.   
      G/ b& p: _0 d/ c. ^
  182.   
    ) p. T+ K4 }# L0 v$ w
  183. ($imported ||= {})["Galv_Character_Effects"] = true6 t3 E, u6 T. L% j  V. x" h
  184. module Galv_CEffects1 K& o6 ^$ \! P, l
  185.   
    # p# h% }0 Y2 \' n$ H: ~: O4 r
  186. #------------------------------------------------------------------------------#  - l) z. I# M, F3 b) l8 V9 J' h
  187. #  SETUP OPTIONS+ I/ w; E" F5 L$ ]1 S/ x
  188. #------------------------------------------------------------------------------#
    & W% [* Y4 @3 O
  189.   
      G' a6 j  I5 h& W
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the2 w  |; H6 }, D0 U9 n
  191.                         # region on the wall you want to make reflective (and1 K% @6 e/ r' y" p& K0 p
  192.                         # then use tiles/mapping that make the parallax visible)
    ' V$ T. y; S7 t: X+ t
  193.   
    3 d" W: G, x) P5 y2 q" V0 a
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters- H, X7 x* l/ n- M( P; A+ Q
  195.     ! N5 P# {7 U2 A* S# s
  196.   REFLECT_Z = -10       # Z level of reflections
    , v8 K8 K* _1 r6 s  G* s( P% ^- c
  197.   SHADOW_Z = 0          # Z level of shadows
    0 i$ e& V3 M2 V! d
  198.   
    + ?  P' `  K0 Q( I7 x' B% v
  199. #------------------------------------------------------------------------------#  
      k: w# e9 G$ V" I$ V( z3 J- s2 n$ n
  200. #  END SETUP OPTIONS' ~' \9 R! C/ v, \0 s! O
  201. #------------------------------------------------------------------------------#
    " v- j" G0 H  Z7 h4 z. m. k
  202. end
    2 e6 h! z$ E. S, J
  203.   / _1 f. t  _6 J- v
  204.   9 n; p* v, E' Q/ q% S- p2 A. j

  205. 1 D) H2 M  ^( e) B

  206. 2 ~# g& i7 i- b7 F
  207. class Game_Map
    # s$ g, m; [, o# f) l3 @
  208.   def do_icons(refresh = true)% r! j) t+ f# g- A
  209.     @events.values.each { |e|
    2 K& B3 m' S: u$ m
  210.       next if !e.list7 f5 R7 T7 T( ?
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    " m  y6 q0 X+ r8 B
  212.         e.icon = $1.to_i0 G! Q- F3 Y  q6 O% V5 r0 O
  213.         e.icon_offset = [$2.to_i,$3.to_i]/ h3 @1 M/ t9 u1 [. z0 |
  214.       else0 p4 l7 o5 y9 D' `. s5 W
  215.         e.icon = 0. T# r0 l) c  ]: ?
  216.         e.icon_offset = [0,0]. S  ^0 ~/ Z# A( L. v
  217.       end! n6 a& S( D6 E* n) c- t) z/ z
  218.     }+ i" c1 o' {) V
  219.     SceneManager.scene.spriteset.refresh_effects if refresh' C3 Y( h6 F3 A& L8 i0 j" Q
  220.   end
    ' x" P" f! Z: a
  221.    ' _% a$ v- O. ?7 t
  222.    ( ?& \0 t! X) b3 G( A! C
  223.   def do_shadows(refresh = true): X/ u- B7 I7 Z% p" |! z
  224.     @events.values.each { |e|/ ^) e5 p; `( P" w4 F
  225.       next if !e.list: z6 i% [; G# H7 x$ k
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/' ]$ i, t; j8 x: l! ]: ^
  227.         e.shadow = true
    3 F0 x' N* V) i8 F
  228.       else
    6 @: Y( n* l* Q2 W/ ]$ \
  229.         e.shadow = false
    4 t( X, @# H( n/ m9 N/ x
  230.       end
    . Y- u# @' h5 L$ K0 X
  231.     }$ f7 O+ R8 j0 r9 N; T8 k1 l
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    ( D8 `6 n* i3 t, q0 U4 C* {
  233.   end
    & b. S$ o" i( o$ z/ E' t# Z3 B
  234.    
    8 ]- L( @! \% |' H
  235.   def do_reflects(refresh = true)# g3 C0 J- o, r) H, F+ {
  236.     @events.values.each { |e|- o7 f8 }' o8 v6 A
  237.       next if !e.list
    * X; M4 p; A3 p3 o, M2 Z6 ^" s: ]
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    # H2 L1 p; \' M8 X/ R3 C# x4 ]5 j# K
  239.         e.reflect = true# w8 {7 K0 n2 Y
  240.       else3 G2 g! m" d& B* p* ]( D& e0 f% K' u
  241.         e.reflect = false
    ' V6 c+ O3 z' z0 H. A/ a
  242.       end
    - o: R; U7 i& X( i1 E! L4 K
  243.     }
    - t; U' n" v0 j/ h" M: [! E' ]
  244.     SceneManager.scene.spriteset.refresh_effects if refresh( k3 z& \1 |' ^  `% t1 W
  245.   end! r4 z' v0 x" V6 r
  246.    
    % b7 z. Q1 Q( p# {- [/ @
  247.   def do_all_chareffects
    1 {+ s1 m0 v7 e1 R6 i$ |7 r* B
  248.     do_icons(false)* ]! k/ ?2 h6 ]4 @% g' p
  249.     do_shadows(false)
    ) A, W5 A1 E. B8 \# e0 ~  I
  250.     do_reflects(false)2 H. R0 g! D) e0 h
  251.   end
    . F3 E  h( K# t1 o6 r* w& D
  252.    # V; n9 L2 H( a5 h  O: D8 f5 {* C
  253. end # Game_Map9 p( v, B7 y/ c* }  \
  254. ( t4 c+ M8 Z* Z  q1 x. n' K5 K$ y

  255. 3 P( O( M3 K. i) q! D

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-7-4 11:29

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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