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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

5 H/ p4 g2 f" h. U# j! J这个代码怎么用啊,有大神知道吗。我从国外找的。
: t. C2 j9 K! _8 {: Khttp://galvs-scripts.com/2013/02/21/character-effects/
% I7 a- g+ d/ C7 `3 G是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    ; p3 X+ @- ?4 s, Q% \
  2. #  Galv's Character Effects. ^. |  k1 B( L5 C1 p# k
  3. #------------------------------------------------------------------------------#4 i  q6 a4 J; N+ j. N8 i: d
  4. #  For: RPGMAKER VX ACE+ N. D* V+ |! k7 O
  5. #  Version 2.13 [) |- @. n3 I8 E5 v5 A- t- M; w
  6. #------------------------------------------------------------------------------#
    . r9 v: r- b8 s0 ], b$ K8 Y
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows, C2 u% v* R; J. a3 w1 @
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ' B+ v. j. T) M8 [% W! t
  9. #                           - Fixed shadow facing bug/ Z9 ?, {: L7 }3 M( t
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows0 S( r/ J. B9 o, E+ @
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows. ~+ Q) |4 t& V8 V. [
  12. #  2013-02-22 - Version 1.7 - bug fixes
    ; E' L) C+ ^7 u% n
  13. #  2013-02-22 - Version 1.6 - added icon effect
    1 b7 O4 k4 b! g& b: ]" j4 `$ ?
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    # x8 z. Y" I" ]/ S; T) R
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles  U5 y# ^' v7 w
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    3 C8 {$ t' \4 o7 L% I
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    . @: a1 z! [- P2 ?
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
      a: }3 w8 P" G; W$ N# k
  19. #  2013-02-21 - Version 1.0 - release
    5 D& |( c& ^9 E7 t
  20. #------------------------------------------------------------------------------#' M7 Y6 \& d+ G2 m: W: m
  21. #  This script was made to provide some additional effects for characters such- M9 V/ A/ s( p1 Q7 L5 J5 c0 ]. o; t
  22. #  as events, followers and the player on the map.7 R& a( f- E, i, Z  m7 u
  23. #  Currently it includes:
    6 ~- f3 r; E; M3 p# T- D
  24. #- h7 a; I6 s  b& h; j7 m
  25. #  Shadows* ~. {! Z; R2 J2 F
  26. #  Shadows that appear under player and events in a directions depending on) m4 Y0 H, \% ~" u' g' I
  27. #  a light source that you choose.: C! L8 v$ v$ {; O
  28. #" f/ l3 x+ J2 H3 o, j
  29. #  Parallax Reflect5 M4 _% }) d; a/ t/ a/ D
  30. #  Reflections that appear on the parallax layer for events and actors to be
      Q5 m8 G1 n3 S! M
  31. #  used for things like reflections in the water or glass floor etc. To get0 e; }9 c. T# B, q: N
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    ; C7 _$ @( @  Y" q# E5 p
  33. #  partially transparent.
    6 i) a0 X$ m7 V6 E
  34. #
    3 G; p7 y9 g: e7 q4 }
  35. #  Parallax Mirrors9 a3 y5 J. O2 o
  36. #  Much like reflect but are instead actors and event are reflected in a mirror7 b. @% }5 x- W& I1 r# U
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    9 b( E7 @8 p2 j' k& R& N4 _
  38. #  changed so actors and events can use different charsets for their reflections3 U9 [6 N+ h! F, ~
  39. #/ _; B/ R1 n- _8 w8 z
  40. #------------------------------------------------------------------------------#5 w: O% U! b/ A# S2 I8 H' ^
  41.   
    . x+ U5 [- |' C+ Q
  42. . ]5 [4 n8 J  x/ O
  43. #------------------------------------------------------------------------------#
    * F% _9 F3 Z# ?$ r8 M
  44. #  NEW - First event command as a COMMENT
    6 n: m3 F) t+ i. z) x
  45. #------------------------------------------------------------------------------#
    6 u  k* H1 D; e. v$ z, T
  46. #  You can add a comment as the first event command on an event page to set if
    : r( M1 H. n0 ^: U( ?
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    . u% E* [" j0 O, w
  48. #  below, all must be on the same line in the comment.
    8 m" u7 c  i4 x6 b2 O
  49. #3 ]1 S9 a: G9 n  P$ l
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)% M$ X" k0 q- N* }9 t5 i, U+ y
  51. # <shadow>           # set the event to display a shadow
    4 h1 f7 S3 c# J) V3 Z
  52. # <reflect>          # set the event to display reflections
    , O* P/ A& Q$ e5 y5 z9 i9 ^
  53. #
    3 S! H7 F$ [' L9 A/ v& w# ]
  54. #------------------------------------------------------------------------------#+ p6 _4 U+ I) d+ F/ A8 p
  55. #  EXAMPLE:9 C) b% C4 v2 r- ?" @* m. P
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event% z( b4 M# p  n: \( s1 Z
  57. #------------------------------------------------------------------------------#  t4 T- a- f. ?6 @2 E# c6 s

  58.   K% C# i+ W+ Z7 @; h( S! J& R. ^

  59. / K7 V& r/ T& B7 C- @( M
  60. #------------------------------------------------------------------------------#0 b( p  [2 V9 a
  61. #  SCRIPT CALLS:
    6 t5 ~6 Q- }- L' ^0 G
  62. #------------------------------------------------------------------------------#. b3 U' N6 g. F0 N
  63. #
    - j) }+ r7 c$ x
  64. #  char_effects(x,x,x,status)" `# H( l3 O& H/ \- u0 X
  65. #& X( w- T5 [" y4 b
  66. #------------------------------------------------------------------------------#! J' Z" x* B6 c. b( S4 A/ D/ a
  67. #  # each effect can be true or false to enable/disable them during the game.# h* a# }( ?! \4 {. u2 a4 n) @
  68. #  # you can change multiples of effects at once, x being the effect number
    / u' j: J( ]/ J+ `& L( k& ~- ]
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    1 e; @9 Z3 T0 C, |  Z8 F
  70. #------------------------------------------------------------------------------#
    * A/ L, g* q9 o0 }/ d8 L
  71. #  EXAMPLES:
    2 {3 r2 A8 _7 E( R" ]
  72. #  char_effects(0,true)              # turn reflections on; a1 _1 `2 K9 H' y/ ]2 P
  73. #  char_effects(0,2,true)            # turn reflections and mirror on; B7 x; O/ a, g5 P, N
  74. #  char_effects(1,3,false)           # turn shadows and icons off! Y) \! A$ C% d" L* z* |7 X. ]
  75. #------------------------------------------------------------------------------#" q8 D$ `4 A4 e! K
  76. #
    * x5 Z% n" Z1 c; _- X
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    * _! c; {7 y1 p( o
  78. #% H* [! \2 m" ?- z2 W, [
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
      j& Z7 q. n  {$ i/ F
  80. #
    6 s) C% K, h' |8 g
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset* c. ^9 B2 j: r! K4 _: V
  82. #+ o; b. ~+ u) {- s/ d# U
  83. #------------------------------------------------------------------------------#
    ' \3 N' X& p  q& U
  84. #  EXAMPLES:# K! f7 L: T7 p4 L2 _
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite- q/ Q3 I4 C& ], {4 ^
  86. #                                    # in position 2 of "Actor2" charset.9 Q2 s/ P- |& W+ B
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of; d5 D4 I& k' N
  88. #                                    # "Actor4" charset.& `- A9 X5 F, j& \5 J+ E
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of$ D1 d- s' K4 Z% E9 W2 f
  90. #                                    # "Vehicle" charset." o7 F- i( V) `( \/ ?7 s
  91. #------------------------------------------------------------------------------#
    . X. q$ S9 m2 n* a5 u
  92.   
    7 S" f0 o6 q& v* G5 S( }
  93. #------------------------------------------------------------------------------#5 W- c& z; {: Y+ C
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS0 b5 N! `: K7 U( {# W+ i
  95. #------------------------------------------------------------------------------#, p: S4 [  [" j% [5 l
  96. #
    1 _3 f7 v' I# K8 f  q; J3 p1 m# T) _
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off7 v7 b+ n9 n) X' ~
  98. #                          # use this to specify for mirror and reflect.
    : t  K. J* D7 E& S  h3 e
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    . G1 v& p$ |3 v$ A/ q
  100. #                          # to change all events use :all
    2 S/ F& A: W- Q9 l9 y0 ?+ h6 D
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    8 D& @0 M7 j. {/ H" B" S% J
  102. #                          # it 0 for no icon.
      O% \( \2 k8 x& g. i" J# t0 S
  103. #' ]- C' R; R. F% h: P) I/ P
  104. #------------------------------------------------------------------------------#
    / ]/ P1 T: K2 E
  105. #  EXAMPLES:0 b1 R7 t3 u; c& }6 j7 u! e  X
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON$ X. t; V! o3 m* K3 ?
  107. #  shadow(1,false)         # Turn event 1 shadow OFF/ C) T7 o. x  r: i) e5 q
  108. #  reflect(:all,true)      # Turn all event reflections ON& j1 Y4 U0 X% L8 \+ @
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    $ @* F6 @% i) l1 v  Q& ~
  110. #- \& v. G& T% e6 M# }9 X, ~
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    ' ?4 B# y$ D2 L, L1 O2 J1 Q- j. \
  112. #        a map. This is a design decision to try to keep lag to a minimum. You9 J4 E0 C( |6 ^3 d& Z
  113. #        should use these effects sparingly and only activate them on events9 M/ v1 P8 c; `& b! o0 L7 W
  114. #        that require them.) V8 F6 l( \9 c. R) f, }' I) a
  115. #------------------------------------------------------------------------------#
    2 H! f6 n" g, Q- |# b/ h
  116.   
    9 s$ ^; l+ U3 t( R  C
  117. #------------------------------------------------------------------------------#
    9 E! v9 i( F0 x# e$ h. K, i& r/ j
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES. m1 v, C; v, N1 u* q% |
  119. #------------------------------------------------------------------------------#
    . C6 \- z2 K; s, A4 [& i
  120. #
    1 V/ b% H5 B4 F6 X2 R$ z' ^
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 8 D+ B" B0 {0 h' C
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off " U. B( a' Z6 o: L' p& }
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.1 j9 ^$ C( K7 K: h& z% B
  124. #
    9 j0 u# q  J3 _  s) P
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects/ P5 d# E( A/ `+ v2 Y: X
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.  m1 c6 F+ F  b+ r- Z# m2 }
  127. #  v_icon(x,x,x,icon_id)8 x1 c7 J4 J, l5 g% _" t" I
  128. #$ _$ `* q! h2 g" N
  129. #------------------------------------------------------------------------------#' e! ?( B2 W  w, D0 h$ E
  130.   ! f0 i5 k8 ^% l
  131. #------------------------------------------------------------------------------#) b. F- C/ G2 U+ s/ ]8 [$ `
  132. #  SCRIPT CALLS for shadow options4 p7 S! L3 w, k& b+ r2 c
  133. #------------------------------------------------------------------------------#
    7 o7 P$ B2 R6 q
  134. #
    * W3 E: ?( C! y7 r* ?
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    ! Z5 L) _; K$ u8 v' u, N
  136. #                              # light source number you wish to change (for
      x# b# I# M9 n. e, e
  137. #                              # more than one). These are reset on map change.
    ; l- w* t6 l0 v0 E& t
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.1 I: k: r, @+ A( B
  139. #                              # This will need to be in parallel process if you
    % L! g1 x- F& s0 M) }
  140. #                              # want it to be a moving light., }5 p# M+ ~/ z; J
  141. #
    ) ~: k. q$ {/ R) h& C
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below- W' r1 U& Y# Y5 N/ O( ?
  143. #
    * T' z. j- G3 R6 F5 r" ?
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    7 d/ d- p6 _6 W" ^
  145. #    # fade = amount shadow becomes more transparent the further away you are.) @  O/ V0 x0 ?6 Z
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.. X# V6 B2 R2 t0 K4 ]# y7 N
  147. #
    ) y" C; j) N0 D2 j3 h! ?
  148. #------------------------------------------------------------------------------#
    0 g  ~  z: t. z6 A7 o) k3 r: A
  149. #  EXAMPLE:
    ' c* z$ J% r) I
  150. #  shadow_options(80,10,false)    # This is the default setting.! P  F' S( z+ Z4 f; ^/ k" O% c
  151. #------------------------------------------------------------------------------#+ q$ u! |  \: @4 E
  152.   2 n9 [5 o* Y3 J& A# R, h- S. W
  153. #------------------------------------------------------------------------------#2 L% u# W# q1 c3 P5 R# ~* ~
  154. #  SCRIPT CALLS for reflect options  s) l8 g, k. y4 R8 ]0 F; G5 s! q! M
  155. #------------------------------------------------------------------------------#8 q: j1 {% m- p* X. A3 a
  156. #
    , E0 H# P/ N4 Y: n/ `) W$ S: a2 i( S
  157. #  reflect_options(wave_pwr)
    : n+ S, a8 d8 ^6 P( J
  158. #1 E& i3 ?* K$ \4 z9 g- G5 R
  159. #    # wave_pwr = how strong the wave movement is. 0 is off& ]3 N7 j2 o# b1 |( d' y) ?
  160. #
    * y- ?% C) g1 h7 P
  161. #------------------------------------------------------------------------------#
    * q& k( n& v! e% S
  162. #  EXAMPLE:1 F3 w- T; s; T! W
  163. #  reflect_options(1) # Turn wave power to 1$ t  ]& y8 S; `5 y$ o
  164. #------------------------------------------------------------------------------#2 s' Y# |+ Y6 j4 l- u
  165.   8 q1 {. \: l1 Q7 s9 M
  166.   9 g" c+ c. J9 \" T* Q
  167. #------------------------------------------------------------------------------#! h! Z) O! W, [: s" H5 R. Q
  168. #  NOTETAG for ACTORS
    - v5 U  e5 J6 c/ n
  169. #------------------------------------------------------------------------------#5 x. E& `) N5 p4 I1 L
  170. #6 U' m! E) z4 z1 L' S
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    5 l, d# }1 u1 M, M
  172. #2 r/ n+ J9 w) D7 E
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    . B/ s4 |7 h, ?4 e$ j! i
  174. #                                  # and use the character in position 'pos'
    0 D3 l% A; E# f9 E
  175. #
    2 c+ y+ g0 R2 C- S" X$ |) C
  176. #------------------------------------------------------------------------------#0 I2 C$ T3 c6 Y
  177. #  EXAMPLES:
      I# x/ O% H4 l! h: g2 w6 I
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    % `: R( W) M. |( |
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    - f' P3 [' O$ C3 i
  180. #------------------------------------------------------------------------------#
    0 K1 A* E9 s+ k* u2 o4 C1 p
  181.   0 t  v* q# J, M
  182.   9 _$ m  s' Y- m# D; p: L  @
  183. ($imported ||= {})["Galv_Character_Effects"] = true- O# q( J4 d8 u/ e; r2 W' \
  184. module Galv_CEffects$ M; W- s+ _. _8 M
  185.   / d; S' Y5 |' |- g9 H
  186. #------------------------------------------------------------------------------#  ! P" p8 S' _* [
  187. #  SETUP OPTIONS7 n" ^6 g8 W+ N9 q6 c1 V) C
  188. #------------------------------------------------------------------------------#. b* n! S4 @8 a7 U$ T9 Y9 o, V' c
  189.   - K5 d: t" s6 n
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    , C0 P3 z0 S2 {" x! x
  191.                         # region on the wall you want to make reflective (and
    ' ]8 Q  j& r2 e6 t
  192.                         # then use tiles/mapping that make the parallax visible)
    & R8 F4 [8 F" b. V
  193.   3 T0 |3 d, J/ ]) }# J8 @
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters2 j! f; Z1 o! M. K6 O; q
  195.     8 t% N/ ]# I" Z
  196.   REFLECT_Z = -10       # Z level of reflections  Q( v, ?  o; F1 ^6 u
  197.   SHADOW_Z = 0          # Z level of shadows! R2 Y" R* y& ~. u. K. s1 E
  198.   - g) R: l2 r4 C0 D1 r4 J% ~2 y
  199. #------------------------------------------------------------------------------#  
    ( V( h) I1 T. g# E& @+ Y6 l: n9 E3 G
  200. #  END SETUP OPTIONS6 h* C6 c- i; `+ N1 y' K% t4 t
  201. #------------------------------------------------------------------------------#- F- u4 q. v( U: c9 B7 k5 B; h6 ]
  202. end
    ' `5 \( F) K3 ?2 S3 m$ M6 Q# Y2 q
  203.   5 \* P) r0 W7 @0 V
  204.   9 k5 |8 t- R7 x; m- S# J# x5 [
  205. 4 `* \" Y& C& v0 [
  206. 0 n( u  R( H! f# K
  207. class Game_Map
    ( U1 W. I4 v3 x* X/ `: j, Q
  208.   def do_icons(refresh = true)
    & ?% _, s% y% T+ }5 i7 ~
  209.     @events.values.each { |e|4 ^) V2 z7 F9 H/ e2 q- Q
  210.       next if !e.list
    # [$ a9 W9 ]* `% Q; S3 E
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>// T& d( d9 `! [4 h; O# W6 _
  212.         e.icon = $1.to_i
    # q5 z! e; l: r: Y. C% @
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    / l1 x( g& ?2 K+ a3 I, O
  214.       else  G* Q9 Q( Q0 y- {3 `
  215.         e.icon = 01 v, W1 W: z  \' F# H1 ^9 w
  216.         e.icon_offset = [0,0]! Q( C& \) `; L9 _" Q1 s
  217.       end( w; ~- N4 Q( ?8 T! \& @6 o
  218.     }
    7 |  l9 T8 b% ~. k# h/ d
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    2 q" @- `' k" u
  220.   end3 d7 C6 T" D6 D; E
  221.    
    ) g( \6 O9 }' m. E1 t* W
  222.    / h/ _8 S: q) _( G9 |
  223.   def do_shadows(refresh = true)
    ( W4 q# j7 d! D" L9 X5 T
  224.     @events.values.each { |e|3 e( o3 s" @& B5 q& t
  225.       next if !e.list
    ! f! O1 [4 M/ x9 ~9 ^  G6 e
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    8 ?& n6 q% _, b: k* ?8 l
  227.         e.shadow = true
    9 M7 U- m$ X9 H
  228.       else5 ]6 E  k) O  E5 @% d4 S4 R- q
  229.         e.shadow = false
    5 E/ o! N' ^* L% t5 M
  230.       end
    / U$ z: L0 d( i
  231.     }& S+ I, V1 Q2 b6 M2 B  {
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    5 w% O' q$ e1 Z9 z" r
  233.   end# ?. K' P8 `3 M( L
  234.    8 D' K  l# R. J; }$ r0 X( n6 p- d/ V% q
  235.   def do_reflects(refresh = true)$ J- Q7 [' r; d, o8 q
  236.     @events.values.each { |e|
      n: ?3 }1 [( I( K
  237.       next if !e.list
    4 t0 q* [8 l: D
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    - h% v+ ^6 z6 n' R$ q" {
  239.         e.reflect = true( ?  x$ Z5 d. c+ p5 m9 E: a# S
  240.       else3 f3 N5 T1 X2 h- R) E
  241.         e.reflect = false" F  b( C7 e0 f5 G1 d' f8 B
  242.       end
    1 [$ S- M- ^* S: l8 O/ @
  243.     }
    1 g1 k: B6 H! ?7 _; N2 `6 o+ a
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    , t+ @# _, L$ ]- _( \
  245.   end
    / ~, w& |9 [2 L: f7 P% {0 ~
  246.    ; ]/ ?  Y9 v4 r+ O! U: ~. t4 N
  247.   def do_all_chareffects
    % i" k% V2 m& c- ^# A7 s, v$ B
  248.     do_icons(false); Z! J& G; ]" i/ Y4 C
  249.     do_shadows(false)3 f- _3 L* U6 ^' c( Z5 B: B
  250.     do_reflects(false)
    ' E" d' g2 I! `5 P% Z5 P- V
  251.   end- E! e& S  \% Y. e3 w& S6 O+ X
  252.    
    0 a  V" O  |+ c5 D. w, @7 E! d
  253. end # Game_Map: _1 ^- T( O5 V% m% q" H
  254. . i; y8 V" w) z4 h
  255. & [6 p( i" N1 Q  ]8 `

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

使用道具 举报

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

使用道具 举报

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

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

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

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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