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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
0 y  l) B& i! p0 s$ z' H
这个代码怎么用啊,有大神知道吗。我从国外找的。
/ \; k- x  k. z% v6 |3 o# Yhttp://galvs-scripts.com/2013/02/21/character-effects/  K8 K: j* x: ?- b+ @
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#1 i8 c8 H, |+ ?$ o
  2. #  Galv's Character Effects! @0 Y1 q( _1 ]! u
  3. #------------------------------------------------------------------------------#( [/ ~: I6 k$ A  R4 w# z
  4. #  For: RPGMAKER VX ACE
    ; W9 J5 T0 w3 b) i3 q6 k, Q
  5. #  Version 2.1
    5 J' C9 L  O5 P9 _0 L4 Q+ K
  6. #------------------------------------------------------------------------------#
    * }, u7 s% j  f0 y
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    + K6 b  p- Z) _/ I
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects4 [; C. {/ b2 ], R0 H; K% {' G& K
  9. #                           - Fixed shadow facing bug, P+ O' h, C0 c8 ]) z. q
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows/ |# W; G( A3 Z: x, ?
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
      o$ M6 E1 E* V* j6 B% h1 T
  12. #  2013-02-22 - Version 1.7 - bug fixes
    $ K5 u6 U( \1 K/ g% ?, {
  13. #  2013-02-22 - Version 1.6 - added icon effect
    7 V2 z- Z" j, V! j
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps+ Y3 d5 ?2 D9 W" E
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles& q% H1 C: L% j$ S& O; A
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    , j8 s3 y2 p! q
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    : s1 ~+ K. v8 i$ G" r
  18. #  2013-02-21 - Version 1.1 - updated flicker effect# q6 G8 P' V. W# o- q) M- N( }0 Y' Y
  19. #  2013-02-21 - Version 1.0 - release7 G2 [; T% c1 I: j
  20. #------------------------------------------------------------------------------#. x* t! Z( q) m7 |; ~
  21. #  This script was made to provide some additional effects for characters such
      |, G% z# B; t$ R0 z1 {2 R. Y8 S/ l
  22. #  as events, followers and the player on the map.
    + B" `7 r" M6 `. e
  23. #  Currently it includes:( B: d4 v: A9 c8 ?- L5 x5 m& |
  24. #
    : v1 F0 v# J2 H( `3 Q; O9 f; m
  25. #  Shadows* x' @. }$ z2 i
  26. #  Shadows that appear under player and events in a directions depending on
    . S1 A4 p* d' ~3 R8 f
  27. #  a light source that you choose., K' Y3 K. [4 O) H( P& Y
  28. #+ W6 I. s7 G- d. O% B
  29. #  Parallax Reflect
    % M8 i7 _2 ?$ X8 z) r
  30. #  Reflections that appear on the parallax layer for events and actors to be
    : y2 z8 w/ n) V; P0 B+ m8 Z5 V
  31. #  used for things like reflections in the water or glass floor etc. To get
    7 k4 e' v- N# g. k& y2 j! M; y% @
  32. #  effects like the demo, you need to edit the charset graphic to make the water9 Z( v, {7 x2 g2 i* q5 t: g. H
  33. #  partially transparent.  L1 \7 N6 g! m! B" r6 W1 m# v' B
  34. #/ j; s5 k5 `% l# i  H, m4 g
  35. #  Parallax Mirrors
    ; e- u: }. z* W8 x
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    0 f/ r7 \$ ^. y
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    ; }$ q, o/ h6 [4 V& M
  38. #  changed so actors and events can use different charsets for their reflections5 g5 m1 x( ~! @* O
  39. #% I' F9 ]( W3 N9 \3 Q* ]1 o' c
  40. #------------------------------------------------------------------------------#8 m( f% k; Q. u$ H9 J
  41.   9 E9 @8 t9 T6 x& q
  42. * V7 {1 m3 l# r1 j$ s. A
  43. #------------------------------------------------------------------------------## I# u% N! V0 q. r
  44. #  NEW - First event command as a COMMENT+ J) Y) S2 `; ]5 ?
  45. #------------------------------------------------------------------------------#
      p8 ]' K7 l! B( O6 a: O* ]
  46. #  You can add a comment as the first event command on an event page to set if) F" K' v5 ]) ^. J
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    ( H+ {5 }5 w' X' R5 Q$ `& h
  48. #  below, all must be on the same line in the comment.# W2 b( D& T& |, q( Y1 V, Z  r, q
  49. #7 f* ]* l1 @0 L2 S
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    , G, f+ v% P) Q5 B6 M% {2 q
  51. # <shadow>           # set the event to display a shadow
    & ?3 e* c6 y4 y( _6 i
  52. # <reflect>          # set the event to display reflections
    1 M1 Z% T% a+ g) p. {( E
  53. #9 T  H' N& j2 y3 t
  54. #------------------------------------------------------------------------------#
    + J+ m, {2 C: Z1 l/ B
  55. #  EXAMPLE:: J, f3 U* ?- }& F. Q/ |, d% e
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    # M, D5 d2 N! ^& i# c" J7 n1 f
  57. #------------------------------------------------------------------------------#
    1 W$ }, ?2 B& L# J' @: }

  58. ' m/ S+ M2 P) [
  59. ; I7 V- ]+ I% a) ]* n# p) W
  60. #------------------------------------------------------------------------------#
    0 E+ T" [, a/ n
  61. #  SCRIPT CALLS:' }: e9 O6 c$ `$ X& Q3 O
  62. #------------------------------------------------------------------------------#5 X- p) J- d/ }; L! H
  63. #$ {6 ^% Y* n* M: p* ]3 s, M. {/ a) I
  64. #  char_effects(x,x,x,status)
    ! Y; X4 n0 U! z  y" Z) y* f; y# |
  65. #
    9 a2 m- l( X& b& Q
  66. #------------------------------------------------------------------------------#" {7 V0 A) O3 H9 p) Q# E
  67. #  # each effect can be true or false to enable/disable them during the game.7 Z! T- X% F+ J4 {. S$ w. q! e
  68. #  # you can change multiples of effects at once, x being the effect number! m8 I9 @0 M$ G! B8 s2 E3 x) R- ~
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons  k$ W* T2 x- @! p4 |
  70. #------------------------------------------------------------------------------#* B. _2 P) m7 C9 [8 f
  71. #  EXAMPLES:
      f1 _$ M) E% m  |# x
  72. #  char_effects(0,true)              # turn reflections on* ]: y1 m! h! i
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    + {5 ^1 l# r7 m; _
  74. #  char_effects(1,3,false)           # turn shadows and icons off6 D* Q. w, \: M* E' n! G" H; \
  75. #------------------------------------------------------------------------------#
    , B& D" B7 f+ R6 M
  76. #
    6 `: Q/ g+ |. [8 C) s# }
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset9 h2 ?; I) e$ B' f+ G
  78. #) w8 b' r5 M% T2 u
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    , T  c: f7 b+ H3 B, q
  80. #
    ! w; q* [: _' d! ~
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset# z" y1 q4 u7 q
  82. #
    3 S6 y# Y9 l; u6 ?6 f9 P2 L9 S
  83. #------------------------------------------------------------------------------#
    9 ^! X6 P1 T, C9 O: [7 m
  84. #  EXAMPLES:6 b8 P+ M. w1 J
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite+ T( Y1 l) M7 o7 J
  86. #                                    # in position 2 of "Actor2" charset.
    ' w& f' S% x+ k3 N7 s
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
      V/ w8 w. a4 Q3 T; w! l0 A/ T9 F5 g
  88. #                                    # "Actor4" charset.
    . x( X, j" Z/ F5 c4 m
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    % U( z% Z8 p& C* z; L& @
  90. #                                    # "Vehicle" charset./ f: I4 F2 v, X3 n2 b2 p% q& C
  91. #------------------------------------------------------------------------------#' ^' c0 `. f7 L
  92.     n$ K. R0 G' c5 i! u
  93. #------------------------------------------------------------------------------#2 d. U! Y/ _1 M; O! \; F
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    / R: @' Z( U0 z; [4 j' y  S- B
  95. #------------------------------------------------------------------------------#
    6 @* _9 G7 l5 _- \2 t8 D0 k
  96. #9 `% _9 \$ G1 ^. _
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    + o/ x9 u) A6 R# D3 A5 }
  98. #                          # use this to specify for mirror and reflect.7 N4 }2 K3 c# j( p+ v
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change5 O( T- C5 X; ^6 E/ P
  100. #                          # to change all events use :all
    , E4 ^# Z* d' Z2 D" G
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    / a: R" j5 y5 E' y7 U5 d- `
  102. #                          # it 0 for no icon.. H3 g% l( A( s! H9 c! O$ ?
  103. #
    / i3 c* R! W/ B
  104. #------------------------------------------------------------------------------#
    3 N+ j6 _' D0 F0 _- Q
  105. #  EXAMPLES:3 O" y. Y3 x9 k- y. S
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON! \% A/ q& Q, J! c8 j
  107. #  shadow(1,false)         # Turn event 1 shadow OFF5 G7 N/ C" P; B7 r0 j- d* j
  108. #  reflect(:all,true)      # Turn all event reflections ON
    , v- s  i+ A+ V
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear: S0 B% c; E5 Q) Q
  110. #- A5 ~3 S% W) E% ~3 }
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering4 `! M! f" I' Q1 v
  112. #        a map. This is a design decision to try to keep lag to a minimum. You9 G5 u' r$ V  Y
  113. #        should use these effects sparingly and only activate them on events
    6 g9 y7 p& x% B# U
  114. #        that require them.
    % T0 X1 U( J/ L; b& t. U
  115. #------------------------------------------------------------------------------#
    & y( B- Q, I# _
  116.   ! g$ H2 q8 ^) s: Y1 F% J
  117. #------------------------------------------------------------------------------#8 H7 z' M$ z: ]
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES# N& z3 F3 g3 ?
  119. #------------------------------------------------------------------------------#
    . w$ F; {( }; g. y+ E
  120. #. t+ j5 {0 w) ~% a
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default % U) @! ^9 r6 C, G" }' g* N% O
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off ( j' @# K* w* ?% O. E9 x5 w
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.5 j* s. s; Q4 M4 H7 d, F. I! E
  124. ## k  V: F3 C! A! v$ u8 y5 f/ w
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    : k+ C/ ~; c: e- J6 T9 p
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.% }+ f6 D% F# C. d. T
  127. #  v_icon(x,x,x,icon_id)' C. x; L# Q6 u+ Q/ a, W7 T5 z
  128. #
    ; ?6 b; w( s4 k/ q0 a0 T
  129. #------------------------------------------------------------------------------#; `* M; |+ l) k
  130.   
    + Y6 J8 C9 H6 e! F. f
  131. #------------------------------------------------------------------------------#: z, t1 P  x3 k# _
  132. #  SCRIPT CALLS for shadow options( p. X  m0 z, U  A" M( `  k9 [7 ^
  133. #------------------------------------------------------------------------------#' d" C6 f, ~# d3 p; R4 Y5 @4 h
  134. #2 W) S4 ?8 u1 _3 K- p& |# \
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the * y2 t9 f9 ~% O( i
  136. #                              # light source number you wish to change (for
    8 @: a: j9 k* b( U& \2 c1 t
  137. #                              # more than one). These are reset on map change.
    , b/ B2 m1 w4 D* Z$ g7 o  K1 m
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    ( ]! t" L- e6 w5 q9 t
  139. #                              # This will need to be in parallel process if you
    ; \( q9 |! q/ g9 R4 b
  140. #                              # want it to be a moving light.
    + [1 c  k. I8 d% |; L
  141. #
    - F7 r. o% D$ ?3 L8 U6 B
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    ; G$ q4 c  \: t/ m8 o! `2 y; C, ~
  143. #/ `9 F; [# ], G& G" Z8 d
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    " {# \6 }% U- i$ D
  145. #    # fade = amount shadow becomes more transparent the further away you are.5 z8 }, M$ W4 o: v$ H' e" n/ p
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    5 @) \- J0 O, g& z7 ~3 l- M
  147. #
    8 E1 C" J- G% ]  P
  148. #------------------------------------------------------------------------------#& E" F, p9 g! I; z
  149. #  EXAMPLE:  o' A2 [5 o( ^: c7 S" Q0 @! W
  150. #  shadow_options(80,10,false)    # This is the default setting.
    0 k! ]  R* N: h* a0 y* P
  151. #------------------------------------------------------------------------------#! I8 U9 z2 |6 b5 l6 Y( L9 o- f' l
  152.   ! p) `( t% M- n, ]
  153. #------------------------------------------------------------------------------#
    / ]: R3 r6 ~6 L" c0 a/ T+ ]
  154. #  SCRIPT CALLS for reflect options# @. m! w5 w; p) b6 w. @
  155. #------------------------------------------------------------------------------#) M* c5 z- R& _$ `# f' I6 X2 T
  156. #
    6 ~: w, ?1 ?; p" a" s
  157. #  reflect_options(wave_pwr)
    / K) e3 M/ X7 W7 k; v5 L, @
  158. #6 f# [) k3 J' ?
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    9 u7 o4 A' ]; v# Z* z
  160. #
    # l* U: x/ @8 l6 ?; ]9 V  @, ~
  161. #------------------------------------------------------------------------------#7 C* @9 _. ^- H4 `# d) c
  162. #  EXAMPLE:# z1 _) k) f7 v2 T( s
  163. #  reflect_options(1) # Turn wave power to 15 F- _; w# F3 A  \- f7 F4 W4 y4 f* @/ }
  164. #------------------------------------------------------------------------------## r0 i5 k) p; [# E8 ?1 y
  165.   & k& n. a5 W# w" V
  166.   
    ; O2 g7 _- t! T& d+ ~
  167. #------------------------------------------------------------------------------#4 x9 Q( w1 A3 V$ z9 }; ~
  168. #  NOTETAG for ACTORS
    $ J1 B1 _* T" \; ]
  169. #------------------------------------------------------------------------------#$ M0 h: J8 U; T& V8 f7 j
  170. #0 _' y" B( i- o' A
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)+ S, a/ L3 S0 D0 p2 a6 |% v  u- O7 M
  172. #! O+ j8 c" `, U
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections0 b8 H: u" j- w# n' U3 L8 m- N7 k4 W; x
  174. #                                  # and use the character in position 'pos'
    3 z7 n( }% l' e, ^2 F) V) r& q
  175. #* P! R$ _# t# F! R" C% \
  176. #------------------------------------------------------------------------------#
    - S' @9 K& J: f: j
  177. #  EXAMPLES:. R( h1 v5 i1 Z
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset  ^! d- B2 G& f5 N9 n& |
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    + ?8 z& E& t! `7 Z
  180. #------------------------------------------------------------------------------#
    , z5 u2 I! [) t2 k; u5 m4 I" P  o
  181.   ' u2 ]1 s0 n5 z. U- D6 p* H
  182.   ! j- H2 P) {  z8 q( z5 f
  183. ($imported ||= {})["Galv_Character_Effects"] = true, S( h6 `  S2 b5 s5 Z3 g
  184. module Galv_CEffects( H' t8 [8 ^) ?8 d6 ~+ b- o
  185.   / p* M" I) {/ B! [2 k: f& V
  186. #------------------------------------------------------------------------------#    h$ A+ y4 z2 ^# Y/ v
  187. #  SETUP OPTIONS
    , ?( Q- ^, e, F6 P* r: s+ g: S
  188. #------------------------------------------------------------------------------#
    % ^, e% E8 O1 V9 A" C
  189.   
    7 b' p5 u) {  e5 V* ?- B& j7 J7 H
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the1 g  d3 c& P2 M1 s
  191.                         # region on the wall you want to make reflective (and
    7 w; O& x, Z/ X- i; i
  192.                         # then use tiles/mapping that make the parallax visible)
    ( l! D. e, D# H' ?5 i( h4 u$ H; C
  193.   & L# V% s& X* p/ n; B3 t) G
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    . ?+ L5 I( h0 ?* Z; u' `  x) k
  195.     7 q& P& F7 P5 x. h4 l
  196.   REFLECT_Z = -10       # Z level of reflections
    # b$ K  w* [1 V/ @. G+ Z! D( T
  197.   SHADOW_Z = 0          # Z level of shadows
    1 c! s9 E) \, a  w- U
  198.   
    ) I  r1 s5 e" V( V& a6 b
  199. #------------------------------------------------------------------------------#  
    # f! h# r0 M, g4 B6 b7 S
  200. #  END SETUP OPTIONS2 D- p; Y9 L; b8 H" K  s& q% ]
  201. #------------------------------------------------------------------------------#" e1 _* v, ?* i2 ^9 q& B" W
  202. end
    2 L; y4 }% V8 R: N9 O; k
  203.   
    # @; e& w: w4 Y. b- `2 k4 K2 @9 X
  204.   ( ]( X  Q2 N* [* @' `. O1 j! _
  205. % c% V& Z" a9 z+ T: n2 m! y, Z

  206. / g# {& |9 v" V* K
  207. class Game_Map
    7 O( ?4 Z& g& D$ M# z- E
  208.   def do_icons(refresh = true)8 P7 }( v4 w( g" ]3 Q) \0 l
  209.     @events.values.each { |e|
      E- g/ h- ]- e9 X
  210.       next if !e.list
    6 {' a& t) D+ P
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    9 ], H& O1 S( Z2 i  g
  212.         e.icon = $1.to_i$ p0 G& g8 l! a" B& J# g+ Z8 R
  213.         e.icon_offset = [$2.to_i,$3.to_i]! ~' _+ L. z& _
  214.       else" ?# S) ?7 y/ D- f* F5 b
  215.         e.icon = 0
    & f, A% {' x' e+ q3 H
  216.         e.icon_offset = [0,0]" U$ @4 }9 t1 T/ p( {
  217.       end
    ) S6 j$ P: @1 `# P6 v
  218.     }
      z7 i1 u, b- Y3 N
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    ( h1 d$ Q  ]$ y' J
  220.   end! r9 t5 o$ E( k9 ?( D6 F
  221.    
    ( R1 [, P: R6 q
  222.    / V9 u6 W; K% t2 r
  223.   def do_shadows(refresh = true)
    5 P& s2 U, Z( a! C$ o! y$ Z
  224.     @events.values.each { |e|, d% N# p  A0 L' c$ D
  225.       next if !e.list
    % }+ k/ T  E' M& D) m
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/; `1 H" `7 o% I( e2 F% V9 Q5 Q
  227.         e.shadow = true7 s' O. o6 x/ E4 u. Z. w" f: n' y8 S
  228.       else
    ! f" f1 y7 m9 `8 Z- e; I0 Y7 }
  229.         e.shadow = false: y- K0 _' l: J% S) ?8 b  K
  230.       end  i9 b# o/ i3 E
  231.     }
    ; R7 E; c9 K( j0 T5 K; W9 W7 d
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    / a( V' u0 Y; ^7 ^6 T* M
  233.   end
    . ^: \0 t# z+ W" I  f
  234.    
    2 [* ~* F! Q* r' W+ n
  235.   def do_reflects(refresh = true)
    ' b# m$ v5 O* b5 q+ }- K+ h
  236.     @events.values.each { |e|+ s" U) i1 Z. g% z$ o: O! I# V
  237.       next if !e.list  b7 Y. X( s' I& O
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/3 x( S5 n/ \% H, d5 ~  [
  239.         e.reflect = true
    1 [7 ~/ {! j# E7 j5 F
  240.       else
    7 A+ d: Z: w+ {" c6 x0 |$ f
  241.         e.reflect = false
    $ b' ]8 Y& W; U/ n; _9 h
  242.       end0 o- g; o6 h- h7 d( [& F: p
  243.     }+ \! u1 W+ ?0 L* ?
  244.     SceneManager.scene.spriteset.refresh_effects if refresh2 a( P5 q( y: Y! t! W3 d
  245.   end
    , l8 T" I6 \& f4 ~
  246.    " Y; ?  t( j# h3 _- _4 k6 V
  247.   def do_all_chareffects+ H, R! P/ ?+ R$ S& o% P1 g3 A1 S
  248.     do_icons(false)* [0 `6 j+ @; a( y2 V
  249.     do_shadows(false)
    7 l4 r- u6 p% {! F9 u) U
  250.     do_reflects(false)
    4 M% _* N# f* a# `
  251.   end
    " N! R. r1 N6 A
  252.    5 a  S$ L9 S* _1 b8 s5 B3 p0 C
  253. end # Game_Map
    3 o) Y. I8 ~- B" y" Z
  254. * H$ H8 W. }' Z- T% o

  255. " D' P# @, K, F& L5 v" c

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-2-19 06:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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