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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

( u2 p! s# ]  |这个代码怎么用啊,有大神知道吗。我从国外找的。
- i/ x) Q# n0 s+ `: g! S$ khttp://galvs-scripts.com/2013/02/21/character-effects/! [: j( c2 o) r
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#6 A. j: i) v6 h  C
  2. #  Galv's Character Effects) t  F6 v1 K5 f  l. w; z7 [: z
  3. #------------------------------------------------------------------------------#
    " B; l7 k1 K1 ]' a
  4. #  For: RPGMAKER VX ACE
    $ w7 e* w$ ]# i4 J4 u  L. ^
  5. #  Version 2.1# b" ]# n1 \7 q+ g0 |+ S
  6. #------------------------------------------------------------------------------#. k5 k! n2 B4 K. L& E( Q( ?- w
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows5 Y$ W& }, ]  \. D' [; N
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    & L2 h$ z; y% g
  9. #                           - Fixed shadow facing bug; w% |, M/ m, M# e5 S
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows# @6 J  F' C& S: O
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows; i! P% Y, F5 @
  12. #  2013-02-22 - Version 1.7 - bug fixes4 E1 c% @) D- U8 W
  13. #  2013-02-22 - Version 1.6 - added icon effect
    4 k, [; {4 N9 }, |$ |* N
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps3 x8 @6 Q% m$ z  h
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles1 @1 F3 s" o' t0 S( z" g
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks9 `4 T7 o" l" R' }
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    / }- G  [( A' }, `: j3 l
  18. #  2013-02-21 - Version 1.1 - updated flicker effect4 d# P2 P; N4 z: G5 f$ j. L: A
  19. #  2013-02-21 - Version 1.0 - release
    & Z+ @# @! n4 j  G  }. A
  20. #------------------------------------------------------------------------------#( u5 e  d, g& A9 T
  21. #  This script was made to provide some additional effects for characters such
    * P4 B+ L& Q% e# ]' Q1 X
  22. #  as events, followers and the player on the map.
    " K( T9 m2 D) |  W. V0 k& R
  23. #  Currently it includes:, }' W- L2 @( w" u( s
  24. #, h: x, J7 _2 y% Q, p" t
  25. #  Shadows8 z" Q; H3 V- X3 G
  26. #  Shadows that appear under player and events in a directions depending on; \1 O8 N3 L2 U) Q7 W
  27. #  a light source that you choose.* [' g' Y: ]5 o7 H6 I2 H1 y
  28. #- S; q2 x/ w- t7 v" q
  29. #  Parallax Reflect
    / k, x' w, @: z) P$ S
  30. #  Reflections that appear on the parallax layer for events and actors to be
    / V7 S( u: ~) C# {0 P! n" J
  31. #  used for things like reflections in the water or glass floor etc. To get
    ! S6 v! @* V" H( s
  32. #  effects like the demo, you need to edit the charset graphic to make the water& y# S0 k. D0 g: y: _" p# `
  33. #  partially transparent.
    ! i6 F9 G$ t+ h
  34. #& A5 [. v3 h% I2 ?
  35. #  Parallax Mirrors6 p4 t; l9 o- K( F
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    . K# C, b- K4 u2 P
  37. #  on a wall designated by a region. Both mirror and reflect effects can be1 _. X! `2 I3 l
  38. #  changed so actors and events can use different charsets for their reflections
    ) a3 s7 |/ U% J" C) ?4 w
  39. #
    $ |7 ~+ k2 @0 }* H* r7 T
  40. #------------------------------------------------------------------------------#
    0 G. f0 u* Q, A2 s0 @0 |& v
  41.   
    $ K7 Z, w) P" U, c, M
  42. ) b( |; y) ]- v
  43. #------------------------------------------------------------------------------#* E; H( [2 k0 |! q0 h( o
  44. #  NEW - First event command as a COMMENT
    ( k1 ]8 z) U" L- N' p" K
  45. #------------------------------------------------------------------------------#4 e  r: Y' h7 ~4 e( K* b
  46. #  You can add a comment as the first event command on an event page to set if
    9 h8 f  O, M0 o5 q3 F8 h
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    ! i1 K* @1 z9 P6 k
  48. #  below, all must be on the same line in the comment.
    * @: d' x8 W6 b) J' ?1 [7 k
  49. #/ y$ F) K( [! q7 x& G8 r
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    " n+ t  `1 D" s; p7 j1 ]; E0 S
  51. # <shadow>           # set the event to display a shadow
    : h9 W- I/ }3 l3 m2 a
  52. # <reflect>          # set the event to display reflections
    3 x: ?; _0 y7 R4 V/ ]! @! ^: Y$ d3 O
  53. #
    1 @# ]1 O7 V2 b0 H0 X
  54. #------------------------------------------------------------------------------#5 k2 `$ l3 Y) t# o: m
  55. #  EXAMPLE:
    ' T/ s" E$ z  C! |7 m# [6 `; O
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event* D% \! M, T5 h: f$ D) ]$ k
  57. #------------------------------------------------------------------------------#  T4 x2 r6 a  A' B1 b; P: O! o

  58. 2 {% U2 U6 }# ~- k9 L2 M/ y

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-6-4 15:44

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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