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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

- w6 M7 w! z$ [8 g8 R) I这个代码怎么用啊,有大神知道吗。我从国外找的。$ N$ O# p5 W5 o+ d( V
http://galvs-scripts.com/2013/02/21/character-effects/
& v, M4 x3 Q8 H& s7 L. z是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#- ~( J" m- o/ V6 H2 l0 [: S
  2. #  Galv's Character Effects
    / a( l( f$ ^$ j+ W; F7 D4 D
  3. #------------------------------------------------------------------------------## d; f; E$ z* F9 v  z" Z! _
  4. #  For: RPGMAKER VX ACE2 t. f/ f: q$ ^! q; j% \5 I
  5. #  Version 2.1
    * m, f; P$ b# p: f
  6. #------------------------------------------------------------------------------#
    & q6 |3 D" I+ j8 Z9 Y0 Z, m% K
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows% A* ]  O. X. [: P/ C" L) {* c2 e
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects  [3 L# u) Q$ U5 P, J
  9. #                           - Fixed shadow facing bug
    5 }' f( E! ~/ Q8 t
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    + L  d# I: j5 M! ^
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    . I5 m7 ]  c. n0 z) G/ q. `4 E
  12. #  2013-02-22 - Version 1.7 - bug fixes
    ' r; F  p2 t4 T( a5 k) u
  13. #  2013-02-22 - Version 1.6 - added icon effect- {9 A" b) a2 ]0 g3 ^5 d/ i: r, F
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps9 F: y8 q' `; A7 {& V# D
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles  v4 U& s) t& b" k5 t
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks2 v8 b* ~, j4 _! D
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    , I; Y2 L" U0 \# Z' M# |5 t: R
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    + r+ S/ [3 ~& V+ D1 q" s5 P3 F
  19. #  2013-02-21 - Version 1.0 - release
    9 f. W* C. R4 f
  20. #------------------------------------------------------------------------------#
    ! o* K, q1 ~* A4 ^! u$ {( q
  21. #  This script was made to provide some additional effects for characters such, W) ], H( A3 a! b3 k
  22. #  as events, followers and the player on the map.; }) P$ @% c. V, E
  23. #  Currently it includes:
    . k: `, L! O' y( H1 X
  24. #8 F6 P) l4 s4 O/ z$ |' K+ {
  25. #  Shadows5 U  ^1 v% I) e
  26. #  Shadows that appear under player and events in a directions depending on
    + j! C/ D6 N% M. Q; V, c  Z1 V) P0 E
  27. #  a light source that you choose.0 T# T- S" }4 ]) F
  28. #, X4 {; y* i7 V3 p
  29. #  Parallax Reflect/ o0 ~6 G6 [+ i; @
  30. #  Reflections that appear on the parallax layer for events and actors to be
    + M/ v  _  p5 d9 _/ O' U3 q
  31. #  used for things like reflections in the water or glass floor etc. To get
    / H( S+ _  r: o9 D; T! |
  32. #  effects like the demo, you need to edit the charset graphic to make the water. E( R% _8 o7 W! [
  33. #  partially transparent.
    : _5 D% o2 a7 u; |
  34. #
      }6 l  K9 {' ~, o/ Q/ n
  35. #  Parallax Mirrors# \* A8 _" K$ Z7 r
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    0 A1 d; X' \9 Q  I  S  i$ k
  37. #  on a wall designated by a region. Both mirror and reflect effects can be) ?/ q, R4 o; B) I, [9 o8 D
  38. #  changed so actors and events can use different charsets for their reflections# z% \: t; J+ l, d# U; {% a, q
  39. #
    # ?& ?4 j; F) Y# J0 w
  40. #------------------------------------------------------------------------------#8 }6 n# u5 ^3 S& m7 {: [0 t% ?+ P
  41.   $ M6 r. Z$ W! W5 r) Y/ Q
  42. 3 E, u* h$ n7 g1 P
  43. #------------------------------------------------------------------------------#
    , t4 U# f% L) W
  44. #  NEW - First event command as a COMMENT
    . a$ J7 d% l4 N8 K
  45. #------------------------------------------------------------------------------#" G$ T4 \1 U. C2 h3 O
  46. #  You can add a comment as the first event command on an event page to set if
    - s6 m7 R8 h* ~5 F: i( t
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    9 Z9 Y8 S9 t2 Z" i1 h5 A
  48. #  below, all must be on the same line in the comment.
    7 ?9 F7 c& j0 ?" s' n) A8 Q0 s
  49. #6 ~3 N% O' ?: u) k
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    5 P  h( p- _3 v6 l" K) ^6 o9 E
  51. # <shadow>           # set the event to display a shadow# e0 s4 S! p3 f- L5 l+ j8 [
  52. # <reflect>          # set the event to display reflections: f  \$ |0 @; N& ?
  53. #
    5 S+ G" i7 P$ k( S: f7 n; ~
  54. #------------------------------------------------------------------------------#: |+ l3 B8 A2 V, H" ?0 I' {7 Y! c
  55. #  EXAMPLE:6 G8 {  b2 o+ a  D$ ^& f8 G/ X
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    . E; \: Q5 D# G- H2 l8 E3 [4 A- o
  57. #------------------------------------------------------------------------------#" |% t/ a. \; t- R0 H: P" n: g
  58. + p3 t: G  `4 M& ~- Q2 O

  59. 2 X: C7 e/ A# t- |% w
  60. #------------------------------------------------------------------------------#1 m: I. M7 h3 u0 u4 ~
  61. #  SCRIPT CALLS:
    # o" D7 U) _" g( o! s) ]+ x  E
  62. #------------------------------------------------------------------------------#
    & H8 y* q" ?/ s: X/ f3 V4 w# w
  63. #
    " H& `: ]1 i6 R
  64. #  char_effects(x,x,x,status)
    9 G- B9 W. q4 x9 n4 ~+ N
  65. #
    2 {+ A& N% R7 t! z" e
  66. #------------------------------------------------------------------------------#
    : C6 O) }; K- C% P
  67. #  # each effect can be true or false to enable/disable them during the game.: _/ ], \5 E0 q/ {
  68. #  # you can change multiples of effects at once, x being the effect number
    5 V7 f5 C' N  {, K$ t7 ]" ]$ j+ _* M( s
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons% F. B, T* B$ L7 w& @( p/ e
  70. #------------------------------------------------------------------------------#4 ]: c2 ]' P; n6 T/ a2 R, z
  71. #  EXAMPLES:
    0 w* s( _8 w. P) N( W/ [0 [
  72. #  char_effects(0,true)              # turn reflections on$ d- ?8 Y$ {* N; l
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    3 u" Y9 v. H4 K8 }% E6 G$ |* t0 s: x6 x
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    , I% Z7 h$ I' P; s& F) ?1 Q
  75. #------------------------------------------------------------------------------#( W4 r8 R! L% i6 }# j
  76. #1 _. F4 L) o$ Q# B8 P
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset. Y) s( e4 y' k* d" r  G+ [8 D
  78. #
    ! O- E  u2 Q) E  b+ g
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    * P& m2 e  e3 e, c
  80. #
    8 Z# m, O' y- r% p+ W& D
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset* K! M( B3 u: h7 g( S" A" [
  82. #  H: N, p0 {# h
  83. #------------------------------------------------------------------------------#
    7 o3 M; j/ g( ]1 K
  84. #  EXAMPLES:7 K; S/ ?1 @! b' Y
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    0 j* n, Z' e4 V! b, Z, Q! `
  86. #                                    # in position 2 of "Actor2" charset.
    ' n+ C. Z* l5 [9 n2 ?
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    7 E  E& G% ^% X# R! I# `7 m, h
  88. #                                    # "Actor4" charset.
    # K* y9 q% Y  }" `: q* m
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
      T) k0 Z6 J  q: N) X7 @& W# m
  90. #                                    # "Vehicle" charset.$ A, k4 j( k5 N  s/ Q; |- t
  91. #------------------------------------------------------------------------------#
    1 U& E; s# U2 M& K! w: ^) a5 l
  92.   
    ( P$ E' ]9 J7 n, z0 [/ c
  93. #------------------------------------------------------------------------------#5 C+ D0 p- ]/ z9 x6 n
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    & M& [( `. D+ x: l0 \
  95. #------------------------------------------------------------------------------#
    + [1 ]# {3 r- J4 ?
  96. #9 c" H1 O, J7 h
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off- j- L3 |# d/ ?9 k& \5 ]
  98. #                          # use this to specify for mirror and reflect.
    $ P* {0 p5 Q- I" x( t
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    0 }9 {1 g8 x1 m- C" ?" X
  100. #                          # to change all events use :all
    + v0 C4 _5 Q: G: L/ q1 t9 g1 q2 }
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    : [5 U$ f* C" ^3 d$ ^3 K' @
  102. #                          # it 0 for no icon.( Q" ]7 S' P. a* j$ g7 }: k  s/ e! {
  103. #. |" K6 W( ^4 ~" K8 m
  104. #------------------------------------------------------------------------------#
    # z  H$ R6 ~( n# }6 r
  105. #  EXAMPLES:& D3 ~3 L! |' p% |! g8 b& j
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON$ \% V6 P! |9 c1 p1 c
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    1 S4 f* ]& p, i# B; D, k, ~9 s. Y
  108. #  reflect(:all,true)      # Turn all event reflections ON
    . _+ X) H, z8 i8 k" B% T3 u0 [8 Z
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    % f& g1 n4 [4 X* k- ^5 q
  110. #- g& j; w$ _; {5 C6 U3 E/ z* p
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    " u5 }" C; U3 V8 ?% E  _3 ?2 _0 I
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    . b- P% B+ H4 |! J7 ]
  113. #        should use these effects sparingly and only activate them on events2 j+ Z1 }: h: b6 ?% p- E
  114. #        that require them.
    5 \$ @; W) _$ h; `% h# @
  115. #------------------------------------------------------------------------------#
    , k: r7 K7 C# A4 w2 k
  116.   
    ' X1 ^3 Z+ {" C0 [' S1 y
  117. #------------------------------------------------------------------------------#$ I- k6 b; C. P& z4 @* r' X
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    1 J$ I$ t& }1 ?% y0 b- d, q
  119. #------------------------------------------------------------------------------#
    7 Z$ a; T+ N$ A6 G, ~
  120. #0 M+ K" m) f$ k8 y" e
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 8 [( a) z; e* w7 n! H7 B3 b
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 4 l- i; d$ B, w, ~2 r# U
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    2 P+ b3 [3 r3 H. t
  124. #
    9 M& B4 C8 ?4 ^$ @, d, v; e
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects- x+ u9 i9 f' J' A( ?! |/ }- j5 U
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.- z3 A7 S/ r; u. P5 f) T
  127. #  v_icon(x,x,x,icon_id)
    4 n, ~, }! Q1 w9 s  x# W' _
  128. #
    # t7 F9 H; F( D1 m
  129. #------------------------------------------------------------------------------#3 n( ]: C% g4 _% z2 o
  130.   
    8 f" A% w" t% q% r
  131. #------------------------------------------------------------------------------#
    4 h- `  ~  n2 r2 F8 J. X
  132. #  SCRIPT CALLS for shadow options1 Q. {% e' u6 j& J, M
  133. #------------------------------------------------------------------------------#2 f" d5 ?3 z" c5 M% }. e9 q- ~
  134. #- Q" W6 Y2 E. p& Z; k9 F$ x
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the ( V& u  q* q" ?) r" t* w
  136. #                              # light source number you wish to change (for
    , ^6 D( n- b( P# J7 W) j
  137. #                              # more than one). These are reset on map change.
    0 p8 ^8 j4 H' H  Y
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
      o* t  a# X) v3 e. A
  139. #                              # This will need to be in parallel process if you* ?  ^. P- E- w
  140. #                              # want it to be a moving light.
    , Y5 _, B( [3 H) j7 h9 J* n$ [3 k
  141. #8 s" N- L; F7 e! n8 u, e5 i6 r6 B9 g
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    . F  r' }. h( B' F- q* P
  143. #
    % T, S" `. \6 V7 X
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    & }5 W* }6 u) v8 B- Z! g: c' f
  145. #    # fade = amount shadow becomes more transparent the further away you are.# \7 u% A6 L8 c- i) H- B( J4 R
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    ; s& \6 W' J' t% m
  147. #
    + g( {) }: z3 }/ Z- u
  148. #------------------------------------------------------------------------------#
      T0 y: {# i4 m9 Z9 G
  149. #  EXAMPLE:
    , q* V) j# }7 d+ O/ \- ^" U# T
  150. #  shadow_options(80,10,false)    # This is the default setting.) T3 ^" E5 p0 Q, G4 A9 `
  151. #------------------------------------------------------------------------------#4 J% ]7 d! ?# A8 U  z! n0 p. N
  152.   % u- D4 @9 W5 W, M  k; T- z
  153. #------------------------------------------------------------------------------#  E! u# `6 q1 z8 c7 ~" @
  154. #  SCRIPT CALLS for reflect options& e" m3 z* `0 d1 M* a7 v
  155. #------------------------------------------------------------------------------#
    " t2 l- C6 F# W1 Y' i  o
  156. #+ ^+ m3 w4 T$ e5 S- {4 U
  157. #  reflect_options(wave_pwr) 9 q: w6 V( i3 n" m8 P
  158. #& D$ i6 T0 {& A% v
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    / s" }3 }: o4 m: r- A" ?7 D
  160. #9 _1 m- ?/ G2 a6 b
  161. #------------------------------------------------------------------------------#
    . n2 J: y: j' `1 H( h3 j# U
  162. #  EXAMPLE:) E% g2 H, r+ |9 J2 w3 K/ t
  163. #  reflect_options(1) # Turn wave power to 1
    * b/ v$ ^$ n- |  S  y8 [
  164. #------------------------------------------------------------------------------#
    " b% \; D$ a; b# }4 S" W
  165.   2 J5 T! m/ j8 k8 z; S9 j1 A
  166.   
    4 s7 s- H! S; L3 J: ?# l
  167. #------------------------------------------------------------------------------#  a) w/ V3 b1 P! }, y1 I" }
  168. #  NOTETAG for ACTORS* ]! W. T$ O! P% v: V3 k% W
  169. #------------------------------------------------------------------------------#
    - Y/ r- s; ], u: s
  170. #
    3 A5 j8 ]  Y6 b  a2 M# A: |. y5 \
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)+ P% @1 L# w8 O7 H& q1 g
  172. #
    ( c; W* @% n9 j9 J# v
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    6 Q/ P+ x0 k8 K: I8 T" m4 x
  174. #                                  # and use the character in position 'pos'8 Q- C3 U# m* G& B2 \  B  k. y6 D
  175. #
    % G; \9 z2 h, G3 \
  176. #------------------------------------------------------------------------------#% N: ~" [8 i. P/ T5 J; h# f
  177. #  EXAMPLES:
    ( X0 @9 b% b$ W3 O* Q1 R2 y
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    ( |* W+ ]* o5 V$ c
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    1 s& V9 I* s' A- j+ f) u
  180. #------------------------------------------------------------------------------#" ~8 _$ P8 |4 S: h
  181.   , O* v) t9 W1 P$ d8 ?/ O
  182.   
    6 t/ G/ d9 b# a- X$ Y1 O
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    5 r) _  u' D2 z% o: O& H) @# N, [+ `, R
  184. module Galv_CEffects
    ( P( ]! l: V4 m8 `: K
  185.   7 y/ v& b9 B( X, P9 o% S- [% p
  186. #------------------------------------------------------------------------------#  
    : u# P) x* f" e1 J
  187. #  SETUP OPTIONS
    * v- |8 T- Y* w  G' T% `! L( R
  188. #------------------------------------------------------------------------------#& e. o2 F9 b7 I6 R" [
  189.   
    5 R! e# a. X% Z  ~: g  {
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the" y( A  j7 {: l" K9 ~1 t3 x
  191.                         # region on the wall you want to make reflective (and) \2 w) u9 n  T" D. H0 \- d8 y
  192.                         # then use tiles/mapping that make the parallax visible)" N- W3 o8 b5 X2 S( {) i1 a. z
  193.   
    ! g. F0 r$ F6 R/ n! {
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters( A( o, L  `! V( a' D) F
  195.     " Q4 k, d4 u; m" D5 }! b6 f2 i
  196.   REFLECT_Z = -10       # Z level of reflections. Q! X7 I2 h' v) B" {' e' h1 |- x6 `
  197.   SHADOW_Z = 0          # Z level of shadows& C, @; D4 Q, I9 ^: e
  198.   
    & @( R9 ?  H) d" B+ F  {
  199. #------------------------------------------------------------------------------#  " L+ {7 }7 b! p$ {! \: n
  200. #  END SETUP OPTIONS
    ) t7 J! N" ~: Q# |' v2 ?/ `
  201. #------------------------------------------------------------------------------#
    * x0 D$ g9 Q( K- P
  202. end
    4 |) g' L5 Q  u6 P8 z4 @
  203.   
    % q" j' S7 c  c3 `/ I% Z" M
  204.   
    ' a7 ?& i7 _3 s; O
  205. 6 W2 ^" D# R# N# G* \8 A6 S( ^
  206. / x8 J* Z, Y* S# `+ n( g& u0 Y
  207. class Game_Map
      D6 L; B7 G! _( M9 C- O  L
  208.   def do_icons(refresh = true)
    5 w; v& P/ Z. Q
  209.     @events.values.each { |e|( E+ D/ u1 @! R" `/ w& O! Z# S
  210.       next if !e.list5 l/ J& d/ [( m" |9 @8 Y
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/! q+ w, u/ U4 D: C( T" B
  212.         e.icon = $1.to_i2 q9 d0 J9 U0 c1 j
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    2 S6 O6 {* g- F! ?6 A% O: `
  214.       else
    3 [' v+ G* j/ P
  215.         e.icon = 0
    $ @7 q$ t8 K8 U8 b& S$ w+ I% G( E6 x- {+ o
  216.         e.icon_offset = [0,0]+ c. |* b; E4 M2 h
  217.       end5 i% B) k% i5 \) K1 f/ F
  218.     }% D2 m1 l7 D% D6 B7 l/ h
  219.     SceneManager.scene.spriteset.refresh_effects if refresh. {  u$ c8 E) t7 T/ J, l  S
  220.   end7 d6 S7 ?$ P7 ^, N3 X4 t3 _( [
  221.    & v% x  Y9 ^! H2 v
  222.      _7 ?6 ^. c0 k* r5 h
  223.   def do_shadows(refresh = true)
    : l' n5 }$ c. m. L% c7 N6 J
  224.     @events.values.each { |e|
    ' c& z6 ?: l& S! {: T# s
  225.       next if !e.list
    : x& D& t" h1 m  X/ h) |& X
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/6 l8 m% n( `4 d3 G9 R
  227.         e.shadow = true
    * l; [  R9 F8 @  w  ]+ u
  228.       else
    + H8 t4 y- B) ]0 S* ^3 i
  229.         e.shadow = false
    $ c- n* \: Z) s! k! V, P
  230.       end4 H& P$ }5 p  _+ K) V" N; B
  231.     }/ z/ B1 _/ n- w7 h- e9 M
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    ; ?% X3 m# i4 m8 s/ r2 C
  233.   end
    ! a9 z: I: V' J
  234.    . {4 `* j' o3 |9 h* z* D
  235.   def do_reflects(refresh = true)
    , I# ^9 W2 g, g4 ]* ]. F$ _
  236.     @events.values.each { |e|  \, L  W! {- w' ~* Z& W
  237.       next if !e.list
    0 j) ?0 n) H: w- ^
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/2 k; {! t6 L3 n
  239.         e.reflect = true: ]9 S2 ]2 w% D( _
  240.       else
    : S+ Z: Z  P' Y, |$ V+ f' U
  241.         e.reflect = false5 N5 y" e9 f; W
  242.       end$ q& H6 i  k, `: g4 x
  243.     }
    6 j" B& \: o/ J: j; w" \1 J
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
      p3 I+ q" W  ^# A$ h
  245.   end
    & B8 `! C& b% v
  246.    ) C9 e: E4 e8 z2 ?  i9 R# V
  247.   def do_all_chareffects/ n6 K7 h" P9 ]0 F
  248.     do_icons(false)
    $ U8 j) R- U' B! E+ V3 W, z! b6 z
  249.     do_shadows(false)8 R1 t9 t1 k- T$ I
  250.     do_reflects(false)
    4 {2 O7 `- l1 p: d
  251.   end
    % T/ L5 s2 d1 A$ L1 e, X
  252.    * m7 _  H$ s6 n4 S! ?2 a
  253. end # Game_Map
    : ~* v7 a) b0 {, x. k( b
  254. * W2 P. [$ }8 Q  Y

  255. 6 c% G' }! |. @+ ?0 l4 u

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-7-23 07:41

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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