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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

- m6 S( k- y7 d* J6 ]这个代码怎么用啊,有大神知道吗。我从国外找的。% Q0 H* l% f( U
http://galvs-scripts.com/2013/02/21/character-effects/
. r3 }( {4 ?0 r! `6 v: k是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    8 K4 M2 R/ Z0 e# g( o
  2. #  Galv's Character Effects
    % W& E* s4 m7 X6 W; @; B7 S
  3. #------------------------------------------------------------------------------#
    # B& Z- v3 ^% N  c; r
  4. #  For: RPGMAKER VX ACE
    7 }, s6 V( G9 d5 F& K
  5. #  Version 2.1: Z9 `, V$ l8 V8 x# Q4 C
  6. #------------------------------------------------------------------------------#! g9 o1 S8 O/ ]
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    ! A' c: G; D! E8 E* R% l2 N0 T
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects- ?4 f9 U* E# Z  l# M
  9. #                           - Fixed shadow facing bug; |+ f- |' i* {1 D# o4 `
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows' l% x3 t: P2 x% `  h6 L8 F
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows* L; |" p4 z6 k. P" W) v& o& J
  12. #  2013-02-22 - Version 1.7 - bug fixes7 a6 {" }) K/ y  ~
  13. #  2013-02-22 - Version 1.6 - added icon effect
    7 Q( X: u; z2 J# p, L# O  Z" K
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    $ L/ e8 a+ U) W
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    9 Z+ P2 I8 }0 s
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks( H' f: [- C! H) H9 Y, D
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    # \3 d* i7 S) Z5 s' y1 l( [
  18. #  2013-02-21 - Version 1.1 - updated flicker effect4 K( X) s" b2 v+ N& t3 L: ?; Z
  19. #  2013-02-21 - Version 1.0 - release8 G- s1 i0 ~  l/ t) ?' ]
  20. #------------------------------------------------------------------------------#" M2 j* G1 e+ }2 `$ M' a) ~* b5 a# b
  21. #  This script was made to provide some additional effects for characters such
    ! P$ u3 G" C9 q2 ^4 {- O
  22. #  as events, followers and the player on the map.
    , h6 z8 [* l7 u& f, V0 U8 t/ J
  23. #  Currently it includes:* n* m+ o+ E& J/ E$ Y/ S
  24. #, }0 M0 [% N6 F, H+ X- @( j
  25. #  Shadows4 |3 d" ?6 o2 p4 u
  26. #  Shadows that appear under player and events in a directions depending on9 V: Z- U: v3 p
  27. #  a light source that you choose.- q3 D- B7 Z3 M5 ?
  28. #
    & y$ A/ _2 @! ~9 \
  29. #  Parallax Reflect; N* L0 `6 A$ a
  30. #  Reflections that appear on the parallax layer for events and actors to be9 S3 L6 S/ \) v. X% f- M; r
  31. #  used for things like reflections in the water or glass floor etc. To get: M7 x2 w/ v: `, X* K! y& c
  32. #  effects like the demo, you need to edit the charset graphic to make the water- j$ ~6 t1 d7 W; Z
  33. #  partially transparent.
    2 {4 r5 y& j& }
  34. #' P/ Z7 q7 o5 w1 Y- Z# @- f
  35. #  Parallax Mirrors
    ! @# |4 c8 t) x! a9 F5 f6 k. \
  36. #  Much like reflect but are instead actors and event are reflected in a mirror2 e' u# [8 z/ a9 ?9 \* y
  37. #  on a wall designated by a region. Both mirror and reflect effects can be- X7 f8 N& G$ e5 Y. g. r
  38. #  changed so actors and events can use different charsets for their reflections; S7 V+ \% h9 H* L
  39. #7 ~" M! u- \+ x3 H  R* [
  40. #------------------------------------------------------------------------------#% |' K8 S" y* K2 M
  41.   
    4 [; B! p) S8 V' C& ^: k- p

  42. ( T+ ^8 {/ Y. J% \
  43. #------------------------------------------------------------------------------#3 |4 S# o- u* K" T4 ?9 n8 G
  44. #  NEW - First event command as a COMMENT
    ) s+ G/ |/ n+ \. I7 l" r/ J
  45. #------------------------------------------------------------------------------#- w; |4 J$ Y; F  _* R6 m6 P) K3 e" O
  46. #  You can add a comment as the first event command on an event page to set if
    , ~/ W& j5 I2 h$ o! Y/ L
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    . E; J  }9 u8 u( ?$ o; L% ?  E
  48. #  below, all must be on the same line in the comment.
    . a! r; i2 ]( h9 A! s- ^* A
  49. #
    0 r1 Y! k" F# y, o, o3 v
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    1 Y8 |- I* r" t" r& g) ]) P0 u3 l
  51. # <shadow>           # set the event to display a shadow0 }) f2 g- N* x
  52. # <reflect>          # set the event to display reflections1 [: ~0 P; S6 z' Y$ ]6 G% d2 ~
  53. #
    ; i/ M1 @$ ~/ }* P) @( w$ U& ?
  54. #------------------------------------------------------------------------------#
    5 e# H3 p4 d( N
  55. #  EXAMPLE:/ f) \3 d* a1 G
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    7 c1 E6 D+ G! i# [# ]
  57. #------------------------------------------------------------------------------#
    % ]7 ^- z/ M. }" Y# I# t: k

  58.   O: j9 O" ?- \. q- K

  59. + }6 f& d% s, R4 Y) u* X
  60. #------------------------------------------------------------------------------#
    2 Z! z6 n9 ^6 U" c5 \
  61. #  SCRIPT CALLS:8 W- d/ V; U1 V* v6 ~# w* H! [4 M! s
  62. #------------------------------------------------------------------------------#. u, @5 e  u. U1 A# U: G' |
  63. #
    1 }2 l  c" O$ n$ Q9 ~0 J" ~
  64. #  char_effects(x,x,x,status)2 y" E. Q" F/ C$ ^# l
  65. #
    : p& J' s# Q7 s9 X: b
  66. #------------------------------------------------------------------------------#
    " V* a; Z4 s) O8 M% r
  67. #  # each effect can be true or false to enable/disable them during the game.5 p# ~* Q2 S& j1 W
  68. #  # you can change multiples of effects at once, x being the effect number
    ; T$ t+ I7 k0 T) t8 w$ z
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons* C) g# S- \0 ^2 n0 u
  70. #------------------------------------------------------------------------------#
    ; G, R) q( P, m5 Y7 L
  71. #  EXAMPLES:
    : B: @- @% a% R  u% `/ K
  72. #  char_effects(0,true)              # turn reflections on/ \' I$ U/ i- ^5 g
  73. #  char_effects(0,2,true)            # turn reflections and mirror on- E- W/ C( `' p6 A, j* ~) A
  74. #  char_effects(1,3,false)           # turn shadows and icons off) G# o& M- X  m
  75. #------------------------------------------------------------------------------#5 |8 A2 T# |5 A: V0 x. h' a
  76. #8 V# G- k! {) T7 n& m; s( }
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    1 I& W# i  W) F; I: y: g4 I: t
  78. #9 ~% R- w1 o' s' R! g5 W
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset/ ^9 V, x' i8 Z0 B4 n' W! R" N9 \
  80. #$ ]4 @7 F2 _6 Z: S
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    0 k3 ]4 m0 u8 I& B
  82. #
    . x  s9 [  O/ W3 m' d& f  x$ p4 @9 b
  83. #------------------------------------------------------------------------------#
    " F/ j2 T3 ], v! B( X
  84. #  EXAMPLES:
    " d3 H9 G, K5 r4 g
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    # `: ~4 L2 z5 V: t. ]* a3 `! V: `
  86. #                                    # in position 2 of "Actor2" charset.
    $ o; T' S, x2 Y# z2 K! `! G
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    , d" H1 M2 Y5 A1 \  g6 M
  88. #                                    # "Actor4" charset.
    ) {; D% A+ W4 [3 i. X
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of- i0 e# E( i/ U- w6 {( C
  90. #                                    # "Vehicle" charset.
    " `, a+ R: F4 L. H
  91. #------------------------------------------------------------------------------#
    6 n) _3 f) b8 L6 H8 }0 Q
  92.   
    , k* C# k3 L, {7 I3 P" U7 B* S
  93. #------------------------------------------------------------------------------#: N. ?4 C; V( s3 r1 W; D, T4 j
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS7 M- W* z, w) [0 n8 j1 s0 ?* W2 h
  95. #------------------------------------------------------------------------------#
    " ]& s! C  s- z- B. e
  96. #& l- q. a* J* C
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off% p* ]: a" z% @: b# G7 W
  98. #                          # use this to specify for mirror and reflect.
    , H- Z0 {3 K& K6 J
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change- q/ Z$ D5 w2 Q3 i. F
  100. #                          # to change all events use :all  I/ W0 w7 m! v  Q( D9 z5 H
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make' _/ g7 {2 t: _9 Z5 @$ b
  102. #                          # it 0 for no icon.1 L8 D& N  M. w8 m( b! G' J
  103. #
    ; T3 t4 w: G! ]8 n  c' x
  104. #------------------------------------------------------------------------------#
    7 `! u( }4 B, W4 F% |
  105. #  EXAMPLES:
    " Q0 G' A- e: y( n  t
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    7 d' X9 H" y9 {" a
  107. #  shadow(1,false)         # Turn event 1 shadow OFF5 R2 ?* e; t& r  |1 h0 Z% z
  108. #  reflect(:all,true)      # Turn all event reflections ON
    ! i% G0 I( T8 ]% `$ L. A) a8 F
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    7 W$ I6 K/ x3 W1 q: G4 r) a  W
  110. #, r' }5 d+ u' G" B' h; C
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    % o& L) @9 ]+ f& u( O# ~4 g
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    2 [5 S6 U0 m  L7 M' r/ n
  113. #        should use these effects sparingly and only activate them on events! h& n6 m5 l& C4 `! ^& \
  114. #        that require them.
    ; F0 `& j" ^1 i
  115. #------------------------------------------------------------------------------#8 ]- i2 y7 Q; V. u
  116.   
    3 t# u! C3 e; i9 e
  117. #------------------------------------------------------------------------------#
    0 x5 d2 K  r3 M6 A9 ]5 t$ |0 a
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    - N; P) Y- d! \& A8 G% k  y! S
  119. #------------------------------------------------------------------------------## L9 n$ G( A$ z# [# B! r
  120. #
    9 b' t7 ^8 D& y2 S7 r& k& u- z2 ~
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 5 V; t3 ?2 R3 m! C
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off ) ~( V' D' K. c0 x" v7 D( \* G4 Q
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.5 d' Q# ^  s/ z; S- m
  124. #  M' r, [. h. |
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects$ \$ s* t  ^, h+ T+ y* Z
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.. B1 c  @7 j+ D1 o
  127. #  v_icon(x,x,x,icon_id)
    " i& G' i& \& g( Y/ k; @7 w
  128. #
    % R  p+ G. B' J7 s" \/ {& _
  129. #------------------------------------------------------------------------------#
      w4 g: d! @. o. I+ N
  130.   
    + v6 y- c* s% B3 F' u4 e% g, v
  131. #------------------------------------------------------------------------------#
    * ?( u1 j' G( s
  132. #  SCRIPT CALLS for shadow options, ^& S! v, m# C' S0 I
  133. #------------------------------------------------------------------------------#- E  M* V; }; a; g# y
  134. #
    3 P: U+ K  |, o6 \8 a) |
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the 4 Z3 c3 A8 v' v6 r0 y
  136. #                              # light source number you wish to change (for+ A1 e2 I; ^' P
  137. #                              # more than one). These are reset on map change.* N0 |9 L1 V1 x4 i
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    1 K( H! e3 R3 b6 O' I6 Y' T
  139. #                              # This will need to be in parallel process if you8 P! `' ]' t8 {3 `2 d0 r4 p6 B
  140. #                              # want it to be a moving light.
    ! ?$ i1 f) w5 T( v1 h/ Y
  141. #
    ( }2 d5 f+ H5 U7 }
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    3 L1 O- m( [. b5 a" ^" r& i9 {
  143. #" M& X) U' E  o3 g$ B3 C+ Z: B
  144. #    # intensity = opacity when standing next to the light source (255 is black)2 T( [9 z9 Z3 \& S
  145. #    # fade = amount shadow becomes more transparent the further away you are.+ I5 I" B2 r$ P" v1 E# B/ G4 n8 w
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.9 f/ z2 Q1 k2 t! B0 _
  147. #$ m/ ?/ {3 @2 [! C& r" ~9 I
  148. #------------------------------------------------------------------------------#- M5 D4 w% g1 u( R" L
  149. #  EXAMPLE:$ T! i; Z7 S& b0 M
  150. #  shadow_options(80,10,false)    # This is the default setting.
    & z4 g; e8 W4 l0 R' D' \7 r
  151. #------------------------------------------------------------------------------#$ W/ F$ ]- n+ P7 E: Y0 V, O
  152.   ' }/ g' m  T, W0 Q! k4 i
  153. #------------------------------------------------------------------------------#, R/ C% y- @. A6 s/ }" l
  154. #  SCRIPT CALLS for reflect options
    4 @/ M2 ?  h5 r$ h" S! c
  155. #------------------------------------------------------------------------------#
    2 y. l( }& }* R0 H+ B
  156. #% Y" I2 C) f. n3 C+ u  D. v
  157. #  reflect_options(wave_pwr)
    0 D9 L$ I+ x9 D. y$ z# V# t/ e
  158. #
    " R# i, V" l6 Y, w: K/ c9 }
  159. #    # wave_pwr = how strong the wave movement is. 0 is off8 g5 Z7 e8 w% k# b" N; W+ h
  160. #4 \0 P+ w5 a/ D+ G6 |' N
  161. #------------------------------------------------------------------------------#" J$ O( Z3 z$ Z+ N# K$ k$ [4 ^
  162. #  EXAMPLE:$ \" B3 t4 i/ Y) D) m4 c
  163. #  reflect_options(1) # Turn wave power to 1$ `& G8 \4 d$ t
  164. #------------------------------------------------------------------------------#* \) i* t! K( c' K( j/ j7 p
  165.   $ [" W6 ^5 W5 `4 M, Q
  166.   + p- ^  z2 y" Y" T/ Y$ G
  167. #------------------------------------------------------------------------------#
      b6 Y) v( X& Y' D5 E
  168. #  NOTETAG for ACTORS
    : ^7 k$ q7 L* Z" x2 C$ U$ M
  169. #------------------------------------------------------------------------------#
    8 a# k2 v& v/ J9 [- [+ J1 @% @7 h
  170. #8 v, [7 K) Z/ i$ n
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    . [% z" d" }5 N
  172. #
    8 [( H+ e$ f. R  M1 |9 N, b
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections; Y% }1 A* P7 }$ A+ [; H$ h
  174. #                                  # and use the character in position 'pos'7 ]4 Z7 V0 I& m$ [: f! P. H" G
  175. #
    0 s7 ?1 l* g1 b5 `4 K" Q( w- {
  176. #------------------------------------------------------------------------------#
    ! i+ X; J( _9 {3 G. L2 }
  177. #  EXAMPLES:! ~8 G2 C8 j& d; D
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset; {; `3 g' Q5 @! Q+ j* a
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset: D( g) b' Z0 g% a  V* C- n9 b* c
  180. #------------------------------------------------------------------------------#
    * @1 z3 m% G' o6 `7 f! I$ H
  181.   
      y' w4 a* i  X, K3 N. p5 u
  182.   
    ) p5 Q8 h' ^9 t. d1 [
  183. ($imported ||= {})["Galv_Character_Effects"] = true+ O( r. v: P# ~
  184. module Galv_CEffects
    " A: q1 s3 Y6 N2 E* K  S9 d
  185.     ]; X# ^" g1 A' ]- }2 x2 H
  186. #------------------------------------------------------------------------------#  9 M  G+ z* t! g4 W& G7 v, i+ c- ]
  187. #  SETUP OPTIONS
    3 |  e7 a5 S2 d, J0 @& E
  188. #------------------------------------------------------------------------------#
    7 Y! P) B& R; ^" C* x
  189.   
    * i4 B* e2 B! B" `# g5 Z
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the6 I$ W6 a2 d4 _5 U4 m, R
  191.                         # region on the wall you want to make reflective (and. Z4 ?6 U- Q" D. ?5 s# Y8 v
  192.                         # then use tiles/mapping that make the parallax visible)
    2 I( i2 P: Q- d
  193.   
    7 ]. h0 m6 n, o1 i
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    % @# W. y0 K! n9 I2 O
  195.     2 L) K. R% c, S" U6 b# b) Z
  196.   REFLECT_Z = -10       # Z level of reflections
    7 n% P- b# _, G* y  P9 U' |3 L5 E
  197.   SHADOW_Z = 0          # Z level of shadows
    + W2 v1 d' M$ V; i! a$ h9 Q; D% e
  198.   
    * K. @" e% u# P+ w
  199. #------------------------------------------------------------------------------#  
    " o7 O% `. c5 Z# a5 f& @
  200. #  END SETUP OPTIONS
    + X5 p; s( n! X" M$ N3 `! g3 H( H
  201. #------------------------------------------------------------------------------#
    , g( P, X* S8 w
  202. end. B' X# Q) V2 O
  203.   + ?' V8 f" ^0 ?! `/ p
  204.   
    ! I) U  M6 P8 a+ o" n8 y9 D* b

  205. : ^# p$ Z7 }$ A7 ]) o+ a

  206. ) o3 s' i$ _* C' F* G. l; O( g# P
  207. class Game_Map9 s. @! S/ e6 e$ W
  208.   def do_icons(refresh = true)) [1 I" u& `; T& V
  209.     @events.values.each { |e|
    9 K8 y  m  [' G: f
  210.       next if !e.list% F) v% m+ z  s9 Q
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/* j/ p6 \( f: \1 v
  212.         e.icon = $1.to_i
    " B# U: a. g, l1 k; F) |; T
  213.         e.icon_offset = [$2.to_i,$3.to_i]7 T  M7 ?* a* P" j2 ~2 j
  214.       else
    1 Y; \4 q  C7 A
  215.         e.icon = 0
      B  _# }$ {( t; H
  216.         e.icon_offset = [0,0]6 h7 a$ \8 r2 g- M. G
  217.       end
    4 K" e8 x0 G) E6 ^2 x+ X- S
  218.     }
    : H2 A2 T6 [& ^2 R4 a2 ^
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    " I0 i5 ]4 q; l! D2 B& \
  220.   end
    - b; P, k* t4 w' ?% M, {
  221.    
    : p3 i3 n; L$ L. T% R) E
  222.    
    0 G7 \" X# \( V) s* t" }/ `* _
  223.   def do_shadows(refresh = true)1 [( a* k# u& Z3 _
  224.     @events.values.each { |e|
    1 o. v) p4 ^3 L9 ^: y
  225.       next if !e.list
    3 @- d( C3 n/ q2 e
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/9 Q" Q( Y& z/ F  t5 x' ^1 s; ]6 O
  227.         e.shadow = true7 N+ O4 i/ T) M* U. Y- N, c4 P4 Z
  228.       else
    2 d+ Z+ |. k( t0 l* \9 b8 c
  229.         e.shadow = false9 R5 I; {" H8 F- @6 j0 Z
  230.       end) c: e* Z8 V0 W1 A
  231.     }. p) \, l' E4 D- U, u
  232.     SceneManager.scene.spriteset.refresh_effects if refresh4 R) D2 ~! f2 d+ E
  233.   end3 I" |0 q4 A) `! ?
  234.    * Z9 }! h6 R/ i
  235.   def do_reflects(refresh = true)7 Q( H: l- v- Q9 O& Z$ A; `/ C
  236.     @events.values.each { |e|  s8 p9 t3 i( |0 ^
  237.       next if !e.list( q" K5 @% ~. p1 O  J. k
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/4 c# n6 t! O% Z5 X0 o* z  k4 d3 O
  239.         e.reflect = true
    6 x5 f3 d) N4 D9 r4 R& o3 }
  240.       else$ X4 \$ E; n7 i/ L4 s5 G
  241.         e.reflect = false
    , X8 y# C) P; }0 K1 V  c, _1 u
  242.       end- q4 W% C& m% ~3 c# W
  243.     }
      k( F5 X9 W2 J; U0 E
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    ; t& Z( c9 N' g+ e
  245.   end
    / z3 g+ i' Z8 S+ u  X* K# P2 y
  246.    2 ~- D7 a  s  e$ H/ x$ w2 A
  247.   def do_all_chareffects" L. Z0 Z4 f1 Z! g/ X- f
  248.     do_icons(false)
    , B- J( N: w# K9 i+ S
  249.     do_shadows(false)8 G+ G$ y  G3 Y8 Z4 L
  250.     do_reflects(false)
    - U% D- _% {2 b5 r
  251.   end
      z) J5 s; ?" C# p& y! g: j3 r
  252.    3 Q9 L  k& H% \
  253. end # Game_Map" {2 g6 W3 C# W. O2 g4 i

  254. 3 R) A# v, v+ c6 a
  255. ( B; Z, |$ E1 H# x# q: L+ ~* \

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-6-4 15:04

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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