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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

, [: `& e) Y6 w( n* h- i这个代码怎么用啊,有大神知道吗。我从国外找的。
0 v9 T( m4 r, a3 @+ ^  L- _http://galvs-scripts.com/2013/02/21/character-effects/
" u+ ]+ |1 |7 j' O是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#, b/ c! r) P/ P8 b7 Q* u* E
  2. #  Galv's Character Effects
    8 N; O9 {% c8 o
  3. #------------------------------------------------------------------------------#' W" T9 r# W. @9 O/ a0 N/ |) R5 n1 F4 v
  4. #  For: RPGMAKER VX ACE
    - q- m2 o! Q2 j% u  G2 H( r; K7 v6 e
  5. #  Version 2.1
    , ?8 U. c. Z2 w8 i9 e
  6. #------------------------------------------------------------------------------#
    8 M; d/ l( i( W- P6 u. c
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    9 s' I5 f; Z9 f2 N* ^
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    " |- b* p3 p! m$ c2 V; `+ k
  9. #                           - Fixed shadow facing bug
    4 X, B+ t9 m! F* Q! T
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows( v4 g$ J$ E) f- L; s
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows' E$ E6 X. P/ ^9 E( |( k: n/ z, b
  12. #  2013-02-22 - Version 1.7 - bug fixes
    , h3 ~4 R0 D+ {) N' y! W
  13. #  2013-02-22 - Version 1.6 - added icon effect0 l" o1 o4 v7 I% M. q
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    " Z& g& y! g. S& C) o+ J* P% ~
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles4 A0 X3 {$ L. x1 f, m
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    * l( F2 H4 Z" ?1 ]
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    7 r, o( f2 Z) ~+ ?0 ]; k# A6 f
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    # y% A- A  |$ s/ {
  19. #  2013-02-21 - Version 1.0 - release
    ( A" O8 ~/ F* h1 ^% Y
  20. #------------------------------------------------------------------------------#
    ' q6 B: l7 Z' d! v/ `( l' x
  21. #  This script was made to provide some additional effects for characters such
    8 F% r+ S; F$ B" C1 N! V! A
  22. #  as events, followers and the player on the map." D5 ?8 R2 \# t5 U# p
  23. #  Currently it includes:2 ]  b- ]9 I1 D% W* W) H
  24. #
    + N0 S* {. q: g5 h+ I' O) H
  25. #  Shadows+ m: t( @8 r' D' J) L
  26. #  Shadows that appear under player and events in a directions depending on
    $ |$ D& }# k4 S6 [0 r# _
  27. #  a light source that you choose.
    9 D, H) G2 ~! F& s3 M( R9 Q
  28. #1 ]3 z' U9 T4 Z8 I7 X' N) B0 n0 G
  29. #  Parallax Reflect
    ; g1 ?% t6 P; L1 G
  30. #  Reflections that appear on the parallax layer for events and actors to be3 v7 l( z$ c- l" _! t5 V
  31. #  used for things like reflections in the water or glass floor etc. To get
    + z! S/ Y" i! m, m
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    + R+ @: s& V& \) ]+ B6 ~/ L4 X' ?7 A5 N
  33. #  partially transparent.
    0 x! ~1 {1 [/ @1 p
  34. #  f" k# t9 z8 I) S) k# p; p1 p
  35. #  Parallax Mirrors6 N/ |: Q( Y, N) h* y1 S1 p0 X
  36. #  Much like reflect but are instead actors and event are reflected in a mirror! \! D. i, k: w3 h% M' `
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    . g$ d! `* H8 q$ k/ Z; o2 T
  38. #  changed so actors and events can use different charsets for their reflections+ u& E  ]9 \! U# E/ o1 t7 _
  39. #- z; W# w  l' S, i- l
  40. #------------------------------------------------------------------------------#
    % b+ \- ]0 W. u+ P& ]0 [8 O
  41.   & a4 F. i/ T. W' D0 k$ ]
  42. ( C2 a4 m% S$ c. o" c1 L' A
  43. #------------------------------------------------------------------------------#
    9 y' E2 x' W0 |0 o% ]9 b7 g
  44. #  NEW - First event command as a COMMENT1 t; s9 u+ d) V% I0 L
  45. #------------------------------------------------------------------------------#
      x* f! O, t, f5 E, y) }* |) k
  46. #  You can add a comment as the first event command on an event page to set if
    ; y2 I7 `& H. g8 }0 H% G
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    5 m: m- K9 U* c8 R
  48. #  below, all must be on the same line in the comment.
    % L7 I+ P: @* R4 A
  49. ## a% T* Y5 |0 k) R
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    0 n5 \( K: _9 E( c2 u
  51. # <shadow>           # set the event to display a shadow" q% o* N* x& Q# g( {
  52. # <reflect>          # set the event to display reflections. X0 G, y6 t+ Q$ _1 u
  53. #* U: U4 [' i/ Z2 X9 ~
  54. #------------------------------------------------------------------------------#3 E$ n8 o( E* k( |: z
  55. #  EXAMPLE:3 m' n& j! S- u6 }
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event& L6 P/ Z% E: A5 T) _$ H1 {% Y
  57. #------------------------------------------------------------------------------#6 n, J) v* R0 x+ ?* x. e; W' X
  58. 3 n' {. G! {( K+ @! D

  59. ! r3 e2 U) C% l  _* w7 Y
  60. #------------------------------------------------------------------------------#, q* j8 Y; @  l4 R3 m% i
  61. #  SCRIPT CALLS:
    , k$ ?4 A( A/ H6 x8 l  u
  62. #------------------------------------------------------------------------------#
    ; q, h$ V3 b0 P7 y: `" A
  63. #
    ' |" f, a: t  H
  64. #  char_effects(x,x,x,status)
    * M4 q! R/ E2 O& O! G
  65. #; I8 [$ G/ t1 v  S4 V- w& O& C  F3 X
  66. #------------------------------------------------------------------------------#
    7 @6 J. l* ?8 Z, F; \. g
  67. #  # each effect can be true or false to enable/disable them during the game.8 G, u; t/ U% n  L3 K6 g1 M
  68. #  # you can change multiples of effects at once, x being the effect number
    . X! G# M0 [1 [, }2 J0 _
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons8 @, d& u1 i, n& B' q
  70. #------------------------------------------------------------------------------#
    + i1 ?6 U5 g* R. `. v
  71. #  EXAMPLES:4 g/ a- O( d6 s) m+ I6 B! m" U
  72. #  char_effects(0,true)              # turn reflections on+ _7 }# l" z0 c0 O* E1 v
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    ; V% F" W1 I" i9 h1 X7 t, `
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    8 k- d- v' `9 o. R$ p# J# u1 a
  75. #------------------------------------------------------------------------------#
    ) K& \- }7 V- r# R* X% S
  76. #
    . {' }" i# }+ p2 o2 ~
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    5 g! `. d. M5 F, Z
  78. #( h4 V. U  |' V& z
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    3 X+ Y/ N8 r" ^
  80. #
    ; F# g( _! m8 ^& I' b4 w  g8 k
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    6 d) q# o+ d/ r  u9 \0 q) ^
  82. #, [' h: d6 p2 [$ Z1 q$ b) B3 f9 P1 }
  83. #------------------------------------------------------------------------------#
    1 }  `' t% R! Q3 e' a
  84. #  EXAMPLES:
    9 m' o. z/ d+ v7 x; d' x# b' i1 C
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    : ~% }0 T; Q4 K$ Z
  86. #                                    # in position 2 of "Actor2" charset.- @  P3 y" k8 L/ @) E2 H
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    $ y0 o3 G8 K% H  ?. J
  88. #                                    # "Actor4" charset.
    ; J! l8 k6 a& Y9 i8 O
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of) C2 T* \; W6 v' @+ q, z" p
  90. #                                    # "Vehicle" charset.
    & H- `# i9 b- k- v
  91. #------------------------------------------------------------------------------## E* h) [6 K  ^9 y9 X
  92.   4 ~$ B; @2 J! @3 n: U1 z3 o
  93. #------------------------------------------------------------------------------#/ v" Z. X5 `( Z/ V' R7 E
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    9 o1 P7 h2 r+ E+ L/ M* I7 g
  95. #------------------------------------------------------------------------------#
    & C3 B- b# S0 {+ T+ R
  96. ## p: ]" Q$ i. P7 O" _* n6 [, i7 ~
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    - V+ ~7 K  m: N( M$ z
  98. #                          # use this to specify for mirror and reflect./ g, o1 @# @4 G' |  E
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    0 @$ K% {) H6 \( I. {% N
  100. #                          # to change all events use :all  f. g. O, X. w) {: e
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make' Q- W5 L% t2 P" Q3 X9 v
  102. #                          # it 0 for no icon.
      O, v) [5 F8 ^& r( c5 r7 G0 F5 @: R
  103. #
    % ^, \4 F9 x. Y8 @
  104. #------------------------------------------------------------------------------#, n8 k) o0 B% H; @& d
  105. #  EXAMPLES:0 U. S- B# L% C
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    ) C; c4 w: E9 c6 t% i, B% u
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    " n1 Y; S, p4 F. I3 W
  108. #  reflect(:all,true)      # Turn all event reflections ON" S# H. T" ^3 j
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    ( K2 B/ P; d' {5 t3 k8 P  g
  110. #6 f# t4 I+ P1 f& X, P; K
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering/ a' }* w. D4 t3 b. o
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    $ K7 I/ M( }) K7 O
  113. #        should use these effects sparingly and only activate them on events) N( K+ O0 s: ^3 b% p2 f) U
  114. #        that require them.
    & m9 ~8 K- k4 l' P" l
  115. #------------------------------------------------------------------------------#
    / S$ {0 V% B) l8 V; ~
  116.   ; h) {) N6 U6 k; G" P6 g3 A
  117. #------------------------------------------------------------------------------#
    3 C& X, a6 l4 I, b9 n  e" G" f
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES8 w  D: S$ k, }# T+ R
  119. #------------------------------------------------------------------------------#
    5 s5 I# L$ i3 ]2 M
  120. #
    . W4 i; b$ l* Q& \& J
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 8 f, u6 m8 z; q5 J
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off - T( w" R% E9 Y
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    ! b* Q- `& `$ u3 H4 r
  124. #: M$ `. w6 m" G
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects! L8 i) ]1 p, T3 {
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    # k; g$ k: _) {
  127. #  v_icon(x,x,x,icon_id)8 Q$ ]# s5 ]1 Z+ ~+ R' D8 i
  128. #" W/ E) h. K! U8 T7 E2 [
  129. #------------------------------------------------------------------------------#. ]& V" N* M* w+ N" b
  130.   
    - n, k8 s# ^& _
  131. #------------------------------------------------------------------------------#) h: N$ @( F& @3 [& Y8 Y3 D2 L+ I
  132. #  SCRIPT CALLS for shadow options
    7 n$ |( D+ U4 _  b4 w2 N. K
  133. #------------------------------------------------------------------------------#7 j8 M9 [0 c3 v& n! d5 h3 g
  134. #( |$ {9 T8 x% E, B5 i/ q! T( H
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the 5 P- t. [) _7 b2 w4 O9 @
  136. #                              # light source number you wish to change (for& O7 w* ~" Q8 p' V) |
  137. #                              # more than one). These are reset on map change.
    9 N( p! x, L& V7 z
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    & }# W: d. }/ }4 Q
  139. #                              # This will need to be in parallel process if you8 z3 I8 x% |: T
  140. #                              # want it to be a moving light.
    / S4 V( n& w1 H  ]$ f
  141. ## B* Z+ Y7 U) }4 v
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
      v. m; l# p2 \
  143. #
    . M& G# [9 V; C2 F+ ^, F
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    2 Y7 Y9 ?2 S  u) X* P- M6 v' d8 e
  145. #    # fade = amount shadow becomes more transparent the further away you are.! B2 @* q  `, e/ h6 P, R
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    " w5 Z' U% A( I" _/ G! W% j( @& |+ ^
  147. #8 K1 L; m0 C* r5 Q
  148. #------------------------------------------------------------------------------#  }6 \! M8 N, T* o2 G9 Q, P
  149. #  EXAMPLE:
    ' E, w, B! a" E
  150. #  shadow_options(80,10,false)    # This is the default setting./ n4 j- T' W; x; V- o
  151. #------------------------------------------------------------------------------#
    5 Q, P6 I' i9 _7 U
  152.   5 [8 }  E: q7 Y: d( e
  153. #------------------------------------------------------------------------------#
    * f, W; P# ~& o" c$ g) h# n
  154. #  SCRIPT CALLS for reflect options
    ( T% ^$ B% [& A: U( J1 f
  155. #------------------------------------------------------------------------------#
    * s' }  T/ Y. ?# p- k! }
  156. #
    " h7 L4 U1 j  y# F4 A9 ~
  157. #  reflect_options(wave_pwr)   u7 |9 e7 W4 r- ~4 O1 M9 v. T  @4 C
  158. #
    - m$ w# Y) V! t3 }4 ^
  159. #    # wave_pwr = how strong the wave movement is. 0 is off! u3 v1 {* [/ W+ p. |! l# }
  160. #, t8 L. g$ Z4 R; z
  161. #------------------------------------------------------------------------------#( _1 s4 @$ ^8 H+ W
  162. #  EXAMPLE:1 K, i( o. _8 {2 T4 p) |2 L1 V$ |
  163. #  reflect_options(1) # Turn wave power to 1
    $ d! p5 j6 N, E, }7 W0 G8 ?" ?
  164. #------------------------------------------------------------------------------#" P% k) O( m4 R4 T6 u
  165.   1 b: N' Z- F( ~: L
  166.   
    7 o8 ^$ J* J+ g& B/ Z/ n  A2 A( s" \
  167. #------------------------------------------------------------------------------#
    5 [! N  Z% @4 i! s$ {) s3 ~
  168. #  NOTETAG for ACTORS) V/ M/ S! v3 `0 M6 w5 [, D$ R
  169. #------------------------------------------------------------------------------#* f: M7 c# X; h, y" ]% \# k
  170. #1 L- T9 _7 R0 ~+ D% t2 x6 U# F& ]; m
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    0 C6 V% m/ K# R8 q
  172. #
    9 p$ c3 N9 I: Z0 C/ `
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections6 f& @# Y8 @. z4 h/ p- k
  174. #                                  # and use the character in position 'pos'
    0 N% X, N; u/ G; Y2 e% i
  175. #
    * _- K' z) ~8 M- F+ C0 E
  176. #------------------------------------------------------------------------------#
    ) B  h; e+ t$ }
  177. #  EXAMPLES:9 p/ O; H, z- i+ }/ C- Y" e
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    : Y( y" N+ d! L" [1 }) @$ n
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    3 c2 G% b# C; h( Y& U& ~
  180. #------------------------------------------------------------------------------#$ R! g. X# Z7 ]' S" s) t6 X# L5 E5 r
  181.   4 J) M0 Y6 U+ q+ b2 {6 B3 X7 q) N
  182.   $ H2 B  Y. X6 U+ G4 ^
  183. ($imported ||= {})["Galv_Character_Effects"] = true: G; Q8 f! P9 j: u  f
  184. module Galv_CEffects
    - D* Q$ ]5 N; i( s
  185.   
    5 E5 P8 s$ e9 E, C
  186. #------------------------------------------------------------------------------#  
    $ T  n4 s; s8 V* {$ ]
  187. #  SETUP OPTIONS
    * o3 W+ w, C8 k+ X7 z( s
  188. #------------------------------------------------------------------------------#
    " N1 T  o+ C* G- y
  189.   
    : W8 T# N( I; o0 a; y1 G$ g
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the4 o0 k+ p( ?! d2 Q  B, I% [2 T
  191.                         # region on the wall you want to make reflective (and
    & V$ T# g$ X# A; G0 m2 @% M
  192.                         # then use tiles/mapping that make the parallax visible)  q( H* j* a/ Y8 k$ G0 d- `; Y" ^
  193.   " G3 Q# {  p  W$ l
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters! R& Z) \! L1 n% E( ^
  195.     4 a3 ?( {7 L3 t0 w2 V/ L
  196.   REFLECT_Z = -10       # Z level of reflections- Q# N- U: j5 h" I
  197.   SHADOW_Z = 0          # Z level of shadows5 ~: o  U7 q" E
  198.   
    & M. I0 y/ S) r, L# O/ [
  199. #------------------------------------------------------------------------------#  
    4 J/ H" r3 d7 L
  200. #  END SETUP OPTIONS
    0 Z8 C! U, s) u
  201. #------------------------------------------------------------------------------#/ z2 n, m- E' w8 |! n* b- r. P
  202. end. v" B! e5 L8 r& ~
  203.   
    1 t/ u" r2 B9 c/ f' q
  204.   2 X  p1 f; q* s+ G. Q. ?
  205. & f2 c8 g9 U* ~% {/ a- T) x
  206. * P- L/ |8 T# k# [
  207. class Game_Map2 ]5 F+ W. d' h
  208.   def do_icons(refresh = true)
    2 j' ^4 ~" \5 I/ _; Y. c" k
  209.     @events.values.each { |e|. k. y  d, O/ N' e6 i
  210.       next if !e.list
    - n' L$ O' [# a  t. b
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    1 `' n# m; B) e; ~3 a! Q! w& W
  212.         e.icon = $1.to_i9 k7 M9 Q# T9 l2 b, c/ s
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    ) Z' S# G) l! y6 f# g
  214.       else9 T8 P  [# C! N1 h9 P0 }
  215.         e.icon = 0. c+ J! Q* C6 g. F- I/ o2 j& r
  216.         e.icon_offset = [0,0]" ]: ~' c" I) e# m. `- u
  217.       end+ N& M0 N7 l! f5 A& f) Z
  218.     }
    , z- Q9 N* H" J! T
  219.     SceneManager.scene.spriteset.refresh_effects if refresh; w1 R4 s$ q+ l1 s( |
  220.   end9 D; v: n* ^' z6 F* l# l, y+ j
  221.    " u  a5 F+ x5 P
  222.    
    $ u- u: u. s; b: l4 }
  223.   def do_shadows(refresh = true): z8 \/ }  |; n; P7 {- o5 Q
  224.     @events.values.each { |e|
    ' ^) O" W& W" ?/ j: w
  225.       next if !e.list
    & c! P; v+ P2 ]2 P. m: R3 U! f
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
      t" J& L" ~& ^7 x0 |
  227.         e.shadow = true# k( W4 k, c6 }+ c$ H6 ]2 t
  228.       else
    8 ]. ~- N+ i. T. @9 Z7 g
  229.         e.shadow = false
    , c4 t! e" R. X7 e% {+ y$ h
  230.       end
    - @) ]- s/ Q2 p' B- N% F: ?
  231.     }
    ( s2 n4 {( ]' z+ _/ @- v! |
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    9 ?9 z% T  H; n
  233.   end
    1 c( o- b2 H! d) i$ \% S4 a. A
  234.    $ k1 Z/ |- q- r1 r) ~
  235.   def do_reflects(refresh = true)
    : T) H: h) d2 f0 X
  236.     @events.values.each { |e|
    " y* [- F1 s8 }
  237.       next if !e.list
    6 _* ~# j! A' S: y; }
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    9 x) ?) N, o. a/ G- Q$ M$ K; l
  239.         e.reflect = true* ~5 l* \+ Y3 [& f
  240.       else
    2 E8 c# c9 W( c6 Q9 l* N# I
  241.         e.reflect = false
    3 j$ [2 V9 m( C3 l9 Z4 B0 v/ i) L
  242.       end/ |. P6 p/ C& q2 ~- _$ r1 J! a2 X
  243.     }
    5 v+ D, q# e# }6 p7 j
  244.     SceneManager.scene.spriteset.refresh_effects if refresh0 O. A! `1 w: ~1 \2 w
  245.   end& n9 E- u2 E6 v: m" A
  246.    
    : d( ^' L0 I6 T# u
  247.   def do_all_chareffects
    & O4 s8 W! K6 L. u) P* P; R
  248.     do_icons(false)
    $ Q5 R) B% A8 |% T# M
  249.     do_shadows(false)
    ; f3 c. d. v* l, B9 ?
  250.     do_reflects(false)
    4 J6 v4 s/ Q8 \
  251.   end- C& ]7 i! H7 j# h4 R
  252.    ' ^9 }. L3 F* N' ?" o9 k+ h+ ?
  253. end # Game_Map/ J9 g3 \' `- c7 o: ^
  254. 1 ?8 O1 h  @0 N1 {, @  `* N" J

  255. / l; l2 C: `% v8 @  o; [

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-7-5 21:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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