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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
1 F6 U" W4 K' T9 P: Q# c
这个代码怎么用啊,有大神知道吗。我从国外找的。
* {2 T, ^9 w4 a$ g( ohttp://galvs-scripts.com/2013/02/21/character-effects/
* P# m! x& B; w& N( V6 B是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    ; B7 H$ |: `! D, h
  2. #  Galv's Character Effects4 Q9 z1 k$ I0 Z" g
  3. #------------------------------------------------------------------------------#
    ! b8 b1 E3 p8 ~" z' v& E  Y; r
  4. #  For: RPGMAKER VX ACE
    8 ]6 n, e) ?8 ?9 k
  5. #  Version 2.14 k% ]6 ?0 Z  r& l
  6. #------------------------------------------------------------------------------#4 R1 ~9 D& H2 f* b) }, K
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    # _) Y6 q# o) q9 O7 U
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    " D( q( b5 D) }' h& k( s2 w  n0 L
  9. #                           - Fixed shadow facing bug
    * @1 y8 D" e  I) M$ R
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    / j/ i( Q' i# u% H  O0 i
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows( w' B0 B/ D2 c" N3 l: n9 V
  12. #  2013-02-22 - Version 1.7 - bug fixes$ G; I! t9 }3 Y* O* X# a
  13. #  2013-02-22 - Version 1.6 - added icon effect
    & B! F8 Z8 F) d0 a1 f8 y2 n
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps/ C- ^1 A, z: N% K
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles/ v' t8 `; j7 r% y  M7 M
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks3 ?  Y* ]3 ^" N& ]0 T- F5 C7 L
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops), }7 [" E& H. e& Z: J' R
  18. #  2013-02-21 - Version 1.1 - updated flicker effect% A, \8 X- {: V. N, T  }
  19. #  2013-02-21 - Version 1.0 - release$ X  W" X. u5 D6 g3 @& I! L$ J  h& p
  20. #------------------------------------------------------------------------------#
      ?. a0 a9 q. Z5 Y* t
  21. #  This script was made to provide some additional effects for characters such
    ' E( H' C7 u! R
  22. #  as events, followers and the player on the map.2 f0 k5 {' K, e1 n1 f
  23. #  Currently it includes:
    6 N) u7 b4 \2 Z
  24. #" T# c8 H# w6 V8 Q% n. d
  25. #  Shadows4 @. w. X- r( L. I7 V. \
  26. #  Shadows that appear under player and events in a directions depending on5 ?: g$ n% ^1 u( B; }( ~1 \
  27. #  a light source that you choose.) `, R. ~9 X2 t2 q' y# C
  28. #
    ) B# n0 K) }5 H0 {, v& d2 z
  29. #  Parallax Reflect
    3 d7 y) Y* Q1 X# m! O0 U
  30. #  Reflections that appear on the parallax layer for events and actors to be
    ' l1 ]6 m$ |8 \$ K/ J& \
  31. #  used for things like reflections in the water or glass floor etc. To get
    6 h$ y  v+ ?& b4 S! j, ]/ y5 f
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    , D: y2 L$ A/ m3 g7 e/ ]& N
  33. #  partially transparent.- |' j" m7 e$ c+ Y1 Z7 m
  34. #
      X4 t' p" I/ [3 G! |( ~
  35. #  Parallax Mirrors
    0 u& h4 O- F$ f" C
  36. #  Much like reflect but are instead actors and event are reflected in a mirror- N2 G- t* K/ w# M7 a/ c" [
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    7 H: _5 ^: ~) t' }, L
  38. #  changed so actors and events can use different charsets for their reflections
    9 p% M) p$ z( I! C
  39. #
    $ C( U) B; W0 R9 J
  40. #------------------------------------------------------------------------------#
    ( m9 J& [6 u7 b0 M9 ?4 K7 m" @
  41.   8 X: g: U7 I# a6 Y& U: g/ I( H
  42. . X- E* x: s( p: N5 W
  43. #------------------------------------------------------------------------------#' M+ a" g4 p0 Z; G( c  d
  44. #  NEW - First event command as a COMMENT
    4 K3 d# @& D2 m
  45. #------------------------------------------------------------------------------#
      Y  ]7 U5 q; l8 [
  46. #  You can add a comment as the first event command on an event page to set if+ W" P, O3 E7 q/ A3 n1 q( m. E, W
  47. #  that event has an icon, shadow or reflection active. The tags to use are/ R4 n4 t- o) c8 e; I
  48. #  below, all must be on the same line in the comment.
    6 o2 P5 ^3 V% i4 M+ \
  49. #2 d! {6 g& t' H9 v
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    ! q" v" h3 z( i/ Z0 E( j
  51. # <shadow>           # set the event to display a shadow( g. W6 c+ k0 I' ]$ i+ C% C: o
  52. # <reflect>          # set the event to display reflections( U( d. w& s8 q3 M) F
  53. #8 @% s5 X( m' T' |; M
  54. #------------------------------------------------------------------------------#
    6 ^8 F: f, K! i0 i  y
  55. #  EXAMPLE:
    ; V: I: v7 q. B- S
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event* @, k6 q) j2 F
  57. #------------------------------------------------------------------------------#
    " A8 I. {3 q3 Y" G1 M/ k6 M7 j

  58. , X+ A: a) p& }. v$ g9 ?
  59. $ A! k/ G% c* V7 n, E+ q
  60. #------------------------------------------------------------------------------#3 h" N2 W" f& Z( I* @
  61. #  SCRIPT CALLS:
    5 n7 A9 h) g& d* ?5 s! v# Y
  62. #------------------------------------------------------------------------------#( `2 F# L& [8 w; J2 D
  63. #5 [6 N$ G6 e( U2 O3 g, |
  64. #  char_effects(x,x,x,status)
    1 H- i0 v" f) G+ B. ^* S
  65. #2 b6 ]$ q) T2 N" L9 u/ K8 b+ T
  66. #------------------------------------------------------------------------------#6 y/ O5 L3 p2 q/ ]9 W4 T
  67. #  # each effect can be true or false to enable/disable them during the game.
    ( N' y$ A6 M8 P8 ^/ ~) s1 s% `  E: {
  68. #  # you can change multiples of effects at once, x being the effect number
    # W5 I% p4 K$ ^4 X3 J# `6 T" W# y
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    6 O8 Q* i, u& ]# W: ]+ t
  70. #------------------------------------------------------------------------------## C/ R! x- B. D: g
  71. #  EXAMPLES:+ Z" h8 F9 p4 C* U; o- Q+ E3 W
  72. #  char_effects(0,true)              # turn reflections on& s. x8 F* Z( Z9 u2 l
  73. #  char_effects(0,2,true)            # turn reflections and mirror on% z2 ?# m1 ]  T  `7 z5 A: i  [
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    # B) ^( v  b3 _; V* Z0 K
  75. #------------------------------------------------------------------------------#' \+ V& l" m. w: B6 g, h- b
  76. #
    & s5 \( _* o3 C
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset& O- R+ c- \" p1 _- p% q
  78. #
    9 M- y3 {) Z! G; z8 w) a( }
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset4 K8 w, d' k+ v1 P
  80. #; J! x% E) A( t( s7 Q. R6 V
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset+ S1 f3 L4 F: W) `! f. M+ x
  82. #8 n, T! `3 M- \3 B2 J! D
  83. #------------------------------------------------------------------------------#" t6 k4 D/ m, I1 t& d
  84. #  EXAMPLES:+ K1 A+ b" ]0 k* _) E
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    0 I" f% r( l/ J  ^
  86. #                                    # in position 2 of "Actor2" charset.' w8 a2 y7 ?  I8 s
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of- ~8 n% G. I# Y3 m) m" q6 E1 r
  88. #                                    # "Actor4" charset.& L/ d7 l! M* _! F- N& @% _' {
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    0 {8 \% b& m* j/ b
  90. #                                    # "Vehicle" charset.
    $ L5 A7 N9 O1 _& c4 X& i$ S
  91. #------------------------------------------------------------------------------#$ R1 Q( t/ s4 Z# T! o3 q2 F
  92.   5 U$ G! E7 P# |( g- Q( A/ t* i+ D, s" X
  93. #------------------------------------------------------------------------------#
    ; x+ Y& s6 s" v, I3 v; d: c
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS% f* v; I) s2 m, r, ^( Y* J7 j( j" D
  95. #------------------------------------------------------------------------------#8 C4 a8 ^# L. Y+ c+ i
  96. #
    / X/ K9 i7 Z+ A' l1 Q
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    2 n7 o1 V4 |4 N6 C$ y0 S5 w
  98. #                          # use this to specify for mirror and reflect.6 E+ ~/ y: s/ ~$ F; z
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    : O( [3 _" K4 b3 J) B$ O
  100. #                          # to change all events use :all8 ?# B- \5 ]# k" Y. D! _
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make+ P5 F5 v8 J2 i' s( u) T. K
  102. #                          # it 0 for no icon.' o; q7 L. i4 H8 n6 E5 t$ t; {
  103. #
    4 {- ^* e$ D7 H$ U) s; Z( v
  104. #------------------------------------------------------------------------------#
    3 g( {2 q- ?4 \# P. t
  105. #  EXAMPLES:
    : o7 g8 e6 r( ?& u; X# Y' @
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    3 |* j& [! b) X" B
  107. #  shadow(1,false)         # Turn event 1 shadow OFF9 N2 C" [/ h6 W. S& `. r
  108. #  reflect(:all,true)      # Turn all event reflections ON
    / B9 f; P, G% c$ p) t
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear1 Z7 S( }1 m) @0 a( `5 U
  110. #+ j9 u0 L- x; c
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering& J% ~% O: {: @/ L9 x# f8 i
  112. #        a map. This is a design decision to try to keep lag to a minimum. You9 K" P, H  j) G1 n1 k% J
  113. #        should use these effects sparingly and only activate them on events% s  ?& P8 f6 i3 b" r; p* A
  114. #        that require them.0 a7 e0 e) B2 s/ M3 @1 G, `/ y
  115. #------------------------------------------------------------------------------#( L7 y8 q! U8 S  U8 T2 ]. U
  116.   
    + o4 [" x& n" ~- E
  117. #------------------------------------------------------------------------------#
    % B+ ]7 N# {' t5 F) ?1 Z
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    ! w( O9 ~8 O: U/ b5 P- n
  119. #------------------------------------------------------------------------------#
    9 ?# W, ?. M& \4 |
  120. #
    4 R% `5 J0 V, d/ P
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 6 R1 M! S3 t+ K$ j4 {/ Q
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 0 g7 }9 A- `3 n& o9 J
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.' J3 [4 V6 @$ o8 l
  124. #
    / n/ u# x2 b7 t7 [1 E
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    0 x& F) |" h0 `$ X- D! T2 m
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    2 b) D  M: K0 `* d
  127. #  v_icon(x,x,x,icon_id)
    $ A, R% M; l# A5 Y* H$ S
  128. #6 I: `3 p& S7 T" L3 a" M
  129. #------------------------------------------------------------------------------#0 x4 ~* n- f- A! H/ K, J8 D" w
  130.   
    : ]0 g+ P6 K5 G  \$ E
  131. #------------------------------------------------------------------------------#
    4 Q1 }: C, ?# E* M$ ?
  132. #  SCRIPT CALLS for shadow options
    * [4 z4 E  h6 Y/ J5 l% e. J
  133. #------------------------------------------------------------------------------#
    , h0 n/ m3 J& o6 r; X
  134. #
    ' ~0 i$ j' `3 A" Z! ]
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the % j. v5 m( ^+ [
  136. #                              # light source number you wish to change (for
    , x% S- @/ T. S
  137. #                              # more than one). These are reset on map change.( R3 y, i, o0 E, j$ B
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.+ G' B  M# |- M( p; z, T! e* B
  139. #                              # This will need to be in parallel process if you
    3 {  t) }2 T- w
  140. #                              # want it to be a moving light.
    ; u' w- n+ b# p
  141. #2 F! r9 k6 `! _
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    * ~4 t3 t) v% W! k% T
  143. #1 q& V3 y" k) H
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    & n" X8 @" Y5 E2 k  H8 q+ c: v
  145. #    # fade = amount shadow becomes more transparent the further away you are.! b. N6 u: U! O4 W
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.# u0 J2 t8 U2 s3 E$ o/ y* s9 f/ v
  147. #/ n; J$ w0 [  a7 p0 D5 x
  148. #------------------------------------------------------------------------------#: n8 p  [0 |: M! G
  149. #  EXAMPLE:6 W; w" B( _/ Z# n9 l; d' _
  150. #  shadow_options(80,10,false)    # This is the default setting.) o  s4 J" g6 E7 @
  151. #------------------------------------------------------------------------------#
    % x4 W; F0 `$ ?; r/ R6 \9 f
  152.   
    0 ^- A% P& {* _' F' A8 b( q: s3 b2 w
  153. #------------------------------------------------------------------------------#8 Y/ T& S2 H0 d! S7 S4 l
  154. #  SCRIPT CALLS for reflect options
    ( R  d: v# i1 d7 g
  155. #------------------------------------------------------------------------------#
    # V! O  T0 y; ?$ n* |/ F% g" ~% A
  156. #
    9 a$ {2 I6 m2 q5 ^: P
  157. #  reflect_options(wave_pwr)
    + C4 X: I: e3 I
  158. #6 l! {  n! u9 v" U/ P; `8 C5 `+ t
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    . G" ]6 K* g! w; }9 |9 \! ]% q/ X
  160. #( Z7 w( w! A- O5 L6 |: l
  161. #------------------------------------------------------------------------------## @- Z! L+ M# i# V, x- t% E
  162. #  EXAMPLE:
    # G$ H  ~( g' D! c
  163. #  reflect_options(1) # Turn wave power to 1
    / p2 S% `$ g  u) H; ^; H/ d! Q% W
  164. #------------------------------------------------------------------------------#
    % l0 F& k, J, a. M) k
  165.   
    8 O: ]8 M/ F) G$ S; Y4 ~1 l
  166.   9 Q; ]# R0 I. ^2 u9 U' x
  167. #------------------------------------------------------------------------------#
    : m, d2 F1 X7 |8 O1 D
  168. #  NOTETAG for ACTORS. I* b" O7 }, C  p5 L2 O
  169. #------------------------------------------------------------------------------#
    1 A: Z5 G$ `( d- d
  170. #6 b) P$ r6 ?/ [9 C. H( b
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!): X9 ^5 f$ a2 G$ x7 |
  172. #
    " Z  X$ Y4 d+ J& `2 M
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections- r0 K4 {3 k9 \/ f; D
  174. #                                  # and use the character in position 'pos'
    ; L8 N  ?$ C) X; }$ X5 k3 t
  175. #* G- Z& k0 P+ N; h+ T* j2 ]/ f  e) |
  176. #------------------------------------------------------------------------------#7 c: \/ o0 y2 ?* W/ i8 Z+ W( J$ d
  177. #  EXAMPLES:9 B4 n# C: S! A3 o9 q
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset- ]% d- D* h/ t  g
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset9 G4 ~9 g8 W1 U6 o4 F0 X$ J  f
  180. #------------------------------------------------------------------------------#2 T3 _: c( q4 F9 n" }
  181.   
    5 y- z. Q0 i4 t/ U* c
  182.   ( E6 q6 R( X  ?4 w5 X- {
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    9 e% v* D; ~8 E; L  n
  184. module Galv_CEffects, c) R/ n# f$ w% m: g% F1 i% P
  185.   ( M; S/ S1 Z# B2 e2 a0 H
  186. #------------------------------------------------------------------------------#  
    , v2 P9 }9 B7 m7 b3 M; I: \% K
  187. #  SETUP OPTIONS; P* r8 E5 [+ @7 t* R
  188. #------------------------------------------------------------------------------#
    " z: J7 H4 ]1 k. o0 s
  189.   ' J) x  P9 c9 D& m; u- ?8 O- n+ B6 a
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    & C! w6 \* K. ?5 }( F  A2 b
  191.                         # region on the wall you want to make reflective (and5 s# ]1 q2 q4 J- {% Y- ]
  192.                         # then use tiles/mapping that make the parallax visible)2 S  ~! u( [  ]3 d4 \
  193.   
    $ t3 q7 y7 k+ }2 g5 g8 n
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters% U8 w7 M* q3 R& F8 o* c% `
  195.     1 |) B" V: o) v! i1 D5 _) _2 r( H
  196.   REFLECT_Z = -10       # Z level of reflections
    : Y4 K0 k6 [3 `; H& ~, K9 f
  197.   SHADOW_Z = 0          # Z level of shadows
    # e7 H6 w! k! z3 M( J3 s
  198.   
    . ?% X% m; r" x+ a  b% ~! a
  199. #------------------------------------------------------------------------------#  2 r4 C/ ]" T7 X6 w% o
  200. #  END SETUP OPTIONS
    $ }- d  r/ H+ e# J1 V
  201. #------------------------------------------------------------------------------#
    0 p) C( T  l; [4 x
  202. end) ]7 u( L# [2 z: n9 G" C
  203.   0 F6 L- b* V& `) y+ l
  204.   & d$ v' o: W9 ^! ~# a
  205. + o% I, x5 r- P& N# h( E; n
  206.   ~( g2 \2 @! [
  207. class Game_Map
    9 ?! @. E8 t- x) c
  208.   def do_icons(refresh = true)
    3 x& w+ Q" e: E5 W
  209.     @events.values.each { |e|0 i6 j. ^9 k( Z/ ~" p
  210.       next if !e.list+ B0 e) C9 U5 O2 i9 ?
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    . z0 f( V# S7 x
  212.         e.icon = $1.to_i% P$ R3 c" ~, z8 x) s
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    ( G, w$ E* Y& m& U! ?. F& M4 s6 z
  214.       else- `- y2 e* `0 ?4 j
  215.         e.icon = 0- U* {$ x) s2 s  S; Y* ?
  216.         e.icon_offset = [0,0]" u; y& t# @0 H% Q, B) q0 W
  217.       end
    / E- U, g8 R7 [: |1 a7 ^
  218.     }( w$ z  J. \! i: t  \
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    2 l( y, }5 d# i* b2 M! ^+ t* L
  220.   end" X$ W% p7 R# M% B& A4 V# K8 D
  221.    
    4 ]$ L6 Q# w, G# Z1 H$ [: c
  222.    
    ( `; N3 L' l9 o& Y: E! J6 v
  223.   def do_shadows(refresh = true)' `9 Y5 @1 G) N+ k, I! C
  224.     @events.values.each { |e|( a" {1 z' l9 ?2 u
  225.       next if !e.list" m, P2 U9 I' P1 `2 R5 s
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/. L% f+ @) M4 I& m8 D# C4 g
  227.         e.shadow = true
    , V- d6 b4 e( a" L  a6 p
  228.       else7 a2 i& U% c2 T
  229.         e.shadow = false$ e' Q  x" n9 L- y# U% i- ]
  230.       end
    % U" F$ E) f- g) M) n
  231.     }
    3 {; W6 S7 l" i' }' G/ \! U
  232.     SceneManager.scene.spriteset.refresh_effects if refresh& O9 y* v! o, x. d
  233.   end
    * |1 T2 a2 x; G+ e+ H
  234.    
    % u5 ]! q" F9 @9 x& x; q
  235.   def do_reflects(refresh = true)+ g: s" \& q# E  B9 z4 t4 d
  236.     @events.values.each { |e|3 `4 u* x$ K2 \+ _- Y3 \* P0 j
  237.       next if !e.list
    4 a/ o* }- g% n8 Y. x
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    5 P, |. q( R/ v# R
  239.         e.reflect = true: X6 n; e8 e3 T) U# r
  240.       else# v$ X# ?% P+ n
  241.         e.reflect = false9 t& H& O/ K6 w$ }0 C' W
  242.       end
    # S4 y8 q3 h- g0 X. f0 L# x
  243.     }8 e( f; @; i8 F& c2 ?! ]7 J! ]
  244.     SceneManager.scene.spriteset.refresh_effects if refresh2 d' h; y0 v2 z# Y( `' c3 f) L
  245.   end
    7 }  r1 H4 @2 Y, n
  246.    
    / S4 d) g3 I8 f+ e
  247.   def do_all_chareffects
    * p: N  S& p2 ~& w2 ~" `# `( k
  248.     do_icons(false)
      O$ m0 }# V9 f  c$ _% \* L7 K
  249.     do_shadows(false)7 {. N+ h" Y+ S, O, @
  250.     do_reflects(false)
    ( u2 N  u: C) J; U
  251.   end
    & Z6 F  J, |3 @' {( b" K0 D+ [
  252.    . y2 `# T0 A& e
  253. end # Game_Map" a1 S  P6 _3 S% @+ }. z5 p: C5 l

  254. 4 M" e5 O% V! X5 x( z0 r1 Z

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-7-24 20:08

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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