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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

  `. J- |, c8 V2 T+ [这个代码怎么用啊,有大神知道吗。我从国外找的。
3 L5 n' j7 z9 I* phttp://galvs-scripts.com/2013/02/21/character-effects/- R2 T0 `& d3 {2 B
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    * ^  Q9 X7 A/ z, G' C; @
  2. #  Galv's Character Effects+ p$ v1 n) z% V  J* }8 _
  3. #------------------------------------------------------------------------------#
    ; N  A* n4 x5 [* R$ e, J0 @7 Q
  4. #  For: RPGMAKER VX ACE& n; ?$ h1 m" A0 @
  5. #  Version 2.1, A; v. g+ o" M
  6. #------------------------------------------------------------------------------#
    2 b) \; H' }7 p! T& Q" L' q7 ?
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows" }; u- e3 M% o  A: u, t+ u; l
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    5 L) Z: b2 d( y, u% [! \6 A
  9. #                           - Fixed shadow facing bug
    # F3 d& a$ ?% N
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    # G4 Z" {3 M! Z5 T
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    " D3 n" W, P* E3 Z  B" A' Y
  12. #  2013-02-22 - Version 1.7 - bug fixes
    5 F0 e5 H& o4 K2 d: n0 O! W6 v
  13. #  2013-02-22 - Version 1.6 - added icon effect
    2 L/ `1 s' @- z' F- t7 |
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps# i1 a  u! I: M1 [9 j0 {' z
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    0 H+ }, T  a% p1 `: ]
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    % j& v8 T$ g" q+ g' K
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    + u# q$ E  L: {# A) B1 a' I
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    , O! Z) g/ k( ?# B: s
  19. #  2013-02-21 - Version 1.0 - release
    3 k, {. C3 y: k$ c% R! ]
  20. #------------------------------------------------------------------------------## a% B- `* D+ j1 A# f
  21. #  This script was made to provide some additional effects for characters such
    2 ~% X& K3 F" V
  22. #  as events, followers and the player on the map.
    , _8 ?& A, ~: T$ ]
  23. #  Currently it includes:
    9 U8 e% D2 m  [" @, N5 ^
  24. #. x0 h# t" ?: Y
  25. #  Shadows" x& O4 S, q* e- H* D: u  N; e
  26. #  Shadows that appear under player and events in a directions depending on
    4 X# r- B5 o+ Z- v" r. M2 i" c
  27. #  a light source that you choose.
    : ^0 n3 V' c1 `; t
  28. ## t, f( m  f5 ]
  29. #  Parallax Reflect
    . ~/ H; B6 U- J
  30. #  Reflections that appear on the parallax layer for events and actors to be
    , W" n, m0 Y# K" f7 R/ L. _9 B8 c
  31. #  used for things like reflections in the water or glass floor etc. To get
    + R6 J5 }' e/ O3 y* _
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    ; `+ N4 A* t2 M  ~9 i# V7 [4 L6 ^
  33. #  partially transparent.$ I6 t3 T! c/ r6 l# \: _8 v$ X* t
  34. #3 D/ [0 V  D' R# s: o
  35. #  Parallax Mirrors" U5 l' \% J9 W# n9 ]
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    . z3 a" X7 b" q, C+ U% c: \% v5 q- \6 r
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    + ^" \0 ^& ~" n" f$ ?( [
  38. #  changed so actors and events can use different charsets for their reflections* O- l& y: T+ W) W" O* C2 Q+ a
  39. #2 I4 d; A! ]* ^
  40. #------------------------------------------------------------------------------#
    8 v; C! G7 q: a3 L) S! C
  41.   , b8 t' v- E6 c( D+ T

  42. & N* e" S* R7 L7 ~. k2 g
  43. #------------------------------------------------------------------------------#9 D! k+ m: A& u& V/ ]( K/ s9 \" |7 c
  44. #  NEW - First event command as a COMMENT
    4 m$ p6 k0 r1 p2 q
  45. #------------------------------------------------------------------------------#
      m4 l. W  N7 ~+ `
  46. #  You can add a comment as the first event command on an event page to set if- `; _1 s$ E7 X" `6 g" c
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    5 v9 Y# C3 t+ [& u# _
  48. #  below, all must be on the same line in the comment.
    + @+ W0 d, O4 ]8 `
  49. ## l9 b7 Z4 F* R- R& U" D
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)# G+ s2 i4 |1 p
  51. # <shadow>           # set the event to display a shadow
    0 X! G1 }" u6 n2 ?. K
  52. # <reflect>          # set the event to display reflections7 R2 [. J# P* J' u) o
  53. #
    5 a: @+ g0 A7 v( A% W; `! @
  54. #------------------------------------------------------------------------------#
    8 z9 L4 O( `9 u9 _& ?
  55. #  EXAMPLE:% t' O4 o; ~: U+ O" D2 r
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event* E/ v5 G6 U) _; |3 A
  57. #------------------------------------------------------------------------------#; C, C" p; Z4 w% l' F& s1 M4 d6 Q6 n
  58. 5 A& e3 h" p) v+ |* {
  59. 1 O8 c- e( F7 ~0 i$ _: x
  60. #------------------------------------------------------------------------------#4 p5 i* h, {; ^& X0 Y
  61. #  SCRIPT CALLS:& b  C/ M0 N3 o) n
  62. #------------------------------------------------------------------------------#- R/ W1 r* S* b$ b% n
  63. #
    ) g, K  v; s# w  R5 P0 V1 ~
  64. #  char_effects(x,x,x,status)
    ! v3 _7 ~! Q2 \7 o* [  C9 y
  65. #
    1 v! T4 A# D' a4 y
  66. #------------------------------------------------------------------------------#' o# n% a$ z. n# o. V4 D$ f
  67. #  # each effect can be true or false to enable/disable them during the game.
    % F1 j  T) O+ c, c. x
  68. #  # you can change multiples of effects at once, x being the effect number# z1 n6 e  f+ g6 X; ?
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    6 Q8 p8 [$ u$ L/ N& h- o
  70. #------------------------------------------------------------------------------#
    # G7 R1 L2 d6 b, [8 s
  71. #  EXAMPLES:
    9 O( N( l2 ]/ p& S' ^
  72. #  char_effects(0,true)              # turn reflections on9 X9 A, K0 T, o: A- B
  73. #  char_effects(0,2,true)            # turn reflections and mirror on2 Y) v& J+ J6 v; n! G
  74. #  char_effects(1,3,false)           # turn shadows and icons off4 ^9 W: }% u2 I* ~3 T
  75. #------------------------------------------------------------------------------#) T: V: i8 O! @5 W- g
  76. #
    0 B. E0 d, B6 S
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset( }- T; |. k6 l- k5 C( R+ ~
  78. #
    ! B' t& y3 c* k2 f( n; w  e
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset2 `3 e4 q4 k1 b6 R' C$ b
  80. #. D5 \8 |3 ~1 d8 ?" _9 h4 Z" l- q
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    - c% @- [, t# T! a0 \  b" p' P
  82. #
      Q6 l4 c3 A/ w0 O1 `" l( ?
  83. #------------------------------------------------------------------------------#9 G3 [' Y* d+ @8 a2 Y: F( N& o7 d/ g
  84. #  EXAMPLES:, j: x! ]5 e: P+ w9 z: i
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite) V/ o- q% U3 H9 j1 O7 ~
  86. #                                    # in position 2 of "Actor2" charset.
    : K1 s* s9 o6 z, U- z
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    " B0 Q: q4 s( P7 ?& z, U: W
  88. #                                    # "Actor4" charset.( y" l8 d! R* Z2 ^& }# Q
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    ' r$ k" V" d9 f. z+ z
  90. #                                    # "Vehicle" charset.
    3 S  p7 h/ E3 }/ w0 w% D
  91. #------------------------------------------------------------------------------#$ `* A' E# R$ O  T4 @6 C1 D
  92.   
    $ d$ X. ~5 B) D
  93. #------------------------------------------------------------------------------#" D$ O- m* a/ Z3 M
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS9 J* {# N2 C$ O' R* o" ~: @
  95. #------------------------------------------------------------------------------#0 R3 k6 t. W9 z, ~7 N
  96. #) ^9 B5 r. g  p5 A: w8 N7 h
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    6 y& t9 e8 b' R$ z, y4 h" h
  98. #                          # use this to specify for mirror and reflect.
    4 Q$ L: v2 T! F1 A) ?6 l# y' x1 y
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    ) x% F& x# Y7 E
  100. #                          # to change all events use :all* F& ?6 \: x' `3 Z5 a
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    % J3 D, @$ h7 w0 _
  102. #                          # it 0 for no icon.
    & ]+ b! I& j  N
  103. #
    5 ~2 }" _2 P* V; K% @
  104. #------------------------------------------------------------------------------#
    7 Q& f9 `/ ^* I' H8 S
  105. #  EXAMPLES:
    4 N# i+ o% f3 M5 @! `
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON; p' c6 v( h' ~: c4 ^- z9 a
  107. #  shadow(1,false)         # Turn event 1 shadow OFF) b0 R, K! |3 \. C1 W/ Z7 f  Y
  108. #  reflect(:all,true)      # Turn all event reflections ON
    ; d8 X: ~4 O5 @  V9 t
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear6 o* V$ K: j  ]9 L6 e5 h+ A# ?
  110. #
    ! O+ t# u% A' K2 h0 Y7 X
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering# }. h3 z5 f. {5 H
  112. #        a map. This is a design decision to try to keep lag to a minimum. You. g: f" Z6 o. s0 B
  113. #        should use these effects sparingly and only activate them on events
    & C: `( V- t- d% C
  114. #        that require them.
    / r) O& V# z) a2 n% r) ~& p' u( F, C
  115. #------------------------------------------------------------------------------#
    - |: z; Q8 O8 b+ v- A& [
  116.   
    ( n9 E3 d2 @$ c9 H4 o8 X
  117. #------------------------------------------------------------------------------#' S5 k( Q* G( D. V- L( j
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES; F( X) g' L: ]1 P, |/ b
  119. #------------------------------------------------------------------------------#
    / n, L* X  ^. Z! M9 p0 b0 N
  120. #
    3 w# p8 ~8 X; v* L
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 7 {7 ?7 n( d2 V2 [8 D2 s* k# t
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    + |4 K6 l, k5 t
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.1 Z) ]; @: U) b' C& T! w
  124. #
    - E, g  L1 _: N. E. I+ H6 W" w
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    9 |0 p4 x' H& I* l: k
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    ; O( C8 C# h5 k3 ~' N7 B; s
  127. #  v_icon(x,x,x,icon_id)
    : A7 f; e% T: Y5 H: f
  128. #4 n1 k3 F& Y( v$ K5 X
  129. #------------------------------------------------------------------------------#
    3 D5 {- l; U" m; T
  130.   
    6 C6 {0 K) d" Y2 d7 c9 p
  131. #------------------------------------------------------------------------------#- c+ o& K8 \% ^; q7 I& i1 N& ]
  132. #  SCRIPT CALLS for shadow options. r" u# m  d* {
  133. #------------------------------------------------------------------------------#
    , A0 }; Q2 j% `, @8 G0 y
  134. #
    8 v* \. O8 e! q9 A* J2 G* N2 h- B# v
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    2 j3 d& |- E7 `0 q, @
  136. #                              # light source number you wish to change (for
    1 W% T7 Q% A# Q) V0 n/ K& L/ ~
  137. #                              # more than one). These are reset on map change., H( |6 A$ F2 f9 S; c+ m; Y; B
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.2 r0 ]( w5 ^( i$ B# X* a$ L. \
  139. #                              # This will need to be in parallel process if you
    / @. I: q5 @' j, f
  140. #                              # want it to be a moving light.
    # t8 l$ b4 \( [- q2 o
  141. #
    5 @# a" \3 v  M4 ^% F# k% y
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    + d8 h  R/ R9 Q/ J# ^
  143. #! Z1 ?+ Y# Y5 n- K+ |
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    & x; ^! |6 K" ?: {: o- \: R
  145. #    # fade = amount shadow becomes more transparent the further away you are.5 |  E) f2 U+ C5 f* a( A# p  t
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.' q1 H/ j1 W9 s0 @6 O
  147. #
    8 E! H) B9 _2 T9 A3 ]2 Z. d, l
  148. #------------------------------------------------------------------------------#9 z/ c% l3 I( g
  149. #  EXAMPLE:
    6 v) F5 |' w# \. g8 D: J% ~* c' W
  150. #  shadow_options(80,10,false)    # This is the default setting.
    ) \& m- X7 u5 k% A1 g+ Z7 X1 |2 e; r3 U
  151. #------------------------------------------------------------------------------#1 H5 D, ~& {& A6 q5 |
  152.   
    9 m2 P3 d& q* Y& R
  153. #------------------------------------------------------------------------------## R/ b4 O; q7 ]/ j/ \/ i
  154. #  SCRIPT CALLS for reflect options( V: h* j3 L9 T$ B, V' ~. d' _
  155. #------------------------------------------------------------------------------#
    & W; ]: K9 q8 V6 \7 f3 g
  156. #
      z! a3 C8 _5 O/ X% v2 V
  157. #  reflect_options(wave_pwr) " I- m) W" }  W/ H* Z. U
  158. #
    0 x0 y% z8 R$ _9 U1 i: X
  159. #    # wave_pwr = how strong the wave movement is. 0 is off$ x) u2 ^, X9 u+ K
  160. #
    / `& Y& ]0 ~, r
  161. #------------------------------------------------------------------------------#2 U* _5 \9 ]. t3 j
  162. #  EXAMPLE:7 p- {1 e7 ]" A! @) C
  163. #  reflect_options(1) # Turn wave power to 1
    $ s2 E  N7 J# @$ z0 @/ R" d6 c: r# U2 G
  164. #------------------------------------------------------------------------------#. o: i* C: S5 \, T1 }. {. w
  165.   9 E# N' j1 K" a) e7 |/ S0 d7 c
  166.   ! D4 z2 L7 L6 ^# u2 ?- d
  167. #------------------------------------------------------------------------------#
    ; C3 \; Y5 s* L) f* W
  168. #  NOTETAG for ACTORS
    ' U0 q& x' u4 P( Y0 v0 d
  169. #------------------------------------------------------------------------------#
    % V+ }9 R2 u+ k! n& G
  170. #; H0 }$ f9 [, J, D( E, p9 }
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)2 ]6 f0 Q' R. u- V  W. E
  172. #
    8 }% o3 H3 l; ~) D" V0 z
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    ' t( ^  O; [7 y) f& @" a8 c! y
  174. #                                  # and use the character in position 'pos'; \; ]# ~% e$ W1 n) s6 Y
  175. #( m" k  o, o) K4 C; B
  176. #------------------------------------------------------------------------------#. x6 q3 p. V' r- y1 O! O- j
  177. #  EXAMPLES:
      F  _: x( p9 }: C) D
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    * j8 W  _7 H" Q; N
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    7 V$ E4 m/ e9 E1 b) e
  180. #------------------------------------------------------------------------------#5 O+ m4 c* o. e; y5 F3 J1 U0 O! Q( _3 e
  181.   ) o% C% z- h9 a  `; y, s' w
  182.   ' u% T1 X' v0 ?# H4 G1 p
  183. ($imported ||= {})["Galv_Character_Effects"] = true( C) m% g* O5 |+ D
  184. module Galv_CEffects
    1 I4 ]. y/ X- ~+ X/ {
  185.   
    ) ]& |3 L" `! s3 O6 f* ]! i4 e
  186. #------------------------------------------------------------------------------#  
    # _& M% ?" W3 a( h
  187. #  SETUP OPTIONS+ h8 N6 V! d2 O. b2 b  r) ~( K
  188. #------------------------------------------------------------------------------#
    9 G6 B* J; A, G' Z( y
  189.   $ J2 z1 S" H/ G& E
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    8 @' n% v1 c' h) T: c
  191.                         # region on the wall you want to make reflective (and
    ; o% K0 G& V" k# v
  192.                         # then use tiles/mapping that make the parallax visible)6 o. B+ d/ r" v2 {  t7 |
  193.   - p4 g* z4 D  m! G( w; G1 k: P
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters& M& u  K: U, _1 f9 ^+ n
  195.    
    / r8 n+ b7 T/ k0 e' B
  196.   REFLECT_Z = -10       # Z level of reflections2 [1 `, [1 F/ H5 Z) S  ]
  197.   SHADOW_Z = 0          # Z level of shadows" Y2 t, u2 x* ~
  198.   . {* V# [# k" ]+ C6 o* Y  z- ]
  199. #------------------------------------------------------------------------------#  * D9 @( y: B' P' p0 {; g) y' g# {
  200. #  END SETUP OPTIONS
    9 Z. t; }! C0 w# H
  201. #------------------------------------------------------------------------------#
    8 y) @7 ?) z" ~0 ]; p$ o8 l# h, c
  202. end! z# C8 ^+ s0 }( M
  203.   
    & `- W8 R/ K% H6 {& x0 ?
  204.   
    & f. Y7 @4 B4 z

  205. * H' w" H3 H- [' D3 |7 N% b. m
  206. ! S( H" U7 Q9 @0 W# `7 [/ R% L
  207. class Game_Map
    0 k, C% g6 _+ m& V* X
  208.   def do_icons(refresh = true)5 s+ q7 H. ?3 ^
  209.     @events.values.each { |e|
    ( D0 ]  C2 Y$ }# W% v# _. U
  210.       next if !e.list
    , X; |) A3 X8 B2 G: c: o  N
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    2 g% n4 O: L5 L1 I! R
  212.         e.icon = $1.to_i0 W# t# `1 m9 [0 {
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    ) E6 b- U4 J  b% p" l
  214.       else( j5 n/ l8 w) o" Z# i* |" n3 n! C! p; ^
  215.         e.icon = 0
    7 n  m- r9 i( M2 J+ H% m; x
  216.         e.icon_offset = [0,0]
    4 U4 h0 k) m; W
  217.       end
    / s' W& M( {; D/ }
  218.     }: P( a* V( C5 V  H
  219.     SceneManager.scene.spriteset.refresh_effects if refresh) O' G4 w0 B/ G2 E
  220.   end
    8 g" D# l/ ^  G/ D2 B
  221.    3 Q- G- h$ x) z7 E2 A* Y
  222.    
    4 e$ N1 o, r, [7 c1 s! A
  223.   def do_shadows(refresh = true)
    + h. `+ `6 K: K/ U
  224.     @events.values.each { |e|8 f% i3 j) _7 Z( S+ p' s" L2 v
  225.       next if !e.list* f( C) L) e" X) q( X
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/5 \4 ]+ w3 z' V4 y* l2 T
  227.         e.shadow = true+ Q0 h$ I1 U8 A* j0 c
  228.       else
    # G6 z5 y& R# {6 U/ J
  229.         e.shadow = false
    $ W2 j) h3 G1 ^* z& A' }
  230.       end
      ~) j3 [0 V% [# l: h
  231.     }
    % ]7 T1 n# Z" ^
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    & ^; L  \  E( H" @, y% B0 A$ s( D: w: t
  233.   end
    0 p" k4 H5 A' p9 D! l" X
  234.    
    2 |4 b9 Q  F5 Z, K
  235.   def do_reflects(refresh = true)
      G1 c. X& s& D) [/ t8 o  T
  236.     @events.values.each { |e|* N) ~( x. n5 T7 U6 L& Z' @
  237.       next if !e.list9 M. q9 E) c) B& M& S
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/! n  ~% q6 p; n9 r4 n. u5 e1 E
  239.         e.reflect = true
    / I7 X' W* O) I) Q8 }  F
  240.       else5 B. W0 X  E. }. Y
  241.         e.reflect = false/ R" }1 F& p- q7 ~) g+ e* @. @0 n: ]
  242.       end
    + X, A, j# r8 C
  243.     }
    & x5 H* q: P' T4 @6 D0 a
  244.     SceneManager.scene.spriteset.refresh_effects if refresh1 b7 L! f8 u: n+ V8 i
  245.   end
    % S4 f" F' w, a1 C; C
  246.    
    & E5 G0 K' G; s9 _7 P2 x
  247.   def do_all_chareffects5 A6 j6 m, a! e5 h( f, n. W( }
  248.     do_icons(false)0 u* q; J5 a, x3 A
  249.     do_shadows(false)6 n9 p- C, l  ^  ?# n+ M
  250.     do_reflects(false)2 n2 C5 A2 S4 k* c( s% v
  251.   end
    + J4 K( Z- i- B( G6 V
  252.    
    ) q8 S6 ?( w" e) h/ v6 D
  253. end # Game_Map
    ! O5 n; q  p  u# P$ }8 J" X! L

  254. - x1 E' t  B* \' a( {. b. t5 ~# E; r
  255. 5 o* ~, u# @! j4 c$ c

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-8-24 17:01

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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