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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
: d6 v4 Z1 E: v  A
这个代码怎么用啊,有大神知道吗。我从国外找的。1 l* z& g- O+ S) z  z
http://galvs-scripts.com/2013/02/21/character-effects/
  Z5 q: F6 P# ~3 w4 K0 y: x是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    : |. ~  l5 ^! f; S# X) E" m
  2. #  Galv's Character Effects2 u% c9 t/ s& C. s/ O( E/ D, `& ~
  3. #------------------------------------------------------------------------------#
    6 q' C& D7 `3 K3 U
  4. #  For: RPGMAKER VX ACE
    0 d' x6 ^5 P( b8 f# G
  5. #  Version 2.1
      A* a  P/ z, w, r$ _! i
  6. #------------------------------------------------------------------------------#. u. k* `' R4 x/ n( b; r) I$ T: D
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows# `5 M) i" o6 A; C7 p
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects, B5 k7 {3 g% j% g1 u# O/ q8 o
  9. #                           - Fixed shadow facing bug* \/ Y! D$ a, L. B9 Q" [% ?
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows; ?- ?, ?4 S. _" {
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    ; ^0 b1 a& ^: J
  12. #  2013-02-22 - Version 1.7 - bug fixes. D4 p- u, A7 h1 S
  13. #  2013-02-22 - Version 1.6 - added icon effect
    ; P2 c8 H$ |3 ?: c+ I+ x6 |
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    3 K9 Q1 A, p- M- n7 i' {
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles- v, M8 ~8 o. R" d
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    7 r1 A) o/ j: T. V7 o7 }$ _
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    ) B9 X+ K7 N( P9 g9 ~( D& c
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    - c$ w8 a! D6 |, {) q- ^3 |# X
  19. #  2013-02-21 - Version 1.0 - release+ R3 M8 Z* ^- K5 q0 [- e' y. V) k: O
  20. #------------------------------------------------------------------------------#
    1 Q0 k3 q/ h7 ]- j& }: ?
  21. #  This script was made to provide some additional effects for characters such
    2 }' v' l% J$ S( T: P! {
  22. #  as events, followers and the player on the map.
    2 `$ W. a6 F; q9 w* [/ d/ z
  23. #  Currently it includes:
    ( X+ w3 Q! y# X+ ~$ H
  24. #! E2 ^1 l" u$ `( v; m
  25. #  Shadows
    8 B" x+ H! k+ q( u$ n9 y( ]( W' F
  26. #  Shadows that appear under player and events in a directions depending on
    # S& }! n1 D: w/ r+ g5 w/ G
  27. #  a light source that you choose.
    3 Q& l6 n+ s' A1 a* j# Y2 k  o/ l
  28. #2 \# v' x- W& `% I* V4 q& Q& `$ x
  29. #  Parallax Reflect! q% w" Y4 T' l$ P& m
  30. #  Reflections that appear on the parallax layer for events and actors to be
    2 L2 Z" z' ~( v* J  T9 L, ~9 G
  31. #  used for things like reflections in the water or glass floor etc. To get
    + v% |; ]. T, b2 D+ _+ J2 T9 u
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    * [  M' O6 x$ q* L5 w
  33. #  partially transparent.
    6 y9 K1 _, L. Q1 I4 P8 P& X, z- K
  34. #
    # |# F* p, O1 U3 b
  35. #  Parallax Mirrors
    ' T  i- w' f9 c) Y# Q+ M
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    4 v/ @4 Q5 `" r. U$ a
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    ( Z  ?6 P8 n# j. ~0 S1 p
  38. #  changed so actors and events can use different charsets for their reflections( Y" S' u' v. h4 \6 L+ `- |
  39. #
    4 C9 b; [& U3 U$ x  O; P3 }; a7 j4 }
  40. #------------------------------------------------------------------------------#; d) e# i+ l/ U( Y. u" E
  41.   7 ?) w2 O1 M; B( Y
  42. ' C: m3 t. b  I
  43. #------------------------------------------------------------------------------#* t6 g& R. I4 Y+ v+ I  `! M8 `
  44. #  NEW - First event command as a COMMENT& e8 }& J) D2 ]7 b
  45. #------------------------------------------------------------------------------#
    6 g, _3 l7 m- G9 i' b7 c
  46. #  You can add a comment as the first event command on an event page to set if
    ! U$ K; x/ v/ M  R; l5 I3 p* q
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    2 [$ d4 I2 T0 r9 z0 j' q
  48. #  below, all must be on the same line in the comment.
    / v% ?& ]$ J, b/ H( }  R% ?0 X
  49. #
    / \& l# [3 S/ R& Q
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    ; n! ]8 E1 P) W$ g' w# ~5 \
  51. # <shadow>           # set the event to display a shadow
    / |. E* m$ q/ v; g. {3 f& t7 d- |
  52. # <reflect>          # set the event to display reflections
    # y$ O% D4 \* j8 {1 q7 u# e
  53. #
    ' m% o" A! I" S$ m
  54. #------------------------------------------------------------------------------#
    ! u* w/ X4 j  z' d. \3 g
  55. #  EXAMPLE:; P- t& V% E/ b7 [7 _/ s5 k
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    $ b2 Z7 a5 L- ?7 w: }3 x
  57. #------------------------------------------------------------------------------#
    & k$ ], I" g8 n" ]/ V

  58. ) G6 \( C0 U; T) r

  59. - c  x7 O! E! ~0 w
  60. #------------------------------------------------------------------------------#
    1 m' V* v1 R5 {
  61. #  SCRIPT CALLS:
    " b* o" ~, Y! V1 }8 A, \
  62. #------------------------------------------------------------------------------#
    * C) }8 c# Z% F! d  A
  63. #3 O7 w0 J. J" @) N+ x
  64. #  char_effects(x,x,x,status)0 a7 u1 P/ R4 X' c* Q- O4 g
  65. #' N5 C8 Z, b: _( v
  66. #------------------------------------------------------------------------------#& C5 K+ ?- f  i: d  U& Q2 w7 S
  67. #  # each effect can be true or false to enable/disable them during the game.
    & i% u  V8 w6 D' m- j
  68. #  # you can change multiples of effects at once, x being the effect number
    * q$ v6 F4 P, O8 h. W
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons: B0 H$ X8 m% D/ u) ~& l
  70. #------------------------------------------------------------------------------#$ Z, `% t- ]1 |  R" N
  71. #  EXAMPLES:8 n8 b3 _+ b( o+ P2 v
  72. #  char_effects(0,true)              # turn reflections on2 C0 O% I, w  P2 u: s( A
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    $ T0 n: a" d8 e5 G
  74. #  char_effects(1,3,false)           # turn shadows and icons off$ q1 z  X' d; a% _/ T2 I7 J
  75. #------------------------------------------------------------------------------#
    ( g! Y# w( L8 o9 k" M/ K
  76. #
    ( d3 M* e5 U( \  Q/ G$ K
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    + s4 R; p+ }# o& ?% B* l8 M6 X& ?
  78. #- t; R6 q8 R( e7 t  Y
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset; p5 S! H  }+ N3 v' t0 I4 E
  80. #
    ; E; H9 T+ `" K' _* U
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset9 v: g4 C. t/ R; d: X
  82. #  \1 B- u$ l, ?3 @- q& L0 ?0 C3 `% L3 {
  83. #------------------------------------------------------------------------------#) b, z" z( Q1 m( r- ^
  84. #  EXAMPLES:
    ) J* x0 i4 \2 b- U
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    & F& v& q. S# n3 x1 v& H$ E
  86. #                                    # in position 2 of "Actor2" charset.
    9 b, {$ d! O, E9 o
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    ) J: [' @' h. `! @% _3 Q
  88. #                                    # "Actor4" charset.! Q( {7 i  U- m: H
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    9 R0 m, w6 }) O- u3 _
  90. #                                    # "Vehicle" charset.( E- p* @# f: [$ l2 y
  91. #------------------------------------------------------------------------------#
    & U4 M8 a; k' w: `0 e# i& y" a
  92.   0 \6 `5 m( Y5 l  ?+ H4 _  y- E
  93. #------------------------------------------------------------------------------#
    , I* a( r& m$ w: l3 m
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS# g' z2 O! E- k9 F' F
  95. #------------------------------------------------------------------------------#
    ) X- m( W" X6 J- x$ S; f4 _% ~
  96. #1 N  j: j6 j" s. o! b. v
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off2 m  {. ]# q6 v+ `2 g! Y& N( M, D
  98. #                          # use this to specify for mirror and reflect.6 {# g( E1 [9 n6 K3 B2 [' y
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    3 }( ?; u- `) F- c3 S& w9 c
  100. #                          # to change all events use :all: V1 S2 o1 \9 k3 }9 R" @# \2 g
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    . _3 |1 g6 X4 V' ?* H4 C
  102. #                          # it 0 for no icon.* o. N7 _! v& |5 [/ I
  103. #4 X) g. z5 j" y+ x5 F1 H
  104. #------------------------------------------------------------------------------#8 X% N6 Q, [4 O& v/ @2 h' J
  105. #  EXAMPLES:, u: i, k  ^7 o6 c) [8 c
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    * y% `: e" D) E0 w0 B9 w7 e
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    / |, F5 p. B  |3 A" {$ M
  108. #  reflect(:all,true)      # Turn all event reflections ON; T2 D+ C; |; c* p$ g* R1 _! f( o$ h
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear' l! t: n/ j# S/ Q( O
  110. #
    0 g. C6 V% c% l7 b6 S& k
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    , v) S% H4 N+ x
  112. #        a map. This is a design decision to try to keep lag to a minimum. You) u6 h0 v# Z3 _6 Z; }
  113. #        should use these effects sparingly and only activate them on events
    6 r1 T3 K: \! M
  114. #        that require them.
    2 o0 ^, I, m$ _- h! ?/ O3 R( A) D
  115. #------------------------------------------------------------------------------#+ p1 F5 |  l" Y. ^; \$ `) g! Y
  116.   & X  A1 F* ]* E4 g5 J
  117. #------------------------------------------------------------------------------#/ T) C. f% |+ n2 G! [+ c7 a$ V$ t! n
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES9 o) I. Q) r7 J$ k4 Q6 U
  119. #------------------------------------------------------------------------------#
    $ j/ m# w* ]9 O- N+ g
  120. #
    9 t: e! N1 r% B2 B# f) g
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default ; V0 g1 ^0 |  c3 O  T
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    2 e+ y( B! o0 C; u! B
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    " z& B: w# ]4 \7 e- S, B: O9 ?# d
  124. #
    ! Z  ~6 Q0 m' d# \; q$ A
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    ( g& V; {; ~% V/ Q) ~7 ]6 U7 V
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    . y3 u1 z$ R, k) D/ y
  127. #  v_icon(x,x,x,icon_id)
    8 a, ~* {% r7 Y/ ]' z' b" U
  128. #
    8 Y- }+ ^! P; ~5 Z& @9 _4 D
  129. #------------------------------------------------------------------------------#4 L# i+ ?2 t" \. A3 n
  130.   
    # D3 I  ^# T" h+ ?
  131. #------------------------------------------------------------------------------#! y) S/ ~7 @5 g$ D  n. v1 l
  132. #  SCRIPT CALLS for shadow options, Z" O5 @# ]+ i
  133. #------------------------------------------------------------------------------#5 E+ j% T2 u: ]" r
  134. #
    4 V+ T9 j8 |' h" J( r  r
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    , h, x% h& n" c4 Y1 Q( ~7 y
  136. #                              # light source number you wish to change (for! I, G$ q) ~; O8 |) j
  137. #                              # more than one). These are reset on map change., p) G0 {8 n& n) I6 n2 N. V) l% i
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.' `5 D% x  [& Y. b; i3 o
  139. #                              # This will need to be in parallel process if you4 j# ?0 F! X9 M
  140. #                              # want it to be a moving light.
    + [- w7 G. x7 `# o: q. [* ~# L
  141. #; z) w+ J; t, I; z
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below- E, ^5 t* F5 `) ~8 g
  143. #8 k* R* e! u" B+ `7 I
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    ! B* v/ W9 [3 `$ g' i/ h- U; F6 C
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    : V/ ]6 H  s% I  U& W# M' o( p' t% T
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.( q! l4 p7 z2 w7 u: P- U! U* T4 b# Q& K
  147. #
    & P9 Q  @- S- A) C  O: d
  148. #------------------------------------------------------------------------------#
    ) K+ E2 s* c' r0 P: m$ q
  149. #  EXAMPLE:
    ' Q2 X  B, y9 ?- Z5 I
  150. #  shadow_options(80,10,false)    # This is the default setting.
    7 ?. c" T- Z, R; z' d
  151. #------------------------------------------------------------------------------#6 K# d. X8 E. l5 a) S) _1 l7 m
  152.   
    ) y7 r& Y6 X4 y' c/ Q" W  p% I
  153. #------------------------------------------------------------------------------#/ G% Q# B% w/ ^+ u
  154. #  SCRIPT CALLS for reflect options/ K. F) U/ w( D6 x$ }
  155. #------------------------------------------------------------------------------#9 c3 B* k* k  C$ s. l
  156. #
    $ P8 K8 f; b- Y9 a+ M3 I% Q
  157. #  reflect_options(wave_pwr)
    , j4 O0 T" W6 L8 V
  158. #
    / S" q, E. ]* T
  159. #    # wave_pwr = how strong the wave movement is. 0 is off- W+ @6 Q1 l) F; P
  160. #1 |6 m" e: _0 _5 r6 K' d6 @6 V
  161. #------------------------------------------------------------------------------#: p. e$ D% t0 z' N% }: v* e( B
  162. #  EXAMPLE:" v$ c- k* ]6 E! W: Y7 t' U9 Y+ `
  163. #  reflect_options(1) # Turn wave power to 1; _& j* u: b) L$ D$ w6 H  j! s
  164. #------------------------------------------------------------------------------#
    ) ]& \, Z1 d& a
  165.   
    / P' y2 E, b4 l) [/ L. K' |
  166.   7 d' j7 d' f0 O( Q5 L
  167. #------------------------------------------------------------------------------#( \  j; s) ]$ T7 q% `, f$ L
  168. #  NOTETAG for ACTORS. X+ Z7 N0 I- a; w0 L' A- r
  169. #------------------------------------------------------------------------------#
    : V$ A4 Q: F9 y# S  D
  170. #/ N( c  u! n% Q- h& ?  v
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)1 N: D4 \+ u, n2 a& p
  172. #
    / K0 z- Y8 {, v# n1 Z- Y2 W, g. j$ n
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    8 ?+ R$ ]5 {5 B. q
  174. #                                  # and use the character in position 'pos'
    2 K1 T' J2 V0 {( k! m
  175. #; Y$ x6 }2 u7 Y# i
  176. #------------------------------------------------------------------------------#
    - Q8 N: O- Z1 k- _+ k
  177. #  EXAMPLES:
    " e. _# F8 @4 c1 E: t4 z8 ]+ g
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    ( Y6 t6 @9 P" c. q
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset: S  w5 a( D7 v
  180. #------------------------------------------------------------------------------#
    4 n, u0 I* E+ Y" ?' x& z! B/ G
  181.   
    , c0 b1 ]: G1 Q/ D# N. A% S
  182.   ! O9 s! ^7 m* D+ Z* p7 O% u
  183. ($imported ||= {})["Galv_Character_Effects"] = true( K* t) ^8 Z% z" G" \
  184. module Galv_CEffects
    ; Q) |% F; u7 M5 G! {! R
  185.   
    1 i% T  J" v$ Y; [3 I+ A8 w
  186. #------------------------------------------------------------------------------#  
      a/ T5 U: Q' h9 s& E& R# c
  187. #  SETUP OPTIONS
    5 |! ^. D$ a, I: y
  188. #------------------------------------------------------------------------------#
    / _6 m- I! P6 \6 B8 y
  189.   / z8 N3 R; H! T) j% b% [7 [
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    % m1 `4 l; K+ u) }5 N8 ~" I6 i
  191.                         # region on the wall you want to make reflective (and
    ) u; N5 X* e. G( E
  192.                         # then use tiles/mapping that make the parallax visible)0 Z* o5 ?$ S, C2 U
  193.   
    % E! b% X+ y7 O0 K
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters1 O( B& ^- W% W5 k- Q) L
  195.    
    ) ~" e6 r0 ?: w- ]6 |
  196.   REFLECT_Z = -10       # Z level of reflections
    # j1 T( ]6 T9 U
  197.   SHADOW_Z = 0          # Z level of shadows
    ; N, J; A8 r. N: ]2 V, w- T
  198.   4 i: C& `; }$ _4 y8 ~) x: z; F+ Q
  199. #------------------------------------------------------------------------------#  
    1 A" x, L1 E& \% S& s
  200. #  END SETUP OPTIONS$ g- b" X, |$ B4 Q  J
  201. #------------------------------------------------------------------------------## c. f; I% L- A  w
  202. end$ ^$ ?# f6 }8 K' x& P+ o2 I. X7 O
  203.   
    % h! ^  e, n; k/ x+ C7 E
  204.   $ O) G& g* B2 u8 ?
  205. ( G; ]( d9 T' E: `' g
  206. . U  n% S$ v4 k
  207. class Game_Map
    ( ~2 ~& g4 T9 T( I0 v7 K& n
  208.   def do_icons(refresh = true)" s7 Y5 a+ I) B5 h
  209.     @events.values.each { |e|# E: q. |. ~5 I- o; X" [
  210.       next if !e.list
    0 }' r3 q' k; d# r; e
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    : h( }4 ^" u+ L3 l* ?
  212.         e.icon = $1.to_i
    1 \8 s$ T0 V( s: ^0 ^: W9 k
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    - G4 K! V5 @3 k* `( V7 g
  214.       else
    ) Z& Z4 W- S8 f* Y! d
  215.         e.icon = 0
    ) z. q9 r+ E5 r
  216.         e.icon_offset = [0,0]& J9 I2 a8 l! g! h. @* @, b( l/ J
  217.       end
    ) t1 N% U" W2 O4 t4 V" d: v3 Y' J3 Z
  218.     }
    , n) a1 v0 I8 I$ z* F
  219.     SceneManager.scene.spriteset.refresh_effects if refresh  X9 O# B' j, s* y( ^' x5 C+ |
  220.   end
    " B1 ~9 P! I2 F3 |) ]; o
  221.    
    / ~* Y+ }/ S/ X, E3 ?5 d
  222.    2 f9 D+ k$ k4 V/ }1 U, I4 n  \  y* @
  223.   def do_shadows(refresh = true)
    # K- V7 Q  z5 M1 p2 U
  224.     @events.values.each { |e|4 r  M7 v* k0 C2 l. ^) Z' t
  225.       next if !e.list  }3 ^3 X0 r" v7 A" J2 a& B
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    9 e1 D9 D& ~- T/ W5 u, e  A( C& q
  227.         e.shadow = true! s6 D0 b  o: T8 M7 y
  228.       else
    * |) x  t3 I6 C$ d6 R
  229.         e.shadow = false
    * V2 A8 N; A- `0 I7 o/ [# p9 R
  230.       end
    / G" I  x1 W4 D6 Z* f* D% ^
  231.     }
    6 K9 a. b) l: j: c7 Q
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    6 Z0 i% I5 h- u' ~
  233.   end3 J% ]( C8 i1 l9 ~
  234.    1 B. ~: g# P# E- E( S
  235.   def do_reflects(refresh = true)1 X' K# _; K. k8 Q; D$ y) X7 o
  236.     @events.values.each { |e|; j6 N8 c  f; H
  237.       next if !e.list4 g! Y1 g  Y3 p$ N, e. {
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    6 m# p( E3 j7 O% _" o$ i! {
  239.         e.reflect = true9 b6 A+ a: u- t0 o  [
  240.       else8 A  e* x9 I8 }. i  Z
  241.         e.reflect = false
    5 m5 K" v- D1 H" r2 `: Z
  242.       end
      u# T0 B* d( j! |, K' d
  243.     }
    4 i) k9 O" {, S
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    # @$ A9 U  G6 l8 l- y
  245.   end
    - n  J5 Y0 |: r* w7 e+ Y' f
  246.    9 |- ]9 w' k) F# [; ^, l2 h
  247.   def do_all_chareffects: Y5 y( \6 }& y+ K5 [5 G
  248.     do_icons(false)
    $ R7 Z6 W( l) y' h
  249.     do_shadows(false)
    ; w0 L$ S9 @; t. i2 _: a$ x" ~, o/ M
  250.     do_reflects(false)
    , Q# `4 u, P) W" b
  251.   end/ {# n- w! O6 v5 q0 ]
  252.    " d  \0 t6 ?* U; ]
  253. end # Game_Map- r! p# ], s+ Q4 \
  254. , W5 n4 a& C3 l" b! H5 O$ L* v
  255. " R8 S; G& L2 E' r( k5 w; ]

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

使用道具 举报

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

使用道具 举报

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

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

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

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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