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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
% |7 @& n; c7 K0 t7 {
这个代码怎么用啊,有大神知道吗。我从国外找的。
5 w) Z) o+ _: a! thttp://galvs-scripts.com/2013/02/21/character-effects/8 I; q  M- a5 g; M
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    ! I$ m3 A8 X  W+ f& h( M/ C
  2. #  Galv's Character Effects+ E. h4 `. f% K6 _
  3. #------------------------------------------------------------------------------#0 s) ~5 X& L1 `, Y: i
  4. #  For: RPGMAKER VX ACE& G; C. A) }; k; u, u: l, n2 d3 D
  5. #  Version 2.1. f1 u1 U7 b* B$ e9 X
  6. #------------------------------------------------------------------------------#2 R  V, q  [( \) p, L
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows$ c9 Q  ?; k$ c; l
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects- a  S9 ^  V7 w
  9. #                           - Fixed shadow facing bug
    : h! k8 B4 @$ F# s! V
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows3 X* z, W7 g+ U0 B* Q6 S
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    / H* z1 n6 C% \' g+ ~, s
  12. #  2013-02-22 - Version 1.7 - bug fixes4 \/ P4 j, x! ~: e& s! T; o
  13. #  2013-02-22 - Version 1.6 - added icon effect0 q' U& R* f# N
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    , l9 q5 g+ S* x4 D
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    - V5 n5 u% E: I" H) v
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks! M5 D, k1 c7 J, |* I' o
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)9 [4 \, S- B4 Z( K7 S
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    0 v+ [2 C2 ?- W% l, K* o- ^3 ]1 \
  19. #  2013-02-21 - Version 1.0 - release0 m, g# ]8 H, J
  20. #------------------------------------------------------------------------------#' ?- L% x9 ^# t: g* L( R
  21. #  This script was made to provide some additional effects for characters such+ q  |2 C8 S! ^6 l  g3 S
  22. #  as events, followers and the player on the map.  i6 R3 T- b! N$ f; h2 ]
  23. #  Currently it includes:) ?9 l/ t) ~% b9 O/ c8 S/ G4 A& r! `
  24. #
    ; L0 `& V  i' c! y# |: f. v9 Y
  25. #  Shadows
    ) K" W6 }7 |) d
  26. #  Shadows that appear under player and events in a directions depending on% z0 R" y" {; S
  27. #  a light source that you choose.
    ' [) e1 P3 f8 y0 u+ A
  28. #8 v( Z; o+ T4 D1 s
  29. #  Parallax Reflect
    & M$ r, F+ Z0 t2 J
  30. #  Reflections that appear on the parallax layer for events and actors to be' R7 C- D& ^6 w" d0 ]) c
  31. #  used for things like reflections in the water or glass floor etc. To get
    * q2 r2 r4 n8 i/ T( C
  32. #  effects like the demo, you need to edit the charset graphic to make the water3 s/ M- a, ]: I$ |% q
  33. #  partially transparent.' ^' M) @5 K0 N
  34. #
    3 t, G+ T/ l* I7 i
  35. #  Parallax Mirrors
    3 N$ J4 z" P. V  ]. \
  36. #  Much like reflect but are instead actors and event are reflected in a mirror* p) T% T5 I+ x( m' T: Q
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    2 x8 [# M- m# z& F% d5 Y. u
  38. #  changed so actors and events can use different charsets for their reflections$ L9 o. H0 f1 z# H5 F5 a' C
  39. #' m  f+ K; y2 m" E6 K: g; L
  40. #------------------------------------------------------------------------------#
    8 A" @- G. G' {5 k9 X
  41.   4 o& O  t) V. X. E

  42. 0 p5 ?5 U' K# [0 n# r1 j. g
  43. #------------------------------------------------------------------------------#
    % e0 C6 a2 q( p8 `
  44. #  NEW - First event command as a COMMENT  ^8 r# ?  V: d, o  z  F. ~5 h
  45. #------------------------------------------------------------------------------#$ Q2 D) Z$ p$ w
  46. #  You can add a comment as the first event command on an event page to set if
    5 c; c% X3 T. J) V
  47. #  that event has an icon, shadow or reflection active. The tags to use are; x0 a" f# ^; r. ?7 f1 X; X. N7 \
  48. #  below, all must be on the same line in the comment.4 m5 S& n2 _6 K
  49. #
    0 N6 p3 y" |# C4 x. s. E) Q
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)5 [4 R1 m! \5 q& l+ o+ |. _2 z
  51. # <shadow>           # set the event to display a shadow
    ! h3 I  ~' V9 P. }' R. ]% P! w
  52. # <reflect>          # set the event to display reflections8 j& n+ Q# K; ^; K' _
  53. ## Z6 I& R0 Y$ v' s! A
  54. #------------------------------------------------------------------------------#$ a+ ~& y1 z4 X: o: Q
  55. #  EXAMPLE:5 Z1 x  R  M3 K
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    6 w  U: s" a1 E( `( A& G
  57. #------------------------------------------------------------------------------#
    , X% R- m5 Y1 u- W: [* |

  58. ( q# N9 R* K9 ^$ S+ F$ t

  59. : j( m; D- R% O" N6 T& f
  60. #------------------------------------------------------------------------------#! V/ q* x8 P8 M4 V  y3 P- r* J3 c, j
  61. #  SCRIPT CALLS:3 f% k, Z# [& w' v5 K6 v
  62. #------------------------------------------------------------------------------#
    # ?/ {: [$ d' D( a
  63. #; O- B, E$ k. b/ J+ X7 s( z
  64. #  char_effects(x,x,x,status)
    ' \2 O& y& W& y/ [. A4 C% Z$ T& m, I
  65. #" m0 c/ U. w. U$ [1 a( j& }2 a
  66. #------------------------------------------------------------------------------#
    ! z/ m1 ]3 y; c# I0 e# r
  67. #  # each effect can be true or false to enable/disable them during the game.
    + ~' [- n; x) U  K9 I
  68. #  # you can change multiples of effects at once, x being the effect number, D( D2 c$ S" k" W$ V
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    8 g$ B- f$ p5 u$ {/ H/ u
  70. #------------------------------------------------------------------------------#
    / p; N+ B2 M: U: Z, m+ G
  71. #  EXAMPLES:
    - g( a0 O$ M8 [; f
  72. #  char_effects(0,true)              # turn reflections on" R  I4 o- `! T) `1 _! S2 L  P
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    ! p/ V+ ?/ y4 W' k% H
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    & [3 H  L) R+ B
  75. #------------------------------------------------------------------------------#& ]& t' r4 a% B/ Q
  76. #
    0 Y) Z6 C1 }  Y0 z/ H7 w  b
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    . a0 T4 @& p! t9 Z3 Z2 V5 ^
  78. #
    / Q* ~: |! q  \4 T5 G9 ?. M( K# S
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    + p% b+ K1 b, |, z  Y+ \* `
  80. #0 K6 o  K1 g- Q8 ~+ q
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    % X, ^9 Q! Z$ A- ^$ @3 @% n2 P
  82. #6 c4 x* T; N! V( N
  83. #------------------------------------------------------------------------------#
    6 w7 y9 ^, W" I1 _  c
  84. #  EXAMPLES:
    * d) X1 L; k( q  C: L
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite( G* ^% l; b! i
  86. #                                    # in position 2 of "Actor2" charset.
      u/ }0 q. I* l# g7 J
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    9 y( p) V/ I  K5 b, p: i
  88. #                                    # "Actor4" charset.; M7 {* b, M, \
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    ! M# V! H6 {2 N1 [" e, q, b
  90. #                                    # "Vehicle" charset.
    0 P. t8 ?, ~- w9 A2 Z
  91. #------------------------------------------------------------------------------#
    1 U1 v  I8 J. X( ]% R$ E
  92.   
    ; v: G# q% D' {% P6 a
  93. #------------------------------------------------------------------------------#) B( r* T. U- z% F; f8 u, d
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
      x9 i3 b. Q! F$ Y' A
  95. #------------------------------------------------------------------------------#0 ~( Z' _8 s2 U/ ?  O
  96. #* e  e, t0 Q$ R5 y+ k7 V" {
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    9 O  Q! s+ ]! F; J% x9 U
  98. #                          # use this to specify for mirror and reflect.' |3 T* v( b) U, i. F! N
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change0 y$ N" a) B. R& S1 ]& h% d! G( S
  100. #                          # to change all events use :all
    6 `9 i6 g1 G0 m' i9 E% k" g/ {
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make  |; X4 A) x% y( e) V8 Y: f
  102. #                          # it 0 for no icon.
    : x- ]- S3 s5 `! p/ ], L, H, _
  103. #
    1 z% Y1 [" \! ?( o0 l
  104. #------------------------------------------------------------------------------#
    ; E6 K3 `# v$ Y4 `" ]
  105. #  EXAMPLES:9 {+ g; F  H! F$ i/ O
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON5 w9 z( u5 z( A7 o
  107. #  shadow(1,false)         # Turn event 1 shadow OFF) e. n+ H7 B4 M
  108. #  reflect(:all,true)      # Turn all event reflections ON( i- n( D- X$ E$ y) D6 e
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear) w4 n0 j! s* O; ]/ |- u
  110. #
    7 P% h1 p# @: [, M
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering4 w6 J7 }6 D5 S' K6 h) m  b
  112. #        a map. This is a design decision to try to keep lag to a minimum. You' y' W/ p2 @5 j/ n7 n
  113. #        should use these effects sparingly and only activate them on events) R& K( a2 C" B. t% G; F
  114. #        that require them.( i- ^: X- E4 B8 F' [# G
  115. #------------------------------------------------------------------------------#
    6 O) s0 _4 d% ^' j& o3 T1 Q
  116.   
    7 L6 I+ \9 C, {) L
  117. #------------------------------------------------------------------------------#2 r! \" N, ~7 ?  ~+ i
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES8 o# q7 P# x5 `9 z0 T
  119. #------------------------------------------------------------------------------#9 Q. w2 z2 f% i+ W) O. t
  120. #" |4 g3 u! `) Y6 ~( R  L9 ?9 ]
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default - T% m* p9 z7 ^5 h, S
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 8 \' _) E( Q; }0 ~" g7 G, p
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.- c" e1 ?3 `7 u/ I' G  p# c2 k; B
  124. #
    # J0 J# X( S: y1 g, X
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    5 D2 C3 Y* k* F' v; l$ [# S5 a9 b
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    ' C6 y( \" I; V7 w6 Y
  127. #  v_icon(x,x,x,icon_id)
    $ H2 R5 ^9 R* r4 A! \
  128. #
    4 [5 b- R+ f! T4 X, d
  129. #------------------------------------------------------------------------------#
    4 P+ {, R  g- c8 l
  130.   
    ( T; d( O9 e4 L+ m
  131. #------------------------------------------------------------------------------#0 m9 }+ X6 }" ^1 Q0 M
  132. #  SCRIPT CALLS for shadow options3 `9 ^( O* k9 s, G
  133. #------------------------------------------------------------------------------#
    % K! K% X4 p4 A% N4 I
  134. #
    7 Y' v5 }, B  x8 ]+ y& J
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    / s' p9 Q% J+ k' Z3 z
  136. #                              # light source number you wish to change (for3 [: o# R7 P% E
  137. #                              # more than one). These are reset on map change.& L4 k" c( h8 R; L
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    2 D" ~7 q) I, F7 y% L
  139. #                              # This will need to be in parallel process if you# J9 P  R1 \, u: @
  140. #                              # want it to be a moving light.
    / A& o  Z$ {2 K- J, o5 v8 Y; T
  141. #* D" u- O2 c# R5 k
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    , Q2 y9 G4 Q3 y
  143. #" l( I) m$ @4 H8 r9 \# O0 e: v
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    1 R9 k2 H& K7 ~7 ~9 G7 W
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    . U: F- u0 f4 p( G
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.; P4 \' U: s  s3 b2 o; B( R% u' i
  147. #4 s, r! b% t  D# O3 i8 W0 J1 T
  148. #------------------------------------------------------------------------------#
    3 ?* [" R4 \4 i  t9 X3 p
  149. #  EXAMPLE:/ \/ `7 Y9 d3 e. F. S( K5 l
  150. #  shadow_options(80,10,false)    # This is the default setting.9 h) a; u8 ?( t- C9 E' H! ?3 \
  151. #------------------------------------------------------------------------------#
    9 Y5 G$ v& N( `5 M
  152.   
    5 C/ t! v8 T/ t: {  e
  153. #------------------------------------------------------------------------------#
    + k4 M' f6 F1 g" {, l
  154. #  SCRIPT CALLS for reflect options
    / K; n: N$ ], \4 O$ s
  155. #------------------------------------------------------------------------------#
    " f* C; j! ^" k( i+ H
  156. #* o6 s3 y! o8 w2 m( D% x0 R! w
  157. #  reflect_options(wave_pwr)   [+ ]" o* u$ T1 K
  158. #
    7 x& @) G: V* x4 l% v' h' o8 u
  159. #    # wave_pwr = how strong the wave movement is. 0 is off& @5 h5 {7 c- E. g/ `$ G
  160. #) o3 m; H) J5 c5 ]
  161. #------------------------------------------------------------------------------#1 n0 T* a. ]( R% w5 `6 j
  162. #  EXAMPLE:; K1 |9 H1 v0 d  ?0 p& o' g
  163. #  reflect_options(1) # Turn wave power to 1
    3 }6 @4 P7 x0 D+ W
  164. #------------------------------------------------------------------------------#2 B* c! S$ e& f2 p' |# |) F
  165.   
    : `6 a2 g0 H  w4 R
  166.   
    8 Y8 G8 U, c- Y) T+ ?; b, |" x$ E
  167. #------------------------------------------------------------------------------#$ N) B- G. D5 G: ?  c% p4 f' X
  168. #  NOTETAG for ACTORS
      r: }) K% |) S$ @/ F. n
  169. #------------------------------------------------------------------------------#+ |; I, q6 U* ~0 G8 ?' }, m# U( @
  170. #
    ! Z, P3 b, p6 L
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!); }7 P7 f) m7 J1 O$ o/ \
  172. #: L8 G" M6 ~' y* n3 U: Y7 g
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    ( L4 J6 s: Z+ \& n: m# T$ |
  174. #                                  # and use the character in position 'pos'
    & y& w2 C& F9 F
  175. #
    ! C. U$ e* ?1 e* H, c0 e' w' J
  176. #------------------------------------------------------------------------------#
    / v6 [  ^. d0 ^1 S" o" h, A1 y/ Y
  177. #  EXAMPLES:1 ^# k* {% X! k1 p
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset2 v5 d2 z6 l3 c9 `; U6 [2 j' M
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset% _! C' h) s% [3 R" ?! A
  180. #------------------------------------------------------------------------------#
    1 o& w7 ?+ w( o4 r& }% i: O
  181.   
      k  f! G  s) y$ G) Z) V
  182.   # z. a7 D8 {- P- s2 C" q
  183. ($imported ||= {})["Galv_Character_Effects"] = true+ C1 z  A5 @; V8 P+ i9 O3 c; l
  184. module Galv_CEffects
    3 X# \' F$ w! K, j. v3 N, B
  185.   3 J& H# g8 A' O* F- t3 Z: X+ S0 ~
  186. #------------------------------------------------------------------------------#  
    * a9 ^$ @4 s* f$ d' O
  187. #  SETUP OPTIONS- q* N! J: J0 M8 l# M# K
  188. #------------------------------------------------------------------------------#
    9 Z+ C& t. j2 m4 n" r' H
  189.   
    + o. z9 n8 r! v7 d, q
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    , c. g9 Z6 J6 Y! k5 G! g3 }
  191.                         # region on the wall you want to make reflective (and# K' n/ L3 T/ Y
  192.                         # then use tiles/mapping that make the parallax visible)& E; P" I! U2 |6 c9 O; @3 E5 `
  193.   
    4 p& `- e' W$ |6 ]* a8 d
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters1 ^3 R  B! U& w/ i) a+ }; z! K
  195.     & P# C/ w7 u1 F$ j8 l) h
  196.   REFLECT_Z = -10       # Z level of reflections
    9 ]. }/ d6 e( P3 u# Q; X; Z
  197.   SHADOW_Z = 0          # Z level of shadows6 B# |1 _+ m1 O9 F5 ]
  198.   
    $ d0 x# v5 U. u" C
  199. #------------------------------------------------------------------------------#  * [) I( k4 s$ [
  200. #  END SETUP OPTIONS* \, ~  a2 z( h/ I
  201. #------------------------------------------------------------------------------#& ?: s( H6 e7 J0 S/ }# d, y
  202. end
    5 R: j: m, q: e+ x$ a) k- O# S  Y4 N
  203.   ) G6 L7 M8 B( e5 [
  204.   ' B: s, t7 V- J1 Q* C7 q$ s

  205. 1 k' Q4 e& V7 \5 g1 [( r# R7 c

  206. , b: v8 i8 k& \; P2 D
  207. class Game_Map: e9 X; m' v; }0 y3 C; z7 x
  208.   def do_icons(refresh = true)
    8 \9 A, R, S& _7 Y
  209.     @events.values.each { |e|* K1 [# O. q$ k  A* d2 K' p
  210.       next if !e.list, x/ D7 H1 \( v0 c
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    , r/ v* S  m+ ^! E7 I
  212.         e.icon = $1.to_i
    * k# d2 b6 D3 h- t
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    $ m/ I9 D; z' u, c' I; }1 j, l; C/ \/ X
  214.       else5 l( w' [- p' `  W1 o( y
  215.         e.icon = 0( X' t5 L6 A& h1 P5 ?7 o
  216.         e.icon_offset = [0,0]
    6 N# L' C( X: i" U  r
  217.       end2 x0 A4 X; E$ E  ^" I& i+ s) L
  218.     }
    & W0 r7 V2 Z! J
  219.     SceneManager.scene.spriteset.refresh_effects if refresh2 ~) v4 s3 q7 e* Y1 x$ q, a0 R
  220.   end3 Z7 V1 z0 T. c; p
  221.    
    # t  U: F3 Z. Q" b4 I' `% V+ {
  222.    
    9 {' t4 C6 b+ B7 v9 A/ O
  223.   def do_shadows(refresh = true): @2 e  X0 b8 X& Q% m' ?2 s
  224.     @events.values.each { |e|
    5 k3 `0 Y5 Y5 v# H1 C8 Y
  225.       next if !e.list
    : @9 }( M! D( E! i
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/4 p- @, Z7 E+ |1 t+ E
  227.         e.shadow = true
    7 N6 z% s/ b  f$ L# s; H" R5 R
  228.       else
    . p. a! a9 g1 [2 @* v2 g4 g5 `
  229.         e.shadow = false
    ) v+ F/ r2 ]& b  r1 R% @5 r
  230.       end( o! s1 x3 E6 A3 I, _: }* _
  231.     }- S% V. ~% Q+ ^7 w5 O
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    6 I: L+ h, F: e/ v4 I) r% D
  233.   end
    6 s' X. ?( y# {# T( \8 H
  234.    9 ?1 D8 e1 `; E4 r
  235.   def do_reflects(refresh = true)
    2 B" `; H% d; V; }3 ]
  236.     @events.values.each { |e|
    4 A" q& r& n, A! p- ?
  237.       next if !e.list/ j0 c. O9 A; [" {" K& M
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    $ m1 s/ V  n0 \2 P9 \- ]
  239.         e.reflect = true. k1 F, w  n* Z9 ^1 X
  240.       else3 c8 `% h1 h1 f( ^) G0 ~" x
  241.         e.reflect = false
    4 Q% e: A/ a  ~, h: e6 H
  242.       end# H5 H' H9 s4 |5 }! w7 ]( H
  243.     }
    ; J; R/ Y5 v2 |
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    / E2 [4 j3 F* ~% d
  245.   end/ ?  Q  m9 j& V! V0 ~
  246.    ) H2 N2 t1 K' b) C7 d
  247.   def do_all_chareffects
    7 E8 M. ?" h5 o- K, M
  248.     do_icons(false)
    " \# P9 D' C# Z: L) [
  249.     do_shadows(false)
    3 R( k: R" }) w6 {9 A+ S" W
  250.     do_reflects(false)
    : Z, M5 t3 p9 L1 _+ d7 S! Y& j
  251.   end; Q8 v% i$ Q+ l6 J3 W
  252.    
    $ Q* B5 n$ r& G8 s4 [% }/ Z
  253. end # Game_Map4 h4 i- ~: U9 [' ?; K& n& u' s

  254. 4 I6 e7 D6 r. ]* o9 G+ S) P

  255. : q( c: R# `5 Z4 Z

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-7-6 22:11

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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