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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
1 J" u0 Q& h& a; c$ o
这个代码怎么用啊,有大神知道吗。我从国外找的。+ S6 ^4 g$ ?' b& q: t6 R
http://galvs-scripts.com/2013/02/21/character-effects/
! q: J6 x  k6 z6 x/ t; F1 a. h是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
      D3 z) H) v+ O: @: a4 c) w
  2. #  Galv's Character Effects
    ; R) k+ Q) C- z& E- j+ u6 U6 w
  3. #------------------------------------------------------------------------------#: `1 Y; q3 R' b& C  a: j
  4. #  For: RPGMAKER VX ACE' y8 `6 z+ K6 S- k1 c
  5. #  Version 2.1- l- i  ?3 @9 u6 F5 X
  6. #------------------------------------------------------------------------------#. s2 E3 s# |# q5 F* j- N9 A% S9 d
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    9 z! u% l9 M, |+ k5 h# j
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects0 A: p& ^' j4 D3 O. T  m' I
  9. #                           - Fixed shadow facing bug* i3 F( \5 M0 t9 Q4 z- X
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    ! R" J# ~* M6 W9 D# F$ t; y- ^: V
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows' o$ O. B# E* X4 m) c& a
  12. #  2013-02-22 - Version 1.7 - bug fixes
    ! N6 x, K% ~( R  k
  13. #  2013-02-22 - Version 1.6 - added icon effect2 I) ^+ `" l0 N5 u1 \) O
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    $ t" L/ N2 J7 }8 y( `. P
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    3 S$ u# J& ~5 S8 x% K
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    3 F; L5 Z7 x+ Y+ M8 V3 s1 m: f
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    8 f/ n, b/ a( n4 u
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
      l9 ~1 P" D+ v/ F' T' _
  19. #  2013-02-21 - Version 1.0 - release; Y( a9 T! e4 }$ V
  20. #------------------------------------------------------------------------------#1 P9 \: v; x" b  R; ]
  21. #  This script was made to provide some additional effects for characters such
    ( h. o! H9 O( J3 W4 [
  22. #  as events, followers and the player on the map.2 V# Z; G* V7 [5 M) I5 ]& `
  23. #  Currently it includes:
    4 e' X, S) ~4 s( L
  24. #, L6 E& t% c: E
  25. #  Shadows- S) q. Q  t2 `
  26. #  Shadows that appear under player and events in a directions depending on
    ) z! z/ J5 ~. `1 ^. [
  27. #  a light source that you choose./ \7 _* \0 {- Y+ L! W1 Z2 K4 m
  28. ## u9 @. c( h8 c7 k  W; j3 `
  29. #  Parallax Reflect, l% L" K# u; k7 ^( O
  30. #  Reflections that appear on the parallax layer for events and actors to be
    6 l: a* v, v7 ]7 Q3 X- ~
  31. #  used for things like reflections in the water or glass floor etc. To get
    6 \7 K$ I* j/ n* ?7 @% t
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    ! O! S/ ]( l0 x) ]9 n. f+ S* a% M5 d: z
  33. #  partially transparent.
    , }) Y" A& B) l, b4 M, u
  34. #
    , \. i1 t! [5 o# w2 h0 `
  35. #  Parallax Mirrors
    4 y/ g0 Y- E% {
  36. #  Much like reflect but are instead actors and event are reflected in a mirror2 t  \1 C9 ^! j( x' b0 h* w' S
  37. #  on a wall designated by a region. Both mirror and reflect effects can be. q: O: @' G1 g  y2 ~' N4 |% J
  38. #  changed so actors and events can use different charsets for their reflections
    + T! T+ O  p- i2 B1 V
  39. #9 W- `6 \9 D2 h* w
  40. #------------------------------------------------------------------------------#
    8 z  [8 e7 a" A: u  U- H2 F5 n
  41.   
    * p+ Z0 |( B7 E( l' W0 e- V
  42. ) B* f/ h. Q& R. \3 [& Y! {) w
  43. #------------------------------------------------------------------------------#* t9 u% x; h7 _- j+ ~: c
  44. #  NEW - First event command as a COMMENT' t2 Z/ f& f$ D+ z4 ]
  45. #------------------------------------------------------------------------------#
    ) K8 n, n" c2 s4 D, S% K
  46. #  You can add a comment as the first event command on an event page to set if+ Z8 x+ v8 u$ b) T' P; ^8 {
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    0 V4 `8 u; H/ j% j4 T% h) a( y
  48. #  below, all must be on the same line in the comment.
    ' M* z: `7 o; w, B: z2 M) J, H+ M
  49. #
    ) e4 l6 m9 G3 o0 A
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)% G1 G  J# @, u' r/ Y9 X0 O
  51. # <shadow>           # set the event to display a shadow3 ^# T9 y, M. Z
  52. # <reflect>          # set the event to display reflections
    5 _6 Y7 x2 q' J1 l1 @3 A7 L: L7 h* m
  53. #
    ' Z% a% V" e! K. M
  54. #------------------------------------------------------------------------------#9 K2 G$ V) C. ^$ [
  55. #  EXAMPLE:
      i6 _8 ^5 ?$ a( Y; J
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event) P: n! ?. Q  O
  57. #------------------------------------------------------------------------------#
    4 ]1 O4 N' g+ }5 c

  58. 2 u6 a# |' V  p6 a( b6 o9 I
  59. / N' D" R9 n7 G8 v( X: w
  60. #------------------------------------------------------------------------------#3 Q. `( l3 J' U2 Y) W
  61. #  SCRIPT CALLS:- H/ @- D# p7 F; I! G
  62. #------------------------------------------------------------------------------#; E+ \% G! \& w8 y  j& U+ T
  63. #" }5 |$ |: U+ a, }& P' G4 @) X
  64. #  char_effects(x,x,x,status)
    ' |  q9 L; c. M
  65. #+ V, n- e4 L8 j& S+ j) v
  66. #------------------------------------------------------------------------------#
    + i/ Q5 {6 x3 e/ c
  67. #  # each effect can be true or false to enable/disable them during the game.7 ^+ Q. v' P( p9 K& O2 I7 m0 M2 a
  68. #  # you can change multiples of effects at once, x being the effect number; L/ W# O7 [+ D* c
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    6 y! `9 }0 f" C" h2 b( o0 S
  70. #------------------------------------------------------------------------------#
    2 g1 m; k7 \/ L
  71. #  EXAMPLES:
    9 C; Z' \0 ^% ]% r, x
  72. #  char_effects(0,true)              # turn reflections on
    : ?" V$ B9 \& r6 D6 p+ `' e+ R+ W7 W
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    4 Z8 }- l1 I% ?1 i& ^
  74. #  char_effects(1,3,false)           # turn shadows and icons off' x' k( M5 S: y' D; Y3 k* O
  75. #------------------------------------------------------------------------------#
    ' J- N6 A) Z" a9 o
  76. #
    7 I0 j3 N. M% G7 R& d
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    $ D% E8 ]. R4 c6 H, }: l
  78. #, p( _+ ?$ j1 X3 b
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    , W0 I3 N) H* x1 ?- F8 s6 w
  80. #/ N7 v5 h5 E% j  r- ]: `/ R* z: B6 S
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset& ]2 `4 t0 Y9 Y" P
  82. #1 b% I+ Y7 q' B8 f
  83. #------------------------------------------------------------------------------#7 E( C# Q3 ^& M; }
  84. #  EXAMPLES:
    ) W7 L7 S7 h+ q# k
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite4 |2 g# `% H, [3 J( U2 U
  86. #                                    # in position 2 of "Actor2" charset.
    ' E, _8 j0 {. [8 P; o% i
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of4 v- V6 }, z/ ?
  88. #                                    # "Actor4" charset.
    # C( t6 P0 V& {( U# d
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    2 A* B3 M  o- V( K0 M& o
  90. #                                    # "Vehicle" charset.
    6 X; M' w# M, u9 q: O5 |1 o2 \4 m
  91. #------------------------------------------------------------------------------#( X  l9 p1 a* [9 h; o. E. P
  92.   
    , ]4 L) H  _+ U: J/ k' O
  93. #------------------------------------------------------------------------------#4 {5 A/ g6 ?& t. q' k
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    ' x# ~: Z" ]* B) s  Z
  95. #------------------------------------------------------------------------------#
    " ^2 h( \$ j, A7 H
  96. #: b9 c: G* w9 t8 `0 O; Z* b: g
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off* R! p2 @0 a' o, f/ ~
  98. #                          # use this to specify for mirror and reflect.$ P5 m( z' ^7 {% q" _
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change$ V9 O: k# ~( o7 e# {9 p- A4 X
  100. #                          # to change all events use :all
    9 x! T/ W1 S( ?$ j# c
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    8 [0 i" E: L; A  }
  102. #                          # it 0 for no icon.) O; T) [* J+ \# ?4 G0 \
  103. #
    " i* i/ k; \! u$ l
  104. #------------------------------------------------------------------------------#
    : ~& O0 y+ T$ x4 L/ }
  105. #  EXAMPLES:0 @$ L3 f: H2 J' G& J( U
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON0 o  V2 O& D0 X0 i" h- w; }1 Z- H* g; H
  107. #  shadow(1,false)         # Turn event 1 shadow OFF3 w6 D0 A: Y, k' t' ]
  108. #  reflect(:all,true)      # Turn all event reflections ON3 b- e! v" q" n" R* q
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    6 ?; u  p  l$ `6 \) m
  110. #3 \' V, l. T9 C
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering! ]/ U' `# a2 v- G# S4 t5 k' v
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    / Z2 `2 |; ~8 |$ ~8 t
  113. #        should use these effects sparingly and only activate them on events
    - u1 D, y( d3 K) @: Z
  114. #        that require them./ M7 D' B1 r+ y7 q% X5 c
  115. #------------------------------------------------------------------------------#
      l, N0 Y( |+ C% L% T
  116.   2 W7 `& X- p1 j+ N/ n
  117. #------------------------------------------------------------------------------#& v" Q$ S  {: x$ }, H
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES; c- M# Q. M  c- r' _$ }, ^2 \
  119. #------------------------------------------------------------------------------#+ K! O+ \  ^1 g
  120. #7 j0 f1 y; X& q
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default ; D, F/ a  @8 T( g- M
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off $ f% t) C; c: N! X$ R6 w
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.! J" t% N8 E' E8 s
  124. #
    * S0 ?* [4 t- F! }6 a" o
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects4 \1 P. U4 @% q4 M
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.# A$ Y2 P9 F" X' u' x
  127. #  v_icon(x,x,x,icon_id): s/ o0 L# M: H% x. C! {$ u
  128. ## Z. D0 b& v; ]9 |* x2 z
  129. #------------------------------------------------------------------------------#/ ^7 B0 p$ @1 M" l$ l2 x
  130.   
    ! F* u2 L' ?' ]: M6 a* ~
  131. #------------------------------------------------------------------------------#! }+ o9 N# K% f9 E( n6 Y* ~( \4 j
  132. #  SCRIPT CALLS for shadow options
    6 F: z+ o0 W$ d9 `% P4 Y
  133. #------------------------------------------------------------------------------#
    6 L; R; [6 }2 n/ b$ f
  134. #0 m# d8 ]# d& E1 A; F
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    - U$ z6 H5 ]% H
  136. #                              # light source number you wish to change (for
    & W8 i+ S7 O3 C
  137. #                              # more than one). These are reset on map change.  T* f/ {. O" M
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    , C: V: h: a% R7 E
  139. #                              # This will need to be in parallel process if you
    ) m& u. R; E5 M! \; \) a
  140. #                              # want it to be a moving light.7 Q& I* n1 B" s' l% R" l8 V5 ]
  141. #
    & U# u  L/ {" c8 D; K4 t1 g
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below* R- d; x% ^8 u- S* P2 z; \
  143. #
    4 Y) O) Q# r& T: b' D2 ^# U; ]4 e! x# |
  144. #    # intensity = opacity when standing next to the light source (255 is black)* j' D3 B% c' I9 y* D
  145. #    # fade = amount shadow becomes more transparent the further away you are.  z4 d# l% R* H* `. `, R
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    : ]& c: {) Y. t; i
  147. #
    $ B6 Q& B& G! J9 m/ O; {
  148. #------------------------------------------------------------------------------#1 p2 D: q1 l- p! S  K6 F6 v
  149. #  EXAMPLE:
    : E1 R; ]( z0 P3 Q' N$ O" c
  150. #  shadow_options(80,10,false)    # This is the default setting.
    & N2 U* K/ N! f
  151. #------------------------------------------------------------------------------#+ u9 i5 f5 F5 u. d% d. ^" K: ]
  152.   * o; N3 o- \3 `; r4 z
  153. #------------------------------------------------------------------------------#4 U" x- _/ `, a5 t5 _5 F
  154. #  SCRIPT CALLS for reflect options+ L' @( i. p1 G+ X7 O. l0 v/ |
  155. #------------------------------------------------------------------------------#7 t: z- M/ I% H8 U9 ?) Z
  156. #! ?9 g% R2 l  \7 p. ^
  157. #  reflect_options(wave_pwr) 7 U' J- D0 L) ]" Z  Z6 @8 ^
  158. #
    ; S$ {; R: n8 `9 \5 |3 c4 o1 o
  159. #    # wave_pwr = how strong the wave movement is. 0 is off3 |9 {* L  n+ u3 k7 S
  160. #4 v4 @  r$ C( j6 _8 `0 G! s" v5 I
  161. #------------------------------------------------------------------------------#/ M" p+ J$ ]* J3 e& ]( C1 q
  162. #  EXAMPLE:% @' E! r2 c- O7 W
  163. #  reflect_options(1) # Turn wave power to 1
      D) \/ H$ ]! d6 O. b  Y
  164. #------------------------------------------------------------------------------#. `: C" z: k& C  G. P
  165.   
    1 R4 X& h  C9 r, |6 g( s
  166.   9 a/ b9 z) Y+ d7 U: V9 }
  167. #------------------------------------------------------------------------------#$ ^$ V. g; ^+ {0 v0 v
  168. #  NOTETAG for ACTORS
    ; U# T% i5 N7 V& N/ o$ l5 V
  169. #------------------------------------------------------------------------------#
    0 }7 o& u+ B7 P8 f! ^" s$ T- O6 t
  170. #
    9 H- |4 n+ ]7 Y
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    6 L# |& x& F4 o; }, D1 r0 [  ~8 t
  172. #
    ! I& b6 |) l# F2 t' P6 \0 l2 b
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections1 t3 `4 V2 J, b1 f
  174. #                                  # and use the character in position 'pos'
    # y+ S) u) n- ~* O& M
  175. #+ L7 {* X! c5 p9 j
  176. #------------------------------------------------------------------------------#
    + s; M4 B1 _0 ]# o
  177. #  EXAMPLES:
    + q" d) ^8 _1 V4 M
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    6 v2 k* n3 v. D3 a) Y
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    : _7 h( E  I) U# {0 B
  180. #------------------------------------------------------------------------------#
    8 Q) N0 v- o" L) \1 A
  181.   
    % Z) d: Y3 v2 a! F/ ?
  182.   ' D( U& N0 h# u1 v
  183. ($imported ||= {})["Galv_Character_Effects"] = true. r- Y& V6 b5 s4 U$ q, N: c4 e
  184. module Galv_CEffects: S5 f3 @% A( n' [* O! W* Y3 c/ M
  185.   
    , A5 l- E8 `; v/ \# r
  186. #------------------------------------------------------------------------------#  
      F! r# d* ~# N! ~# }. S
  187. #  SETUP OPTIONS
    * X& t  c& E2 J; t0 s
  188. #------------------------------------------------------------------------------#
    . j. s7 ~4 ~% M5 [% I
  189.   " D$ B, |0 P6 l- M1 H6 X8 |
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the9 C  e5 X% f5 W, o
  191.                         # region on the wall you want to make reflective (and
    : ]6 Y0 I2 U" H. }8 ~1 _
  192.                         # then use tiles/mapping that make the parallax visible)/ V* e* C3 T' d/ i5 h3 x8 i) `
  193.   # N9 d2 q# P' R! }
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters( `8 I' g+ Z: b: o
  195.     # V9 ^2 X$ W, R& M5 X
  196.   REFLECT_Z = -10       # Z level of reflections
    8 P4 F* A( F# S+ X6 g
  197.   SHADOW_Z = 0          # Z level of shadows
    ; H. u( T3 X9 l1 c7 U
  198.   
    9 ^8 ^0 X9 x# L# I/ d/ B% B3 n! c; W
  199. #------------------------------------------------------------------------------#  
    ( t# h, n4 v) v3 F* B6 U' N
  200. #  END SETUP OPTIONS
    ! J+ ]7 i- O5 v9 C8 g( L
  201. #------------------------------------------------------------------------------#
    7 t2 h$ s) l* t8 i- C$ [6 a
  202. end
      q+ U" n5 A. w! s6 g; M
  203.   
    " S; m8 ?$ h& }" _9 M  X6 ]( y2 o
  204.   
    6 [+ V2 P3 ]) X& d$ }
  205. 4 U: n  [4 F+ q, \; U) {
  206. 8 e9 @; s) p# ]: @: O% v" t
  207. class Game_Map
    3 F; `4 c8 y. H  U' j5 ^# }2 e" L
  208.   def do_icons(refresh = true)+ Z3 N( R; N5 {: H2 V( \: L
  209.     @events.values.each { |e|% k4 J$ b" p" ]# ?7 B
  210.       next if !e.list
    9 P4 ^: r, g/ p/ y( E
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/* m6 b. t4 n# c% o: h# u: X. Q
  212.         e.icon = $1.to_i
    ( K- w+ b5 ?$ @  [1 {" i
  213.         e.icon_offset = [$2.to_i,$3.to_i]' F, A- _2 l) u0 b6 ?0 r# `0 k
  214.       else
    * Y8 Z* T$ O  }9 b- N
  215.         e.icon = 0$ E7 I' ^) E) \$ i1 O
  216.         e.icon_offset = [0,0]
    4 M# m2 |: Z  R- j. @
  217.       end
    # V6 g  [) K# K7 v4 ]
  218.     }; H5 R  ]( v$ }. e% Y0 {
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
      Z/ n. j/ l# F" ]' V3 Y7 e2 p
  220.   end1 J  n4 a3 O2 u& P4 n2 f
  221.    
    ; P8 ~/ b; U6 M
  222.    
    , r0 i7 A3 m, V8 ?! W5 r* Y
  223.   def do_shadows(refresh = true)& l2 N: [+ Q  r2 P( M
  224.     @events.values.each { |e|
    5 ]1 i, o- c" O9 w! e1 U
  225.       next if !e.list. ~! N# N7 Y' {3 H
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/3 }: W5 w1 D. w
  227.         e.shadow = true
    + \+ s* t$ P, w* `0 R
  228.       else( \/ [0 b. ~) \0 |# g
  229.         e.shadow = false
    ; }1 ^$ R- y6 k  c3 }4 e4 q
  230.       end
    2 U! i* _% M: Z; p: ]
  231.     }2 S; f5 b! n. O5 F- [" k& C! N
  232.     SceneManager.scene.spriteset.refresh_effects if refresh( _2 o& q! z# U( O; S1 f0 L
  233.   end
      S0 \% B( s7 d. `6 I: e: j1 r
  234.    
    9 O1 t" g1 R6 n. V* o
  235.   def do_reflects(refresh = true)
    " p! @7 r* E- j
  236.     @events.values.each { |e|. S- s/ t+ |- z' n2 [
  237.       next if !e.list
    0 _, Q3 s9 d% z) [7 p2 p
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    # M& p/ ^) k$ n) N8 d' N) L0 B
  239.         e.reflect = true
    3 x* L# ?$ p$ _7 h- F
  240.       else9 [; ^! K7 Q+ f. H
  241.         e.reflect = false; t8 ]6 ~) ?: j) L0 F& R
  242.       end" p/ ~4 e& M' F% q# k0 O/ [
  243.     }
      ]$ G4 Q7 V0 q0 H
  244.     SceneManager.scene.spriteset.refresh_effects if refresh: h% r4 y& Y  M: B
  245.   end
    * G. q4 }5 ], g/ u5 A8 A
  246.    
    + v& q; V# g8 Z# v$ Y/ r' @
  247.   def do_all_chareffects
    3 ^! d, r/ W& ?, e2 v: p
  248.     do_icons(false)0 W. C. v5 m& |2 k7 U! b! {8 J
  249.     do_shadows(false)6 a- [% j7 l# O# w( |4 v
  250.     do_reflects(false)
    & e2 S! [1 v. G9 ?
  251.   end
    7 }# `/ d! ?, i9 c
  252.    
    6 \2 F2 A# Z7 ?  I. w9 E5 M
  253. end # Game_Map3 A1 T) j  I: x$ I
  254. / z9 M/ v0 i$ b3 {2 {
  255. , N9 o9 S; x$ y& v% L9 p- U* Z
  256. : v6 Z) _4 v' |7 \5 t& |# z. M  M
  257.   
    9 G& ]0 }/ ~! ~# _5 |# f" r1 o
  258. class Game_Interpreter
    3 v7 d5 G6 S+ j- P
  259.    
    - ^" k2 D4 [! }/ v0 }  O
  260.   def remove_icon
    8 c) `& @- l" G9 [& B5 x0 ]
  261.     icon(@event_id,0)
    * T. p3 J2 z# Z4 O: E8 w, j
  262.   end: u/ {4 y& Y0 |  G" P  F
  263.   
    / h) R) o& @2 ?
  264. #-----------------------------------#; O$ J' e6 Q, H, H' f' y
  265. #  REFLECTIONS6 w, f6 I6 s. J1 `
  266. #-----------------------------------#* u. X$ i' D# L' a( {
  267.   
    " p* ^- i$ p3 I) n# \- e% ]: |: h/ P8 @
  268.   # Add/Remove Reflections from selected events3 s& X% d; \% J1 x  T
  269.   def reflect(*args,status)
    . n4 H: N/ C2 }1 f" B2 ^
  270.     char_ids = [*args]/ N, [* j9 L/ _
  271.     if char_ids == [:all]
    7 M4 Z* z  R7 P7 n" G. P; Q
  272.       $game_map.events.values.each { |e| e.reflect = status }
    ; {" `2 c" r1 S) a
  273.     else$ `0 U! q. g8 V, c7 o0 F
  274.       char_ids.each {|c| $game_map.events[c].reflect = status }  j3 s! s$ X% U3 Y7 V
  275.     end, G+ N1 q# g: d! U  B0 Q( w* H+ W
  276.     SceneManager.scene.spriteset.refresh_effects
    ' x+ s4 {* O5 K+ A) g- g' p
  277.   end
    4 @" U' U' P+ C0 O
  278.     6 f3 y8 i8 s' |" Q. T
  279.   # Change forever actor's reflect status- Q$ J( [8 u' s! O/ n+ |) t3 j& M4 A
  280.   def actor_reflect(actor_id,status)
    3 u' @5 r5 ?5 V. r! M
  281.     $game_actors[actor_id].reflect = status' w; A) R5 U0 P: y- ]4 E& M, j
  282.     $game_player.refresh6 n8 Y" F7 ~  a
  283.   end
    ! m' s8 D3 s$ x5 v' t, g7 i' j
  284.    
    * T  I  {. @- r' \' m! W
  285.   # Change forever vehicle's reflect status! R8 H! y+ `7 F" U
  286.   def v_reflect(*args,status)6 \4 o8 h' l# [% A9 e
  287.     char_ids = [*args]* _" i( J; `5 c: ~
  288.     if char_ids == [:all]
    ( j# o$ O. H+ d0 o1 K  ]' [
  289.       $game_map.vehicles.each { |v| v.reflect = status }
    % @/ W1 a; u( h) H4 ?$ u: x$ n0 T. ~
  290.     else
    # K' x$ t& }. u  ?9 m; [
  291.       char_ids.each { |v| $game_map.vehicles[v].reflect = status }6 A9 x( K" N6 Z1 @& I
  292.     end) {6 N5 w5 d! o0 Z7 V
  293.     SceneManager.scene.spriteset.refresh_effects1 F/ L- U& V$ X9 w$ `3 ~
  294.   end- x6 N$ C  E. Q' _
  295.   0 H5 E' t8 b) I" o5 _8 r3 ]
  296.   def reflect_options(*args)
    % @5 @/ u- H) C% e0 }) _
  297.     $game_map.reflect_options = [*args]3 I( M3 |" s1 y8 S
  298.     SceneManager.scene.spriteset.refresh_effects4 H4 Y9 M* ~. F- Z0 W5 u
  299.   end5 O( X9 f% o% \8 Q
  300.     5 ]: |4 ]* d" B9 w8 w! s
  301.   # Actor reflect sprite change
    - ^' ~( A  A: ^- H" l! c
  302.   def reflect_sprite(actor_id,filename,pos)
    " h# x* K5 f% X/ j6 C
  303.     $game_actors[actor_id].reflect_sprite = [filename,pos]+ F5 X/ o! l% H* I- W5 j0 j& n
  304.     $game_player.refresh
    % Q" h: I8 G" b6 R) Y
  305.   end
    5 l" X& K2 s3 Z7 A4 U% @9 Z
  306.    
    , N8 y% T% ~1 X* `+ s
  307.   # Event reflect sprite change
    ) W3 v) f4 c% Z' A8 C0 ~6 R
  308.   def reflect_esprite(event_id,filename,pos)8 ^& }4 Y4 w$ h8 T/ b  ?9 U' d1 G
  309.     $game_map.events[event_id].reflect_sprite = [filename,pos], b2 A% ^: Q2 e/ u$ f* m' P( b$ R
  310.     $game_map.events[event_id].reflect = true' ]8 L5 [2 U: z( r. k3 P
  311.     SceneManager.scene.spriteset.refresh_characters
    : o' c! O" }7 L- b/ J2 T
  312.   end
    % N, S7 A; P  |! X9 \" r- e$ I" f% h0 y' ^
  313.     1 h6 h1 [6 S0 z' I1 W: w
  314.   # Vehicle reflect sprite change
    ( `1 s+ N2 j% @; w
  315.   def reflect_vsprite(v_id,filename,pos)
    . E8 Q( `# @: @8 L, t) a
  316.     $game_map.vehicles[v_id].reflect_sprite = [filename,pos]% [& R  c! p' C9 `3 u
  317.     SceneManager.scene.spriteset.refresh_characters: X% o, L3 E( U0 ~* Q
  318.   end+ j% M: |- E0 E$ J
  319.   ' d( G$ k! Z; U4 I) Z
  320. #-----------------------------------#
      M4 {% R* S. v
  321. #  SHADOWS
    , ^4 V* ]3 ^7 X+ `
  322. #-----------------------------------#9 Q0 J% x4 t2 i' ^6 r, N/ ^) G3 L$ d
  323.   1 w4 D4 S2 m+ p$ W. C+ k+ D
  324.   # Add/Remove Shadows from selected characters0 X  }  f" ?$ J
  325.   def shadow(*args,status)" b& K5 |0 U' @) A+ t* S
  326.     char_ids = [*args]
    ) b1 w+ v2 n8 ~  ^  x8 q+ w. q
  327.     if char_ids == [:all]
    ) D9 w7 M; a, C# n, x! E
  328.       $game_map.events.values.each { |e| e.shadow = status }
    " ?: @  X% [+ n: ~" V# S/ E
  329.     else
    ; d. U- \: |1 q, ]7 P/ C
  330.       char_ids.each {|c| $game_map.events[c].shadow = status }* w: c8 X  ^' {# R
  331.     end# R  l7 T  p, l9 ]& z7 }3 G
  332.     SceneManager.scene.spriteset.refresh_effects( A2 }( Q- r, i) D
  333.   end, }- I: W: p# ~9 P/ \7 O& a, B9 f
  334.     ! [% S9 ~& ^1 z7 H3 e; q! H/ d! s
  335.   # Change player and follower shadows
    7 c+ X3 p  d1 t
  336.   def actor_shadows(status)/ F: B" I7 y. b9 G: w) h
  337.     $game_player.shadow = status; j  ^  t; L! T: T
  338.     $game_player.followers.each { |f| f.shadow = status }$ G% B" {, C/ t8 e  y  Y1 ^. v
  339.     SceneManager.scene.spriteset.refresh_effects
    2 T) i8 w* k# x" \; C# ^
  340.   end+ P4 m+ U& ]8 C3 u7 o! T
  341.     ) j' d/ ~7 M  Y5 Y2 H2 i. i5 C
  342.   # Change vehicle's shadow status/ O: Y' X- h- W
  343.   def v_shadow(*args,status)
    + q# }! N; l, C0 D4 ], n* @
  344.     char_ids = [*args]7 y9 ^( q& k+ V) G% J# g: q
  345.     if char_ids == [:all]4 t( C4 e. B1 Q: z, A6 v9 g" K
  346.       $game_map.vehicles.each { |v| v.shadow = status }- V& u4 @; S4 h/ @$ [9 x4 B7 Q
  347.     else
    7 j2 ]6 y1 }* _* S. ]3 x7 e
  348.       char_ids.each { |v| $game_map.vehicles[v].shadow = status }
    # H* F2 [' X' q2 i
  349.     end* l9 [/ [4 H! C) b# a
  350.     SceneManager.scene.spriteset.refresh_effects
    ' K1 c/ x5 A, E2 A
  351.   end
    % v1 e: z' A9 I. L
  352.     . N- O) h, ^! u" j
  353.   def shadow_options(*args)9 e* `9 ^$ n0 B9 r
  354.     $game_map.shadow_options = [*args]% b& j* A$ p7 C2 w. H  E
  355.     SceneManager.scene.spriteset.refresh_effects
    0 o$ F' J3 @  C
  356.   end& B8 m, ~3 r( d! p; B; `. i1 U. J$ U
  357.   2 M' r  m0 J& r0 x
  358.   def shadow_source(*args,shad_id)" N  r+ F7 p* {4 S+ G( z
  359.     shadsource = [*args]
    0 _& `& c9 F. K5 ^: c; q
  360.   7 {+ C( x9 z8 w$ N
  361.     if shadsource.count == 1
    7 `' u! ?  w' e2 _# A& m
  362.       $game_map.light_source[shad_id] = [$game_map.events[shadsource[0]].real_x,
    5 k  H3 F1 ?( W3 @/ k9 I
  363.         $game_map.events[shadsource[0]].real_y], j( w1 N* U) S) W4 H$ p
  364.     elsif shadsource.count > 1, ?/ H+ l& X- h, ?
  365.       $game_map.light_source[shad_id] = shadsource; ?4 x4 Y$ d. b$ E
  366.     else/ B- w1 {4 [8 x) `' c8 @
  367.       $game_map.light_source = []8 [* b) T( T3 V9 h8 D
  368.     end
    5 y) p! {- O' I. {# G: _
  369.   end
    0 v  F% x" \1 W5 j
  370.   # ^. V, R3 h4 p
  371.   
    & ~/ r4 a( f4 N6 l  [, {3 z% i/ z
  372. #-----------------------------------#
    $ R8 l+ d% `9 ]7 M% Q  y
  373. #  ICONS9 ?$ M* C6 l8 R
  374. #-----------------------------------#
    7 m9 p( X4 _+ o# E7 Y
  375.   3 x' {) v) o- j+ V; ]4 ?/ E, F
  376.   # Add/Remove Icons from selected events
    ) O: j) O6 W, O8 R; R. F0 }
  377.   def icon(*args,icon_id)
    ' H& f. N4 B4 a+ K& r! V/ k
  378.     char_ids = [*args]
    ( H0 X1 I" E0 `4 |8 T5 a2 O0 p
  379.     if char_ids == [:all]# D; V5 K; d( D2 F! ^& ]
  380.       $game_map.events.values.each { |e|: d* D3 Y" z# y# ?0 a/ _* d8 E9 [6 Z
  381.       if e.icon <= 02 a* P; F5 l* D+ D3 T1 i2 |, N
  382.         e.icon = nil0 Z; @' I) c5 I- [' _3 k- |% T' f( f7 a
  383.       else- u* U! b# }- }. _7 [( r
  384.         e.icon = icon_id
    0 S2 {4 i6 e3 q8 r2 f" e
  385.       end" M8 X" [  z! o) X/ M/ ?0 b. S  i3 C: N4 [
  386.     }
    8 c) f  {5 z/ X( S" o
  387.     else; A5 J4 k" b7 n# B
  388.       char_ids.each {|c| $game_map.events[c].icon = icon_id }0 n; o& t+ a3 U; M
  389.     end
    + I- o: X# O/ s. C( C
  390.     SceneManager.scene.spriteset.refresh_effects
    ! _" D/ R0 V- O) a: h; r+ _3 B$ e& A
  391.   end) B6 [; w* q" Q8 {
  392.     ' @. O4 J5 |+ U% T  ?: a
  393.   # Change forever actor's icon
    3 B0 t3 V2 Q% B4 E/ q4 X* Q
  394.   def actor_icon(actor_id,icon_id)6 t% j6 m, ~! _
  395.     $game_actors[actor_id].icon = icon_id3 Q: Z2 O; @) S/ F2 [4 x8 z
  396.     $game_player.refresh: O  Q9 D: b7 w+ Z" Q$ k9 N! ^
  397.   end+ p/ X4 U/ ?) W% v% W
  398.     ' w5 Z, r6 Y3 |6 C
  399.   # Change forever vehicle's icon7 l  k4 C1 R4 ?4 M* l5 T/ L  R
  400.   def v_icon(*args,icon_id)- {6 q5 W2 k( {" @* a
  401.     char_ids = [*args]
    5 u. d- }. C$ ^  q8 K. X8 S
  402.     if char_ids == [:all]: Z& A9 ?% Z+ {: |& @/ h) |) z
  403.       $game_map.vehicles.each { |v| v.icon = icon_id }
    8 C( q. \8 T4 S/ L" h& }; q
  404.     else
    ! C$ S' [# L9 R5 Y& y* p( ]+ L& F
  405.       char_ids.each { |v| $game_map.vehicles[v].icon = icon_id }. b) [% a/ \' S4 l
  406.     end
    # o2 M7 }6 K. e3 x' h4 L
  407.     SceneManager.scene.spriteset.refresh_effects! U) Z7 S/ _* w  ?6 j( \" X
  408.   end
    / [+ I/ B1 l' M1 }' d# o
  409.   $ D/ h3 U+ a" e2 W( i  f& g
  410. #-----------------------------------#
      \. F2 u$ q7 ^
  411. #  GENERAL
    & }- h1 h) m4 B! s0 u9 p
  412. #-----------------------------------#: Q% j% S; d( g4 Q/ I
  413.   9 ?4 P* Q% @* {& A- O
  414.   # Turn on/off effects% }) F3 m: w" d, p) F* X! d
  415.     # 0 = reflect
    ! e5 N$ `& Q& L1 E, Z2 R9 x
  416.     # 1 = shadow3 `' y) g/ Q  }& m8 H
  417.     # 2 = mirror' ~) J. D2 x" ]) J% h) F7 f$ ^; K% V
  418.     # 3 = icon- ?! l. o8 y0 d# i8 T0 z' v
  419.       
    4 S, i  M8 E8 g" @. U) N9 U
  420.   def char_effects(*args,status)) M3 b* r% b, [" k1 Q5 }9 f8 f7 Q$ Y
  421.     [*args].each { |e| $game_map.char_effects[e] = status }) n+ V% i" w4 z  a+ c
  422.     SceneManager.scene.spriteset.refresh_effects
    ' Z' b' A, d9 ]3 L) J6 r; Q9 ^
  423.   end
    8 K. E9 B6 V0 x4 i
  424.   
    ) ?' F- @; K0 S( E) J; ]" b, W
  425.    
    4 F" N0 D% a9 h$ L- k
  426. end # Game_Interpreter
    8 E- `5 `& O& F9 f, k9 L# |! W. y
  427.   : o/ y2 K% t8 r! o; [3 C- h( {0 H& ~( z
  428.   7 g% J" w0 [. N" ~' [
  429. #-------------------------------------------------------------------------------& d% w9 t/ c" e8 y7 f8 E, r" ?
  430. #  Spriteset_Map* b0 r0 K, ?6 ~' y" Q/ E  Z
  431. #-------------------------------------------------------------------------------
    . F+ v/ p3 b# f& J- ^' [
  432.   
    . ~1 e3 b- ]4 X% _, U5 T
  433. class Spriteset_Map9 g# D( ?# L" [9 a- I. d' v
  434.   alias galv_reflect_sm_initialize initialize
    4 L/ J% u; K. j$ n: M, W
  435.   def initialize3 X& s' g/ t* k! n# J8 S
  436.     create_effects4 O& X( n% U" ~  L5 [  i
  437.     galv_reflect_sm_initialize
    4 b" |4 ~& U9 G) K5 m7 y4 P% h
  438.     refresh_characters
    ) F* I+ O5 @1 R; i6 L7 ^. F
  439.   end
    ; I6 f) m6 U/ H1 l7 p8 ?( v
  440.       J& p9 Q/ v" q2 U8 ?1 o; N1 C
  441.   alias galv_reflect_sm_refresh_characters refresh_characters# w$ M3 _* v% \" R
  442.   def refresh_characters
    # X' l' J; Y. F
  443.     galv_reflect_sm_refresh_characters
    8 Y6 S1 t) }3 m# V- w& \
  444.     create_effects8 v+ ]) \: x$ M7 Q, V& \6 }# S
  445.   end
      O2 `' {6 E5 G
  446.    
    5 o6 B5 i: a' U% K1 ?2 X
  447.   def refresh_effects
    & ]4 j& |6 h* \
  448.     dispose_effects" B) N$ A7 c$ W$ o
  449.     create_effects
    0 y" J8 n" R  Z+ ?
  450.   end
    4 z0 x- ^# v& y
  451.    
    4 w4 l% |4 ?+ H2 o0 J
  452.   def create_effects
    3 p* ]3 P: o$ I7 ?' _
  453.     @shadow_sprites = []
    1 l0 L2 {9 D0 g& s: Y6 F  A5 g
  454.     @reflect_sprites = []
    ; u) |0 B. E+ O4 a1 P
  455.     @mirror_sprites = []3 k: l  Z5 o# f) ~& R2 ^
  456.     @icon_sprites = []) x, H% H  |  w+ `
  457.       
    ( J3 R6 L, j0 q8 {
  458.     # Do reflections1 H$ S( z5 i, l( U, u
  459.     if $game_map.char_effects[0]( y" Y- ]- l5 h" b& C8 W
  460.       $game_map.events.values.each { |e|7 g0 ]9 ]& [/ d2 J7 O5 h( W) _
  461.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, e)) if e.reflect+ D7 {4 J# i2 R0 X) Y
  462.       }, c# F: q8 w+ T4 u; f6 |" W
  463.       $game_player.followers.each { |f|
    * c" f( i: M, p4 [1 f
  464.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, f)) if f.reflect4 M: f: R6 M; l/ L4 J, O0 f, y
  465.       }
    5 [) j( h" L) U3 N, m5 n
  466.       if $game_player.reflect+ B+ ?2 x& k) l2 q
  467.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, $game_player))
    4 l6 ^7 S7 H# w- E# T6 Z9 G1 R2 r. _
  468.       end
    * p. d. Z2 `1 _) _- V: d3 R
  469.       $game_map.vehicles.each { |v|
    : I* \1 E8 v  c2 B9 X
  470.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, v)) if v.reflect7 g) J  W. j; r; H
  471.       }! G- h7 v0 P. t( }3 f+ d, V1 K* j
  472.     end. a4 O/ i# |% h% I( q; l* N
  473.       
      f8 O. P  p7 P. L6 Z) u
  474.     # Do mirrors- m# z# n+ a1 o' v7 W6 w8 N1 G
  475.     if $game_map.char_effects[2]
    ' o$ a/ V: p( D
  476.       $game_map.events.values.each { |e|' m9 s3 s+ v. l2 `: O9 n9 A
  477.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, e)) if e.reflect; X* y" x( {& l/ u
  478.       }0 l# K9 a3 \" W# ]6 i* V+ I) ~
  479.       $game_player.followers.each { |f|7 h4 r0 m9 v# V' _3 s- s7 _
  480.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, f)) if f.reflect) e+ X7 i1 [6 T, ]7 E8 N
  481.       }
    8 y$ b8 m: _6 d) U8 N7 N  s1 P
  482.       if $game_player.reflect
    7 Z+ |- [1 N4 s3 r
  483.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, $game_player))
    7 c- S2 O2 G, V' j
  484.       end+ N, |# E; g  B, I% p
  485.       $game_map.vehicles.each { |v|
    * d. @6 b& x  O% U% ~# V; M8 i
  486.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, v)) if v.reflect
    - c; t. H" I( r  a  Z/ g- i
  487.       }
    0 M" N' e1 b! \) L( M3 X
  488.     end
    + [1 x  e% Z' v: ?
  489.       
    + q/ n4 `$ u+ [4 P: l
  490.     # Do Shadows
    3 s( B& E* d& G( G2 M
  491.     if $game_map.char_effects[1]
    / x3 _4 n, ?, }/ E# K6 x5 g3 l
  492.       return if $game_map.light_source.empty?
    3 O: f' Z, V. P' @; T: l
  493.       $game_map.light_source.count.times { |s|( }2 r. \! x* T4 `: N) V* x+ G# n
  494.         $game_map.events.values.each { |e|
    % ]* N1 F5 g; L: a/ ^3 ~
  495.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, e, s)) if e.shadow
    & x2 D1 K: T4 D8 L7 F1 t9 k! R9 z& |
  496.         }
    ; X3 T( G6 Q4 v  ~1 [
  497.         $game_player.followers.each { |f|
    & D, \& \+ p: b" N
  498.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, f, s)) if f.shadow2 o3 M" i3 Y+ k% p5 V; W9 B1 H
  499.         }8 `: f0 w2 P- }- B9 r
  500.         if $game_player.shadow
    8 n: t2 |4 \5 j5 j" M
  501.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, $game_player, s))8 e2 t" k$ m4 g8 i; u: j
  502.         end* ?3 ~, W" T3 o* E; ~; ]
  503.         $game_map.vehicles.each { |v|  Z& |* |! @* C- S* I' M
  504.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, v, s)) if v.shadow
    ) i4 i5 _8 o6 `1 }
  505.         }
    5 p' ?" _& L1 W0 T. R( O
  506.       }
    9 n9 ]9 f( C4 ]3 n+ I) M
  507.     end
    / H6 w4 h. H# M1 L* d$ Y
  508.       
    5 J5 |) q$ W; h4 l
  509.     # Do icons
    * v1 Y8 l7 P0 b$ C8 [
  510.     if $game_map.char_effects[3]
    : M$ C; K- b0 @& z9 P% @3 {
  511.       $game_map.events.values.each { |e|- Q6 I; r. p$ `0 A
  512.         @icon_sprites.push(Sprite_Icon.new(@viewport1, e)) if e.icon
    . d' ?% q) N3 t% s& Z
  513.       }6 ?( c. ]! U' k& T: a. M
  514.       $game_player.followers.each { |f|
    6 Y4 r- {, t# _: w+ E: k5 t; o0 _& O
  515.         @icon_sprites.push(Sprite_Icon.new(@viewport1, f)) if f.icon
    8 ^  C6 g) q  C# A' b' G. f
  516.       }* ?, ^: Q, J$ u
  517.       if $game_player.icon
    1 o6 G7 P$ p  l' }3 }; D( |) @
  518.         @icon_sprites.push(Sprite_Icon.new(@viewport1, $game_player))
    ) u9 w* `/ U7 T/ J* s' j! Q/ g! L: w
  519.       end9 _; l  x. F- @6 N* l, W
  520.       $game_map.vehicles.each { |v|7 F. ?7 E( Q7 _+ M2 d
  521.         @icon_sprites.push(Sprite_Icon.new(@viewport1, v)) if v.icon- E% l9 ?, ^! R  a4 i
  522.       }2 w/ Z- ^4 h6 G' M8 _. t
  523.     end
    + s, H: `& E: G. h" F
  524.   end
    ' R( O# d/ A; s1 n
  525.    
    $ u3 \6 H( X0 k
  526.   alias galv_reflect_sm_update update% ^  X! }8 i2 k
  527.   def update% a, W3 `, ]1 V, [' A& ?1 Q, L
  528.     galv_reflect_sm_update1 O% b2 Y6 L, C+ |* ]0 R
  529.     @reflect_sprites.each {|s| s.update} if $game_map.char_effects[0]
    $ P- n* U* z4 G. ~
  530.     @mirror_sprites.each {|s| s.update} if $game_map.char_effects[2]
    8 z' k4 ]: s/ L2 X7 {
  531.     @shadow_sprites.each {|s| s.update} if $game_map.char_effects[1]
    , S5 m4 r0 a2 y* {/ v- [/ b
  532.     @icon_sprites.each {|s| s.update} if $game_map.char_effects[3]
    . Z$ m  z7 D0 t! p
  533.   end2 V% f1 n" F0 B
  534.   
    # q# P# p- Z$ f3 A- R# |
  535.   alias galv_reflect_sm_dispose_characters dispose_characters& t5 ~5 L) |9 |* @
  536.   def dispose_characters
    2 c+ k1 I( F; p  b: v0 b
  537.     galv_reflect_sm_dispose_characters
    5 \0 A( x% b/ ?$ \! N2 @
  538.     dispose_effects- g4 [$ O9 i7 U! C; M
  539.   end
    9 t0 R( S, y3 g& V4 c0 M/ Z
  540.     + W, B' e% W, g' P! b
  541.   def dispose_effects( R8 l) T& g7 s2 [% M( f
  542.     @reflect_sprites.each {|s| s.dispose}- W8 G: p& u2 w- q. I/ P8 g( j0 O
  543.     @shadow_sprites.each {|s| s.dispose}
    ( [& n7 c) _+ z: M  k6 w* y
  544.     @mirror_sprites.each {|s| s.dispose}1 i0 p& ~/ S! ~0 \0 ?- v
  545.     @icon_sprites.each {|s| s.dispose}
    , K, @+ b$ I* u/ g; s$ @
  546.   end
    ! n, C9 o& M* H0 n
  547. end # Spriteset_Map  ~7 U- |. Z, \$ M
  548.   0 y# h2 e! O8 H. g' ?( p' C6 I
  549.   
    ' O: k' Q5 E0 P
  550. #-------------------------------------------------------------------------------& s* ?% I1 Y1 L/ Q4 @- T
  551. #  Sprite_Reflect 2 K) n( i% w) P* Y9 g* ?: v
  552. #-------------------------------------------------------------------------------
    . @# N) E4 V- D, ^+ ]7 y9 c
  553.   2 _' |, g; ]* O
  554. class Sprite_Reflect < Sprite_Character1 g2 {& Y2 @( k* t' o- c5 H
  555.   def initialize(viewport, character = nil)  R! l3 M9 P) [% j
  556.     super(viewport, character)3 d; O+ B# |/ v  K2 a
  557.   end' f& }" M5 l+ t' w& p. K0 W
  558.   3 l0 U/ C+ k) N) |. o
  559.   def update" d: B2 s  S  I# E
  560.     super
    % V; S" q1 N0 P# }$ X; ~1 d. I
  561.   end6 l% W% s; D* ~- }
  562.     9 w9 ^, u/ S) n: s7 m$ B, b
  563.   def update_balloon; end
    3 p! n5 d4 t, G1 l+ q9 G
  564.   def setup_new_effect; end! x5 u& S, ~: J! e
  565.    
    4 O# N9 l) T5 ]
  566.   def set_character_bitmap7 Z6 x4 q0 D* S  e( n
  567.     if @character.reflect_sprite
    5 f6 i" M5 B/ W( {2 m& |( b. e0 n2 U
  568.       self.bitmap = Cache.character(@character.reflect_sprite[0])' Z: N! f$ O( B1 ?1 f- M" u3 k
  569.     else9 N- ^  `2 e; u9 p# ^6 q9 q
  570.       self.bitmap = Cache.character(@character_name)
    2 a/ O8 K0 E' D% g5 B
  571.     end
    . c# Z. a: q+ Q. t5 ^4 {
  572.     self.mirror = true
      ^, }1 I2 y+ U' I
  573.     self.angle = 180& ?% l: I6 J/ t( U
  574.     self.opacity = 220
    4 S5 f' ]8 b5 A) c! l
  575.     self.z = Galv_CEffects::REFLECT_Z0 [# D: h, X# y
  576.     self.wave_amp = $game_map.reflect_options[0]; i6 n2 U4 j. R# f9 ]; ~% P9 g
  577.       
    * `: N/ S' V. K3 P, [2 C7 d
  578.     sign = @character_name[/^[\!\$]./]* j  c/ z) W8 }, c. [$ B: D1 B' U
  579.     if sign && sign.include?(')
    $ [; D7 |+ Y2 ^- q3 z9 Y
  580.       @cw = bitmap.width / 3
    1 N$ O: M% a9 g4 [, b2 b) h3 y
  581.       @ch = bitmap.height / 4
    4 R- x: T+ i# Y# V3 \/ N7 {5 u; m
  582.     else8 E/ @$ D: O* @, I
  583.       @cw = bitmap.width / 12  k0 S! y: b' V' N& s
  584.       @ch = bitmap.height / 8
    ' R7 |9 B( `) x
  585.     end
    $ O$ k2 V4 N& w4 |
  586.     self.ox = @cw / 2
    ( u) g- w9 I" H; |% z' v, q
  587.     self.oy = @ch
    1 k2 q+ x+ x4 M" B1 ], B- f- `& G
  588.   end" u; z, k1 x& u- W6 K& ]
  589.   
      r! G/ Z. S$ f4 T  D
  590.   def update_position
    & r1 W' E6 J+ G, v  ?) ?9 T
  591.     self.x = @character.screen_x3 f# U- U& n( e2 X6 T+ o9 u0 h1 k
  592.     jump = @character.jumping? ? @character.jump_height * 2 : 02 p$ [! }: E! X5 |% |1 a0 f' `
  593.     alt = @character.altitude ? @character.altitude * 2 : 0
    - A' p7 H& h+ A& v6 K, t# U7 j; l
  594.     self.y = @character.screen_y - 3 + jump + alt8 J5 Q/ ?; a& X( s( ]6 v
  595.   end9 l/ h- `4 p4 I: d7 Z, ^  p
  596.   
    9 e1 ^8 D) Q6 m8 @
  597.   def update_other
    0 o0 f6 H( a2 b
  598.     self.blend_type = @character.blend_type
    , f7 U0 e$ r0 m- a8 U
  599.     self.visible = [email protected]
    1 E7 ~  X4 w7 {' r8 ^, \% s3 t
  600.   end5 W. k; c2 S/ I3 t! H
  601.    
    2 j# a. ^! ^! G) D" @# ?# _* j
  602.   def update_src_rect! Z7 w+ g9 u, Z7 b! r$ y7 X5 o
  603.     if @character.reflect_sprite+ n8 `; Q! T% E) I5 w
  604.       index = @character.reflect_sprite[1]
    % }. W" G5 w2 p& V3 n- ^
  605.     else
    " C0 x/ }9 u( e  G
  606.       index = @character.character_index
    ! r! D/ L3 T- o5 ^3 X1 b
  607.     end
    ' Q. O" U6 @7 O4 Z* [0 C0 R6 t
  608.     pattern = @character.pattern < 3 ? @character.pattern : 1
    8 F* U& }: B1 B9 j: c: I
  609.     sx = (index % 4 * 3 + pattern) * @cw
    7 ]/ O# d6 d6 r# E6 m' V. w# `
  610.     sy = (index / 4 * 4 + (@character.direction - 2) / 2) * @ch% P. {4 O: Y5 g5 [+ g8 y
  611.     self.src_rect.set(sx, sy, @cw, @ch)
    ( v0 ^- ?7 l# j' B3 d' n- G- N1 p+ a
  612.   end
    , ]2 c6 y: U$ I) I, t/ q" y- C
  613. end # Sprite_Reflect < Sprite_Character
      O. \+ X7 Z1 {' z
  614.   : z, }# N" Z- ]
  615.   8 Y( s* P, H8 c3 |
  616. #-------------------------------------------------------------------------------6 K9 r- j  ?8 f' Y$ K' q' m7 Q% ~
  617. #  Sprite_Mirror
    * K- R& l/ ~9 q5 w4 d9 g, T
  618. #-------------------------------------------------------------------------------
    3 l# p) K: F- l
  619.   % y3 e9 n: I6 W* m
  620. class Sprite_Mirror < Sprite_Character
    4 m/ C& }1 X4 g$ e) U: E
  621.   def initialize(viewport, character = nil)3 f, G' S8 m% p, s
  622.     @distance = 0
    . B* T6 Z# J6 Y' ?7 ~
  623.     super(viewport, character)) e# l: L2 s8 h" `* H
  624.   end0 x% D9 y; f# w, l
  625.   
    + O2 s2 |6 k. c, S; |
  626.   def update9 Y3 v, Z/ z3 W- u  h$ {6 K4 z
  627.     super, K& Z1 M  _" Y; u& I! ?& k7 L
  628.   end
    5 [+ a- t; m- G7 O6 z
  629.    
    2 o# j- b  Q7 L$ X  y) s+ ?
  630.   def update_balloon; end
    2 q- \' V$ b4 ^7 s
  631.   def setup_new_effect; end
    9 t& C/ q2 r: p. ]
  632.    
    9 ^3 T# n. ^  m; |' E3 v* j
  633.   def set_character_bitmap4 x; s& q; g, ^3 w- |. [$ a4 s3 z
  634.     if @character.reflect_sprite
    ; F/ V1 G" l9 b3 D
  635.       self.bitmap = Cache.character(@character.reflect_sprite[0])
    2 j- a2 {& l0 D( z3 _7 C
  636.     else; a$ b4 b% v( P7 \! C: h
  637.       self.bitmap = Cache.character(@character_name)6 ~' L% s; u- b
  638.     end
    9 V8 O* b4 c) }3 e- O+ @: B; G
  639.     self.mirror = true" l# O9 l. D' g9 n+ W, ~. R; T
  640.     self.opacity = 255
    5 u3 c0 r: b6 D. g6 x8 y! W
  641.     self.z = Galv_CEffects::REFLECT_Z& P7 v! I0 h# P8 {5 Q7 W+ f
  642.       ( O6 N( e* }( `4 o
  643.     sign = @character_name[/^[\!\$]./]1 F  M3 `% C0 `
  644.     if sign && sign.include?(')
    ( c5 Y! N5 a' l) k% u
  645.       @cw = bitmap.width / 3
    " t/ c/ x1 \6 x0 }$ `8 `! H1 `: ?
  646.       @ch = bitmap.height / 4
    4 N* e" O+ B0 B& l5 Q( a% j
  647.     else
    ' O; q- i  \# X& d' q5 @
  648.       @cw = bitmap.width / 125 T9 B1 q( D9 N$ X& @
  649.       @ch = bitmap.height / 8: h0 W& o; w9 I) b- L0 ]4 W
  650.     end
    ( G: a6 z& o8 m$ `% T& `0 p" @
  651.     self.ox = @cw / 2* H' r: @+ Z+ Z4 c2 z
  652.     self.oy = @ch( J4 l+ `8 R+ _5 J& z
  653.   end3 \  K! _/ y1 e$ u$ U8 j
  654.   . [$ d) H1 a* l/ O; F
  655.   def update_src_rect" O& Z3 D$ Z( f, f6 P3 i6 e
  656.     if @character.reflect_sprite, a! C+ R- W8 r, [3 [- c
  657.       index = @character.reflect_sprite[1]
    9 B: _0 C+ b6 D8 Q* G/ Q
  658.     else
    # Q6 a$ R; s2 [3 A+ r
  659.       index = @character.character_index
    ! g( `% G# j" P7 F! i5 M
  660.     end& F6 N7 p# `. {/ C$ C4 ]& n
  661.     pattern = @character.pattern < 3 ? @character.pattern : 1
    0 w1 t9 e- b$ u9 A6 t
  662.     sx = (index % 4 * 3 + pattern) * @cw. W/ l. G& h  m. N
  663.     sy = (index / 4 * 4 + (10 - @character.direction - 2) / 2) * @ch
    2 ?$ {4 w5 \% X8 j4 q8 t# `! I
  664.     self.src_rect.set(sx, sy, @cw, @ch)
    ( Y! [. Q+ R, \7 t1 J2 p
  665.   end
    & {3 W" N3 J) p2 ~
  666.     3 k! l: P2 D0 Y
  667.   def get_mirror_y
    ( |- s5 Q: v' _1 O% y' @8 f
  668.     20.times {|i|
    9 ?+ j! {8 y0 S1 F+ O+ T
  669.       if $game_map.region_id(@character.x, @character.y - i) == Galv_CEffects::MIRROR_REGION0 Q: L( S0 \$ }! @7 z$ d
  670.         @distance = (i - 1) * 0.05
    1 G3 c5 B2 i9 t' i3 i) z
  671.         [url=home.php?mod=space&uid=502659]@DISPLAY[/url] = @character.y - i - $game_map.display_y + $game_map.height
    + ^4 [; C+ H0 [( T5 b
  672.         self.opacity = 255
    * Z8 w8 `* s1 N  V2 v3 s
  673.         return (@character.y - i + 1 - $game_map.display_y) * 32 - i * 4
    / N1 u; {0 g  v( L" u. r
  674.       end
    9 M/ T6 ^4 Z* ]/ {, t" ^1 c* T3 \
  675.     }
    . `2 V. B! o& \+ c2 d7 a
  676.     self.opacity = 0
    3 V: K- A/ Y8 y5 A' \1 Y" V) [9 l
  677.     return @ch. i+ D! p; D6 V1 j; _1 f
  678.   end/ e! S' r6 Y' G
  679.    
    - Z* P, ~' n! _# V' E: x0 U4 V+ r
  680.   def update_position" q5 g* Y1 {9 v* U% A
  681.     self.x = @character.screen_x
    $ z; b: f9 Z+ M) g
  682.     self.y = get_mirror_y - 6
    , U5 m7 @) ~2 `6 {+ k6 `
  683.     self.zoom_x = 1 - @distance
    1 x( M! R. Y( U9 l+ T: q
  684.     self.zoom_y = 1 - @distance
    & M" I- S1 |, [4 a9 O6 D
  685.   end" j5 [0 H1 s2 x* p$ o) b
  686.   3 U% @7 J4 h, a0 r
  687.   def update_other
    # v# h7 C: @1 x: Q' X' H0 C  B
  688.     self.blend_type = @character.blend_type. v2 _# v' ~* Z8 j% @) z  Y( Y# J
  689.     self.visible = [email protected]
    1 ]' U2 g" G1 q, K0 Y# }3 u" h
  690.   end
    3 [+ n% [, F1 H/ g9 O
  691. end # Sprite_Mirror < Sprite_Character
    # v/ w# m2 @4 {7 |. Y7 V
  692.   
    # M* {. S: L" t7 U( w% m$ q8 ?( Q
  693.   . h1 w8 b* c9 O" o2 a$ X8 r- N
  694. #-------------------------------------------------------------------------------
    . I  E- i& F: P( g
  695. #  Sprite_Shadow
    , l+ j5 I: H- p+ Z2 E
  696. #-------------------------------------------------------------------------------
    : e3 q0 X" m* v$ g
  697.   / L2 ?5 t* A# a: X, K3 [
  698. class Sprite_Shadow < Sprite_Character
    * b! P0 V! g. c. [
  699.   def initialize(viewport, character = nil, source)/ |' j( l7 w& _6 ?2 M
  700.     [url=home.php?mod=space&uid=14094]@flicker[/url] = 0
    ; K' d" e# L( e: F( w
  701.     @famount = 0
    8 c" Y' C. j. D3 R7 O3 B
  702.     @aamount = 01 v( W' x6 Z: B8 G- |# G/ _$ Z
  703.     [url=home.php?mod=space&uid=171370]@source[/url] = source6 a5 K: n; g7 K) {- k. N( h
  704.     super(viewport, character)7 z; b( h* i) b5 X  X' \5 z: I
  705.   end
    0 |, [: x4 j% j0 E! n
  706.    2 Y  r* I7 y& X! G  t
  707.   def update_balloon; end
    $ ]. h5 F9 r9 o/ @7 r0 f& d2 B* K* t1 k& C
  708.   def setup_new_effect; end
    1 B  ]6 _4 X  s9 O0 C1 O' `$ ~" w
  709.   4 j7 x! z% V8 r; ~
  710.   def update7 x& x$ v% g5 R
  711.     super8 s3 m+ k" V9 h$ P. L8 n
  712.     update_bitmap4 h6 ?1 M3 T# J* G. O2 `
  713.     update_src_rect
    # F3 b5 S( v! R: F9 v7 a% Y& u/ x
  714.     update_position
    1 ^% E  e4 z+ f* b6 }8 l
  715.     update_other6 {6 ^$ B: J/ c7 l  i
  716.     update_facing
    ; W. o' t! [9 ?! [7 H, ]
  717.   end% S4 M) N4 N- N: Y6 k3 w7 u
  718.    
    9 l( q# x( F+ O5 ?
  719.   def set_character_bitmap. q/ K. Z6 b# @: \$ T5 d
  720.     self.bitmap = Cache.character(@character_name)2 B0 L0 e# R; g, L4 x. N
  721.      1 K$ C1 R7 T4 G4 m. A0 x8 G
  722.     self.color = Color.new(0, 0, 0, 255)( N5 X" E" w/ H' s
  723.     self.z = Galv_CEffects::SHADOW_Z% {* B  \* W# I7 h9 a
  724.     self.wave_amp = 1 if $game_map.shadow_options[2]9 n0 K* a1 A+ {; d$ |
  725.     self.wave_speed = 1000
    / T! z$ k6 U! w/ d$ o3 Y
  726.       % X* {. b# S' Q( x
  727.     sign = @character_name[/^[\!\$]./]
    5 v- m7 ]  A5 l7 B
  728.     if sign && sign.include?(')
      B6 h5 R! i4 h2 z
  729.       @cw = bitmap.width / 3# S' v  n  b, r+ t9 L# y( P
  730.       @ch = bitmap.height / 4
    4 i. S$ q1 z/ s  i$ j. P* Z
  731.     else- a' Y, b/ `7 L7 q
  732.       @cw = bitmap.width / 12- h) d& L6 T! r- C; I+ M) W2 K
  733.       @ch = bitmap.height / 81 Y' N$ l% K' B. L6 z( X! V
  734.     end
    / W& a2 L6 b% @) S- r
  735.     self.ox = @cw / 2( |. P/ i2 J+ z! b' Z
  736.     self.oy = @ch4 L! ]2 h/ M* p5 n8 ~- M' y/ a* Q8 b
  737.   end
    0 N- k: {! ]. s" w$ p
  738.   - M' P' t/ o( Q/ b. }8 l
  739.   def update_position
    , m: x1 `( J$ V1 s1 D
  740.     self.x = @character.screen_x: `- \+ w2 ~- h5 [7 a5 w) r
  741.     self.y = @character.screen_y - 10
    4 |" X" Q' o! R9 M
  742.     get_angle
    + @& H  ]) F7 Z
  743.   end
    ; `5 z8 z! W: k7 N
  744.    
    3 F* s! {! w4 a8 F$ M' G, O) J% N
  745.   def get_angle
    ! B7 }8 s' Q- f: L2 {& e2 [
  746.     x = $game_map.light_source[@source][0] - @character.real_x
    - [- z5 {7 O; ], O' A
  747.     y = $game_map.light_source[@source][1] - @character.real_y
    0 r2 E7 L- n8 V- X
  748.     self.opacity = $game_map.shadow_options[0] - 9 L$ ]. Y/ f% u
  749.       Math::sqrt(x * x + y * y) * $game_map.shadow_options[1]
    * }$ T1 q$ o5 o1 `8 b
  750.       
    7 y. L: @( j- g1 g9 X
  751.     if x == 0 && y == 0 || self.opacity <= 0
    6 M" [  `( E+ x  T
  752.       self.opacity = 0
    . h2 L; F5 T( g
  753.     else
    ( J& J1 @( j3 s* K9 f
  754.       self.angle = Math::atan2(x, y) * 180 / Math::PI + @aamount4 {8 G" i& E7 ]2 t- C
  755.     end
    : x7 k% E; _" N2 A
  756.   end
    ' e: K  ]1 K% V( y4 \' P( F
  757.    
    7 i( W2 ]. j- L# A- ~
  758.   def update_facing
    4 n. j! [- P2 G; t
  759.     if @character.y < $game_map.light_source[@source][1]2 U( z  o( ~- q: ?: h& H# m  x" s
  760.       self.mirror = false, V! ^0 q5 [* V) N8 f! o2 N
  761.     else
    7 R0 W! K4 W# E! d0 u& [
  762.       self.mirror = true% U" O8 s0 m) n: f8 \- r5 m
  763.     end+ g( S  K; s  x
  764.   end+ q; a  ~3 C( o
  765.     . {' h7 D: }7 G- {. e6 j) M2 S
  766.   def update_other
    ! O, \, s7 |  u  }, y% `
  767.     self.blend_type = @character.blend_type: I% T9 o) S- D* c
  768.     self.visible = [email protected]4 F& z' L2 j( H5 P/ p5 @: C. q, p
  769.   end
      x4 N% X5 W. C# Z2 N( l0 h
  770. end # Sprite_Shadow < Sprite_Character  s6 u+ |" ^' g: i2 |) y# D: A
  771.   8 G$ t# c* x& a$ d
  772.   + K8 r2 ]; E5 n: B) k9 Y
  773. #-------------------------------------------------------------------------------
    9 L& c7 C% I# A' f
  774. #  Sprite_Icon% J$ p& ?% l$ a7 Z
  775. #-------------------------------------------------------------------------------
    $ a8 Z9 q- x  n5 J% V$ `, T/ _6 n
  776.   ) Z1 Q2 u0 B, R# P( p
  777. class Sprite_Icon < Sprite_Character
    & m6 b: q9 w  b! w) }% Z) f
  778.   def initialize(viewport, character = nil)/ `6 J" m6 [& M
  779.     @icon_sprite ||= Sprite.new! c! ?) \) ~  [1 R1 g4 B2 j! N
  780.     @icon_sprite.bitmap ||= Cache.system("Iconset")  F6 N) v" T% e* i
  781.     @icon = nil4 q5 r' ?% r1 W( y5 `$ e
  782.     super(viewport, character)
    6 {' n, u$ m; Q0 O+ v% |3 E5 u
  783.   end& |5 u$ ^3 p' U0 |) m
  784.   . O0 t! X7 S, F. c
  785.   def dispose
    7 D* E/ a% i3 Q* X- X3 R
  786.     super8 |" N% Z7 @2 K; f& N9 `- Z4 z% k
  787.     if @icon_sprite
    ' ]6 _* Q4 R& d; M* k) u. a+ O
  788.       @icon_sprite.dispose
    , P5 _: K. G' _1 {: Z8 @5 {
  789.       @icon_sprite = nil
    7 G. y, e: X" ], b' {1 [
  790.     end5 Y6 F/ ~4 h: A5 m  Z. E5 y+ W
  791.   end  K% @* k' t* u1 }. I
  792.     7 {) U4 f) T* G7 ^8 s
  793.   def update
    " _/ [5 r1 o* r7 a/ F4 P
  794.     super5 A2 |* p+ S" I/ V3 ?0 T3 G' Z) g
  795.     update_icon
    ' p7 \5 O0 i; j0 G3 R" w
  796.   end
    7 i1 B" N3 X9 P: E
  797.    
      H& P! k7 k! p$ v; M6 E! F& a
  798.   def update_icon
    2 a2 K; T% K5 f
  799.     return if [email protected]& l* g8 Y$ F+ t' D  ~
  800.     draw_icon(@character.icon)/ e% [0 V1 w: a: C. K) e; b& z
  801.   end
    * K1 ~$ h2 a; c" A
  802.     , W- {# h+ \% n- `. c0 T, v. I( |
  803.   def draw_icon(icon_index)
    ; L$ o8 ~5 l" U9 E) v7 o( j' w' N
  804.     return if [email protected]?
    6 n4 R' K% Z5 n
  805.     rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    7 h' `) l  j6 v0 S) `) L2 X! i- p) K
  806.     @icon_sprite.src_rect  = rect2 e" Y/ F7 }) T* F9 F
  807.     @icon = icon_index0 R3 `% u$ m4 x. X- O, M# Z' H5 ]. l
  808.   end
    # n& {7 r8 ?+ M" t' Z( d
  809.    
    ' P2 X0 C  g& Q
  810.   def update_position
      y$ ~$ a' P9 o! h
  811.     @icon_sprite.x = @character.screen_x - 12% y3 `# ^( b( p0 f; k
  812.     @icon_sprite.y = @character.screen_y + Galv_CEffects::ICON_OFFSET6 b' e+ {! V! B4 _/ p1 _  ^( I
  813.   end
    0 S2 |, E+ E' t7 T1 N
  814.   % b# B0 M$ W% F9 {0 Y; k* ?, @
  815.   def update_other6 Y, [' \) ?' Y& o" _) J
  816.     self.blend_type = @character.blend_type
    : c$ J3 c0 r3 D3 K/ D
  817.     @icon_sprite.visible = [email protected]
    . s! k# c" }1 I% s2 G/ {2 @* n9 Q
  818.   end1 Z- v: z/ n7 |' p0 g
  819. end # Sprite_Icon < Sprite_Character
    ' ?: C5 N( A! q# ]: v* h  p
  820.   
    $ A/ I* D9 M8 B! ?! c2 Z
  821.   
    6 @+ s# `6 K( _2 x
  822. #-------------------------------------------------------------------------------
    ! {, o0 j2 J7 ~  {( ^, [/ e
  823. #  Other Stuff
    9 ^, \  W$ Z* O, z9 {. c6 g
  824. #-------------------------------------------------------------------------------
      [9 A8 e6 e: N7 N" R2 m
  825.   
    " j5 J3 h/ W3 r; Z, Q2 K0 N
  826.   
    8 }' C$ {$ y, \/ I# p) n
  827. class Game_Character < Game_CharacterBase$ b) |& u1 C2 J! ~+ y
  828.   attr_reader    :altitude0 f% ~* _" j, }# g% o
  829.   attr_accessor  :reflect
    + n6 c: Q1 K1 i5 n
  830.   attr_accessor  :reflect_sprite
    0 V4 i& A) }8 V3 s9 e
  831.   attr_accessor  :shadow
    8 B% K9 J: ?. R0 w5 E. J
  832.   attr_accessor  :icon5 g* o7 p4 [( F! v2 n( h1 q
  833.   attr_accessor  :icon_offset" N% |$ |7 ]! }  u! y3 Y' w
  834. end
    & q. Y& l/ m5 Y0 `% U1 w& k
  835.   
      X; M3 F' `, }/ H( C% B
  836.   1 s  [" w9 j6 v7 D4 j: y- q
  837. class Game_Event < Game_Character
    3 P7 D7 z& i: ]' h
  838.   alias galv_reflect_ge_initialize initialize
    $ T$ V% i" L' e! w! N) a/ c
  839.   def initialize(map_id, event)& t: V3 d0 t+ e8 h0 N/ l2 _% a6 G& E
  840.     @reflect = false6 p3 `) E# ^9 A' @5 T& b( p) H
  841.     [url=home.php?mod=space&uid=31758]@Shadow[/url] = false
      K0 G6 X5 Z$ [
  842.     @icon_offset = [0,0]; `* h- h4 W' T) D
  843.     galv_reflect_ge_initialize(map_id, event)
    4 ^6 L8 S1 o( `( b( @6 b9 T
  844.   end
    * t- W( U! n% d' b, L6 U
  845. end # Game_Event < Game_Character+ R0 u4 c% G1 j. v2 k) O! d
  846.   ( D# \1 Z6 z9 e* N1 }. \1 z
  847.   
    : d: q5 a! `8 r5 T5 Y
  848. class Game_Vehicle < Game_Character- y- [: S1 g. {1 K
  849.   attr_reader :map_id+ k- W- _, c( o3 E; D
  850.    
    1 w/ P+ y8 v# o+ b6 G+ I
  851.   alias galv_reflect_gv_initialize initialize& c' [2 o2 _) s: l4 X; }0 ]% Q
  852.   def initialize(type)+ ?, v3 I, ]! s, _5 T
  853.     @reflect = true3 x) u8 ?+ P: o) i& t
  854.     @shadow = true
    7 _3 ~) d6 ]* r4 I
  855.     @icon_offset = [0,0]7 }# [5 O) K7 q1 `. T5 n
  856.     galv_reflect_gv_initialize(type)
    ! K/ }  E, g9 y9 _6 S
  857.   end7 t4 ]' K7 w% p/ w5 Y
  858. end # Game_Vehicle < Game_Character
    $ n/ b0 q4 v% P/ i0 i* g
  859.   6 p/ R4 ~0 U- N5 c5 j5 P' ?- @
  860.   ; ]( S2 r5 R; ]
  861. class Game_Follower < Game_Character
    / F% R. f) J* l8 @3 i
  862.   alias galv_reflect_gf_initialize initialize  z! \  e: A5 i* I) S
  863.   def initialize(member_index, preceding_character)& Z/ V: P& ^# k9 p4 |2 U& o
  864.     galv_reflect_gf_initialize(member_index, preceding_character)
    $ ]" J9 ?3 W& \: H( C8 i' \
  865.     @reflect = true# ?1 D1 `! p: y" }' m; j* c
  866.     @shadow = true& \7 c' l: C6 n' H# c
  867.   end
      J: J3 _% ?, p, g5 X
  868.     # K9 C7 {" [1 B; S
  869.   alias galv_reflect_gf_refresh refresh" R9 P- c0 a5 }" l
  870.   def refresh9 [1 n, L( o* @. Y. ?
  871.     galv_reflect_gf_refresh7 g2 u  p4 @# \6 c2 g  ~. A' x% v
  872.     return if actor.nil?" D; [9 ^, F8 l  V* K- Y3 e
  873.     @reflect = actor.reflect& ]: N& I* R7 G# h9 O" r' U5 Z! L
  874.     @reflect_sprite = actor.reflect_sprite) ^* Q( T# q2 X! J* i6 l, q8 C
  875.     @icon = actor.icon
    + ]; X) r7 x5 ]+ m4 o$ m( D1 ~
  876.     if SceneManager.scene_is?(Scene_Map)
    / S) V; B! C# Z8 z. _
  877.       SceneManager.scene.spriteset.refresh_effects$ {5 Q$ [! C3 A; S7 g( t% J
  878.     end9 _( D; u/ U4 o# J% ~; l
  879.   end
    / A' h7 ?5 D, H1 i
  880. end # Game_Follower < Game_Character
    $ r3 b( Y7 i& y. y2 H5 ~6 e3 c
  881.   + ^- M5 t+ l6 s- b- p5 K: r" M8 h* H+ e
  882.   2 |' f! ^2 J+ a4 x
  883. class Game_Player < Game_Character
    6 G: @/ r# j& e6 p4 s
  884.   alias galv_reflect_gp_initialize initialize
    " q3 E) [2 ]: s) i7 b1 t. q. [
  885.   def initialize
    8 Q4 n2 h4 F( ?/ Z: b
  886.     galv_reflect_gp_initialize8 F. B& O% i+ u: i4 F
  887.     @reflect = true
    & Z9 j, H- ]* H+ K) P5 A4 `
  888.     @shadow = true
      g2 l" ]1 N! S6 @
  889.   end
    5 `4 q8 L( }7 Q: O1 |" m3 D
  890.     % C2 ~, ^2 K1 L: O% G
  891.   alias galv_reflect_gp_refresh refresh
    % V; G& x$ |1 O, y
  892.   def refresh
    ) D& r3 s9 [4 P) Z
  893.     galv_reflect_gp_refresh
    3 z, l  P' `; h% k4 J3 a) T* O
  894.     @reflect = actor.reflect7 T3 g+ ?, y2 D. q4 C
  895.     @reflect_sprite = actor.reflect_sprite+ Z: t2 R. U& u/ e; G- c% [" X9 m
  896.     @icon = actor.icon$ D/ E; k* u/ |5 t3 y- \
  897.     if SceneManager.scene_is?(Scene_Map)
    6 b: K' e* g7 \; m
  898.       SceneManager.scene.spriteset.refresh_effects: n) l/ X) D# U5 e- q) W  |) N' v5 W
  899.     end* |& S+ b6 J3 j& T/ c/ r
  900.   end9 B/ s9 y! g4 T& f- N* Y( R- r) G
  901. end # Game_Player < Game_Character9 [5 d7 V; l7 T, {" G0 ^
  902.   
    9 F# W" V. f4 S, d8 Z8 |
  903.   
    , p7 V" j$ g' z
  904. class Scene_Map < Scene_Base
      v5 A. ]: ^% ?3 v  E0 t8 j* Q
  905.   attr_accessor :spriteset8 a; B! X$ Y) e$ C1 q- `3 R2 d2 y
  906. end # Scene_Map
    . K$ P2 z: v" ^; ^. w* b+ l
  907.   * P# O7 N* d( ?; I) S; v
  908.   / y# r# \7 X+ i$ |) K) X% e& I8 i
  909. class Game_Map
    " r1 ]% D5 D+ P- ^7 A
  910.   attr_accessor :char_effects8 z# M" e- p9 @+ c
  911.   attr_accessor :light_source
    4 P& Y2 D, N* w9 Y+ ]! @+ l: B
  912.   attr_accessor :shadow_options
    " b" U  `! |' K; W- |# X
  913.   attr_accessor :reflect_options1 o# Z2 E8 ~: K& C5 h$ w
  914.     2 F: o' N# ~; Q- L* p) c
  915.   alias galv_reflect_game_map_initialize initialize
    ; `" l6 z5 @* k' T0 A
  916.   def initialize
    0 c0 W: R& [8 s
  917.     @light_source = []
    $ c& ~, k% G1 Z  P" `% D9 y
  918.     @shadow_options = [80,10,false]
    7 l$ a7 `3 O3 V' H' l. K/ `
  919.     @reflect_options = [0]
    ; b! ~5 B; G0 f; P
  920.     @char_effects = [false,false,false,false]' U& ]7 k+ l" ?0 M3 _
  921.     #[reflect,shadow,mirror,icon]
    ; s( h9 z* S( T3 V
  922.     galv_reflect_game_map_initialize* |& _6 T: T- |0 w4 k% {' X) b3 |3 J* ]
  923.   end
    4 s$ [" s8 k( ^2 K1 ~( ]9 ?. l
  924.    : f# N0 o: [' r' w' Q% |
  925.     7 e  W4 H6 s& Z  N# W- C
  926.   alias galv_reflect_game_map_setup setup
    ) R3 E# k9 m* i' W4 ]/ S! S
  927.   def setup(map_id); j  @% i% L/ A! [3 c' S7 G& H+ N1 l
  928.     galv_reflect_game_map_setup(map_id)
    % h; @  M: y- C; F5 K" w  b
  929.     reset_char_effects
    2 r1 d, [6 J) K* r1 X
  930.     do_all_chareffects
    % f/ ^( b6 J' r$ t  }( r
  931.     if SceneManager.scene_is?(Scene_Map)8 J+ y1 q+ D/ ^4 c* N
  932.       SceneManager.scene.spriteset.refresh_effects4 g( e3 d# s, K4 x* w- e
  933.     end
    ! O6 x$ ?% {& A+ j+ |" Q! @/ J
  934.   end
    7 ], e0 w4 L. d0 n/ L
  935.    
    7 U3 l0 Z6 D. ?/ i! h
  936.   def reset_char_effects- W7 A! Q; w/ r1 Z! R, Z3 Z
  937.     @light_source = []
    5 t; d- p) x5 Z+ v' H) ~& F5 ~
  938.     @events.values.each { |e|0 G6 J0 i& K0 t# }4 H' ?7 D- \! }
  939.       e.reflect = false
    - e) c# y* V* P1 X! h
  940.       e.icon = nil }
    : @1 ]1 T  e- P7 }
  941.   end
    : ^) B5 R( N: E4 j9 M* c
  942. end # Game_Map
    6 v! w5 n- h# o1 K, M" }6 R, t% e# p
  943.   
    + L* ^& e# T" a
  944.   ) k- l! h9 N. z9 i) O$ N
  945. class Game_Actor < Game_Battler
    # `% S# ]0 s. P# y9 X& f' f
  946.   attr_accessor :reflect
    $ _8 b! j9 f( ^; D
  947.   attr_accessor :reflect_sprite
    ; j8 c2 s! ^7 K% K2 ]# K
  948.   attr_accessor :icon- I, s- F% H1 i1 X5 H0 m$ W
  949.    
    9 K) x7 z5 p/ I3 E3 t  G# S! x8 w( ?, }
  950.   alias galv_reflect_game_actor_initialize initialize- m* v- q% j9 g  [% o2 S
  951.   def initialize(actor_id)4 a) Q8 Y* [/ A4 u4 p+ h0 m' \
  952.     galv_reflect_game_actor_initialize(actor_id)
      _/ Q2 x+ `% h1 i- L
  953.     @reflect = $data_actors[actor_id].reflect+ ~6 c6 I. H! F; b, v: B. r
  954.     @reflect_sprite = $data_actors[actor_id].reflect_sprite! M0 |" L5 m7 M" Z" Q
  955.     @icon_offset = [0,0]
    : c; E2 H+ h4 c, S* c% \( n
  956.   end
    " x9 q5 O% I" I, K2 O! N
  957. end # Game_Actor < Game_Battler
    5 l" F' L4 \$ w7 [0 T1 |" X9 M/ C' _
  958.   4 u9 f% V2 ]; t; i
  959.   
    ) o/ v" F5 [; H  @
  960. class RPG::Actor1 a; ^6 ?7 c3 L+ T* B- J- J
  961.   def reflect_sprite9 V# ~$ e$ o* h+ N: N! {
  962.     if @reflect_sprite.nil?
    ! M0 h/ Z/ j$ P" b0 B
  963.       if @note =~ /<reflect_sprite:[ ](.*),(.*)>/i
    : [( T) i0 P$ |. _/ c6 I; b
  964.         @reflect_sprite = [$1.to_s,$2.to_i]
    2 s* m+ h7 `/ U3 O
  965.       else* g! I  X4 q( M$ ~
  966.         @reflect_sprite = nil- X+ y, V" i  {. j: J# @0 e- P) i
  967.       end
    - D# Z! w# O' u) W! h( l2 h3 T
  968.     end
    , ^- c! b2 g4 z- t
  969.     @reflect_sprite* T5 h9 N, Q$ s) e- a1 W3 U
  970.   end
    $ h3 x" {, k8 ^& \
  971.   def reflect, G7 n: N% L! q# p3 {
  972.     if @reflect.nil?% c% Y. S. `6 R: W- s+ v0 ]4 S* C
  973.       if @note =~ /<no_reflect>/i
    8 R/ r  o5 F$ A, t6 z# L. n
  974.         @reflect = false
    7 e7 b5 q3 L! D: e2 y, n  R
  975.       else
    & B  w( f0 q. i
  976.         @reflect = true+ \6 t' J8 K' s6 i% f6 r# e
  977.       end
    ; d. Q% G8 \1 t
  978.     end8 C/ x6 i' r, R5 \* x6 j( R* J
  979.     @reflect
    ( L$ T' V, ]: n# D- q# r* o6 d
  980.   end6 y7 t0 r6 ]2 F0 F
  981. end # RPG::Actor" R: a$ G! v2 `4 n7 v
复制代码
回复 支持 反对

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-6-4 16:51

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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