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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
* P- W; G( C. a* V, O4 m
这个代码怎么用啊,有大神知道吗。我从国外找的。
. l* Q, S; E' o& c5 t: Ihttp://galvs-scripts.com/2013/02/21/character-effects/' v0 D: `1 W, S" G* ^4 f  T- I3 ^
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
3
 楼主| 发表于 2014-6-25 11:35:49 | 只看该作者
记得口袋妖怪的池塘是有倒影的
回复 支持 反对

使用道具 举报

梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    * A, \; t" ]) y6 y3 q# i
  2. #  Galv's Character Effects; B8 o/ t7 |' P: J
  3. #------------------------------------------------------------------------------#, y6 a& q- q% H! j$ F5 s1 P
  4. #  For: RPGMAKER VX ACE
    ' z- Y6 P1 I3 ?$ c4 T3 q
  5. #  Version 2.1
    * a4 j( f: C% p* q% @
  6. #------------------------------------------------------------------------------#
    ; Y& |1 N7 {; t1 u+ f
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    3 I) i! Z& `+ H* [7 Y. H( f0 J" C
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects9 n2 u  U# a# ^* x) T
  9. #                           - Fixed shadow facing bug
    2 u) z1 b+ d/ c% z3 N% h2 \+ j
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows8 G0 M3 }! t" K1 o7 o5 W5 {
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    ' W) G. K9 B6 f  w5 M  ?
  12. #  2013-02-22 - Version 1.7 - bug fixes
    ) y5 n% R: d4 @, R5 H1 R
  13. #  2013-02-22 - Version 1.6 - added icon effect. Z, J5 S6 Q6 F+ q
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps8 z0 M" a: D0 j9 V% C! V
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    % h& `* j. C! A1 l+ N4 j0 `
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    - Q- S1 u/ X! H: c) b5 g; j4 y
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    ) W; O& h9 z2 s1 `; T) j+ L: v
  18. #  2013-02-21 - Version 1.1 - updated flicker effect4 M6 G, {7 M  p6 J
  19. #  2013-02-21 - Version 1.0 - release$ V* u7 z* @/ B( j. ]5 I
  20. #------------------------------------------------------------------------------#) N3 Q  ]; z' }( y7 v( b
  21. #  This script was made to provide some additional effects for characters such
    + x" [" `, \5 @# T- `* y7 B# \9 X
  22. #  as events, followers and the player on the map., v% B( Y# v9 `$ b! T9 |% q
  23. #  Currently it includes:" n7 S! J; A2 g' R/ \- j6 K
  24. #; j$ S3 N- k- U6 c/ C2 M
  25. #  Shadows
    " q5 a) I3 F  @9 I# D1 ]
  26. #  Shadows that appear under player and events in a directions depending on! J' t9 O9 _% x  G
  27. #  a light source that you choose.
    ! S2 L- L- j/ K# r' U
  28. #' A0 b( \3 E, ~2 {+ c
  29. #  Parallax Reflect' t. H( j0 Q4 S; b* M0 {
  30. #  Reflections that appear on the parallax layer for events and actors to be
    % v, ]; j. z" R6 n4 x
  31. #  used for things like reflections in the water or glass floor etc. To get
    & X) m$ ]" F, o* h3 q( L7 B
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    6 b/ b# O# |2 M, W% ?9 V  Y0 c
  33. #  partially transparent.
    / B: ?) x' [, o4 M) p, m* a
  34. #
    1 _; O( P! G( j, \
  35. #  Parallax Mirrors" O& h  E. d$ N# o4 z, X, \
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    ) ]7 J/ X2 ?3 ~) h6 G5 U
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    " _2 G  Z  o. c5 c3 Y" A# A$ j
  38. #  changed so actors and events can use different charsets for their reflections
    1 E/ G  O1 g6 U
  39. #( |1 C: t0 [' Y: A& K( w$ w* ?
  40. #------------------------------------------------------------------------------#: c1 E2 a8 u2 Y' t9 e' k
  41.   
    1 o# n) v8 m. ?, I) ]/ u
  42. 6 S) P2 z0 n% X7 l( m. Q
  43. #------------------------------------------------------------------------------#
    4 O; ]: Y: S! c; P5 t' Z
  44. #  NEW - First event command as a COMMENT
    0 D; L, [4 [4 f: Z& g5 Z% _
  45. #------------------------------------------------------------------------------#
    2 Q7 i8 F6 r( k: W) v# w  k
  46. #  You can add a comment as the first event command on an event page to set if4 N$ P9 r( r: y' T+ g. _" e) C
  47. #  that event has an icon, shadow or reflection active. The tags to use are5 ?# k% z: m9 l& c) G
  48. #  below, all must be on the same line in the comment.
    ' R! Z6 i+ s8 u0 i6 r
  49. #0 v5 v' p# r6 g
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)7 I& X! h2 V/ b) n: y
  51. # <shadow>           # set the event to display a shadow0 u4 H. w  x3 r9 x
  52. # <reflect>          # set the event to display reflections
    4 j$ X9 @2 S3 Z. v1 b3 @
  53. #6 O) P" `2 k, y  p# c( S5 z' F
  54. #------------------------------------------------------------------------------#/ c% a7 R/ k, w3 C- C" t
  55. #  EXAMPLE:
    7 @4 |0 q( [$ ^' Y! y1 p- S' r
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    2 G" {, N, r0 B  }2 A
  57. #------------------------------------------------------------------------------#, Z8 ^) t8 g, D/ y$ x  ?# `( P

  58. 5 D! ?+ o* Y+ V# \, I2 x9 C7 Q6 p

  59. 2 I% l0 J  F0 g/ G" Z0 H9 D. ~
  60. #------------------------------------------------------------------------------#' z2 f. k; P. N& I4 ?" I
  61. #  SCRIPT CALLS:# A& Y9 y" {" {% v+ Z
  62. #------------------------------------------------------------------------------#1 X; q! u9 P9 q' ~! M+ ?2 q
  63. #
    0 k" K6 T9 d3 q8 Z" _
  64. #  char_effects(x,x,x,status)8 X$ K5 J3 }* o' S
  65. #3 ~; g' z' v1 u8 a
  66. #------------------------------------------------------------------------------#
    / g, w" z8 |) v/ v  k) p5 u
  67. #  # each effect can be true or false to enable/disable them during the game.
      P% z  H  u" a$ z$ Q
  68. #  # you can change multiples of effects at once, x being the effect number! x) Q* x8 A( T
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    . R4 G! P# g$ U. ^' _
  70. #------------------------------------------------------------------------------#7 U1 l5 {+ q2 o/ Q* p1 O
  71. #  EXAMPLES:. }5 ?# G- n* ?9 z' `1 M( y1 {3 f
  72. #  char_effects(0,true)              # turn reflections on
    : w* m# p( u; \/ u# ?# r4 D9 A, |5 a
  73. #  char_effects(0,2,true)            # turn reflections and mirror on3 @) e  }+ e; F- [) C
  74. #  char_effects(1,3,false)           # turn shadows and icons off  \+ ?! s0 v2 P  @
  75. #------------------------------------------------------------------------------#
    ' F; n/ F  I+ T9 A# r. Q
  76. #- g# `2 Y" H; r7 \3 ]
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    3 S* j+ x2 n# l% F' U
  78. #
    * a) D+ D6 c# ^  f( O* P
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    3 m; {/ z; ?% f8 H: ?% G+ F# l9 q% b9 ^1 \
  80. #
    # {( ~& ^, P3 O4 _) @1 \3 b% L) k
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset. C: I6 x8 V7 I0 D  U6 E0 d, u
  82. #
    . m2 E8 B4 s0 B7 L) x/ E
  83. #------------------------------------------------------------------------------#& W& d7 Y5 p6 y2 P# y2 ^: l  s
  84. #  EXAMPLES:* g' D0 u. t* j, ~5 I
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite0 w. \! I. [, u6 |: {' ?3 R$ F
  86. #                                    # in position 2 of "Actor2" charset.
    + W# j. ~. h, q6 p0 ^
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    8 t. K8 g' Q7 I
  88. #                                    # "Actor4" charset.4 C. G" T* O4 L! W
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of; m; m  {& b+ O8 b+ E. x" |
  90. #                                    # "Vehicle" charset.  s2 D0 i; l1 n) U/ T- m" D9 L
  91. #------------------------------------------------------------------------------#% M9 G; e; \! v5 T
  92.   . ]( [; x7 s# }' \9 e5 b
  93. #------------------------------------------------------------------------------#  z, ~! z2 v7 p# h
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    8 M# W8 w2 d: k1 n4 r
  95. #------------------------------------------------------------------------------#$ V. d$ o8 |- f) v( H( L
  96. #  |2 x( X: g0 S; x( X/ X5 t' w, ~+ Y
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off3 a' b* Q- p7 T2 }
  98. #                          # use this to specify for mirror and reflect.
    0 H6 ~7 x  u) X: @! W6 _
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change; Y% O- X2 R, u" c. U; }2 U* m/ d
  100. #                          # to change all events use :all  r$ B9 z& G, L; ~; F: ]2 N
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make; k  I, k0 c1 K) C9 w$ c5 S
  102. #                          # it 0 for no icon.2 Q- L. K# H. ?2 M
  103. #
    " ~+ Y- G7 i, Z9 `  q
  104. #------------------------------------------------------------------------------#
    + s  ~0 v7 b6 Y6 P7 @0 K$ k
  105. #  EXAMPLES:
    & E8 S$ H1 M6 Z, @; m7 t+ U$ U
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    ; v* u' K. B$ f4 ~( n6 @
  107. #  shadow(1,false)         # Turn event 1 shadow OFF3 B6 I; C7 Y# T" ~. L
  108. #  reflect(:all,true)      # Turn all event reflections ON% c. B- m, l: H' C, t/ }7 u1 W; ?
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear, s' `/ m+ r  V
  110. #
    ; O, l% V# ~( L0 K9 D
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering+ q% q' |% k. }' ^+ X' B
  112. #        a map. This is a design decision to try to keep lag to a minimum. You2 V, Q; V/ R% `
  113. #        should use these effects sparingly and only activate them on events. U* O; _3 @* g
  114. #        that require them.
    . y5 d: m& c$ m: _- }2 _- ^3 Z
  115. #------------------------------------------------------------------------------#5 g6 g  q  A+ ?# C6 C
  116.   0 ]# ^7 R! [3 P: @( N
  117. #------------------------------------------------------------------------------#, X. o' H5 |2 @7 k7 O  r
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    ; l3 F$ [4 s2 b5 p1 c
  119. #------------------------------------------------------------------------------#
    0 V4 ^6 X2 _0 \& ~, A
  120. #
    - E" T% g( j" D; ~6 }! ?
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
      A% i5 Q' E' q# ]* A9 }; L  Z
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off . i) L7 F) o6 ~' a$ {
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.  }3 h2 e( I4 n) s' V
  124. #9 r1 t8 n+ r& I
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    8 G' u2 E; |  ~+ n5 P1 X! l$ a
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.: }" d% H3 _; ~, b
  127. #  v_icon(x,x,x,icon_id)+ k& Y1 M( V& j5 B! S$ U, z$ h: a
  128. #( A' x2 p% c" {7 ]
  129. #------------------------------------------------------------------------------#
    ( u2 P/ O0 ?1 W: c0 _: d, Q/ F
  130.   
    & d+ O6 B! A+ u/ c3 C
  131. #------------------------------------------------------------------------------#; F) f. _/ l0 a
  132. #  SCRIPT CALLS for shadow options) b* J" G, }- s% H
  133. #------------------------------------------------------------------------------#2 {6 g! {8 D$ Q8 Z" @# u
  134. #
    ; z- L* X( ^; `1 m( ]* G5 l- T
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    + n! o6 m! R8 f0 m9 }4 P
  136. #                              # light source number you wish to change (for2 |" h1 K: K0 y8 D8 a: @
  137. #                              # more than one). These are reset on map change., W, C9 L9 n  K
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.8 w% p7 U( Y. b+ K8 `! `
  139. #                              # This will need to be in parallel process if you! D6 }* |/ Q2 E1 D1 B. a2 Z7 u% e
  140. #                              # want it to be a moving light.( h- C1 l5 K1 r
  141. #
    ( O" w5 P7 t& b: w. X% M
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    3 ~1 o: n$ F% J  }* k3 G
  143. #) r% w2 @* S" t8 l! z1 }
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    4 w: ?$ N9 h3 W/ t- i0 e4 n
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    ) |. z9 t' m6 p4 x' C4 Z
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    5 {) P; R. g# ~9 D9 E2 g
  147. #
      s5 j0 |, o! h' [( f( W. v
  148. #------------------------------------------------------------------------------#6 i# G% O) J1 `( U8 z2 ?
  149. #  EXAMPLE:! c6 g! H3 h4 T2 y- @2 \2 a- q
  150. #  shadow_options(80,10,false)    # This is the default setting.  D) _2 U0 {( q+ [) k
  151. #------------------------------------------------------------------------------#
    ) N! L. L$ Z/ G0 O  Z, T. W$ q
  152.   * _4 }5 w( d# i2 ]! R; |. a
  153. #------------------------------------------------------------------------------#
    0 p( S6 \5 n6 m; O4 Q1 a
  154. #  SCRIPT CALLS for reflect options; L6 T' f, k' E- L" `0 X
  155. #------------------------------------------------------------------------------#% H4 \) B4 Y0 p8 I
  156. #3 r, d% D  y( ]# ^
  157. #  reflect_options(wave_pwr) 1 n% a; v8 ?4 l0 [4 G8 D. U
  158. #" U  `) k& W9 M1 q: c8 R
  159. #    # wave_pwr = how strong the wave movement is. 0 is off0 N, T! v2 q1 `! e( ]
  160. #
    . \& d' d/ B3 q2 ?) H) ?
  161. #------------------------------------------------------------------------------#
    , w3 Z& K; K% K4 ?6 H. `
  162. #  EXAMPLE:
    ( n( v0 ~$ a* ?
  163. #  reflect_options(1) # Turn wave power to 1
    2 C( M. R* s# N/ m4 \* O
  164. #------------------------------------------------------------------------------#: Q8 ]* A! |# l+ P
  165.   
    4 E& g* B9 \6 X1 C% o5 H1 O
  166.   
    , f$ y7 x. o3 s5 Y/ c
  167. #------------------------------------------------------------------------------#. ~, M8 z$ W' H# u1 Z
  168. #  NOTETAG for ACTORS
    ) r5 \; y, t0 ?) m2 O" M
  169. #------------------------------------------------------------------------------#
    7 J. i/ Z& S3 ^& V- _
  170. #. i+ k7 I" l7 J. q( }( Y- `0 X
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    2 _1 e" Y8 m) W* W. K: I: `
  172. #
    ; G6 Y/ \: F. x4 @& b' d* `: D' ]6 l
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections7 s3 U# g, H' Z2 N3 G9 |' w* ]
  174. #                                  # and use the character in position 'pos'
    " D% @& s( E, O! \- n
  175. #, B  b/ N$ f- z8 A; @3 `' E7 k
  176. #------------------------------------------------------------------------------#% P7 v% [  w  ^$ L# |3 x
  177. #  EXAMPLES:
    6 n# D: f, `- o- W4 e
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset! C! T5 j! y) U* I6 P
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    ; }4 ]8 H5 V3 b+ A$ T
  180. #------------------------------------------------------------------------------#2 b: e( ]$ k+ v5 q9 }. U4 J, |
  181.   " i. B" Y6 d) X/ W. Z9 J9 @! O
  182.   
    1 e% k  g' R+ l) }% K
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    5 J/ o3 a: R* e' z+ [2 ]
  184. module Galv_CEffects# v: J, i& a- U+ H. k
  185.   
    * y) S2 r8 |" v4 p
  186. #------------------------------------------------------------------------------#  3 Q: |9 G' y8 u, I! P  s
  187. #  SETUP OPTIONS
    # t" k2 b- j$ R
  188. #------------------------------------------------------------------------------#- x' z$ X  u/ p2 p. N% w
  189.   
    3 p/ `" t; d' S) n( U. x1 N
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the+ k( i1 X% Y! C1 r: N
  191.                         # region on the wall you want to make reflective (and7 y9 E1 u' K0 B1 U1 [$ R0 A
  192.                         # then use tiles/mapping that make the parallax visible)
    ( |0 ]- L) T1 N; D
  193.   * t5 N" }  X' V2 e
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
      }  s0 N0 J/ F7 c- w) s
  195.     . A1 |. o5 L  B3 I/ {7 c: j' a( R* E
  196.   REFLECT_Z = -10       # Z level of reflections0 b3 ~3 d0 o6 V" ?- R* ]6 c1 x
  197.   SHADOW_Z = 0          # Z level of shadows
    6 x6 M% D* P* u9 @/ {
  198.   
    $ J( W5 U# q$ Q& N& f
  199. #------------------------------------------------------------------------------#  % r3 k- K4 y& p$ \5 C! x' L0 l
  200. #  END SETUP OPTIONS) z* R* t- Q% \# r( t' X2 s2 e# I
  201. #------------------------------------------------------------------------------#
    7 l- E* T. x! l7 J
  202. end( H+ ?9 ^' y# I0 }6 Y9 b
  203.   
    # y6 X9 u5 _" M2 n
  204.   
    / i: I6 T$ Q) @# B, W
  205. ! U0 r9 `9 X5 \$ k9 B7 f) y
  206.   W. P: B4 O# N$ q% X
  207. class Game_Map& U, ~. q- \% u: D* m
  208.   def do_icons(refresh = true)
    . i$ v  [' E% f
  209.     @events.values.each { |e|
    - q: r. L8 |1 X2 Y% Y
  210.       next if !e.list/ F: t, ?0 U) n) a$ X& b6 Z
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    $ w# @) k+ f8 o* R# ]2 G
  212.         e.icon = $1.to_i
    # c; G$ |3 M7 \: P; Q' E6 r/ v
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    ; ]+ e* f+ u1 E- a; j5 l' n
  214.       else* D# A3 N# a1 x, _
  215.         e.icon = 04 R7 O% n+ _7 m( ~& K- {8 W
  216.         e.icon_offset = [0,0]  Q% |5 C$ f8 K. g7 t
  217.       end
    2 b3 L+ R( U9 \( q" @
  218.     }  w! a! y/ p/ C
  219.     SceneManager.scene.spriteset.refresh_effects if refresh+ F% G+ p: C: P. Y' [) t: O6 b8 B! _3 @
  220.   end
    # V  U2 ~( N7 i) L
  221.      b2 s& v: `0 h# R! h: [# \
  222.    
    7 \' x' p2 U, |( X2 ?. x
  223.   def do_shadows(refresh = true)$ s5 [1 S( `# n: c, W
  224.     @events.values.each { |e|. V& D& G+ ^# A- \1 U7 x+ M
  225.       next if !e.list1 Q6 m' D* R* L# d/ d% ~" D* q
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/9 e+ _& E" W; w! |& b% q  t1 R2 E7 h; a
  227.         e.shadow = true
    ' A9 H7 u/ F& c5 E# N
  228.       else' V" V* C( k5 m/ v' X7 _5 z- ?
  229.         e.shadow = false
    % R6 A/ R+ p& l
  230.       end
    6 {1 |% v) u; L6 T6 F0 [1 _; [' H
  231.     }7 h* l) U' |. b& H. |) [- w
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    : S  R. Y; G) y% r
  233.   end
    + U! C/ b* C1 Z( [- @  c
  234.    
    0 q# w! T+ x: u
  235.   def do_reflects(refresh = true)
    . B( P7 c+ ?1 o! Q  O" f
  236.     @events.values.each { |e|
    / ?  }5 _" I- p8 j# ~* Q( O. s
  237.       next if !e.list4 a, i% d: z( C1 o
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    4 ~% s% O" G9 n% b
  239.         e.reflect = true5 Z9 ]* g2 K( N& c6 Z
  240.       else
    7 J$ G9 g( a  H, `5 I% Y6 X
  241.         e.reflect = false
    0 d9 A4 l8 S3 A
  242.       end; t' {( M' V' @* E7 v
  243.     }4 @6 p- A6 j! T5 f
  244.     SceneManager.scene.spriteset.refresh_effects if refresh( g* \2 s& N1 V# E  E
  245.   end! N/ x! K6 j% }$ D8 a6 }9 Y
  246.    
    , h" M4 k! Y8 @6 l3 w
  247.   def do_all_chareffects
    / Y* h1 A4 A$ f8 C- x9 T5 S0 }1 b, ?
  248.     do_icons(false)
    ' m/ X( p3 w- z& q$ W
  249.     do_shadows(false)$ H& J. {0 M  s. v2 C) |
  250.     do_reflects(false)7 P5 F8 y$ a9 M3 `( J) ~, P/ K. n
  251.   end
    # D/ I! a8 J0 D# d8 V( N6 c( p
  252.    
      `2 {2 k% Z- `
  253. end # Game_Map8 y4 |; |/ q9 W9 z" ~0 v& m+ x

  254. 8 D# e/ a# F* K% h' C/ {( t
  255. " L5 k+ p! g3 h+ v9 E/ i6 G, c4 h

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

使用道具 举报

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

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

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

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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