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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
; c  D6 Z  \  a6 k+ a
这个代码怎么用啊,有大神知道吗。我从国外找的。
. a9 u! k7 u& T7 P2 E* K) whttp://galvs-scripts.com/2013/02/21/character-effects/1 w3 F8 t2 g+ J; e
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    % Q- R' \4 `5 R. e- z: y
  2. #  Galv's Character Effects
    - A. O7 b7 c+ b( l- l5 d
  3. #------------------------------------------------------------------------------#. K( w9 {2 f! u" a* @( e/ h
  4. #  For: RPGMAKER VX ACE! r% Y: y8 B0 B
  5. #  Version 2.1" ?7 v4 V+ D" u5 _3 [+ U
  6. #------------------------------------------------------------------------------## ~4 \$ i3 E; H6 @9 i. Z
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    1 W7 V3 {5 l* C9 j
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects" _0 }, i, D9 c, w) s9 I
  9. #                           - Fixed shadow facing bug0 c% v* f" h& y6 ^2 d
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows1 T+ j/ Z4 q7 p% G
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows$ S- K) z2 E- Y% s, F
  12. #  2013-02-22 - Version 1.7 - bug fixes
    : k0 |2 s9 f# I; o9 {
  13. #  2013-02-22 - Version 1.6 - added icon effect
    4 W& p2 t0 v( C2 b+ i! U; K
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps, Z1 E8 G$ h& v2 ~. K  u9 L1 b
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles0 T; |/ ?) K8 @3 Q5 L
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks' l+ f7 h/ m+ [& o, t+ T) }
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)! b7 ]6 V: R# w2 T! [, q' P
  18. #  2013-02-21 - Version 1.1 - updated flicker effect+ F0 ?7 g# F" w! s$ u" n
  19. #  2013-02-21 - Version 1.0 - release
    ) E4 P: K5 u1 X$ Y: \: v
  20. #------------------------------------------------------------------------------#: q' D  C4 t$ N) Q" d) I
  21. #  This script was made to provide some additional effects for characters such
    ( h. |1 o0 M+ Z  b
  22. #  as events, followers and the player on the map.% H4 [+ }; [. Z
  23. #  Currently it includes:+ `! l$ L* B2 g) U$ H1 i
  24. #
    ' d8 T2 a" Z7 k( t
  25. #  Shadows1 {* E: R0 `, y. L. @
  26. #  Shadows that appear under player and events in a directions depending on
    3 S2 l7 b+ `6 y: z  c2 `
  27. #  a light source that you choose.6 |: C9 e( ~+ \0 m* c- a
  28. #
    ) B, K6 {7 e. K: C
  29. #  Parallax Reflect% L/ r+ n/ ~5 P" W
  30. #  Reflections that appear on the parallax layer for events and actors to be
    4 h0 v; p0 w' r' K
  31. #  used for things like reflections in the water or glass floor etc. To get% k8 O/ R9 ^6 L
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    ! F7 M/ D" y" m! g9 m
  33. #  partially transparent.
      S# `* S4 g8 ~1 e6 _# Q
  34. #
    : n& D$ R; U% v0 R2 |
  35. #  Parallax Mirrors# u2 f$ G% L1 ^
  36. #  Much like reflect but are instead actors and event are reflected in a mirror' f" L3 A0 Z( ^9 |, P; {
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    ) [6 j; y6 e8 M, ]* o
  38. #  changed so actors and events can use different charsets for their reflections
    1 k' [. h9 \  G4 a) ]0 h, q
  39. #4 v2 Y* _2 G& Q8 e
  40. #------------------------------------------------------------------------------#
    ) [9 C$ g+ E) z" B( d, b6 u5 Q$ R
  41.   
    + X( K9 z0 V* v* u9 _. M' f. j/ i
  42. ) {8 J/ X0 W: m% Q- D3 S
  43. #------------------------------------------------------------------------------#0 r$ q% S8 a0 H1 f; E4 v1 H7 O
  44. #  NEW - First event command as a COMMENT& o  y' \1 }: m( M
  45. #------------------------------------------------------------------------------#2 p! c. r( q- B. ~% y
  46. #  You can add a comment as the first event command on an event page to set if$ d8 ^  H+ j2 Y2 F/ t; s% x
  47. #  that event has an icon, shadow or reflection active. The tags to use are* B1 @7 l8 l2 C4 K( H$ |
  48. #  below, all must be on the same line in the comment.# F! `, Q7 D6 O1 r2 R. s
  49. #0 ?6 _2 i7 L3 Y& d
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    % G- t( s+ \5 E
  51. # <shadow>           # set the event to display a shadow; @; R" p& W' J( d
  52. # <reflect>          # set the event to display reflections
    ) A  b$ e- Z" n! |
  53. #& A" T6 a  K! M# l" G$ x$ I/ D* R
  54. #------------------------------------------------------------------------------#9 w; Q' C, |! N, P/ g2 F( b
  55. #  EXAMPLE:5 {5 B& \) w$ x; M
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event; M+ b6 O5 _. U/ @* \, o! C
  57. #------------------------------------------------------------------------------#
    # v2 G2 A% d4 Y9 i: P& b- \* Q
  58. & ]* c/ J. g+ u
  59. 9 g1 o% ]) k8 D( C! e; D
  60. #------------------------------------------------------------------------------## r  F9 y% A3 O- ?2 `! m
  61. #  SCRIPT CALLS:# B/ m" q# M8 b1 i* G! u& o5 M
  62. #------------------------------------------------------------------------------#
    # G2 _' B, Q0 Z1 n6 [" |
  63. #
    9 O* W# X; F1 Q7 g4 V# }1 q
  64. #  char_effects(x,x,x,status)
    ! ~1 f  B* H) x$ A2 i/ W
  65. #
    1 I/ G+ J" [: K
  66. #------------------------------------------------------------------------------#
    3 j7 w, Q$ Z6 q7 k
  67. #  # each effect can be true or false to enable/disable them during the game.
    ! h( T$ y" T6 A" c0 h
  68. #  # you can change multiples of effects at once, x being the effect number
    % A0 r7 n1 J/ }3 D2 O% ]5 S
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons) T6 f4 R4 r' o- O/ T% v8 k
  70. #------------------------------------------------------------------------------#: V1 a+ z4 P+ S* i
  71. #  EXAMPLES:
    5 i3 {* H+ W1 N' V
  72. #  char_effects(0,true)              # turn reflections on) |% N3 ^. _/ m9 h& w; F
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    4 p# o8 V9 X% x& b
  74. #  char_effects(1,3,false)           # turn shadows and icons off3 I  o& d5 m9 k2 ^
  75. #------------------------------------------------------------------------------#" Y) V4 j5 ?6 Z( o
  76. #( d" m8 ~: W1 h
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset# X) l& \0 N! V$ u
  78. #" r2 ]0 a. t9 l  P
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    * X- o! ~% U. t: e1 K
  80. ## e6 {* U0 L  g. ~1 g
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    # E6 |0 }+ v! j: v6 j
  82. #
    ( ^4 v" C! c5 o( i/ P! @
  83. #------------------------------------------------------------------------------#
    " L4 w) }# I9 a: D, q- F1 G
  84. #  EXAMPLES:" Q# v. w+ A4 U9 v- S
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite) F4 c+ R$ Q. b) b" R
  86. #                                    # in position 2 of "Actor2" charset.* u5 V+ e+ S$ u( J5 C0 b
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of6 {  W9 v0 L8 ]% x' `0 u. [
  88. #                                    # "Actor4" charset.
    + o  r# u5 u0 P( A
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    2 m0 J$ G1 C9 M# _
  90. #                                    # "Vehicle" charset.+ ?1 V4 n9 \4 t% ?
  91. #------------------------------------------------------------------------------## {' K7 J; p' `% N
  92.   
    ) Z5 d1 Z# r1 P( {. B/ C
  93. #------------------------------------------------------------------------------#5 l1 I- t' U6 E: `
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS1 {5 W# E# c- ~4 h! h
  95. #------------------------------------------------------------------------------#
      e2 L  d" \" {9 l+ P
  96. #
    7 K3 R  r) P; \8 W) z" H$ Y, C
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off4 Z5 [7 K+ S% X: q* b
  98. #                          # use this to specify for mirror and reflect.
    0 x  a. w# }' K0 [" c" E4 B3 y
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    ! a  G+ ]8 z. ?4 j6 Z
  100. #                          # to change all events use :all: e" N: \! x% X& }' I) G. S
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make! a  F- B* \+ Y& g* P
  102. #                          # it 0 for no icon.
    , g7 {- k$ x7 y0 x
  103. #
    % T6 c$ w4 H& r& W2 d  B: R( b, m
  104. #------------------------------------------------------------------------------#) M; `# @$ W* o. u, ~, a
  105. #  EXAMPLES:8 M2 o4 L: O, i8 p  q
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON! _& v; m, p6 Y8 q
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    3 g% N" T+ M* B/ T
  108. #  reflect(:all,true)      # Turn all event reflections ON4 u" X# i1 c; V' H" T) X; Z
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear2 n7 S) h9 E2 W/ x: y1 h
  110. #. h2 B/ I: l4 D. ^
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering5 ^; v0 B/ Y1 {! E
  112. #        a map. This is a design decision to try to keep lag to a minimum. You+ L  W! _' s( C
  113. #        should use these effects sparingly and only activate them on events1 F, `( Y" |8 T
  114. #        that require them.
    4 i% [# d/ F  X3 g
  115. #------------------------------------------------------------------------------#- K5 C- m+ I" B2 t" `" |" H  f
  116.   : A1 O9 _. t1 f9 |* [
  117. #------------------------------------------------------------------------------#5 {- R" y1 @, X* b- w8 a9 m
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES1 n% u7 l2 r$ P/ g
  119. #------------------------------------------------------------------------------#
      R# k/ B. m, j- g" r
  120. #: a8 b% f% t+ M# u/ }- D. ]
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default + P4 m' c% u/ n8 e" h/ r0 d6 f
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 0 L. u0 ]0 t  G! u1 p3 ~) X
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    ' ^9 M6 O! k, v/ F
  124. #6 T- l# _4 L2 a" \+ @& B
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects) N6 z2 G: B% }
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.8 e( z7 G: I8 Z( |/ K; X
  127. #  v_icon(x,x,x,icon_id)
    ; p! J8 j4 `7 J, p
  128. #- Q+ e, S; M8 ~
  129. #------------------------------------------------------------------------------#
    4 k3 E% _) X- q% v6 F' m
  130.   # W( M4 I2 p- O; h" s. P
  131. #------------------------------------------------------------------------------#( }, {) W( e# r" A0 s
  132. #  SCRIPT CALLS for shadow options8 ]3 O  R8 x2 K4 Z7 Z' d
  133. #------------------------------------------------------------------------------#
    ' p( p. s; Z4 W. l) Z! E
  134. #
    ) T) `5 g+ x& A( p, K; P
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the ) K7 l. V9 X3 S; h$ V. T- u
  136. #                              # light source number you wish to change (for
    $ |/ a% T4 l) D+ _7 n+ w
  137. #                              # more than one). These are reset on map change.
    + p4 O; v$ G1 i4 g) v* m
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    7 O8 u8 r4 T/ `, ~4 b
  139. #                              # This will need to be in parallel process if you
      ^# F) n- L  _" F
  140. #                              # want it to be a moving light.
    / H2 X3 ?$ m8 J- G0 V% M
  141. #
    ) _3 g9 t( `# A" q' h, C$ T
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below& l9 z% E9 X2 S3 H6 v: H  D; P4 y6 M
  143. #3 @) b0 f3 F5 d8 w. U7 G0 k0 q# Z
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    / K' t7 t2 f9 p$ d0 u+ L
  145. #    # fade = amount shadow becomes more transparent the further away you are.2 V+ D2 Q" w8 g$ ~. r$ J+ P! R
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.- ~' N: y8 P; l. v( V
  147. #+ \" J$ u& B8 H& J
  148. #------------------------------------------------------------------------------#' H( l. E" Y) G
  149. #  EXAMPLE:
    8 Z* e' D0 Y( W2 j% Y- q1 K* f
  150. #  shadow_options(80,10,false)    # This is the default setting.' a3 g4 W. ~! m
  151. #------------------------------------------------------------------------------#" Y, o1 \. E8 Z* g
  152.   
    , v) f8 U- [& [+ i% P. x
  153. #------------------------------------------------------------------------------#: J7 {0 s# m: C' g4 ^
  154. #  SCRIPT CALLS for reflect options
    $ B/ h1 }; f+ f
  155. #------------------------------------------------------------------------------#
    2 H( Y! @  c3 u) }( C
  156. #1 ^, p8 l$ n1 r" |7 `/ w3 `
  157. #  reflect_options(wave_pwr) ( P9 y6 o7 j: j0 G$ i
  158. #, F* ]3 q# Q* \* o7 W- O! g
  159. #    # wave_pwr = how strong the wave movement is. 0 is off5 Z1 N5 X9 S& v0 H% a$ v0 [
  160. #
    9 w0 t( k  u* |% z4 \
  161. #------------------------------------------------------------------------------#
    / T+ z" P- c& r4 j
  162. #  EXAMPLE:
    $ I5 p8 Y) X2 x0 n$ f
  163. #  reflect_options(1) # Turn wave power to 1
    ; Q5 C% W5 Q' S, {8 g7 l
  164. #------------------------------------------------------------------------------#
    % p( Y$ m) C$ p* B2 R( F
  165.   3 a. e: v; w' @5 b8 I: A
  166.   & ^6 _" \% z0 A: h
  167. #------------------------------------------------------------------------------#
    & y8 l# a4 n) w, P5 q
  168. #  NOTETAG for ACTORS/ W4 O3 v6 p( F) i1 i" R3 K5 [
  169. #------------------------------------------------------------------------------#
    5 r% e/ S6 E% T5 u2 e+ |/ o
  170. #
    ) Y3 K3 C0 Y/ @& u7 n7 S- M
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!): a; D) M, v' S1 L2 F7 ]" m
  172. #
    . `. f4 {2 e# W  |. F' m
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections+ g9 Y8 z+ s) |9 r
  174. #                                  # and use the character in position 'pos'
    $ `" [- W; M' H) K6 P, l' i
  175. #
    # y) ~6 F9 Q" v! |! S
  176. #------------------------------------------------------------------------------#. H( F; M; `0 e3 Y
  177. #  EXAMPLES:
    " T0 P* M# g0 l- l+ d( S8 P- @
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    ) i/ u3 ~2 D1 @" f8 N1 x
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset: z: X! M! g4 A2 r* z
  180. #------------------------------------------------------------------------------#9 m" l$ r( D+ N- J( b3 |3 h  R
  181.   & i( U) I0 R5 z$ r  \+ W6 s& G( ?) ]
  182.   
    * ?6 z* q. r* ~
  183. ($imported ||= {})["Galv_Character_Effects"] = true  a0 V3 G& n# q  }( o  @; K9 s+ `: k
  184. module Galv_CEffects. U( X; S& _9 t; Y
  185.   
      R  [. h: R4 P! _0 Q
  186. #------------------------------------------------------------------------------#  
    ; }9 A- t/ g2 b4 w! g1 O% i* h
  187. #  SETUP OPTIONS) r' k' q% w  x! \% H
  188. #------------------------------------------------------------------------------#0 w2 `% |" y% L1 q
  189.   
    1 |7 l% f7 F, C7 R! K. Q) p6 h
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the' s' {2 A1 p7 _5 u5 K- Y
  191.                         # region on the wall you want to make reflective (and* z6 v, h& I' S. p
  192.                         # then use tiles/mapping that make the parallax visible)
    % }" G+ v9 k0 F% U' P
  193.   
    % ^) P$ Q  L( k: c  y, s
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    ( E. |: [7 P) Z8 D) p: J' w
  195.    
    ! v3 b( e! Z& F1 N1 f
  196.   REFLECT_Z = -10       # Z level of reflections
    ( X# l/ K) w% n
  197.   SHADOW_Z = 0          # Z level of shadows# J8 H. m* H2 S! w8 D8 ?
  198.   8 w3 l9 q& u0 ?# N0 l6 X
  199. #------------------------------------------------------------------------------#  
    : t1 P' O% R/ k4 a7 g$ s: z, P
  200. #  END SETUP OPTIONS  Q) s: q3 i# g
  201. #------------------------------------------------------------------------------#) z$ S: A4 {7 B
  202. end, l" W: t6 N' P* J9 {  A( n* ?
  203.   
    1 N8 o% U: Q% W7 |
  204.   / h/ K. T, O/ S- i+ ~( ]7 f
  205. % m8 d) H5 M  i; P
  206. * `2 m+ M% n5 g3 g7 h) m  U: G
  207. class Game_Map7 V7 I( v, S1 M  k) f) u
  208.   def do_icons(refresh = true)  f5 t" J" y, x0 W) B. X
  209.     @events.values.each { |e|
    & P" N5 |: J* S# {7 v( Y( g
  210.       next if !e.list' H9 H( F1 @+ u; F( R
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/" _) c" x1 J# H- y( T' z1 K0 R& P0 q
  212.         e.icon = $1.to_i
    : Y' ^" g8 m0 R
  213.         e.icon_offset = [$2.to_i,$3.to_i]3 @% M5 Z$ V* h" y7 ]# T
  214.       else
    0 i7 v# X  z* j: x( ~
  215.         e.icon = 0) x1 q5 R4 e3 X( g
  216.         e.icon_offset = [0,0]) C  \/ E7 T* `; G6 V: d1 g
  217.       end! G& Y8 K# j1 s" Y/ o" y2 T: @- S7 I/ q
  218.     }$ L* r4 O* o1 i) [/ L7 b
  219.     SceneManager.scene.spriteset.refresh_effects if refresh4 X4 P- u) H2 a; l- ~: Y0 ?
  220.   end1 E' s, \0 Y9 Z! z; U
  221.    
    7 X: H1 D4 N5 J( G
  222.    / R) {( n8 c% J
  223.   def do_shadows(refresh = true)' ^' A4 `$ t) p6 D
  224.     @events.values.each { |e|9 d' {  N& k3 w* w
  225.       next if !e.list9 |# B1 `" M+ [
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    " v* }$ c. h  q2 ]: i( z  }* y
  227.         e.shadow = true
    5 P  h4 Z' [- i8 k# V6 U- p% D) @
  228.       else
    1 A2 R' Y* `! e, B
  229.         e.shadow = false
    / e2 `, f- Q9 g
  230.       end
    9 J/ P+ ~9 f- w
  231.     }" ~! Z5 Q& _! ?, v
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    : Z# z0 v  E7 F  G! b0 O
  233.   end" H, v2 a1 H# a! Y
  234.    % r1 `# N0 t1 Z* S
  235.   def do_reflects(refresh = true)
    ) B9 J6 Z9 m& u
  236.     @events.values.each { |e|3 B  D' f; T3 n, M2 R* B+ Z
  237.       next if !e.list/ X* m( [# P0 M3 n( R
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/5 @; S; O: z) R6 [( j
  239.         e.reflect = true
    $ b) B6 ^% j3 ^1 ~0 `
  240.       else7 n/ r6 A/ `# S; ~- j
  241.         e.reflect = false7 h7 R3 s) K3 U  L- |0 J# u$ H1 Y
  242.       end5 N7 ]: r- S) w( p2 Q2 o
  243.     }2 M0 h" E5 t- v) s+ G
  244.     SceneManager.scene.spriteset.refresh_effects if refresh5 F3 v$ E! I( `# e# F6 `
  245.   end, T% J4 k/ T5 s. n9 @
  246.    , W" {- m2 }' r2 C+ [
  247.   def do_all_chareffects
    ; r0 z/ z* p$ N2 A2 F# ?
  248.     do_icons(false)# Y) v  L8 t) z% E* D% r
  249.     do_shadows(false)
    ' G8 Q6 k. p( b0 ^
  250.     do_reflects(false)4 F, ?4 }; u( b6 i
  251.   end
    . i' j+ U0 G5 J
  252.    
    # [3 R1 _3 R6 y
  253. end # Game_Map
    ) Q. K( m# H( v9 x! C

  254. / l8 o* E* i  Q7 H% J

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-8-24 12:15

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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