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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
. l. U' O( O+ I" ~
这个代码怎么用啊,有大神知道吗。我从国外找的。& u2 n9 g! Y6 N) k
http://galvs-scripts.com/2013/02/21/character-effects/+ f3 Q2 H# Z5 b+ z
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------## `* ^) W$ Q; N, v. B
  2. #  Galv's Character Effects
    3 f* g2 o" I: G; o% s
  3. #------------------------------------------------------------------------------#
    ( k6 B' L. \# p; K0 b9 I+ ~4 ~2 k! h
  4. #  For: RPGMAKER VX ACE
    - a( k% `/ t1 ~1 e$ }
  5. #  Version 2.1! N- ~$ J7 L: X
  6. #------------------------------------------------------------------------------#
    & x1 _( a2 z8 p  F
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows: z: [' C# C7 t/ A) _
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    # Y% g5 |/ b- y2 S( S
  9. #                           - Fixed shadow facing bug7 D* y: K& A: d1 X& |/ l& I
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    1 |1 g( b' A0 i
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    $ d! @  W" C& R4 a. }) r. A) D
  12. #  2013-02-22 - Version 1.7 - bug fixes
      [6 C# t6 w! @# f; d- C
  13. #  2013-02-22 - Version 1.6 - added icon effect
    ' Z$ U( R' E* a: I
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps+ R2 h% z' Z8 q# n6 i3 U
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles0 V2 n1 p7 m) y3 N% l; L
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks4 [+ e% Z) p! G2 l: ?6 U$ m! J2 g
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    ( }2 D6 E" V( Q* [/ n' b$ M8 x
  18. #  2013-02-21 - Version 1.1 - updated flicker effect* {1 N6 [0 T' ~* q
  19. #  2013-02-21 - Version 1.0 - release
    * [/ c* Y, e  Q$ u2 K
  20. #------------------------------------------------------------------------------#
    . A! B: ~; |1 j
  21. #  This script was made to provide some additional effects for characters such
    ( _( c  R& v( e7 N1 \/ q, C
  22. #  as events, followers and the player on the map.7 x. {+ u6 M, z5 ~
  23. #  Currently it includes:
    3 f. K  h7 w4 l3 Y. j) Y
  24. #, D- {4 |% Q, I
  25. #  Shadows6 D% R1 a$ |2 a& f) b" R( ~2 @; k
  26. #  Shadows that appear under player and events in a directions depending on/ z* t9 K* r# r+ y& _9 B! A- ]
  27. #  a light source that you choose.
    1 O: L+ W; j% ^9 }4 Y1 T# @9 \
  28. #/ s- |3 ]# H6 D( T+ l8 d
  29. #  Parallax Reflect9 P% W9 }. D  F8 w& f" u
  30. #  Reflections that appear on the parallax layer for events and actors to be
    ; P1 Q5 r+ |! p9 n8 v- a* a
  31. #  used for things like reflections in the water or glass floor etc. To get1 N1 j# ~+ H. E4 S, [+ t, w1 J
  32. #  effects like the demo, you need to edit the charset graphic to make the water7 g0 a8 B) a+ `. I6 @/ P& Z
  33. #  partially transparent.
    8 [* w. t# `2 ?4 Z6 g  z2 {) ?
  34. #
    $ _! [9 S! m# M; N
  35. #  Parallax Mirrors! b3 v0 K$ j1 l
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    ' K+ f# W7 S0 A
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    1 V' @+ f+ C, [* y
  38. #  changed so actors and events can use different charsets for their reflections' ^1 s6 [8 E) h* K0 z3 G( ?8 x
  39. #5 X: F$ ]! t) q7 l7 d* i
  40. #------------------------------------------------------------------------------#5 s9 P: h8 Q3 C( b$ X+ S; G( Z- x
  41.   8 `% X' D4 r2 N' k! U

  42. & M/ u5 Q. W- j% ?
  43. #------------------------------------------------------------------------------#
    4 [6 L: d  T$ ]" g: n
  44. #  NEW - First event command as a COMMENT9 e$ ^' e& T! L1 Y' I
  45. #------------------------------------------------------------------------------#
    ' [5 F& i! y; |
  46. #  You can add a comment as the first event command on an event page to set if
    , A1 G. C* F. j" C" c
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    ! e* [. x) K1 E  Z% h& p# ~3 {
  48. #  below, all must be on the same line in the comment.
    / M+ J; v+ G. P5 C# I* y: n
  49. #- K$ ]  [6 {& p5 W: i0 g+ D* d: v* O- `. r
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    7 @* z9 I4 C) T  }/ ]* W
  51. # <shadow>           # set the event to display a shadow
    : \3 x1 X2 _! T7 s; n' v
  52. # <reflect>          # set the event to display reflections
    3 @4 L; {5 s. `% \% i1 @
  53. #9 \# Z& z: p% ?' u
  54. #------------------------------------------------------------------------------#
    + w7 ^, X' Z: x# i! S
  55. #  EXAMPLE:
    . ?- |  U4 E- y6 ~- V* W
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    0 n7 d3 b# @8 W. Q
  57. #------------------------------------------------------------------------------#5 q) S& ?, Q! v, P

  58. " X& \( V. ^6 V' p1 k" i

  59. ) u" M! L9 |" G4 E& w
  60. #------------------------------------------------------------------------------#
    - J0 o2 }, w- e+ @5 x/ q8 d
  61. #  SCRIPT CALLS:
    9 o8 k+ g; M& b' h* S7 Y
  62. #------------------------------------------------------------------------------#2 L$ B4 a; g) S
  63. #
    , a( x5 L9 X# x- W) \0 L
  64. #  char_effects(x,x,x,status)" G. S' g2 T' S; Z8 g/ R! ^( t
  65. #; G7 f9 V) j! [. r9 F' R
  66. #------------------------------------------------------------------------------#
    ; H. p& y; e8 K* ~+ l
  67. #  # each effect can be true or false to enable/disable them during the game.% w4 L+ h. {+ R( A" d  ]5 k9 \9 [
  68. #  # you can change multiples of effects at once, x being the effect number
    1 ^6 K" k6 }8 A! `2 k# k" a. m5 H
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons' n9 c' V4 h1 Z8 D
  70. #------------------------------------------------------------------------------#
    ; I& m( f( K! h6 j. ~; P) P
  71. #  EXAMPLES:1 ]5 Y' [* ?; l' V
  72. #  char_effects(0,true)              # turn reflections on
    1 Y+ q  v0 }5 k+ u6 o+ p$ s/ l$ X! m1 e
  73. #  char_effects(0,2,true)            # turn reflections and mirror on8 q8 T/ ^* A! W% q6 q' o
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    & q! @( l1 X8 q: h+ u' ~1 K( U% Y$ R
  75. #------------------------------------------------------------------------------#0 p1 k3 ^! \3 y8 p
  76. #
      G* s- Y3 V9 m. \% y$ ^
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    1 G- n: f0 [+ @/ J0 n5 E$ H
  78. #+ T0 U0 h& s7 T
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset% h( g; V  n) _$ C: g9 O& l  t8 O  l
  80. #
    8 y5 ~& e7 {; s
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset& D) F$ h2 \* E! W) Y7 o* `
  82. #
    . E+ v5 O* i. l
  83. #------------------------------------------------------------------------------#, z. V$ d3 \1 B. M7 s
  84. #  EXAMPLES:. O( q$ k) q: y; V$ Q5 K& y0 K6 ^* X
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite9 R) L4 g9 M, b* l" U
  86. #                                    # in position 2 of "Actor2" charset.3 U: Q0 ~2 C" W, b& l
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    , p& b4 B9 C5 D4 x# i- a" S* U
  88. #                                    # "Actor4" charset.9 m% s5 f' U: e$ {3 A3 n* n
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    7 h5 B. b' y, C, ?+ e7 h( b9 f' Z- N
  90. #                                    # "Vehicle" charset.
    % e  O: ~9 j' {  j
  91. #------------------------------------------------------------------------------#: x' s* I* O( I7 {
  92.   
    2 ?0 A% ]# m% T' w3 ?2 T
  93. #------------------------------------------------------------------------------#. F6 M/ v) Q* Q" x
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS; q- T! y2 @; J  R( o- d$ P
  95. #------------------------------------------------------------------------------#
    * W3 _5 J# Z5 j* V3 S' I, ]0 j
  96. #0 _! ]/ S3 y; ^. H7 O
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off$ z; |% }& ^. U
  98. #                          # use this to specify for mirror and reflect.  E6 C' L: ^: M4 S' @4 j
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    5 _; r' e4 V- L# O
  100. #                          # to change all events use :all4 L) I2 |( j& u- m) ^4 Y$ s
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make' s$ z) Q. |) k* L# @
  102. #                          # it 0 for no icon.7 U% R( Y$ `3 V# x) X$ z
  103. #9 C( l) Y! a% `* j1 {# A
  104. #------------------------------------------------------------------------------#
    . i2 Q+ v2 G7 B4 e: H
  105. #  EXAMPLES:8 Y& @1 W$ A! k) K
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON* C  R! V1 _8 {8 o- K0 V8 g" k
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    ! h' s' Q8 s2 e* p! H
  108. #  reflect(:all,true)      # Turn all event reflections ON
    - J: y: ~) x! }1 b' B" r3 ?
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear- q+ _2 [5 e( h% l
  110. #
      h" x4 A' h: m) p/ V9 g6 Y
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering9 |6 o" N/ a# i( x7 _
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    # I, J, G& e" l. J6 U' _7 t
  113. #        should use these effects sparingly and only activate them on events! g: g3 u/ g+ q
  114. #        that require them.0 n7 I; x8 [9 M8 Z9 W& ~
  115. #------------------------------------------------------------------------------#: {; z8 P# r7 v& I: D6 ^
  116.   
    6 y3 C; z9 H; M* C
  117. #------------------------------------------------------------------------------#7 ?  A- H+ B0 E) c9 d6 b# u
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES4 Y6 M- d9 I, l9 p
  119. #------------------------------------------------------------------------------#  x, b: ]8 s' [- U2 `  `
  120. #
    + A+ W9 |# b( ^" w$ N- Y* Q8 M
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    $ a/ z; k0 [2 H$ g) n
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 3 l8 W# T" l8 I0 d5 ~6 f5 ?
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.# I+ T" x& I' `9 |8 ]7 l
  124. #' R; r  l* n" E: r5 H
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects/ V, J& F. u. r$ B
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.' v( P' q, ?3 m8 @- V7 j$ H8 F
  127. #  v_icon(x,x,x,icon_id)
    2 K9 B' r: ?% S0 A: C# a
  128. #
    0 f  F% k6 S- u3 t  E
  129. #------------------------------------------------------------------------------#
    # e5 N8 P6 h3 g) }( O  G, D
  130.   2 L0 I; @- {$ h  \
  131. #------------------------------------------------------------------------------#
    & ]2 S" d* I; ~$ ?& O+ k' L
  132. #  SCRIPT CALLS for shadow options6 z$ D/ B; D# k% T
  133. #------------------------------------------------------------------------------#
    % ^; P9 J" R7 G) z8 M
  134. #
    ( t( y* s, g; F* j  Q/ ]5 d6 l
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the 5 M/ i2 O; C5 i" G. Q4 G4 L
  136. #                              # light source number you wish to change (for
      u9 h/ q+ A; _3 R
  137. #                              # more than one). These are reset on map change.
    ' ?4 B4 J% {, Z2 B
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.! j+ b: b) Z# q
  139. #                              # This will need to be in parallel process if you( y; v! E/ D( x7 u# P8 C4 j! U! J
  140. #                              # want it to be a moving light.
    . h( g; M8 [' S
  141. #* `6 q# v$ p/ w4 w/ s! b# T
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    : \, F, y8 |2 _, J+ ?
  143. #/ _4 S" Z& x; ]& V, I8 F% z6 u9 G$ {  a- E& N
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    % {2 }" I6 y8 x) ]
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    ! ]. V) D! L! u
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.& H- F% l1 T, i5 F# ~. A' \
  147. #5 i/ h( v* [( z! Z
  148. #------------------------------------------------------------------------------#' v  w/ Q! `. P+ S+ U
  149. #  EXAMPLE:, A$ B* l# [1 T2 ~# m. ?! w
  150. #  shadow_options(80,10,false)    # This is the default setting.8 G- K0 ^$ W' r" ?, p+ o; h
  151. #------------------------------------------------------------------------------#
    , n  k6 ~- G9 z) F; Y4 h! U
  152.   
    4 T  t+ o$ D( D0 D; K: e
  153. #------------------------------------------------------------------------------#* e! B% [( [! Q5 E! z5 a
  154. #  SCRIPT CALLS for reflect options
    : P4 P. f5 p+ y- s3 N
  155. #------------------------------------------------------------------------------#
    - N* f4 e+ ?" B3 F
  156. #( ^6 h7 _3 W/ ?" n# e- L# n: c
  157. #  reflect_options(wave_pwr)
      W7 l: i; L* M* A8 B8 g: h9 e
  158. #
    + C  q, O" @( d- D- L0 M  i
  159. #    # wave_pwr = how strong the wave movement is. 0 is off! a( A0 V4 h; x6 Y3 W8 @
  160. #5 t& b& H* s, a9 l
  161. #------------------------------------------------------------------------------#
    9 |' x3 T5 [. D, {
  162. #  EXAMPLE:3 Y! ]6 N% f3 C% C$ U
  163. #  reflect_options(1) # Turn wave power to 1
    4 ?, h" N' ^3 ~! q3 B+ S: H  n7 `
  164. #------------------------------------------------------------------------------#
    6 v) ~4 D5 u. y# r3 ], |+ b7 p
  165.     ^' ~# q7 Y+ [0 p
  166.   8 L6 `: y2 T- ?# N' n" A$ ~( S
  167. #------------------------------------------------------------------------------#
    0 ~9 J5 p; ?1 A8 R8 ~( l4 F8 ?
  168. #  NOTETAG for ACTORS: m7 Q0 }1 b! z# L6 [
  169. #------------------------------------------------------------------------------#; H: r1 o1 f+ R% ~; I, c  F
  170. #* e/ Z9 x4 G9 P% J" B* w
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)1 o1 M8 ^. B5 W) j
  172. #7 O1 g9 q' @/ ~. s" \- m8 b0 u9 o
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    8 G# h) h, Z6 d9 y/ v/ F8 t  L
  174. #                                  # and use the character in position 'pos'
    1 K; h# R1 h' W
  175. #
    1 R; F9 p+ g1 Z  Y$ r8 e' ^& W
  176. #------------------------------------------------------------------------------#% L7 A4 w& K; [: i$ h
  177. #  EXAMPLES:
    ) N( G6 u5 M3 @- R8 F
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset0 c+ O+ l* F0 G& t% f3 C
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset# \. }$ Y6 W5 B: G* q( a. l# J
  180. #------------------------------------------------------------------------------#' e1 D( x: X- U
  181.   
    7 ?: [( M% }0 c4 P) c1 A. T
  182.   
    / G) V8 _( H* I
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    2 B5 f# I7 {; f" f' L2 l
  184. module Galv_CEffects$ o5 s  Q7 P" |, p
  185.   2 A( g% X* m9 r* ]+ g' Z1 F
  186. #------------------------------------------------------------------------------#  
    # N8 d' @/ D- {) \
  187. #  SETUP OPTIONS
    " S. _2 h# {% k. s; V$ N$ ^
  188. #------------------------------------------------------------------------------#
    ' B0 Y" h/ c' q: N- t% Y( ?3 p) V
  189.   ' d% s; O% T$ {
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    1 y* d& ?) s! t: [. P! k. o5 M
  191.                         # region on the wall you want to make reflective (and: u1 j) O' r. p  A- c
  192.                         # then use tiles/mapping that make the parallax visible)
    2 ?$ V& e: d+ N6 l1 F' E. V
  193.   1 a7 N4 G0 L9 c' U* v8 }  J/ H
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters, I8 w$ f6 ^$ ]8 |1 S  X
  195.    
    1 j% f# B& K9 H  t' A
  196.   REFLECT_Z = -10       # Z level of reflections) p' P( r2 ]$ _
  197.   SHADOW_Z = 0          # Z level of shadows
    5 G: k2 ^; r1 Q8 a
  198.   
    9 t- X. y' L9 }% S# l
  199. #------------------------------------------------------------------------------#  
    3 p/ j* ^/ T' d  m
  200. #  END SETUP OPTIONS. }( l5 f5 O9 q, W
  201. #------------------------------------------------------------------------------#2 o4 i* v! j' Q/ p: k( m) C/ ]% |  V
  202. end
    3 A1 {, q  s- l6 G: Y, Q" j
  203.   
    $ A# O& D1 d  B7 W, ?4 D' i
  204.   % |, Y( w! b, u* i, n) G' e: m2 T

  205.   V1 X! {9 |' ]# v, l
  206. 2 u) S: ~, V& w
  207. class Game_Map
    ) v" p& q$ F. X, b8 P) ?; t2 s, c6 }
  208.   def do_icons(refresh = true)
    ; {# I. d: T* b) ]. |1 G: f
  209.     @events.values.each { |e|) V( i; W' n/ ]7 u
  210.       next if !e.list
    7 T9 H( X* X* o* p+ H
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    6 E. \! H( O& ?/ X9 d7 d6 Q
  212.         e.icon = $1.to_i
    " [* c/ V3 c. J$ `! L; _
  213.         e.icon_offset = [$2.to_i,$3.to_i]& U0 g  B, o0 ~: b
  214.       else
    - {% x7 s% ?7 p. Z* {. k6 [$ s
  215.         e.icon = 0
    6 r# B  o. J  ^# p3 K! U
  216.         e.icon_offset = [0,0]
    6 u4 g9 T9 {  U) y! @
  217.       end" S/ M% f0 K5 W( t
  218.     }
    ! `: t# ?7 z6 U- v) N; G, V! ?
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    " B: r, ~8 N: t5 f  Y
  220.   end
    / D+ |0 Y# L4 N1 h
  221.    
    & {- d7 Q2 j9 S6 V: u* O1 |6 H3 p
  222.    
    4 w. O  D; {, Z! e; z
  223.   def do_shadows(refresh = true)
    7 h7 Z, t  y7 u' {+ C% U# {
  224.     @events.values.each { |e|
    0 Y8 D$ d/ U6 r* H  b- [& Y
  225.       next if !e.list7 V) s, n- S1 A
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/0 \2 a- J+ V5 P/ _
  227.         e.shadow = true" ?0 x5 l; e9 I4 S7 E
  228.       else
    , `  g& c) V0 G" |( U# \! w$ l
  229.         e.shadow = false
    / Z7 g( ^6 {& o1 ?7 U' `
  230.       end8 B& w, K. ~, a& L$ n& H% V+ U
  231.     }
    7 @) Q6 E, D% J" R; Z
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    ! g/ p6 A5 N6 R  N
  233.   end% I" I6 N+ g, b4 }% b) u3 V0 |
  234.    
    5 c& [6 A2 y# m
  235.   def do_reflects(refresh = true)3 j* k! z0 }- R0 E
  236.     @events.values.each { |e|
    ( Z/ E% B7 k5 Y1 _! [4 f
  237.       next if !e.list
    ( T5 w9 @; K- D
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/' o  E/ E9 S9 K% ~$ ]! n
  239.         e.reflect = true
    5 y: Z" Z( A3 L6 l
  240.       else6 Z4 g7 W- `  ]& |
  241.         e.reflect = false
    + ~7 r' s& P2 v. A
  242.       end
    " Z7 g8 y: V  f
  243.     }( R! Y8 m. h: w% b# {
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    & v+ n9 M/ \; N* y. X
  245.   end
    1 z: U8 D! l) r6 y
  246.    
    2 m& a& Y3 }1 E" K
  247.   def do_all_chareffects. u/ L( g% Z: }+ A
  248.     do_icons(false)
    ' b" t8 n4 A# Q1 q  D
  249.     do_shadows(false)3 l$ w4 t' }/ @
  250.     do_reflects(false), B7 U. [% N. m0 d' F
  251.   end" D) M9 ]2 z  Z7 Y& ~+ x1 D% t
  252.    7 ^& ]2 T" J1 o3 d* P/ H( s
  253. end # Game_Map
    1 q0 T, j' Z, y: ]. v

  254. $ Q$ {. ~$ H3 h: w1 s+ C- m

  255. 1 Z; H% g0 f1 l

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-10-27 22:15

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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