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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
' I1 T* b" I$ S0 d* a
这个代码怎么用啊,有大神知道吗。我从国外找的。: i8 ]: A% p: f! V! q! o
http://galvs-scripts.com/2013/02/21/character-effects/4 [6 j6 r% w% N2 n
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
      t. N* Y/ C  f9 R1 e2 u
  2. #  Galv's Character Effects+ I0 D- ^* K! d' r
  3. #------------------------------------------------------------------------------#0 I$ Q  j" k9 r  Q9 Q5 b+ T$ \
  4. #  For: RPGMAKER VX ACE
    1 l# h2 w7 t$ X2 J; d) w# y
  5. #  Version 2.1% b- D6 J+ `1 k; O% N0 N0 C
  6. #------------------------------------------------------------------------------#+ Q" m1 z3 [  r
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows& N* L3 [5 }2 G3 q" _' T' Y8 E3 `
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ' R* d0 Z, Z) L; c* t
  9. #                           - Fixed shadow facing bug8 R1 Y, t3 O1 I# ]7 U, U  ^# S( p6 b
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows7 D  I" H/ s) c! u7 ?) E6 [- k: A
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows/ K- K, A- K7 D3 Z
  12. #  2013-02-22 - Version 1.7 - bug fixes# L! }2 L% T6 H. i- Q$ l6 ]
  13. #  2013-02-22 - Version 1.6 - added icon effect2 m( S! s( w' m5 M& H3 x( b
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    . N( O# S4 R- c. T& d9 y
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles: w3 k7 k  }4 l% @: b  R% b  Z
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    1 @: N  L! j# a2 a- C. f
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    / D) K; }6 C  C) ^0 k# j
  18. #  2013-02-21 - Version 1.1 - updated flicker effect- G5 I3 G: G: R8 h, f% |' x
  19. #  2013-02-21 - Version 1.0 - release, b* Z6 ?  Z1 Z" m
  20. #------------------------------------------------------------------------------#2 a0 l4 O' r8 F0 T. ~
  21. #  This script was made to provide some additional effects for characters such  ~4 w# O& X3 f! I
  22. #  as events, followers and the player on the map.
    $ G# D' F/ d+ l' c
  23. #  Currently it includes:' u1 v# Q! b" p0 c1 J/ e( Q
  24. #
    , [& I4 _4 B, P0 m- O
  25. #  Shadows
    % s% ^1 g6 g+ Y* s- }
  26. #  Shadows that appear under player and events in a directions depending on; D  n6 @+ z* o6 C% r' o) Y
  27. #  a light source that you choose.
    ) R( Q. X- D5 w  y; B) N) y
  28. #
    7 O& v% w$ c$ {# P
  29. #  Parallax Reflect
    8 c, n8 B5 b* v
  30. #  Reflections that appear on the parallax layer for events and actors to be
    " ]. r3 b) X4 G  e3 Q, l$ @% o
  31. #  used for things like reflections in the water or glass floor etc. To get
    " V  C% W! y/ s6 _
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    : b- }7 [( y9 P* n. @% P
  33. #  partially transparent.
    9 F. U9 z' g$ s7 m# h. ~% @
  34. #, e% B' ~* N) @, q% j
  35. #  Parallax Mirrors/ `) P, F( ]% `5 u( C
  36. #  Much like reflect but are instead actors and event are reflected in a mirror2 \$ }! ?+ D: t
  37. #  on a wall designated by a region. Both mirror and reflect effects can be8 Y- p4 d0 B8 `; z. T( c# N
  38. #  changed so actors and events can use different charsets for their reflections+ k" J, h: h! Y. f+ k/ p3 [
  39. #
    5 x" C4 V! N. f+ ]$ d" B; d
  40. #------------------------------------------------------------------------------#0 @+ z; o0 f; v1 f, W
  41.   - q$ ]( [% @& z0 V1 i

  42. 5 a& E  _# v# i2 Y
  43. #------------------------------------------------------------------------------#
    5 H. ~" n) U& H5 h$ T
  44. #  NEW - First event command as a COMMENT
    , ~* [- U+ k* d4 i" r# o' h8 n4 d
  45. #------------------------------------------------------------------------------#
    , t8 m8 `8 H4 k* C* L: C
  46. #  You can add a comment as the first event command on an event page to set if
    1 U8 M0 v# V: u* E
  47. #  that event has an icon, shadow or reflection active. The tags to use are2 R. Y+ K5 X% s/ n: k8 B* Q% f: G
  48. #  below, all must be on the same line in the comment.1 h; h$ {( N4 z1 `
  49. #4 y( U4 o3 s" c3 h
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    & Z/ @3 B  `5 n& X
  51. # <shadow>           # set the event to display a shadow6 P$ K# r) R' C' o( `
  52. # <reflect>          # set the event to display reflections
    - l1 a, ]" }! C8 K  \
  53. #
    " a* h% i# D* \% O8 F" ?
  54. #------------------------------------------------------------------------------#0 A5 H, L) a3 _7 L
  55. #  EXAMPLE:/ X9 ^3 r' i6 q9 {) S% S
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    ' q) P( Q6 a+ E: U+ ]; z
  57. #------------------------------------------------------------------------------#
    0 U+ `, }& B+ z% O% B
  58. , Q1 m6 }  Z# |( e
  59. " e1 @) a! |# s! f1 d( p4 F6 S, d
  60. #------------------------------------------------------------------------------#
    " |% z1 D$ [) p+ U% f8 x  e- A8 v
  61. #  SCRIPT CALLS:; @6 g# N& ^3 y4 I. j4 A+ S2 j
  62. #------------------------------------------------------------------------------#- T: G5 U, l( p  M0 \0 ~5 I( N: u
  63. #: m: f% H2 v% Q' |1 [  j$ Z
  64. #  char_effects(x,x,x,status)+ X4 D1 \) o( u
  65. #
    5 [" P" g/ |7 @6 ?( o6 m! D; o: i
  66. #------------------------------------------------------------------------------#
    1 T6 p0 d1 c; {" ~$ q' q
  67. #  # each effect can be true or false to enable/disable them during the game.
    4 @7 c" i, K1 ~; _
  68. #  # you can change multiples of effects at once, x being the effect number
    7 }, p. t1 T6 Z
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons8 u! Y. [- p$ y9 x2 N
  70. #------------------------------------------------------------------------------#
    3 A* J) [# {* R8 s6 q
  71. #  EXAMPLES:9 u& y9 b3 H& v: M3 M- b
  72. #  char_effects(0,true)              # turn reflections on
    0 J: j/ m9 _$ M  s7 }5 M; h1 I; P  N
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    # y( h5 U  B& _4 ~) o: m7 t
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    8 |, U/ X5 r3 x; E7 ]. Y
  75. #------------------------------------------------------------------------------#& Y' D5 Q8 _$ `3 U. E* n
  76. #' g, v1 F2 ?6 n- r
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset5 ^. m: B$ Q$ |' o
  78. #
    , ^! i. E. t# ^; s4 G
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    # F& G9 d: r* H: A* ?# k, ^
  80. #
    / L& j3 f: o9 y  k0 ^
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    , A+ T9 r7 J4 k* q; Y: a8 Y" u
  82. #
    / G8 x" T; ]& Z1 {. n1 D
  83. #------------------------------------------------------------------------------#: W- G3 L1 L7 [$ S* z
  84. #  EXAMPLES:1 u$ n4 G8 _8 [9 r% n. g8 b, R
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite* ~7 k0 U8 v) {( Q
  86. #                                    # in position 2 of "Actor2" charset.
    ( l, g% ]3 b. r0 @8 n, u
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of9 ]2 n5 r4 |# n( c5 _9 z6 F  Q
  88. #                                    # "Actor4" charset.2 N$ y. q( v* G7 z7 H
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of- h8 _# x. L9 F. G; B. b
  90. #                                    # "Vehicle" charset.; h8 I# A" }' {* N! O: c
  91. #------------------------------------------------------------------------------#
    # Y' ]' \$ c, s; N; {
  92.     x6 s/ s& ^! K
  93. #------------------------------------------------------------------------------#
    " D9 o; O! d  q+ D- `
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    , n8 a6 ?4 @0 X2 [* t
  95. #------------------------------------------------------------------------------#3 Y! m  y3 W; O$ l; N# ?1 l
  96. #6 G- W' B$ S7 [3 }8 s& O. ~7 R  f
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    ( Z1 k4 O$ }# V
  98. #                          # use this to specify for mirror and reflect.
    8 J3 i( u9 f+ A# ?
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change& b! C) Q; [% L  `; R% e: O! |
  100. #                          # to change all events use :all3 q3 b3 q5 {, R" [
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    0 W9 E" D, \+ h- T* ]
  102. #                          # it 0 for no icon.
    2 t7 |2 N0 ~7 e: ]' ^
  103. #/ V2 c) j4 {/ @# W/ @
  104. #------------------------------------------------------------------------------#
    / K  v) [& h5 v, @
  105. #  EXAMPLES:, o$ N( }  h2 I9 w$ g8 h2 Q
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    : \+ n3 s2 N( c( O
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    8 m, {0 _/ y- C; |2 z3 `) I
  108. #  reflect(:all,true)      # Turn all event reflections ON
    % ^% s* h# j+ ]4 ~: S+ b
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear/ w! }& u+ p; h9 M& B) v8 ]4 h) h
  110. #
    9 n: p) y" H8 S4 C3 t
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering; {" P; l5 r% ?" c3 a, }% E
  112. #        a map. This is a design decision to try to keep lag to a minimum. You8 R$ c1 a& ?! N0 |: w. T9 [
  113. #        should use these effects sparingly and only activate them on events
    2 v) P# U/ f+ C. q
  114. #        that require them.+ p: b5 s7 ~! H3 |; i! q9 W
  115. #------------------------------------------------------------------------------#
    " i/ R/ q7 M7 h0 |0 R
  116.   
    # n. B9 O+ O* r
  117. #------------------------------------------------------------------------------#, o& n% f* [8 E( }& x
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    7 _; F2 i. |+ B8 n/ A8 Z) Y
  119. #------------------------------------------------------------------------------#
    9 j+ i  ^0 X0 R4 B
  120. #
    4 R( Y" n1 Q4 o9 g- u3 b- q
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 5 y0 z, b" k$ F' W# p( h# H
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    1 v5 W" f: Z( H/ B! E# N' F  G
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them." j: }8 r/ K* y0 {3 Z# K8 l( t, P
  124. #
    ; q! h. u7 @& @% K
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    - v$ ], \3 C" N) ?
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    , _" u9 r6 _$ k9 C% w2 d( D
  127. #  v_icon(x,x,x,icon_id)3 ^  ?$ d+ J* w' k
  128. #- M% v$ s9 f8 h- L4 A
  129. #------------------------------------------------------------------------------#
    * K6 l# S- l5 a. P! ^$ [6 w1 f
  130.   / |5 O& P: f, i5 X
  131. #------------------------------------------------------------------------------#
    3 B) b; K. y/ k
  132. #  SCRIPT CALLS for shadow options
    , E6 o) z6 |$ {! p1 u% e4 O
  133. #------------------------------------------------------------------------------#/ M# j6 F2 w: O+ u$ b
  134. #8 s" A( B- `5 ~4 d5 d; B
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the + m# j7 D5 g, }/ S
  136. #                              # light source number you wish to change (for) a* J" J9 j. q0 \, ]# v: X
  137. #                              # more than one). These are reset on map change.: V3 M2 \; p0 ], N" d; i
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    " x3 l' n1 q% E/ A1 a6 S3 d
  139. #                              # This will need to be in parallel process if you# U- \2 N, k6 z! G* o$ u) w
  140. #                              # want it to be a moving light.
    % H/ d$ n* `( n* c
  141. #/ U+ P; J# |( P: C" y
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below- z! |' V7 E* l, O% t
  143. #
    8 N$ T+ N7 Q  l( l
  144. #    # intensity = opacity when standing next to the light source (255 is black)9 [% A. S( C& E" B. m
  145. #    # fade = amount shadow becomes more transparent the further away you are.5 D1 s4 c/ d. d* v7 V
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    : u. S& V7 {8 y5 R: o
  147. #
    % y5 f* d5 U: J, x* N1 w
  148. #------------------------------------------------------------------------------#
    , h. H3 a  x3 p- X' e* @
  149. #  EXAMPLE:" W- |% O, P# n6 j
  150. #  shadow_options(80,10,false)    # This is the default setting.: m2 q" L4 W3 c3 j1 k2 U
  151. #------------------------------------------------------------------------------#
    ' C" {5 S1 P  O: d: k6 v" C! n1 ^/ V
  152.   ( _9 A8 T( X) |/ Q$ @2 D6 t
  153. #------------------------------------------------------------------------------#
    9 V- f+ [* _) u. F* U4 L. s
  154. #  SCRIPT CALLS for reflect options
    9 T' O6 F+ Y! k# ?& p% e" u
  155. #------------------------------------------------------------------------------#* [  j7 m% [  D4 n
  156. #
      r  v% h6 E3 Q6 W
  157. #  reflect_options(wave_pwr)
    ) K- J' C4 @4 t7 \% k( T- l  W
  158. #
    . V% |) Z) L3 `
  159. #    # wave_pwr = how strong the wave movement is. 0 is off" ]6 X8 d3 l9 p+ a5 _
  160. #
    1 a& L: c4 m0 b+ n9 A& E
  161. #------------------------------------------------------------------------------#  z, d2 v$ K+ W
  162. #  EXAMPLE:$ |8 q1 M: `  ?' _3 C* E
  163. #  reflect_options(1) # Turn wave power to 1+ t5 t1 ^2 b; J7 P& C/ v) N. k
  164. #------------------------------------------------------------------------------#
    , {! _6 U0 K8 m8 e* f7 n0 h
  165.   
    6 \0 Q5 P3 [! E7 h- {' |, s; C3 d
  166.   3 Q: D7 _9 t3 j
  167. #------------------------------------------------------------------------------#8 t" M; x4 f6 k+ Z6 S) L; O
  168. #  NOTETAG for ACTORS) q$ ]+ Q. u* u$ b& m. I! N, f  Z
  169. #------------------------------------------------------------------------------#: M5 O" i* i& x+ P- Y5 q
  170. #3 Z" W. R4 F4 D) n' j/ j  U0 T
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)9 b+ D! e. x/ Q4 B: ~2 q
  172. #0 A' ]/ j0 ?$ x  l
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    . K* X# U3 K, v% m  ]9 Y
  174. #                                  # and use the character in position 'pos'5 }$ |5 `7 a% f: \, r7 E4 D5 O
  175. #
    9 _) A2 I, y0 L, `+ G3 ~2 Q* H3 j
  176. #------------------------------------------------------------------------------#/ Z6 C3 a4 l) n8 J+ a
  177. #  EXAMPLES:
    4 m  f5 M2 }5 y
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset; R% ~# V: T7 _  {8 C
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset0 k* I% h5 P/ ]/ F
  180. #------------------------------------------------------------------------------#6 J  X& J) i8 ]. H) |; q
  181.   % Q; P7 h7 [5 |
  182.   
    - X( Z% x- ^% G2 O
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    5 n, {: n0 l8 ?  D+ P+ s' Z0 |
  184. module Galv_CEffects' ^# O0 k2 @# E; Q+ p
  185.   
    ( B% z& A' V3 A  g5 I
  186. #------------------------------------------------------------------------------#  4 ?2 D! ]# {$ L/ h+ y
  187. #  SETUP OPTIONS; k0 g8 A" P9 }
  188. #------------------------------------------------------------------------------#0 J; v; Q- ~- T! _! \2 T
  189.   
    - w! x' k4 B) ?1 i; \; \2 d' [
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the6 W3 ~) D/ C- _# l8 }# [" L  o% ~/ m
  191.                         # region on the wall you want to make reflective (and2 l2 Q/ C. x+ O9 m3 K7 w
  192.                         # then use tiles/mapping that make the parallax visible)0 ?4 U$ G' x1 e
  193.   2 i% @: E9 l- T& b2 K' \
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    8 |* V$ v; i# @1 A' u* Y
  195.     ' ?* M1 x9 C+ j& w* k
  196.   REFLECT_Z = -10       # Z level of reflections
    : ?5 H6 ]8 f+ N' I& a1 l, r5 O) T/ L
  197.   SHADOW_Z = 0          # Z level of shadows
    : Q4 L; z$ j7 c% o- A7 _
  198.   
    3 c& W2 a4 \0 W/ O' J0 H- B. F6 W
  199. #------------------------------------------------------------------------------#  % e- K; q2 t2 ?+ O
  200. #  END SETUP OPTIONS
    ) }  S9 O4 j2 O2 _  J$ V
  201. #------------------------------------------------------------------------------#
    ; ?' a! \' c! h: j
  202. end  G5 B/ y; U5 l7 e1 ?
  203.   
    3 v  e- ^3 A4 j+ z
  204.   
    & u) n  U% R: }3 A" O
  205. 6 C$ Y# W% C' {
  206. - r' o7 {6 Y# M" b; b& z, h9 z+ ^
  207. class Game_Map, b$ T5 ^9 Z, h) p" J
  208.   def do_icons(refresh = true)& s) _4 Y7 H& p- _
  209.     @events.values.each { |e|) c+ J: v1 q* y- [8 F
  210.       next if !e.list# q) V/ _: G' P( D5 |4 t
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/) b9 W2 b/ X7 j) \
  212.         e.icon = $1.to_i( a2 m1 J# N8 N1 C$ D- R
  213.         e.icon_offset = [$2.to_i,$3.to_i]5 W$ |$ _6 k7 g/ f1 w
  214.       else% ^8 s3 w9 Y9 }) n/ K% w0 t
  215.         e.icon = 0
    8 T+ c4 n! p3 U+ [; T1 G
  216.         e.icon_offset = [0,0]% f& `7 L- b) I% }# I
  217.       end" w- M0 U- O4 F7 ^) _+ o7 i6 i  x
  218.     }
    * `  e, ~* p% [7 k
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    6 h( r' M) u8 `% r; E  ^
  220.   end
    8 k0 Q8 ^9 ?# m3 o3 S8 G
  221.    
    , w5 O# \& \0 G) ^+ _4 N" N
  222.    - Z' I( |- X2 r" a2 |4 _
  223.   def do_shadows(refresh = true)
    8 O: Z1 }! x+ I0 K: B1 a+ E
  224.     @events.values.each { |e|( ?% Q4 O$ o0 t5 J6 T
  225.       next if !e.list
    ( a$ |3 Q: Q. }8 m; @: `* L
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    % S; g' |) w2 X. b
  227.         e.shadow = true
    3 m1 y- J8 I/ N! }  C" z" L/ e
  228.       else6 J* y+ \3 D! q# R# w: Z+ b
  229.         e.shadow = false7 {& Q5 ?3 T7 {! I! r1 \8 x( ?
  230.       end
    $ j  x8 Q3 S* z" Z' B
  231.     }
    & f  ~1 X. I- I% p4 V0 t& p+ |7 N
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
      A/ j* I- i$ P$ H5 ~( b
  233.   end
    4 d  C" T4 q4 N: b' k0 O2 d
  234.    % D. B5 y% c# r. [& c
  235.   def do_reflects(refresh = true)% s5 G2 p1 k4 N3 ]+ ~  |; Y
  236.     @events.values.each { |e|
      P+ D- M! v+ m9 n* R
  237.       next if !e.list, R, T3 e" P1 x1 i# e+ ]
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    4 ]& z2 K' D& V# a( z  C0 Y# S4 a+ D
  239.         e.reflect = true8 l0 _' N4 k5 K/ n
  240.       else2 U! Q" k& D0 Q
  241.         e.reflect = false
    % g! [1 b& R, ~4 ?
  242.       end& A+ K# O" e0 x3 l+ P
  243.     }
    1 p! O+ y7 }! f3 T0 M
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    ; M+ T  Y! b) f& z" {9 n
  245.   end
    . B0 j6 N% G7 i# g& W9 `
  246.    
    . A' y$ m! D4 q
  247.   def do_all_chareffects/ |; \/ b1 @3 A% q1 G8 ]7 u
  248.     do_icons(false)) O9 c7 d9 t: v/ Y8 ^% z- h/ A
  249.     do_shadows(false)+ l( {! R9 P5 @: c, w" V
  250.     do_reflects(false)
      n9 u- m2 q( r5 A! B
  251.   end
    + A* b: q4 O, l, A# l; e" o9 o$ |7 B
  252.    
    6 O, T* f/ T, a" }0 o+ y" D
  253. end # Game_Map. Y9 U; z# ~, b  `' X1 ]

  254. 8 G3 k' A  v9 T# V. d

  255. $ `% c. j5 o; V+ O0 w! z9 c, t

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-11-23 22:03

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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