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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
$ I8 ?2 Y, `/ L5 a2 n' D
这个代码怎么用啊,有大神知道吗。我从国外找的。
8 t4 p/ l$ N  i; k. W+ Whttp://galvs-scripts.com/2013/02/21/character-effects/
, c* p- E3 x' m1 J+ e( v是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    ' _2 Z" l; `9 W% D( \/ c
  2. #  Galv's Character Effects8 y6 k9 P' x8 M4 m& }* O" I
  3. #------------------------------------------------------------------------------#
    7 _) i- H* }/ `6 |- z3 F- k( g8 ?
  4. #  For: RPGMAKER VX ACE
    + j8 @' f& K) i) n; Y6 e, ]
  5. #  Version 2.1! r% y1 m7 @" n) W. ]5 G1 I$ T; s
  6. #------------------------------------------------------------------------------#- u+ R6 g- X' F# g: f( o& u
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    0 u8 K3 T3 h) [( _$ H8 k
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ' H: ^: ^' S# d! E& H% N% g
  9. #                           - Fixed shadow facing bug: F" w; R; N) a8 t  ^/ c- H+ N& r
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
      e) T' n  p; L4 c" z+ f8 J2 _  A( ]; c
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows$ @  ?9 I3 i" y: i
  12. #  2013-02-22 - Version 1.7 - bug fixes/ Q3 G. g0 a2 L( ^" O
  13. #  2013-02-22 - Version 1.6 - added icon effect: ?4 i4 o% d. C  U, u' d+ J& T
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    6 q& \. L# r1 e, u' T5 u/ o
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles6 Z: O& D+ g: x; ~
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    $ c7 j* V( n' C3 y6 G9 ]+ g8 D
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)0 D, P8 J, T% _' S* F' k
  18. #  2013-02-21 - Version 1.1 - updated flicker effect+ n# v5 l  e  i  \$ s; Q
  19. #  2013-02-21 - Version 1.0 - release
    4 P0 f' c% B, q  O, W: g
  20. #------------------------------------------------------------------------------#& v6 [6 o" b$ n
  21. #  This script was made to provide some additional effects for characters such
    ) h( S% O) p2 j$ i; X
  22. #  as events, followers and the player on the map.+ \: B& e8 P' K6 ?6 t4 v
  23. #  Currently it includes:
    6 u1 n& C$ e3 {2 k0 U% I' d
  24. #' c& W& f0 I3 s5 U% q* N
  25. #  Shadows; N4 n. ^$ G" F1 J; d1 c
  26. #  Shadows that appear under player and events in a directions depending on1 a0 a& P, N4 Q1 g
  27. #  a light source that you choose.8 C9 `; J/ \! E5 o: x2 o2 J
  28. #
    2 Z  o5 h1 y+ _) j& `
  29. #  Parallax Reflect
    ; p. e* A0 G' ]3 @$ q
  30. #  Reflections that appear on the parallax layer for events and actors to be+ N+ Q/ w+ |& @$ k( w0 j" S
  31. #  used for things like reflections in the water or glass floor etc. To get
    1 l. |# u2 d) e- o# Z* b: p
  32. #  effects like the demo, you need to edit the charset graphic to make the water, U  R/ \+ F/ V: Z, f) s
  33. #  partially transparent.
    ) }4 N* R' J0 V) w2 V3 S; r1 f: G
  34. #4 H* R8 u/ {& d4 R# H* z( O
  35. #  Parallax Mirrors
    8 z) N' k" J- ]9 [* P; n7 R
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    ) E0 E* Z" V1 C2 b* K
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    6 n% E3 Y( l7 Q3 N1 i! H0 I8 p! N
  38. #  changed so actors and events can use different charsets for their reflections
    0 _% L5 q& v+ o  j
  39. #
    ( u! P8 w. N" W2 I% _
  40. #------------------------------------------------------------------------------#
    9 q* \, F/ }4 l& K
  41.   
    - o" ~: o& Y; x0 H6 g0 V+ @
  42. 8 ~5 ^1 W# N& v# M
  43. #------------------------------------------------------------------------------#' j; S# Y& j  v9 G
  44. #  NEW - First event command as a COMMENT
    ( d' h1 L0 R2 V  f+ Y$ g& d: @# i3 z
  45. #------------------------------------------------------------------------------#1 l9 _" L8 I  [
  46. #  You can add a comment as the first event command on an event page to set if( a0 X9 ?0 M$ I, C! F
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    7 R% N% b2 n7 e9 m0 ^
  48. #  below, all must be on the same line in the comment.
    ' i& u- K) b! V5 J
  49. #2 A0 l% |- Z& ^* s+ s+ n
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    # p5 V; B/ a4 S& o; ^/ M% @
  51. # <shadow>           # set the event to display a shadow
    9 j8 ?: M. w% H% I
  52. # <reflect>          # set the event to display reflections
    # B1 }8 [* n- j# f
  53. #
    6 c9 m6 _+ D( O; z; |7 {
  54. #------------------------------------------------------------------------------#6 R/ K; w& o- b+ N0 J; A! y, s
  55. #  EXAMPLE:
    & E' s; N) p6 f& ?& R9 O3 A$ Q
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    : J' |) E' b  G) r" C
  57. #------------------------------------------------------------------------------#
    2 a% \3 K) l; R6 b$ D

  58. - L0 m& |! F0 B* s8 \) b3 a/ }. G

  59. : ?% |" M/ U2 n- w! V# i
  60. #------------------------------------------------------------------------------#
    - c) f1 ~; D4 t  b
  61. #  SCRIPT CALLS:% `- T5 k; L0 p: ]. n% s5 o! A) ^
  62. #------------------------------------------------------------------------------#
    ' G' }9 S* A" G- ]: U
  63. #9 i* I; j0 J0 @/ W( ?
  64. #  char_effects(x,x,x,status)/ C6 a: m: f, I+ W- ^7 r
  65. #
    - n5 F9 R7 z% U- S5 h8 n/ k* d
  66. #------------------------------------------------------------------------------#' V: x  M" X& C# e( d
  67. #  # each effect can be true or false to enable/disable them during the game.% G. m. E4 I0 V
  68. #  # you can change multiples of effects at once, x being the effect number) p6 {+ I' B; n  w2 U  ~
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons" P  s0 a. B6 c/ ~* {1 \* M
  70. #------------------------------------------------------------------------------#
    , u9 M) r2 z4 k$ P* L% b, ]
  71. #  EXAMPLES:! y" J& t: o, f0 `) e: B
  72. #  char_effects(0,true)              # turn reflections on
    8 P) g" m) `, c0 k6 d
  73. #  char_effects(0,2,true)            # turn reflections and mirror on7 V' K9 o( l& r# y: C" f
  74. #  char_effects(1,3,false)           # turn shadows and icons off; ~4 t( q& t4 M! @  C+ O! l
  75. #------------------------------------------------------------------------------#/ d- u: N$ m$ c) p( k1 `
  76. #
      {* d6 O' ?1 ?* v" K  W
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset$ y3 C/ O2 J6 j6 M! ^2 K) F
  78. #
    $ P/ [, {6 L( |
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    : a9 U* K6 p0 {3 ^' T4 _
  80. #
    ( y7 e/ `5 J; K4 |; p3 S% y, v
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    / }; E- L* K+ `8 i* m4 K' x
  82. #" b0 R! o. ~# e' W
  83. #------------------------------------------------------------------------------#6 D- Z. j0 S. v" \' K8 v. p1 W
  84. #  EXAMPLES:
    1 @6 U* n9 L9 m2 R! k- [+ b
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    2 m, l1 x! N: g( d$ P
  86. #                                    # in position 2 of "Actor2" charset.' E6 w( i, B3 T6 _
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of8 G" `. W6 k. c! I) P5 ?# M& l1 r
  88. #                                    # "Actor4" charset.
    " T" ^3 a7 k+ y2 t% Y, U& h2 F4 W4 o
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    7 J/ C9 s+ L5 s: h7 w( I
  90. #                                    # "Vehicle" charset.5 H5 P1 n9 Y& ?
  91. #------------------------------------------------------------------------------#9 H+ p- u4 M1 n) O; T/ U
  92.   4 c8 j7 h! l) s3 _) S
  93. #------------------------------------------------------------------------------#
    ! u3 u0 W: E2 b( ?7 m; z
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS  N% r! r* U3 [
  95. #------------------------------------------------------------------------------#
    9 P2 A- F- n. w3 Q7 u$ T0 [
  96. #
    1 Q2 I- m) t& q; @# V2 {- T# O
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off$ m/ g1 H0 v5 ^5 `+ d. H
  98. #                          # use this to specify for mirror and reflect.! w5 K7 q7 `8 r: e1 j
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    ; i0 B. j7 d% ~2 y+ Q& [% Y
  100. #                          # to change all events use :all
    ! e  \6 o* V; Y, `" g1 i
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    ; M& }2 J/ W* K0 j; |
  102. #                          # it 0 for no icon.
    ( R9 d, l/ e7 q( L
  103. #! r# `) g6 F' J6 Q
  104. #------------------------------------------------------------------------------#& Q7 c2 D1 P$ ~" @; ?1 y
  105. #  EXAMPLES:, R9 j0 }0 X* ]9 ]! P
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON' S8 [$ C, g5 H! _  P9 V
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    5 O% [# `8 o4 D' |0 J
  108. #  reflect(:all,true)      # Turn all event reflections ON
      c6 q# b4 |9 @  C. `
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    ' R  {/ @9 D3 \) X5 h8 {4 L) g
  110. #$ y" o# d1 I( ~
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering. v' l- H  l; O) v; N" C2 D
  112. #        a map. This is a design decision to try to keep lag to a minimum. You' s$ |9 q' e/ q. q, n
  113. #        should use these effects sparingly and only activate them on events$ H7 b) Y; [4 V7 q
  114. #        that require them.
    6 h0 ?" p$ h0 C9 q  F2 u6 U. W
  115. #------------------------------------------------------------------------------## A! E) a+ C% [2 v9 E0 W
  116.   . G; ]# b0 \" v
  117. #------------------------------------------------------------------------------#
      M9 s: t( B+ N$ x* y
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    6 G  z, v% K9 J4 g5 k2 ]" K" f
  119. #------------------------------------------------------------------------------#. k9 O- L7 F: q0 E+ h4 g# B
  120. #
    + U$ m! R. L% m" g: F! A3 d: G0 m& M
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default - V# n5 R8 K/ c
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off - J' p9 T. o' w% R' y
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    , A: N4 C# j0 }5 I! `6 u7 k, q1 g$ v
  124. #/ e, J$ U% _' X' w0 w% i( E4 }( q
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    & u5 f, {* a. B2 g, [
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    , b) ]  K4 Y# E) C  k2 y
  127. #  v_icon(x,x,x,icon_id)
    ( y3 R# T  R* A! ]1 B6 b% f
  128. #9 B% }9 D$ G! C+ P9 o
  129. #------------------------------------------------------------------------------#0 p9 h% m! i& I2 {1 y' U- w
  130.   3 S0 P9 ~: q/ L8 c* u% v
  131. #------------------------------------------------------------------------------#* R( d9 m/ U% M5 m4 B! k
  132. #  SCRIPT CALLS for shadow options
    6 O( Q( I" _  n2 S( `0 y
  133. #------------------------------------------------------------------------------#
    2 t7 V) h# R, }- H' w( }# @, t7 E% F
  134. #
    / D3 ^" u/ \, |% A% o, E; u8 Q3 t
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    % R+ m  d/ ?! \9 v1 F6 }
  136. #                              # light source number you wish to change (for$ @7 P( Y1 X; e" N/ w
  137. #                              # more than one). These are reset on map change.- n3 d# t: n, k& l& ~6 ~
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.! w6 {1 k0 E' F  {3 X
  139. #                              # This will need to be in parallel process if you# @* Y, l# O) G. N
  140. #                              # want it to be a moving light.8 B: b/ t6 J+ \
  141. #7 w5 w: D! ?" A+ i8 J. m; R
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below9 B) Q6 u0 \0 U4 a
  143. #2 `3 F# z" w* ~% Z
  144. #    # intensity = opacity when standing next to the light source (255 is black)6 a) n8 `& F( ]5 Q
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    . p3 _) J7 }* v/ n: y- s
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    0 `$ `+ d$ t$ Z- e6 d
  147. #
    9 k7 r, q0 M. B5 L8 }0 u" ]/ b
  148. #------------------------------------------------------------------------------#3 Y6 s! M% l+ J4 z
  149. #  EXAMPLE:
    5 S/ y" m7 r8 n9 f
  150. #  shadow_options(80,10,false)    # This is the default setting.
    * G. o) X  I. P6 Q- q- |# h/ w
  151. #------------------------------------------------------------------------------#
    8 M. `& @0 F" G% z- \! T( r# ?# |; d
  152.   
    ; i& I3 x1 F0 b% ~2 z/ S
  153. #------------------------------------------------------------------------------#
    9 h3 @1 b  o6 q' o" z' V  M
  154. #  SCRIPT CALLS for reflect options
    4 z( B% U% Z9 |+ c
  155. #------------------------------------------------------------------------------#6 s0 ?: o' f* n8 \/ Q- t1 c' T/ }
  156. #
    0 L9 H2 K6 k* F6 [
  157. #  reflect_options(wave_pwr)
    4 F) A2 ]7 a0 \* Y
  158. #* m! N/ D% h1 H; c- U. p+ J3 w
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    4 n: D* H( B4 ]
  160. #
    : E8 a/ Y( o2 B( P$ k* r
  161. #------------------------------------------------------------------------------#' I0 w' g8 Y" M
  162. #  EXAMPLE:
    * i5 B  N. z# @: C4 B0 f/ s
  163. #  reflect_options(1) # Turn wave power to 1& T2 Y+ P! v( x% Z1 H; S7 X* g4 g
  164. #------------------------------------------------------------------------------## x& y" P4 y: |7 d, V, H
  165.   0 S; Q3 w! c& ?& D" ?  N! v
  166.   / n4 `; b; O, U9 Y- ~
  167. #------------------------------------------------------------------------------#
    " J! y' _5 S, U' L6 D9 q9 F
  168. #  NOTETAG for ACTORS, [# J: q+ y5 a! L
  169. #------------------------------------------------------------------------------#( T$ s$ j8 h  s- B; H
  170. #3 Y8 o; q5 H9 E- Z2 @) c0 a
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    / g  {* b& R/ P; U8 `8 v' R# t
  172. #
    ' T* `2 |  m* \  _9 O+ K  ?7 z
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    " b9 w, J% I( ^" b) n0 \6 v+ W: C
  174. #                                  # and use the character in position 'pos'
    # a) O2 t( G0 @# T
  175. #8 ~& o1 [" c% V+ y
  176. #------------------------------------------------------------------------------#
    7 v1 g' d9 t2 B; G( |
  177. #  EXAMPLES:
    1 F+ q3 T) b0 g7 f% ^7 @
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset' H/ z) a  d5 ~" i
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    4 e8 Z+ R8 ~6 z- W$ ?$ S& [
  180. #------------------------------------------------------------------------------#
    3 m! s1 D( V2 s7 y
  181.   
    * h1 f4 {4 w8 H
  182.   
    $ w- Y. b* L: Y9 Z6 T9 p# l
  183. ($imported ||= {})["Galv_Character_Effects"] = true" j% d8 H1 L  y6 c
  184. module Galv_CEffects9 M' l. l7 l7 Q3 B
  185.   
    ! M# @! |5 |" ?2 b$ p5 Z; x
  186. #------------------------------------------------------------------------------#  
    / c/ G( h* j; @
  187. #  SETUP OPTIONS7 @, y& y3 E4 \
  188. #------------------------------------------------------------------------------#4 c, y# G* N. \( T& ~
  189.   + ~8 {; q2 i4 |$ N1 b% t0 r
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the  k, Z, x  \5 I
  191.                         # region on the wall you want to make reflective (and
    " ?/ k. O: O; Y& Z* {& W
  192.                         # then use tiles/mapping that make the parallax visible)
    6 _9 y6 w( o3 {& T5 w3 D! R
  193.   
    7 Y9 b' B! V$ i; f
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    7 H1 U6 X6 n" J- e0 D) T$ x
  195.    
    $ U: W1 w9 Q8 w& @
  196.   REFLECT_Z = -10       # Z level of reflections! l* _  F4 B: Q; b. T# h
  197.   SHADOW_Z = 0          # Z level of shadows8 \0 w- h8 v7 y% Y0 k; Z
  198.   & D0 O0 D3 p3 B6 e
  199. #------------------------------------------------------------------------------#  : T6 `1 C) ]9 a7 V2 h. G; V
  200. #  END SETUP OPTIONS
    ; Q/ p8 x/ l/ c9 B5 h2 B
  201. #------------------------------------------------------------------------------#$ b! ?; G7 `9 L. R2 A
  202. end
    ; ^( P2 K6 g% I' [5 h
  203.   
    & X" z5 r1 |2 b6 K( D% E( d/ j
  204.   
    7 d+ E9 y3 r3 M$ }$ I

  205. - T/ l! o7 |' s- S( D) ?, E1 F
  206. 1 ~1 u. Q) v' s0 i2 ]1 w- L, A0 S
  207. class Game_Map- L6 P! U- ]/ {. v! }
  208.   def do_icons(refresh = true)
    * _- j; W% }. n' u
  209.     @events.values.each { |e|
    : t- `' P) M4 K; ?5 [) k7 q+ ~
  210.       next if !e.list& C$ P0 d% {5 ^2 j6 a7 v
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/. x# q/ a- _5 z7 h1 X8 \
  212.         e.icon = $1.to_i9 P7 m0 F0 [" }7 g% p
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    ) d. ~9 w* U7 c5 T6 B
  214.       else
    ; d# z& b& X$ S$ j2 v8 p+ }: T
  215.         e.icon = 0( ~. v2 p+ ?" Z. w. y$ }' Y# z
  216.         e.icon_offset = [0,0]
    # L8 l4 C+ Y4 r! x! o. W
  217.       end
      `' |7 s: `7 ^3 R0 H. s
  218.     }
    % S6 I$ d4 X/ Z/ Y- L. F4 V3 ~
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    , K  o+ l, r' v1 `$ q- p6 C
  220.   end% u  s9 Q- B0 O- g( B) `1 m5 g
  221.    
    5 q- m0 X6 Q" |0 U
  222.    
    + ?$ ^4 }9 ]* ^" d
  223.   def do_shadows(refresh = true); d8 ~) }, V9 ~8 V
  224.     @events.values.each { |e|
    + E0 j* P8 N) @2 W" @
  225.       next if !e.list
    $ K2 P8 t9 K  U% }( X# x
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/9 L- X, O3 [: p5 d
  227.         e.shadow = true( ~9 r* g! _0 V) D2 ]
  228.       else
    8 {6 {) O& D& z9 o5 j
  229.         e.shadow = false
    " H- ^3 ^3 \+ B$ |' }0 c
  230.       end
    , ~5 o/ v7 V& p* R8 ]( a7 {
  231.     }/ O: w7 q3 g' h# Z/ _3 m' `
  232.     SceneManager.scene.spriteset.refresh_effects if refresh. I8 A, h; m: T4 [4 k
  233.   end
    / U$ P$ F/ d' Y$ p" m
  234.    
    3 e# O. b- Y6 d) I1 K
  235.   def do_reflects(refresh = true)/ g2 K) M% j( t6 M' s/ x7 Z
  236.     @events.values.each { |e|
    # i; l; D, t( ]0 c. m- ]
  237.       next if !e.list2 L. k( F" {3 l
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    8 t, q+ x& V$ C/ i
  239.         e.reflect = true1 ~4 n& n! p7 d$ v
  240.       else) n7 l2 d* _5 w; M* V: \
  241.         e.reflect = false3 `( b7 q0 y9 Y  u3 a, m! r
  242.       end) F$ {4 Y" j* ~0 V  J. u9 j
  243.     }; A8 X8 k+ g, s' {4 e+ {" ~
  244.     SceneManager.scene.spriteset.refresh_effects if refresh: I% J  Z4 |3 U, s3 d
  245.   end
    % U. q& H8 s: |- v
  246.    / O) `  g0 F. b9 Y, ]" ?* n
  247.   def do_all_chareffects
    # C; B% K/ F6 A) l, X
  248.     do_icons(false)
    % U0 x/ p1 q- U, j
  249.     do_shadows(false)# U( x$ q! [* s" w7 \5 C9 w
  250.     do_reflects(false)
    1 |1 o7 u- e2 z) u2 [
  251.   end3 N6 L# y% Z, V- M
  252.    
    9 |8 Z/ E/ p7 u. J/ P
  253. end # Game_Map; c) k! N; w2 `, [$ Q5 j: w

  254. 3 f, _- R. v! E# ^2 d

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-6-4 17:45

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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