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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

* @$ K$ i+ n3 I0 Z7 P2 `6 e- B这个代码怎么用啊,有大神知道吗。我从国外找的。9 _' L* g  R9 R1 j3 V* P" Q
http://galvs-scripts.com/2013/02/21/character-effects/# A6 K8 y0 b. b/ B5 m7 Q1 M
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    1 X5 O) |7 U% W6 b3 S4 h
  2. #  Galv's Character Effects
    * |' s2 z8 T5 s9 Z
  3. #------------------------------------------------------------------------------#
    3 T9 V& T3 Y$ v, b
  4. #  For: RPGMAKER VX ACE
    ; c# u; }3 q7 q, ~+ ]! p
  5. #  Version 2.1. i3 ?0 r+ [4 [, K) u% |
  6. #------------------------------------------------------------------------------#
    # U( d% O5 o" x- ^2 c# ^, {8 e
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    1 z6 B+ @: E% p. ?, @
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    2 O& O2 y7 O& e' W
  9. #                           - Fixed shadow facing bug
    ' K, X, T: \0 X$ c- D- }6 n
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows8 C) C6 G4 P% Y5 ~" @
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    " k7 e. B! G) a/ S. J" g
  12. #  2013-02-22 - Version 1.7 - bug fixes
    9 c$ k- b# v  n# f& d: V' M8 O# Q
  13. #  2013-02-22 - Version 1.6 - added icon effect
    % f+ M$ e. B) V% K
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    9 |+ W5 `% ?* K& \1 R, d% Y/ {
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles, C7 G# ^0 ^4 _, J+ e# @$ j1 E/ Z* V* A
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    9 E3 b1 d: S0 t  r
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)+ C/ \- h) d; J: @2 M: `4 T
  18. #  2013-02-21 - Version 1.1 - updated flicker effect6 V% i: e5 v3 U9 V
  19. #  2013-02-21 - Version 1.0 - release1 ?, v3 ?  P: v5 H4 z: Y
  20. #------------------------------------------------------------------------------#& o7 H3 y8 f4 Z6 S( s+ M
  21. #  This script was made to provide some additional effects for characters such& t! C5 M& s3 ?& Q& f. F
  22. #  as events, followers and the player on the map., v' M9 ?. l+ j3 `; }
  23. #  Currently it includes:
    ! z& R0 W( Q/ a5 Y3 f
  24. #$ K8 }0 p7 Q( |: h
  25. #  Shadows
    $ B% F' v' A( z3 {9 c0 x5 R
  26. #  Shadows that appear under player and events in a directions depending on
    8 b& _% e4 P2 S- B3 q' M
  27. #  a light source that you choose.
    , H0 R: s  n- O! O7 Y
  28. #  \: h/ c1 N' ?, `
  29. #  Parallax Reflect
    1 K. }8 i6 r; R/ [
  30. #  Reflections that appear on the parallax layer for events and actors to be
    4 k. d# A; v% x8 ^* e* g# Y
  31. #  used for things like reflections in the water or glass floor etc. To get
    $ H; z1 D0 W& f# y( e% C! q
  32. #  effects like the demo, you need to edit the charset graphic to make the water$ G4 C* Z7 F. k1 L
  33. #  partially transparent.6 O9 x, l/ [3 Q
  34. #1 X: v5 j8 z- h4 d) j' G. h; u
  35. #  Parallax Mirrors
    * R" i2 E$ T* m) N8 }# S& s
  36. #  Much like reflect but are instead actors and event are reflected in a mirror9 {0 J/ E/ r" q1 p7 K& a3 T
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    ' R1 p. E, U6 r1 u
  38. #  changed so actors and events can use different charsets for their reflections7 Q: s0 |6 \+ ~; U+ ~
  39. #
    8 W. z4 Z7 Z6 R
  40. #------------------------------------------------------------------------------#& i3 @2 e2 U1 F
  41.   
    ! w. i& x2 c/ M' V9 L. z
  42. 2 R# }" K- C2 ^+ y$ ~
  43. #------------------------------------------------------------------------------#) F7 f" H1 w# q9 j
  44. #  NEW - First event command as a COMMENT" `) N: t. |5 \6 r+ @# x
  45. #------------------------------------------------------------------------------#7 C1 J4 c3 ?+ R% d0 S
  46. #  You can add a comment as the first event command on an event page to set if6 p9 n7 r0 Z9 D7 v4 o7 v
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    / I4 Q2 n, f6 |: J+ x
  48. #  below, all must be on the same line in the comment.4 s* ?$ w/ w  v  [+ h- U
  49. #2 q9 _$ I. s# X
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)+ I/ j7 y- f% X. q% l
  51. # <shadow>           # set the event to display a shadow2 H$ o3 f" M0 q9 |
  52. # <reflect>          # set the event to display reflections+ }( g# f( u$ Y$ [2 |+ \
  53. #8 Q+ _' g& w1 H" H4 N# _
  54. #------------------------------------------------------------------------------#
      ^5 k. k* }* B
  55. #  EXAMPLE:
    ; ]7 D  U9 X: j9 l
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    9 @1 u& a) c0 {( E  `& Q
  57. #------------------------------------------------------------------------------#0 Q% }+ z# F9 [" s& D9 x. o$ }
  58. % [& f* @! |( y. S& o8 m

  59. 7 a9 S1 T. c) R7 i1 A$ A/ Q2 J
  60. #------------------------------------------------------------------------------#
    " a) j4 d& r2 Y3 \6 \2 M4 e! h
  61. #  SCRIPT CALLS:
    9 e7 r- T  N& f
  62. #------------------------------------------------------------------------------#
    & c! t" `4 w& }4 W: W- i, q
  63. #
    9 p; `+ F6 M$ B" a/ l. h# E1 G  U
  64. #  char_effects(x,x,x,status)
    ' `+ @; V& X& a' T
  65. #2 ]+ `( Z. ?0 i, V6 H
  66. #------------------------------------------------------------------------------#
    $ ~7 K( P, D/ w& E( W2 q0 v6 \" Y
  67. #  # each effect can be true or false to enable/disable them during the game.$ P# i4 `! y' D
  68. #  # you can change multiples of effects at once, x being the effect number/ ?* N: H; g3 _
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons" a9 [3 D* T5 [+ _; g
  70. #------------------------------------------------------------------------------#% H5 z6 w6 |# X' @
  71. #  EXAMPLES:. |; M9 k) d3 F; s3 p/ R) s
  72. #  char_effects(0,true)              # turn reflections on
    6 O+ `' v7 F7 u* x5 X
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    7 k# Y4 |0 m: v
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    9 c0 T+ F- [/ L8 S& p8 Z+ E4 s  l% T
  75. #------------------------------------------------------------------------------#  C) y. j+ M* J# F
  76. #- ?% D2 I6 d1 e
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    + A, j% z& r1 U+ L7 q$ p! ~
  78. #& x% _; Y8 J- ^/ [6 L+ [
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset( Q4 E2 g# @# g; [2 s; s* e1 N
  80. #
    - l* e( M' K! }
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    : `$ ~  Y' b6 Y' i; G" I( ?
  82. #1 N! V$ b5 L4 T0 `
  83. #------------------------------------------------------------------------------#5 x+ m5 T- w7 e
  84. #  EXAMPLES:
    0 M' r7 i0 i7 r/ b
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    ' S3 Y. }4 e' I1 p& Q, R
  86. #                                    # in position 2 of "Actor2" charset., F- a) q- B. B+ t) ^
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    . l* b% {8 @1 _6 U. h) t5 c+ Y
  88. #                                    # "Actor4" charset.( S0 \7 V" c4 ]+ @" A6 Q
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of" t3 T0 v5 j+ k3 E0 L
  90. #                                    # "Vehicle" charset.
      A7 l: }0 d8 z% V
  91. #------------------------------------------------------------------------------#
    # @( j# u+ k( s" l( f; Q2 @* g- b
  92.   
    : F+ [3 X1 V0 _4 u& W
  93. #------------------------------------------------------------------------------#, t$ _7 D2 h: s+ S$ ]
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS& H5 r: f+ M4 g2 M. G
  95. #------------------------------------------------------------------------------#
    8 y: D& [5 N! R
  96. #
    2 M& G$ V& Z" D  Q, O1 w
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off: D8 f4 ~% E8 s, e7 H
  98. #                          # use this to specify for mirror and reflect.
    : {7 E$ R9 H% h7 g+ W
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change/ [- O* U( [8 z1 [- s
  100. #                          # to change all events use :all2 [3 x( j( }$ e1 E0 w6 g  ~  N6 O
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    8 C5 F7 E" b! z8 j* z$ G- S3 o
  102. #                          # it 0 for no icon.
    " D/ C' M' P- J' n# _
  103. #
    0 F% R/ [3 O6 o- |5 M( ^
  104. #------------------------------------------------------------------------------#
    ; X, b& d. a8 h5 L2 p
  105. #  EXAMPLES:' r& ]) w0 o1 a3 Q$ Z
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON, V' N8 x" e$ c; V+ v0 |
  107. #  shadow(1,false)         # Turn event 1 shadow OFF0 D$ K" p5 Z0 L" F0 T
  108. #  reflect(:all,true)      # Turn all event reflections ON
    ' d8 t+ V: ~% G/ S$ B
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    ( y  K( N2 N1 V/ M7 c
  110. #. D0 J4 r" k$ C; T1 x; D
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    9 y6 y% f- G$ L- q
  112. #        a map. This is a design decision to try to keep lag to a minimum. You# v; E0 @: N. g6 O/ ^% k
  113. #        should use these effects sparingly and only activate them on events
    & y  G) z. t# K0 g2 p
  114. #        that require them.
      \: I# x  h6 R
  115. #------------------------------------------------------------------------------#* h8 I9 j* C4 S; T7 j3 N
  116.   
    8 A! s  }: c# d0 T6 T9 F
  117. #------------------------------------------------------------------------------#
    2 {% u* l) O! M3 t
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    % V4 C4 c+ N2 \- I: C
  119. #------------------------------------------------------------------------------#
    # c( g& {9 j/ j3 d1 B0 {* |
  120. #2 z7 A/ Q% K7 M/ |3 ^; m
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default / `" d/ z7 g5 p, \# u. {7 @# {
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 0 G9 h  ^+ L, i6 Z% Y( F
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.( e- C5 @- y, H7 ~
  124. #
    $ O; E3 N% E- _4 k+ J" r
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects. o" @# V- c1 X" b1 L! m
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.$ _7 u# L4 s9 ]- Y$ P
  127. #  v_icon(x,x,x,icon_id)+ O4 d4 |8 I9 `
  128. #0 Y) n0 t/ J! {, I8 }9 Z
  129. #------------------------------------------------------------------------------#
    * T( v+ A1 u+ h5 K+ J
  130.   8 z* Y5 C3 o+ L) p' b* o
  131. #------------------------------------------------------------------------------#% R5 h6 n$ {* \( O
  132. #  SCRIPT CALLS for shadow options# _5 g  {0 b4 j  _0 g4 A" u
  133. #------------------------------------------------------------------------------#0 K+ e6 f- s8 h( q
  134. #
    0 Q, s  {9 W/ Y, W1 `: n( x3 m
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    1 ]) ?* @) I, f
  136. #                              # light source number you wish to change (for
    ! Z5 ~' {' E* h4 a9 v, R
  137. #                              # more than one). These are reset on map change.
    5 `. _9 ?7 D/ H3 E2 v
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    2 }1 J: @2 h1 @6 |
  139. #                              # This will need to be in parallel process if you1 v( b0 e, E! F8 h& J
  140. #                              # want it to be a moving light.8 _  l, _0 E* U" F4 h" q8 W
  141. #! b" J: O" _! i2 F' r+ J
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below, ^' z4 ^5 U, f5 r
  143. #1 G; P. M3 o' d8 x1 g
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    ; i$ j2 b2 K9 a+ G
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    % t; u1 j4 A% F/ J/ J* `8 O
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    - S5 H, B+ U% B6 q! ?3 x, W2 X
  147. #7 O* j7 F2 u: [; J4 q. d) |# p# U
  148. #------------------------------------------------------------------------------#8 I5 C# l6 i1 E9 ~
  149. #  EXAMPLE:: A: x, b; C* |( k
  150. #  shadow_options(80,10,false)    # This is the default setting.
    $ s" ~" A( K, ?% L8 I1 X4 o, Q+ e
  151. #------------------------------------------------------------------------------#
    # O" m  j$ |6 `4 S7 R% D
  152.   
    7 _2 i( p4 E- P
  153. #------------------------------------------------------------------------------#
    ; B  @- R* ~9 y! N
  154. #  SCRIPT CALLS for reflect options1 w. J" D  [$ @4 a: Y; q. Y
  155. #------------------------------------------------------------------------------#8 {, F8 T3 w" N) H3 }7 c
  156. #
    6 B& X+ t, w5 M' C5 E
  157. #  reflect_options(wave_pwr)
    " |; F' v! ~' S) T- N9 R6 v
  158. #
      D$ O* X' m2 f& _4 v: y% t" C
  159. #    # wave_pwr = how strong the wave movement is. 0 is off5 ?5 B8 F* D: J4 P+ w% _' E
  160. #
    4 U: w' |3 n) F" v2 I" E* ?
  161. #------------------------------------------------------------------------------#
    : _4 m0 y" e. V9 Z1 s1 E
  162. #  EXAMPLE:
    9 Y( X  o! Q9 P& F3 O( t- L
  163. #  reflect_options(1) # Turn wave power to 17 c( Q% w& k+ N: F6 j3 [
  164. #------------------------------------------------------------------------------#
    + Y( d# L& |7 b. w0 G$ q- b
  165.   3 g& j, ?, P$ _7 H; [; w
  166.   
    + l7 ?% C; L0 ~
  167. #------------------------------------------------------------------------------#. Z+ M& @4 N% i6 R# {! m. _$ M
  168. #  NOTETAG for ACTORS
    7 {/ @3 O7 i' g9 z, e5 k! c$ A
  169. #------------------------------------------------------------------------------#
    & q1 U' h( t1 x1 _! \/ [3 t, ^/ e
  170. #
    + L1 F6 E" Z" j- P: {
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)) s: U! F7 C1 w2 A! C% g3 f8 J( t5 }, I
  172. #; z2 O" g% V& i! e  P1 \
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    # I4 R! L4 B+ v7 @+ u" o: x$ `
  174. #                                  # and use the character in position 'pos'
    $ `7 ^* F4 m) t- A# y
  175. #
      j2 }% S1 E) g" E  _
  176. #------------------------------------------------------------------------------#1 Y" ~  J  M" t. S" a. g8 ?
  177. #  EXAMPLES:7 z+ N# y2 M' @, M+ k
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    - `& L0 Y/ T2 P+ W" X
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    1 Y! U7 j- W  I" Z4 [
  180. #------------------------------------------------------------------------------#
    " @4 F; P$ y( b, D
  181.   % a5 L' A' X. ^6 @) v# e! x
  182.   
    4 a9 P9 l0 t  f& @0 j9 A- Y* k+ p
  183. ($imported ||= {})["Galv_Character_Effects"] = true! m& M1 K3 P1 o7 _$ O
  184. module Galv_CEffects, u1 M$ r+ J) v
  185.   8 q. B5 {. L# M" j0 j* g
  186. #------------------------------------------------------------------------------#  9 t' ^8 f: H' Y+ Z" B: B5 B$ I
  187. #  SETUP OPTIONS
    1 Y& x# |9 B3 E# W$ ]% h
  188. #------------------------------------------------------------------------------#4 q$ T- C! E* X: X# |: p
  189.   
    & I/ K  }( b4 d* v8 B
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    ) h$ d+ T; ~7 o) Y0 ]
  191.                         # region on the wall you want to make reflective (and* f. ]; I0 m/ @, f9 p* M4 S
  192.                         # then use tiles/mapping that make the parallax visible)
    ! I  L9 \, o! K3 B  s
  193.   
    + y5 ~  E/ n( y: ~. D
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    7 i  \; }+ r2 B
  195.     ( n- Z9 S4 I4 O: N. k/ e6 G
  196.   REFLECT_Z = -10       # Z level of reflections
    % j3 y0 Z# E; n% H( A8 W+ \8 z
  197.   SHADOW_Z = 0          # Z level of shadows. l. g% z" j. `3 A- k! i* p- H
  198.   : E0 B3 q6 t- a3 j
  199. #------------------------------------------------------------------------------#  
    6 G! z) R. S3 y$ q* U6 \
  200. #  END SETUP OPTIONS! O4 |1 C; e' _( j, E5 N
  201. #------------------------------------------------------------------------------#
    5 C- ]8 Y/ D) c/ U2 B* G* h
  202. end
    3 B8 w4 o; n( Q  ]& p% x! X/ v( O
  203.   
    , L. u/ x  @7 p$ Z
  204.   
    " N1 u9 }1 d, n( p# M3 z

  205. , X# M* w( W, D3 b* g
  206. * C! i" M) f! B/ o* \7 Y- X
  207. class Game_Map
    8 e/ ?5 e" c! d) T+ p  S4 `  s) X, }  H- k
  208.   def do_icons(refresh = true)
    2 F$ ]+ }' n4 @' \; C9 O* c
  209.     @events.values.each { |e|! W( q" x  ]9 T# _# d2 x. ^8 r6 k/ u
  210.       next if !e.list
    5 W' \$ z' O5 z& k4 c$ T, g, `) k
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/1 g* c5 `+ G. e. y9 e
  212.         e.icon = $1.to_i
    5 I7 o. w7 u  B5 t  G3 H: q
  213.         e.icon_offset = [$2.to_i,$3.to_i]# k4 z, d2 V! y. [- q
  214.       else
    - M4 Z7 u8 N/ V$ g5 C
  215.         e.icon = 0& u; P5 g( d- x5 `8 X$ o  ]1 d
  216.         e.icon_offset = [0,0]
    7 `- U4 l, Q7 u7 q
  217.       end
    5 Q% N, E, b/ D$ G8 K) b9 g
  218.     }
    4 C& V3 F  V' J
  219.     SceneManager.scene.spriteset.refresh_effects if refresh3 c/ G. ^- K+ O: [+ W  [
  220.   end
    2 o6 d  h5 ^2 R  n9 U  s
  221.    
    ! u7 b; {$ a3 m6 @
  222.    
    9 G) L2 b, ~$ o, P* P% H4 u7 ?
  223.   def do_shadows(refresh = true)
    + E; j5 S3 R% K2 w1 e1 w5 _' x
  224.     @events.values.each { |e|
    - i! C4 T) F. G( @% M0 d5 F
  225.       next if !e.list
    : |: D* U% @. Y) C# x
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    4 R  s3 Y5 Y& _; O1 |3 y8 S) r
  227.         e.shadow = true
    & B( `( i' m9 _
  228.       else
    1 {8 H3 {7 x% s4 Y  t9 n+ P/ K. M
  229.         e.shadow = false" U; U2 n4 h7 K: P; z
  230.       end* j" j# m% M- ~+ C, ?6 X) n
  231.     }! L" x) Y5 j: @4 z8 B
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    6 b1 c5 N8 d& z
  233.   end
    9 h: l2 N1 I. r0 o8 ^# b' M; m
  234.    ' h6 X1 z, U# J" j& O5 d  c) M
  235.   def do_reflects(refresh = true)
    ; N; Y# c0 t2 `' M4 \* O6 n
  236.     @events.values.each { |e|. W* z) Z$ `% u; w2 j# o
  237.       next if !e.list
      r- W! E$ r! I) M) ?- _0 t
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/  }3 \8 D: A. U, v; M; I
  239.         e.reflect = true
    $ G* K' {3 p1 j3 l6 m  z
  240.       else
    - p3 M6 t# X% c6 u; T4 z
  241.         e.reflect = false
    + j) U% E) e2 b- V7 P
  242.       end' I5 x$ H# {4 h2 W) A% X
  243.     }( P$ v7 O% h" V/ E& M* q
  244.     SceneManager.scene.spriteset.refresh_effects if refresh1 L$ D: e7 r' p, V7 I
  245.   end# _$ U7 y7 R: @, s- x* |
  246.    & K* b3 `5 ]! D" f3 ~. t
  247.   def do_all_chareffects. ~. C+ r8 T* e- G
  248.     do_icons(false)
    % h, u5 E$ t8 S
  249.     do_shadows(false)
    ; W5 U8 I- E5 k# Y* D
  250.     do_reflects(false)
    : g$ Q. I. H! |! \; M
  251.   end
    . v5 R6 N5 Q, X# g' T7 k+ B! Y
  252.    : R4 q6 C) {4 R/ X9 R  u+ K
  253. end # Game_Map0 o! E4 [# L8 x

  254. + A! S6 O, ?. C$ H( \) }

  255. ) x5 o8 E) t7 G! G* {" f) j6 [# H0 g

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-9-11 13:09

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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