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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
0 J" c" B- c) b1 q( ?4 C# C% L
这个代码怎么用啊,有大神知道吗。我从国外找的。: D  a. _% O( w5 I( A
http://galvs-scripts.com/2013/02/21/character-effects/
( Q( L9 L+ X- `$ V5 G  N" q% ~是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#$ s0 g! k/ g5 K, S  A8 e
  2. #  Galv's Character Effects
    . m+ O+ i. k, {; T
  3. #------------------------------------------------------------------------------#7 B7 O" C, Z: L% h
  4. #  For: RPGMAKER VX ACE
    ; D* X4 m; O- C# T3 [" i
  5. #  Version 2.1. d, d1 h  j  p. K$ P
  6. #------------------------------------------------------------------------------## ]% l8 h( h8 Z' Y1 R' W* B, ~
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    ) w) L" F3 s$ Q: s+ T1 R4 N, t
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    0 K, f/ }, z& T! x+ @
  9. #                           - Fixed shadow facing bug! E8 i0 m- h. a5 ~0 S
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows0 v2 B. e" B2 A, v* X* ?! N) Q
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows; J3 b) o! u0 E( e' c
  12. #  2013-02-22 - Version 1.7 - bug fixes5 Z& g: m) T' Z4 a) ]' l. y
  13. #  2013-02-22 - Version 1.6 - added icon effect
    : t6 L# }$ ~9 z6 @( J
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps: t' E7 A5 f# r% z! ]- j3 O" G- M; M
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles: I8 x1 Z6 t% \; |/ I' Y
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks1 z/ {# G7 ^+ M4 m7 A
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    0 T* Q) ]! Y! p$ P' R7 c( l' @
  18. #  2013-02-21 - Version 1.1 - updated flicker effect2 X+ B5 V* N4 \" H. N
  19. #  2013-02-21 - Version 1.0 - release1 B' P7 c5 [( r/ W1 x
  20. #------------------------------------------------------------------------------#
    9 _4 }2 ^1 n8 Q/ U5 m+ ?  h
  21. #  This script was made to provide some additional effects for characters such
    / @* {0 }  X& V4 i6 w  ^
  22. #  as events, followers and the player on the map.
    : N. w% h: g" u  Y( n" ?
  23. #  Currently it includes:2 |- V5 s' G1 u. {' ?
  24. #  |8 |5 @! p/ v+ Y7 S5 _- R
  25. #  Shadows+ n0 q) r  G7 Y. J" g
  26. #  Shadows that appear under player and events in a directions depending on$ {! m) g" Z* z7 ]! f- N
  27. #  a light source that you choose.
    . P- L' b) G' Q7 j" u+ C& h  N+ U
  28. #
    0 ~2 X# j$ Y% @' W% W6 w( w' X
  29. #  Parallax Reflect
    4 z% H& l! }/ E" w
  30. #  Reflections that appear on the parallax layer for events and actors to be
    ' m! j5 |5 k, q! h8 _7 u
  31. #  used for things like reflections in the water or glass floor etc. To get% T- w0 W5 P& R
  32. #  effects like the demo, you need to edit the charset graphic to make the water, Y/ V( ]1 _% d1 _2 W) j- A$ i
  33. #  partially transparent.
    6 k  G+ B% J' ?4 I
  34. #, v. x9 N6 S. ^3 z$ n: D- ]: v' I; J
  35. #  Parallax Mirrors
    , H6 G; Q4 R" a/ Z0 L
  36. #  Much like reflect but are instead actors and event are reflected in a mirror' @3 h9 n# `3 w% K# _
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    - H9 u6 h/ i% ?. s3 C0 V
  38. #  changed so actors and events can use different charsets for their reflections8 e" p3 F' W; Q4 E) n
  39. #* A" V0 L& A! {* c7 o1 ]
  40. #------------------------------------------------------------------------------#
    * a3 V. z9 w3 O
  41.   
      }" Z7 G5 m& V0 }
  42. 3 \( z% ?; z/ O; {8 A
  43. #------------------------------------------------------------------------------#! F( n' |' B. R' j# [# d
  44. #  NEW - First event command as a COMMENT
    4 g' u. R0 N6 q9 H. Y
  45. #------------------------------------------------------------------------------#1 c( x# P! C; |$ R, i2 @. \
  46. #  You can add a comment as the first event command on an event page to set if
    ! A- C9 }4 I, x/ L( B5 L5 H
  47. #  that event has an icon, shadow or reflection active. The tags to use are. e! s' {# L' ]  b& A) C8 p/ h0 W
  48. #  below, all must be on the same line in the comment.
    ' n; k* F( M9 G7 g8 T5 Q
  49. #
    , ?  U1 W' s2 n) W5 ]% m2 @
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    ( f8 F1 w- m3 b) }( P  E
  51. # <shadow>           # set the event to display a shadow: ?# d# s" J; G, X8 U% ~
  52. # <reflect>          # set the event to display reflections( p( o+ C/ k$ d# H7 m
  53. #
    5 y& C( d0 Y; i' B: Q) k) n" Z
  54. #------------------------------------------------------------------------------#4 d2 I( T6 ]: J1 @  m6 T/ j
  55. #  EXAMPLE:
    8 L$ i' [' A1 J# z/ H
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    4 J( h( W' l  v0 G
  57. #------------------------------------------------------------------------------#% |+ {: q' ~7 {8 ?' B
  58. : P% H6 g: Z- Y/ ^+ q1 U

  59. 6 u/ C4 c  [$ D
  60. #------------------------------------------------------------------------------#0 G  {/ g/ q; B5 I1 S: z
  61. #  SCRIPT CALLS:
    ' [2 ]8 W# T/ z1 P. l/ Y0 Q
  62. #------------------------------------------------------------------------------#' N& A! N2 }- ~' H) }$ {  f, a
  63. #; p/ G, ~+ e3 h# G7 R: X) \& S
  64. #  char_effects(x,x,x,status)
    : l" o3 f) H' A2 ~9 ~8 X5 i
  65. #4 H  Q7 b- I- E8 _
  66. #------------------------------------------------------------------------------#
    # s' ^% }2 M. h/ j( [  h
  67. #  # each effect can be true or false to enable/disable them during the game.6 X2 Y" e5 ~9 y3 P
  68. #  # you can change multiples of effects at once, x being the effect number
    ; ?( E7 \9 m8 l
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons( q6 D' W8 i3 Q: M
  70. #------------------------------------------------------------------------------#4 e' V4 Q" l, U/ {
  71. #  EXAMPLES:
    / l- c* N% ~& k. W* m
  72. #  char_effects(0,true)              # turn reflections on
    7 q' p0 U0 |, l' G
  73. #  char_effects(0,2,true)            # turn reflections and mirror on5 m" q, q5 |$ w6 f5 q+ T$ y$ h
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    7 x: _" @  M- P/ K  g
  75. #------------------------------------------------------------------------------#( L' r: i1 X" x& n8 ^7 f  L' H, P$ W5 z
  76. #
    6 t) P# x6 [  y' T! H
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset, Y9 ~  @8 ^. G# }9 c3 E5 @
  78. #
      Q& Q, o' ?6 u
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    ) F$ U  Y' s! ]7 |1 J
  80. #
    . `8 y- F' P. [. d) m
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    ) e" V' a: c0 X% h; K& r
  82. #$ v; m0 b; }- T  t8 E  i
  83. #------------------------------------------------------------------------------#
    9 s: m1 ?  R. n* x
  84. #  EXAMPLES:
    + ?# u; K+ w* X  Y# r( Z( L
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite" o9 x: O0 f: ~5 \$ `, U  {
  86. #                                    # in position 2 of "Actor2" charset.
    + G* K) @" S4 d  ~# I1 E
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    " l8 L" ]+ h7 ^+ \0 d
  88. #                                    # "Actor4" charset.; |6 p% }' e+ n: N" Z& {' j
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of7 }3 R; a8 v, N3 c; G0 I5 Q
  90. #                                    # "Vehicle" charset./ D7 Q: Z8 T& [$ F% I; V( k
  91. #------------------------------------------------------------------------------#1 u, f& X2 A' }% k
  92.   
    2 e+ E9 ?- W$ T0 a% L  X
  93. #------------------------------------------------------------------------------#
    ' _2 [$ b1 n3 D  v/ z
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    5 h& K2 {2 Q$ V1 m6 h, K3 i- y  D
  95. #------------------------------------------------------------------------------#
    + L% P! m0 E) J5 p% M/ d) U4 e
  96. #+ \) _" h/ x. [; u$ o8 F) r" _
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off2 I  {, q' f  f+ l, k7 j6 \
  98. #                          # use this to specify for mirror and reflect.3 c+ i) X8 E7 }5 O2 ?
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    " D- }. L6 r; L) ?% S& J% b( ?! ^
  100. #                          # to change all events use :all
    , F. ]. P' y* q: z* g( x, `2 y4 K$ |
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make6 j/ n; j/ q& a+ v" U6 w
  102. #                          # it 0 for no icon.
    - G* S5 y+ X! R9 C4 E9 j: M
  103. #) \' W3 ^1 I* S7 b/ X
  104. #------------------------------------------------------------------------------#. s9 k& @& T( ~! b  W
  105. #  EXAMPLES:5 ?6 q, r9 }) m; z  @
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON+ g/ b9 Z/ v7 d$ S! d: f
  107. #  shadow(1,false)         # Turn event 1 shadow OFF" `' S& X; d+ t; R
  108. #  reflect(:all,true)      # Turn all event reflections ON$ f$ ^' {% d8 x. h0 o2 y
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    7 q* W3 \  F, y
  110. #
    4 ]" Q. I! i0 u% ]  H$ Y2 H
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    ) _3 Z8 Z9 e  W2 `9 l/ v2 g
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
      r5 s0 Q; Y4 _) P- u3 c. r
  113. #        should use these effects sparingly and only activate them on events
    % }* h0 u' Y$ K, q
  114. #        that require them.+ O4 F  x( `. Q9 ^: B' w$ Z1 T+ y
  115. #------------------------------------------------------------------------------#* ^5 r- D5 M  @* m3 t
  116.   7 g- y) ]# [0 h# U9 n
  117. #------------------------------------------------------------------------------#$ D- g9 ?" ?# d" P' w0 e% K
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    * O: d/ h6 y8 Q
  119. #------------------------------------------------------------------------------#
    . A1 R. E9 Y$ V
  120. #0 H/ v/ i9 @" K$ A" Y9 u* D
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default - y* G6 ?9 h3 K$ a6 X+ i
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 0 U- `8 J: U& }. J
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    , v' h6 D, Z% c7 ]: B. M! _
  124. #
    0 I# z4 y% [- M5 `1 z2 Z
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects) l5 O% B0 U  D1 n
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    $ B) G5 v/ z2 v( b
  127. #  v_icon(x,x,x,icon_id)) i2 q+ n4 L2 z4 d
  128. #3 {9 k2 b* E( A: F- n4 v
  129. #------------------------------------------------------------------------------#- `, w$ ?9 Z+ i% e  U) Q' K
  130.   
    ) M' P; m7 E9 Z9 c# Q$ \
  131. #------------------------------------------------------------------------------#
    - D. ?8 ^" K& P9 p; E
  132. #  SCRIPT CALLS for shadow options: z+ O$ ?3 E/ R( ?4 H% T5 |
  133. #------------------------------------------------------------------------------#" q  u- ]. r9 K. F) p) ^. y+ X
  134. #3 D- [! A" d  ?2 c& V& ?
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the - u! @) I( p7 W3 i# X
  136. #                              # light source number you wish to change (for3 H7 _# r4 U# W. B4 m
  137. #                              # more than one). These are reset on map change.
    & O! a2 i- S; T  v
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    ! G5 B) \3 e! n. d6 \- t
  139. #                              # This will need to be in parallel process if you5 K: ]7 w' F( _% g2 O! l. v' F
  140. #                              # want it to be a moving light." H" q4 C, m9 d8 [" E5 q& h
  141. #
    2 m% i. l& `5 E. N. G
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    3 z) N" r) H! X" h* }5 W/ O
  143. #' E7 J9 x2 P, Q' r- c" i9 ]( U/ \! d: Z
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    4 Q1 k8 g! `6 x. {: z4 ^
  145. #    # fade = amount shadow becomes more transparent the further away you are.9 Y' ^# j! {# B4 n$ C
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    8 R- r2 Y6 P: U' P7 O- b' _1 ^
  147. #9 i; j& X  H- u- W$ i# l6 u
  148. #------------------------------------------------------------------------------#' N4 x3 f, @* I, |
  149. #  EXAMPLE:
    % W# @5 \6 h: O
  150. #  shadow_options(80,10,false)    # This is the default setting.! o. F; [& Z2 E. l1 J! R
  151. #------------------------------------------------------------------------------#
    6 n8 ^; z9 C' U# V6 _2 ~- }0 V
  152.   
    % y2 E( _2 U) ~$ [
  153. #------------------------------------------------------------------------------#$ b& X$ c7 ?4 ~5 ]
  154. #  SCRIPT CALLS for reflect options
    6 d/ L* y7 a* x; ~4 M
  155. #------------------------------------------------------------------------------#1 @( A. }  l6 _" C6 G( E: H# U9 O
  156. #
    7 o: ^  L' O$ F  h/ k  v, b, H
  157. #  reflect_options(wave_pwr) 1 A0 e! O8 B6 r. f9 V0 N
  158. #. i" M9 g. R4 h( o; h! o4 T
  159. #    # wave_pwr = how strong the wave movement is. 0 is off) o6 O( @4 k1 l) J5 a: x
  160. #
    6 S5 ~& y! z; W* x, o" e
  161. #------------------------------------------------------------------------------#
    ! C/ p( t; @- x0 P% F
  162. #  EXAMPLE:
    8 W4 L9 B" x" m& w0 E
  163. #  reflect_options(1) # Turn wave power to 1
    6 L( T6 t* X& q" m, H- l' K! C( C
  164. #------------------------------------------------------------------------------#
    ' K9 U1 F+ R: [9 {; d
  165.   
    ; w1 H* n0 t* z  E
  166.   
    9 A1 J* o  D5 \: C' r- M& l1 E
  167. #------------------------------------------------------------------------------#; c& _4 G5 G3 g; [; ?: v
  168. #  NOTETAG for ACTORS
    & l; v5 W5 s4 |; Z/ Z3 O0 X4 j
  169. #------------------------------------------------------------------------------#
    * r. `1 I- |; j, M. T6 V- w0 ]
  170. #
    ; w( I, Q7 O8 s, r) S
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!). S, A/ d) N: o# h4 a
  172. #" a: p6 B1 O* B  j% C
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections2 q4 @8 {9 a+ ?0 w; s
  174. #                                  # and use the character in position 'pos'
    ; v" _0 F* |" K7 x6 D3 @5 d
  175. #9 S, p  `4 _0 a8 b1 G" r
  176. #------------------------------------------------------------------------------#
    ' r. X" P; T3 E$ p: v- f" l5 ~
  177. #  EXAMPLES:
    4 ?' I( Y/ r+ w5 B) ?" ~
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    " J! n$ q! I: c) l0 y* t% x5 f
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    2 L- u2 L/ {' L/ r  F( a: t" T
  180. #------------------------------------------------------------------------------#
    : k$ l; F: C  w/ s1 {: w. ^  C
  181.   ' f+ q2 L# O! a% J! l3 p" K# w  K
  182.   5 X* E1 t8 @# e: Z5 X
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    " A8 G- s! x  N2 ]2 x7 t
  184. module Galv_CEffects# @9 _( L8 |) K9 j6 h0 p/ F
  185.   
    ( N, b& F' [1 H2 S2 k7 N+ Q
  186. #------------------------------------------------------------------------------#  0 c" K1 p, i, y* L/ e& D( K& T( ~) J
  187. #  SETUP OPTIONS
    ) ~% q2 ?" K6 H
  188. #------------------------------------------------------------------------------#
    # g" Q9 H$ _. ?! ]2 \
  189.   * B' C9 l$ V' t7 S% k7 X* s, F
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    . H3 t0 l+ G+ p$ Q, C
  191.                         # region on the wall you want to make reflective (and
    " S+ b3 w8 H) Y2 [9 B$ X" Y3 l) H/ T
  192.                         # then use tiles/mapping that make the parallax visible)
    * T3 i2 |; o7 g0 w, |# w
  193.   
    + `( b7 e9 |( e; K) r) ]" q3 W* ?# W
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    + n1 j2 V9 e, U; W7 o. [. Q
  195.    
    9 F! N& `  R( }" t( \$ f' _; e8 E8 \
  196.   REFLECT_Z = -10       # Z level of reflections
    0 w5 N5 v6 V; C9 {! P$ x/ [
  197.   SHADOW_Z = 0          # Z level of shadows' @7 C2 |9 V+ q( y4 F
  198.   ; I2 y; e# y; k+ e% E
  199. #------------------------------------------------------------------------------#  
    - a, X, w& u" _9 b- f6 I
  200. #  END SETUP OPTIONS
    , ~: a6 f5 V5 p' c: [8 D" v. v
  201. #------------------------------------------------------------------------------#2 \; i% ?( l2 o- }
  202. end
    * ^( k) K# \2 T/ [% |
  203.   
    2 ?/ D3 R1 M9 Q. O' I" N
  204.   
    0 X! Z5 }# `% ~- s

  205.   Y. G# r, K. u9 v& U

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-9-11 22:02

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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