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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
" m4 u6 v; c1 D' K: M
这个代码怎么用啊,有大神知道吗。我从国外找的。$ A4 c# `6 d# Y
http://galvs-scripts.com/2013/02/21/character-effects/, t1 a8 F' t% }! \0 }$ _* u9 S  _
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    # A6 Q" W+ v, b1 ]- k
  2. #  Galv's Character Effects( [  O5 s5 i5 t# T3 j+ h3 ~8 Y
  3. #------------------------------------------------------------------------------#
    ; B) G! L6 Z' t$ n$ y
  4. #  For: RPGMAKER VX ACE
    8 u" q; D9 ?# }, c# |
  5. #  Version 2.1% R2 G" D/ s/ I1 H( I
  6. #------------------------------------------------------------------------------#) H. r9 m# y* E: W3 j2 k( p* @
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    . v  b# J, M2 M" P! a7 x
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects8 `) \' h0 U  w1 v' q2 g' B
  9. #                           - Fixed shadow facing bug
    4 d0 {$ ~7 j9 Y: m5 I/ Z' i, ?2 B
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    $ m, |% s/ {( x) ?5 k% I9 ^
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    3 T$ H0 N5 f3 c8 B& O4 k, H3 u
  12. #  2013-02-22 - Version 1.7 - bug fixes( O- s; X( b) o# I3 A; J/ W
  13. #  2013-02-22 - Version 1.6 - added icon effect# o& ~( K" a9 H) l
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps% G# A$ N( C" S1 X# q& K3 ?
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles& [9 y5 b$ O2 ^9 c6 B+ Y
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks0 {, v/ a( f9 c3 e2 x3 }6 n: s. i
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)( C8 l. ^- x% @
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    5 t: y3 O1 g- |5 z0 I
  19. #  2013-02-21 - Version 1.0 - release
    4 }, k+ `9 \" A, ]0 _# s1 C, M0 r
  20. #------------------------------------------------------------------------------#4 ^7 H) h4 G% h$ |
  21. #  This script was made to provide some additional effects for characters such$ z' H) r' g4 {/ l/ d" x
  22. #  as events, followers and the player on the map.$ i+ g6 \9 R5 ^  d0 f7 M+ T! X
  23. #  Currently it includes:
    ' u; _+ c6 [1 h9 q2 T% D9 x
  24. #
    - z. S1 {# A0 D3 r& m7 j( e/ F
  25. #  Shadows
    / u4 u7 u$ W3 M& w, O
  26. #  Shadows that appear under player and events in a directions depending on
    * Z6 Y$ L4 [8 J! c$ i
  27. #  a light source that you choose.
    2 q( o9 D9 \1 g! v$ o5 A/ u) B. ~  i
  28. #5 R& ^. ]) Q' b5 F
  29. #  Parallax Reflect
    + n7 H0 u# E! o  n& b* v
  30. #  Reflections that appear on the parallax layer for events and actors to be- z2 T. N- Z+ ^' U
  31. #  used for things like reflections in the water or glass floor etc. To get4 n; {) u3 q4 M. g; @3 r0 N. L4 a* Q
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    ! h6 V0 j  V( ?$ Q7 H, W& |' N
  33. #  partially transparent.7 i$ ~8 i% z' I) _
  34. #- u% ?# H: j; o% Z0 B- Z& ~
  35. #  Parallax Mirrors  e6 U1 G& {9 c" {2 w
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    + C2 @( b) H2 D7 l! n* Z1 m
  37. #  on a wall designated by a region. Both mirror and reflect effects can be  [: D8 b- ]  u4 X0 U6 N
  38. #  changed so actors and events can use different charsets for their reflections1 i2 C& K; x  y# j! D# c- q
  39. #/ V* B5 }: M) z( K
  40. #------------------------------------------------------------------------------#% {0 |/ M- v0 J" |+ m, ^4 e) f
  41.   
    2 w/ ]6 G: G! S
  42. 6 j+ ?! y+ e% r% I8 o
  43. #------------------------------------------------------------------------------#" ]+ B, `" T0 G* m1 F0 }+ T5 a; y
  44. #  NEW - First event command as a COMMENT3 v" ^  U! P! _0 @+ I1 P
  45. #------------------------------------------------------------------------------#
    ) u  [% N' p8 F- X
  46. #  You can add a comment as the first event command on an event page to set if0 a( a6 b: T  y1 F* `. X. g: x
  47. #  that event has an icon, shadow or reflection active. The tags to use are) U8 j6 p- ^$ j0 U  }. s) e
  48. #  below, all must be on the same line in the comment.# A, v9 p* Y/ y1 W
  49. #8 d* S* E) G; B, W7 K
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)$ s( E' u! f0 Z  Q2 Q
  51. # <shadow>           # set the event to display a shadow
    % D; ~0 S  {, @' K
  52. # <reflect>          # set the event to display reflections3 w9 O4 _" K) e3 y
  53. #7 X, a5 K# v# f, v, f: B+ Y( D
  54. #------------------------------------------------------------------------------#) s8 U7 R/ ]* h8 l( r
  55. #  EXAMPLE:+ m; M% |2 ~9 X* `7 p# l  \) b# s
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    6 S0 p, Q, \: Y( |, F
  57. #------------------------------------------------------------------------------#
    # `7 Q$ E  M# v2 k2 h5 Z9 r3 ^/ q
  58. 4 h; ^% V, @' `! P$ m/ k2 |0 O
  59. % A3 @1 K4 s1 A: G/ Y+ `
  60. #------------------------------------------------------------------------------#
    0 j3 R/ b3 {0 {5 i& o1 P4 z
  61. #  SCRIPT CALLS:
    ' I( n( c( H# l6 g% x; G
  62. #------------------------------------------------------------------------------#  O4 G/ f* }6 G6 G- A! v3 H9 I
  63. #
    . j1 w* K. T! P8 i% Z) j0 Y2 T
  64. #  char_effects(x,x,x,status)8 T5 e9 X6 l+ P  _' K
  65. #7 v, ^4 s4 d1 D  W4 K( E
  66. #------------------------------------------------------------------------------#$ R# o* @) h! b( s: t
  67. #  # each effect can be true or false to enable/disable them during the game.4 \9 Z" }5 U+ G3 f# I
  68. #  # you can change multiples of effects at once, x being the effect number$ G; u; E" }1 T8 U7 [9 u( n2 T
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    3 T: D8 J+ G5 @$ l
  70. #------------------------------------------------------------------------------#
      X5 Y$ j/ ~$ |& X4 S3 ?6 U+ [
  71. #  EXAMPLES:
    $ A$ [' i& J4 M3 Q
  72. #  char_effects(0,true)              # turn reflections on
    # Y9 F- O! O4 K, S, P+ E
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    : Q7 C# B( r5 I9 z7 S! `6 l7 M
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    6 }, g* ^% @7 J% X& X
  75. #------------------------------------------------------------------------------#, |- D+ c1 n3 V0 }- o
  76. #
    ; Q) q9 }0 t' {: W% d
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    2 Y5 }3 ~2 V6 G# s4 V. C
  78. #
    1 o- A  A% R0 _2 W$ b9 X
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset% X6 g7 l) K+ C6 t2 r( F
  80. #
    & ?& A$ u' g6 Q' P: O! x4 e2 y
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    8 |  p! _! ?0 ]$ x3 s
  82. #9 Q8 X6 l' U' z( k2 m/ u" N
  83. #------------------------------------------------------------------------------#
    : o$ ~9 x( r& m
  84. #  EXAMPLES:
    7 R( O- \% d7 H* {
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite( t) d2 U' E6 C) @
  86. #                                    # in position 2 of "Actor2" charset.7 \* h. x2 b$ N
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    4 n- Z/ `6 h2 g5 D  z" W
  88. #                                    # "Actor4" charset.
    ; d! s9 ^! g) [  x9 e9 ]/ k- M
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of1 n! }9 D' e+ q$ p& _
  90. #                                    # "Vehicle" charset.
    " `6 d+ w. P( @% Y( h4 u( W" p& R; @
  91. #------------------------------------------------------------------------------#
    3 Y! Q# E, K2 T; f
  92.   
    ( B( S, Q: }( D" j5 @
  93. #------------------------------------------------------------------------------#' h! k) u# _; g
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    ' U5 s8 ]( v# e' P- D
  95. #------------------------------------------------------------------------------#
    " B" T. K7 h" q' M0 D4 @! o3 k- r
  96. #
    / F1 Y* R( P# ~6 D9 i7 U( a
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    / N4 A! F) Y& s& j4 [) }8 y& u+ \
  98. #                          # use this to specify for mirror and reflect.) [1 F/ k! }  K. a, P5 J
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change5 W( \" {. S" W, y6 e
  100. #                          # to change all events use :all$ c2 @  ^4 R( ?( Z+ @' O: w; z
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make4 c' [6 Y" A( ^; b
  102. #                          # it 0 for no icon.
    ' g' }- I% ?, `# E% ^/ z' }3 E0 e
  103. #
    , I0 Y: D$ [! j7 p- F: D
  104. #------------------------------------------------------------------------------#) {8 ]# ?0 {! f' W/ Z) Y7 j
  105. #  EXAMPLES:0 r8 T% H0 I" W9 q6 |% }6 P3 J6 w
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON: r$ g7 A! e$ D( a! S! `
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    # p& |7 Q0 @3 ?& [/ j1 K& e
  108. #  reflect(:all,true)      # Turn all event reflections ON& C( s1 `  e2 d4 C# a8 x& d% M
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    5 N* }) \$ {/ h" Q
  110. #* W2 ^% H1 ~) R6 R6 G
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    / G: b+ _+ ], Y" _
  112. #        a map. This is a design decision to try to keep lag to a minimum. You- w$ O( C- k" p- L; N( G
  113. #        should use these effects sparingly and only activate them on events
    & {. ]0 `  f& _, _* f9 O8 c9 E
  114. #        that require them.+ C) _: \/ Q8 O' I0 D! x4 C
  115. #------------------------------------------------------------------------------#; m* n4 @* v+ p/ i/ w( E# {9 \
  116.   ) l+ k& U/ t$ V, N6 f9 L3 `
  117. #------------------------------------------------------------------------------#( I! P1 }9 E+ q& r( [$ ^8 r# r9 D
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES  G( ?* K* N& ~4 a5 u3 ^. x1 q2 x
  119. #------------------------------------------------------------------------------#; S" D$ {7 {0 _9 S. f# F$ W; i: M' A3 _
  120. ## `2 L9 n& p% n" Y  Z" f/ K3 J, E& m4 M
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default % k* e- m6 ~, ^
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    ) M/ M0 f/ z6 O# R/ T& b- M
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    ( J# C; z5 g, W, k- t9 [
  124. #
    9 R, r+ o, p$ p3 t* {6 Y4 _' |: K
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    / \: `0 Q+ L& K; r8 }0 m/ T0 L& y
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    , M8 s5 e( A+ Y& e6 r' u
  127. #  v_icon(x,x,x,icon_id)
    3 ?) E  g: ^% Q- v- U: ]; @
  128. #, p" S" }7 D4 p7 ~2 T6 ?0 x
  129. #------------------------------------------------------------------------------#/ r, \$ O4 m! J5 I
  130.   
    + o' _3 }& M' d/ i+ h. ^
  131. #------------------------------------------------------------------------------#3 Z. E9 G3 D2 }0 X2 Z9 A" n
  132. #  SCRIPT CALLS for shadow options
    ' Z+ b; u! w/ G; `4 }
  133. #------------------------------------------------------------------------------#' |9 H  i5 U2 i
  134. #0 q# F  S4 U2 l
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the ( P) Z( h5 T9 L* z( u# {# _
  136. #                              # light source number you wish to change (for- O7 O( x" m3 f; k1 b  J
  137. #                              # more than one). These are reset on map change.  R7 ~) B% K& t# T; g  I
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    ! M( C: U2 a/ |, G! i1 L5 i! O
  139. #                              # This will need to be in parallel process if you
    7 H5 I4 m* j! E, X" ^# n
  140. #                              # want it to be a moving light.
    - `2 p3 o( l) V' W1 M3 l3 ^* s
  141. #
    7 t; A9 }: U; m- H& Y. J, f% F' n
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    + }8 b1 K8 w7 ?: H% x  h! J
  143. #; e4 T8 N8 w( e  g- A( S$ h# J- m: ]
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    . j/ L6 Z# h' P' F7 \6 a
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    & a  E  |6 P+ K$ W0 q5 n
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    : V: E* H! l! `1 W8 P( Y+ k+ L4 l
  147. ## ^, f4 N, f6 e: t# o( Z$ r! \" s
  148. #------------------------------------------------------------------------------#1 `* [& D& ^7 [% q1 c$ P$ t% Z
  149. #  EXAMPLE:$ l5 t0 J/ _4 C' W1 l! \' c( h
  150. #  shadow_options(80,10,false)    # This is the default setting./ d# W" Q) a( S
  151. #------------------------------------------------------------------------------#' ^4 L* u0 @, f4 m& v
  152.   
    ) R0 p! c8 M  U1 ?
  153. #------------------------------------------------------------------------------#" O, o$ F; L" r/ q3 @$ ?' G
  154. #  SCRIPT CALLS for reflect options
    1 b# H0 u5 X) B. {
  155. #------------------------------------------------------------------------------#
    ; [9 F! Y0 o' T0 c% q" B
  156. #
    7 Z8 `0 d* `% ]
  157. #  reflect_options(wave_pwr) + s, `/ \  d3 a  |- M
  158. #
    % x3 a" h; H, v; p& t
  159. #    # wave_pwr = how strong the wave movement is. 0 is off7 i8 r$ r6 k6 t
  160. #
    4 S  d7 l) T: X" w. x3 X' p$ Z1 A
  161. #------------------------------------------------------------------------------#8 F  R7 D  \6 O
  162. #  EXAMPLE:
    0 K# G& U1 c( J) Y: t& W) }
  163. #  reflect_options(1) # Turn wave power to 1
    1 e6 E1 a' J1 X# @: B
  164. #------------------------------------------------------------------------------#
    7 t! K: O  o! ]2 G5 E# B. w3 {
  165.   
    : q3 U+ n$ B* B# E& m; j
  166.   
    ' p- h7 U, g* c* k
  167. #------------------------------------------------------------------------------#
    * m7 O7 H5 l  X
  168. #  NOTETAG for ACTORS2 \1 [- t5 w) p% [8 d' ?
  169. #------------------------------------------------------------------------------#
    4 q, V! G0 c* J0 X' }( [0 [
  170. #4 g; E1 ?# W' m7 ?& \4 i0 m9 K
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    / a, u& R( G2 Z+ l
  172. #
    - B( y1 K* p* |" h8 c
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    0 G) n' ^3 H1 ^% @% ]& I. J+ D9 h
  174. #                                  # and use the character in position 'pos'
    . Y4 P; Z/ j7 {9 H0 n* c3 Q' d. e( u
  175. #) h, B' o  v, X$ |, d$ D
  176. #------------------------------------------------------------------------------#+ g6 i# \7 g- a5 J0 Q4 o3 P
  177. #  EXAMPLES:$ ]) H# S" w, ~; y: J4 W. \" t
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset( x; B% B  q" e8 B* v
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset: V4 S8 B/ X9 t
  180. #------------------------------------------------------------------------------#/ Q) I" D9 U0 z# w
  181.   
    8 `- v' L1 o4 W( I/ Q
  182.   1 x2 Z9 R) l. n) C1 X5 w
  183. ($imported ||= {})["Galv_Character_Effects"] = true4 \9 ]! R& J3 h1 U
  184. module Galv_CEffects/ `3 x6 g! \/ D0 ?' ], V# w
  185.   2 R; g. \) ~" g- g% _/ R+ u
  186. #------------------------------------------------------------------------------#  " O# Y! B) J6 B' n
  187. #  SETUP OPTIONS
    - b! x$ t; W6 N+ Y8 e/ A! Q( Z' L: n
  188. #------------------------------------------------------------------------------#2 k8 @6 ~4 k6 o* I* z/ P5 [
  189.   
    3 @6 A# E5 d; s3 d; @
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    * W# p* d. x9 g, J! ~
  191.                         # region on the wall you want to make reflective (and
    9 v/ E4 ^+ o& q: b1 D
  192.                         # then use tiles/mapping that make the parallax visible)
    2 c( I' B+ p3 y2 g
  193.   
    0 n+ ?" l) E8 c- m4 u% N) |3 e& {; u
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters& r" V9 @/ ^/ j4 P- S
  195.     9 c  G& |/ O' D: s/ Z( g* i; A
  196.   REFLECT_Z = -10       # Z level of reflections9 Q2 I. J5 R5 v: ^/ A
  197.   SHADOW_Z = 0          # Z level of shadows0 m6 z3 F) q' p; R: y
  198.     }8 J2 y& O9 k4 q0 X2 B) |
  199. #------------------------------------------------------------------------------#  ; J# ]8 v. L2 F, U
  200. #  END SETUP OPTIONS3 q& L2 S/ V- }1 [% V/ _. \
  201. #------------------------------------------------------------------------------#
    ' X0 d! q. `% s) r" p; r
  202. end( X; g3 o6 ^0 c, B
  203.   
    1 l0 r" M) U% Q) v  F! r& _- S
  204.   
    ( q4 e% @/ H. C5 b$ H% \- o

  205. 8 I- N# b- y: M9 x
  206. & r' E6 {5 V0 ~0 W* t
  207. class Game_Map" d, ^: E: V) w+ y9 [; b
  208.   def do_icons(refresh = true)7 A0 F# o  M5 A' ~! y5 O
  209.     @events.values.each { |e|
    . ^. X/ f# W+ P) f( S* ]
  210.       next if !e.list2 u; X6 ?' Z5 g/ [) ]( P! {& V4 e
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    ( ~! x" ^! z! C2 I9 x! O
  212.         e.icon = $1.to_i& e; w8 h6 [  M2 y
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    ; X  A, U4 H& N9 j
  214.       else" X6 B1 i- [# S# T5 L6 }' o2 i
  215.         e.icon = 0% X" d3 K# l% G" M/ }
  216.         e.icon_offset = [0,0]
    ' P( f& c2 O" T) O4 V
  217.       end
    . q1 x( G) M2 c% ~) F  S( @
  218.     }
    - d; o4 s& t  w6 F; Y
  219.     SceneManager.scene.spriteset.refresh_effects if refresh5 W# T( b" c; p) D
  220.   end0 {8 K8 Y) X6 p* }1 ?6 s
  221.    7 Y% J$ W: g3 e" ]  W% H% f+ P
  222.    ) k! d  ?1 k/ ^& `" F
  223.   def do_shadows(refresh = true)8 a5 s0 B4 s8 D% b
  224.     @events.values.each { |e|
    . t1 _3 p+ Q9 l3 A3 y/ {
  225.       next if !e.list
    ; s5 B4 P9 ?# X, z" b
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/  O# Q' S2 l  N3 {# q1 N
  227.         e.shadow = true& {1 r% L* W1 m6 I3 c1 ?- N2 U+ N) P
  228.       else7 A, E5 W6 L; Q4 {
  229.         e.shadow = false! d: A5 I! y3 ]9 J
  230.       end: j$ v7 B) e6 a) h, o
  231.     }4 n! J9 f* s, G2 A$ j
  232.     SceneManager.scene.spriteset.refresh_effects if refresh9 H1 I0 L" f  K, R, }% z" G$ ]
  233.   end6 `, ?! u/ y" G; o. J. V. U8 M
  234.    ( z4 p  `* j( T2 Q# d  g, v
  235.   def do_reflects(refresh = true)
    9 b+ E" h" C" I7 D
  236.     @events.values.each { |e|
    $ \: _9 E* R- u5 p
  237.       next if !e.list
    # z; C# _) N: L7 G
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    ! {+ A' \. X; O6 q! I2 ^. w& s7 T
  239.         e.reflect = true9 R7 H* W$ p) m' T& X; @( ?
  240.       else
    " R1 E, |6 O* }" F( T- j
  241.         e.reflect = false
    5 i  b0 v( w* ~( Y8 U; Q
  242.       end
    4 m1 _  Z1 f+ Z4 N+ \
  243.     }
    / D6 d' P/ h* ^- O+ o' R- e5 R* B( {3 L
  244.     SceneManager.scene.spriteset.refresh_effects if refresh6 k# q( G6 i$ r% `1 q& {" \5 P
  245.   end6 n: p' L: b) w7 h- j# M2 [
  246.    
    , Y4 I( N0 G6 q) V9 \3 E& x
  247.   def do_all_chareffects4 P8 L, g/ a2 A8 J/ `
  248.     do_icons(false)" Y1 @* a3 B& I1 v
  249.     do_shadows(false)
    1 p- g$ C9 D+ F& E
  250.     do_reflects(false)
    % o& S7 m& ], U
  251.   end
    % {2 W7 M3 O8 p' `8 g
  252.    
    0 b4 y: |% K# ?8 G0 H' z5 p
  253. end # Game_Map
    6 V- [. f; P9 p6 @$ R+ H( L2 Z8 R7 U
  254. ! i; e: l1 h4 R$ I

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-2-20 05:20

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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