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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
$ w: Y" F. G0 d; `; R
这个代码怎么用啊,有大神知道吗。我从国外找的。
' e$ c- y% S1 f" dhttp://galvs-scripts.com/2013/02/21/character-effects/, r5 r7 f- r- a( D, F4 @3 K
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#( y+ R; f: X1 q* J
  2. #  Galv's Character Effects
    & E) r) I  r2 i& U8 v' |
  3. #------------------------------------------------------------------------------#
    , i( b/ W% r9 F- @3 G* A
  4. #  For: RPGMAKER VX ACE
    ; [) |" r. k  A* O( m# e, @% f" I
  5. #  Version 2.11 w2 v8 ?3 ~) y. P8 h6 n, K
  6. #------------------------------------------------------------------------------#2 C9 U# }+ Z7 ?  \$ h3 V
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows9 K# l. z% j* R$ I1 a
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    5 L3 m; |5 w* ~2 O6 @
  9. #                           - Fixed shadow facing bug# l5 w* v' a! B2 y, f( I0 f
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows# F/ }0 K/ v* Y1 N9 ?$ N
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows6 \0 ^' g: z; u( o/ B# l2 @
  12. #  2013-02-22 - Version 1.7 - bug fixes- o4 f) f* A6 w+ ~7 n- r; m1 j
  13. #  2013-02-22 - Version 1.6 - added icon effect4 j% ]) Y: U, v( X( }2 \
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    % j7 R* ^; D; ^  D+ i) W4 F
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    ! p# R2 K3 V! D, k' Q: `
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks, u* x3 J( W+ f* R
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)% |+ i/ E# p# N: I( z
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    / [. y+ W  m" @  `- [# z$ Q
  19. #  2013-02-21 - Version 1.0 - release
    - A# P2 C! D: G0 N. p2 r  E
  20. #------------------------------------------------------------------------------#
    ; `# _9 z% Q) Z- v
  21. #  This script was made to provide some additional effects for characters such/ K# ^; d. f9 {9 ^
  22. #  as events, followers and the player on the map.! X5 P( y& u  h, [
  23. #  Currently it includes:5 }* G2 }' l0 a' c# X' y. }, q7 E
  24. #5 X0 |- x+ l9 }4 {
  25. #  Shadows* K: z" Z% H% c4 |! k( U( C- l
  26. #  Shadows that appear under player and events in a directions depending on
      K# \5 _6 r; w7 e! a; u
  27. #  a light source that you choose.
    + y- A4 v" V/ x! k
  28. #; m- e% Q9 i0 G" Y
  29. #  Parallax Reflect
    ; S8 E" n2 \/ g, r
  30. #  Reflections that appear on the parallax layer for events and actors to be4 r" K) R- i0 c' r/ R2 T  s1 `. L
  31. #  used for things like reflections in the water or glass floor etc. To get/ |6 T" B5 q* m
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    , S! _) x! g+ \5 \+ N8 K
  33. #  partially transparent.6 c* t+ m& D. Q# Z) K- ^" t
  34. #
    3 Z' H$ E( V1 Z4 e1 _
  35. #  Parallax Mirrors
    - N; h& ^/ M) k4 h% C
  36. #  Much like reflect but are instead actors and event are reflected in a mirror1 C7 M6 F3 Z6 j% D% w7 q
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    ; A- \& g8 k# d( ~: |
  38. #  changed so actors and events can use different charsets for their reflections
    0 S  L+ R6 u8 m$ K+ f7 u# M6 w
  39. #$ \* X" `# b' z, P# _
  40. #------------------------------------------------------------------------------#
    + L4 N9 u1 i1 \$ P+ J  \( a
  41.   
    & N1 U- m1 O) [: `# _1 N  |6 e
  42. ) C" I) M0 s7 H
  43. #------------------------------------------------------------------------------#
    ' T0 p+ T  N$ f% t4 G
  44. #  NEW - First event command as a COMMENT
    ; S% }; I) F" s) X1 s
  45. #------------------------------------------------------------------------------#
    ( [* i( Z# T2 q( I; U
  46. #  You can add a comment as the first event command on an event page to set if
    ! w. V0 Q5 Z/ x6 x
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    & y9 h4 t* ]0 z5 z: @1 i* q
  48. #  below, all must be on the same line in the comment.% ^3 k# e+ S4 b
  49. #
    $ D" l" `# D* K& Y9 W
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    0 n- @/ e' w& e: v
  51. # <shadow>           # set the event to display a shadow5 T% h* _' a& Y% x) t, ^4 Z7 J
  52. # <reflect>          # set the event to display reflections
    " u& a% ]! D5 t+ f. p0 z' H
  53. #
    & A- f* `/ C% ^5 X/ T' L2 L7 d
  54. #------------------------------------------------------------------------------#
    7 d3 W: b9 @" v# I4 A3 k2 ~
  55. #  EXAMPLE:1 N2 E8 o+ a% C5 L
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event( J6 ^( l  i" a6 j6 j7 r
  57. #------------------------------------------------------------------------------#
    $ H0 Z. e6 P6 |' u& o
  58. 0 ~( ~$ ?6 Q& ~* Z
  59.   S, ~8 {3 }: \$ X4 Y
  60. #------------------------------------------------------------------------------#" V5 j% y4 K5 M% g$ v# D' H
  61. #  SCRIPT CALLS:$ G  Q9 U/ d, H
  62. #------------------------------------------------------------------------------#
    # {7 q5 {  v; j. f: q* D: U; _2 j
  63. #- j+ F9 D* p" i- }
  64. #  char_effects(x,x,x,status)$ n3 ]8 d1 P$ w$ p
  65. #1 C7 @& |5 T! C0 [, ~
  66. #------------------------------------------------------------------------------#
    1 H- q, ^* a2 [  ?) N
  67. #  # each effect can be true or false to enable/disable them during the game.
    0 j$ ?3 N1 H% b2 K
  68. #  # you can change multiples of effects at once, x being the effect number
    4 i4 E0 d) W* y3 H
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    ) L( I/ `! o. x3 b! F  U" p
  70. #------------------------------------------------------------------------------#
    * ~' D$ I7 L9 v& ^( {: C
  71. #  EXAMPLES:
    : C+ O/ H  v, d3 }$ i* Q$ o$ z
  72. #  char_effects(0,true)              # turn reflections on
    8 J3 K' h; X( p( ?" Q+ z2 ?
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
      g* r) H5 g4 w* }3 ^8 L6 j1 y( V5 M
  74. #  char_effects(1,3,false)           # turn shadows and icons off3 x& g  w# T% m7 D' ?- N/ l0 `
  75. #------------------------------------------------------------------------------#9 q7 V0 P7 W: [- @3 _
  76. #! ^' ?: P0 e6 V& _. ]
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    & Q3 i( s' h+ k. ?) V& P
  78. #/ P# ~9 k: _  e( b
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset' a; |8 i1 K  Q5 F; k" D
  80. #
    ) W1 R9 f, N, d9 q$ S/ l" E
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    * M1 W8 X: S- F
  82. #+ l4 Q7 t+ T. A9 \- E' t9 T
  83. #------------------------------------------------------------------------------#! y: O  m4 i9 ?# d5 R
  84. #  EXAMPLES:
    0 Y0 D/ d. R) d9 f2 M" L7 x0 b& V  |
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite; Z- Y7 g. u. E/ Z
  86. #                                    # in position 2 of "Actor2" charset.: l7 V- X- e) ~' D4 j4 y6 L
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    + x7 k8 D  N, G4 o7 c. s: c6 R$ l# q: C& h
  88. #                                    # "Actor4" charset." T8 k+ O, y& p' D* r9 J
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    / h: y: m; [; S3 I: H9 m
  90. #                                    # "Vehicle" charset.
    8 \# j& H3 t4 I8 c7 y* V$ j
  91. #------------------------------------------------------------------------------#
    3 w9 R; j  f1 u0 l! L# C0 T/ n) M1 s
  92.   
    . k: p7 ^0 N, s; H7 W
  93. #------------------------------------------------------------------------------#+ Y- C7 S  }/ \7 C" `7 l! A+ G2 L
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS# ]) D# |1 X9 s1 i# C3 `, g
  95. #------------------------------------------------------------------------------#
    0 T  \& \# P$ k" R
  96. #
    % Q; a- e. L4 g! L9 E2 c
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off, w! N" @: H" h- t' N: a0 g
  98. #                          # use this to specify for mirror and reflect.3 J2 w. h) ~1 b, L4 x# D
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    $ p( l. e7 }/ x: s
  100. #                          # to change all events use :all" e9 f) `2 L5 r4 r
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make  Z) `, n1 V; Z3 O9 C( s
  102. #                          # it 0 for no icon.3 L1 k  P: C4 \! Z8 y( ^
  103. #1 o% j8 p0 s+ b- G
  104. #------------------------------------------------------------------------------#* r! c( @3 {+ t9 d8 U( S9 ^
  105. #  EXAMPLES:
    2 l! H* Z6 @+ `: q
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON4 X7 i) `1 d8 }/ J& \8 Z0 D
  107. #  shadow(1,false)         # Turn event 1 shadow OFF1 `, W% H3 Q9 p) c
  108. #  reflect(:all,true)      # Turn all event reflections ON, `* C+ `# i& ]/ z' }, [
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    : l5 _; H, _* G) s4 m/ d4 w% P9 ?
  110. #
    4 J9 i2 D5 |% W2 ?+ r/ v
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    + f9 o" g0 C2 ]! Z
  112. #        a map. This is a design decision to try to keep lag to a minimum. You' f' o$ Z  ~* Z7 t6 v
  113. #        should use these effects sparingly and only activate them on events
      D$ G, j, Y" A- X- S
  114. #        that require them.
      a- e: ?3 ?3 Q! S% b2 w) V6 g% v- Q
  115. #------------------------------------------------------------------------------#) v* y$ Z# K3 h3 t, G, |
  116.   
    ! O% {/ t& g9 K# m0 o
  117. #------------------------------------------------------------------------------#% p4 x6 `) r; c' R5 ]7 I2 w
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    9 ?7 \, h% O6 w0 I
  119. #------------------------------------------------------------------------------#
    / t: \8 X& h) Q# C0 f6 f: I
  120. #0 @* m3 A7 ], f4 `+ o- T
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    ; v/ p3 K% H- R" `, a$ A
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    8 {. K' \' e2 S; o8 y+ J
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.3 _8 Z4 W7 a! t4 P% v4 a* u3 a
  124. #- |- W* ]  o* x& D8 W4 N
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    # N% ]; H# B: ]8 I
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.0 V9 V* A# ^2 t7 y7 g! r; O4 X
  127. #  v_icon(x,x,x,icon_id)
    ) @/ c  e% Q3 X$ Q+ a5 N7 q" N: R" {
  128. #; f$ e- o/ w+ N. \3 q
  129. #------------------------------------------------------------------------------#
    8 X' |  _; `3 k( ^" C
  130.   5 \" ~* G8 L/ Z
  131. #------------------------------------------------------------------------------#
    4 t& x, s% ]9 ]
  132. #  SCRIPT CALLS for shadow options
      Q5 R# {5 ~: ^  X' l$ T3 G
  133. #------------------------------------------------------------------------------#+ a% [7 W, @* t% H0 W8 P
  134. #
    6 n& L0 F- U: {+ c0 k3 u# h" q5 P7 L& F
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the - ^( f& ?: Z/ O# m+ ]
  136. #                              # light source number you wish to change (for, t& D+ u; m$ ~, T
  137. #                              # more than one). These are reset on map change.- v5 b) \. z9 `% Y8 n2 b, i
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.0 \6 w1 g" [* z$ z
  139. #                              # This will need to be in parallel process if you) [# v! ?! m1 Q3 l- ~
  140. #                              # want it to be a moving light.
    7 `* u! E' ~( s/ s, Y3 k
  141. #% D! l( y" ]% p+ k' d3 F! [* e# n! p
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    ! O: p2 {/ F% W( |* g) U8 ?
  143. #/ \4 Y+ U9 e1 M
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    3 r# _0 m5 o7 c  ^8 [4 X
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    $ l/ \. t9 N" {8 _
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    " j. n& R3 r9 b/ j& \" j
  147. #
    : C+ f7 z0 }5 T6 P- a/ @
  148. #------------------------------------------------------------------------------#
      B) }& P# D: v* h8 ^. R. `
  149. #  EXAMPLE:. N8 F8 R$ K  M8 r# m# o& Y
  150. #  shadow_options(80,10,false)    # This is the default setting.7 O; g( F) K5 z
  151. #------------------------------------------------------------------------------#- _5 Q: R& E. ?& N
  152.   
    8 T6 x# K7 o7 D7 I4 t- Q% P+ v" j
  153. #------------------------------------------------------------------------------#2 i1 U3 Z. B9 ^/ d& d0 d
  154. #  SCRIPT CALLS for reflect options
    & m8 d6 X4 b3 m. m' N
  155. #------------------------------------------------------------------------------#) O/ j% @7 u: ~, B6 o4 ?7 U$ Q
  156. #7 L& o4 t8 ]5 m
  157. #  reflect_options(wave_pwr)
    & q3 g5 V* o0 J, \! d
  158. #/ X( d7 y# N: ]- E, C/ X
  159. #    # wave_pwr = how strong the wave movement is. 0 is off0 T7 F# a+ h- [4 M
  160. #8 y9 Q: g: I( y" \$ x9 P5 |! P9 K
  161. #------------------------------------------------------------------------------#( [- z( M: u; `7 i" H4 d2 e2 a& K
  162. #  EXAMPLE:- t! k5 }, Q) W% E3 @( U# F8 E3 M
  163. #  reflect_options(1) # Turn wave power to 1
    , b* s3 T# s1 q6 Y+ }
  164. #------------------------------------------------------------------------------#3 F5 X2 A. @# s. d2 y% y
  165.   # j$ t5 D, g2 P/ U+ i
  166.   
    : W7 ^: Y9 `! M5 e
  167. #------------------------------------------------------------------------------#3 C( _! r3 {4 `1 r& Z* y
  168. #  NOTETAG for ACTORS
    9 t/ y& a) E( r4 e, \9 [! `! H7 s
  169. #------------------------------------------------------------------------------#1 Y+ ?7 x3 S) p' g0 M# a
  170. #
    $ B# i$ q; K& A9 i
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)' G; t9 ^$ [+ @  d: ]
  172. #
      A8 f  @' T3 K# j1 N
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections, ~2 r3 r/ M/ Z" x
  174. #                                  # and use the character in position 'pos'
    2 c: K. {: k- S) g( r$ t
  175. #
    0 x% ]/ W3 {; o
  176. #------------------------------------------------------------------------------#
    : q" x, f8 d9 t. u8 o6 t
  177. #  EXAMPLES:3 S- f! N. Y7 d. a
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    0 U5 i' t9 Q9 B3 }% }0 M
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset& A. l& q  C8 @( q- e) c7 ~# p
  180. #------------------------------------------------------------------------------#: h9 v; \. D* [2 L0 V
  181.   
    7 S6 M9 p& W; h$ D8 @- r
  182.   
    : O  F! Y3 g* G9 a
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    ! Q3 l7 Q" p; \0 ?% T: K; ^
  184. module Galv_CEffects9 ?8 _4 s  ^4 M" D: z
  185.   
    + n5 ~9 K1 b. }0 G) p. c: x9 e( k
  186. #------------------------------------------------------------------------------#  
    1 w! K& {5 w% ^
  187. #  SETUP OPTIONS
    $ p- ]2 i$ p- j, n9 U1 [4 o
  188. #------------------------------------------------------------------------------#$ x3 q$ r9 s1 z6 r3 ^. @; ^* q
  189.   
    + W% g9 M! K) F/ L. G; r
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the% z4 Y8 u) Z" t! h4 y1 f
  191.                         # region on the wall you want to make reflective (and7 y* O3 b, {6 ^! m
  192.                         # then use tiles/mapping that make the parallax visible)
    ! R0 l0 o- n* n6 {1 S7 c
  193.   1 z; A9 D' S/ ]2 m7 R0 a0 R# U3 H
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
      t1 H! q  ]; G( A" A* x
  195.     . l9 f/ m5 u, s+ {3 q7 u
  196.   REFLECT_Z = -10       # Z level of reflections; ]0 {1 l/ b  {, U3 _* [
  197.   SHADOW_Z = 0          # Z level of shadows
    + m' Y0 \6 N  W& N
  198.   
    ! ~- ?" d: k0 K, Z- X7 _! a
  199. #------------------------------------------------------------------------------#  
    $ q- ^. U' v1 G1 O# m$ d8 n
  200. #  END SETUP OPTIONS/ Y% f) t8 k, z$ X
  201. #------------------------------------------------------------------------------#$ k* q  e, n$ y2 l/ Z# a
  202. end  O2 d. [4 w) S: s
  203.   * h0 q: y3 c/ G2 ^3 @5 z
  204.   " I; M( ^4 U; Y9 c% M' l1 u
  205. & w& i5 o5 D8 B( i& e

  206. 1 N( I; f! Q- ]7 _* a2 j
  207. class Game_Map( n$ [1 D0 n+ G) w0 |3 K
  208.   def do_icons(refresh = true)4 M: r" Z" C# T, F8 ?8 y
  209.     @events.values.each { |e|2 M; w9 u5 \  E/ X
  210.       next if !e.list
    6 G. }: Y7 {: L* K$ a. a
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/; I; j" l5 K) e( N( t2 R+ i9 `% B
  212.         e.icon = $1.to_i
    , f4 g4 J  [/ m5 f( I
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    + @0 t" W8 Z( x4 ]; C9 V
  214.       else
    " j# @' R  X# w, k  q- L( b8 X
  215.         e.icon = 01 O9 I8 R0 i( T
  216.         e.icon_offset = [0,0]1 x8 V% W1 N; K$ D
  217.       end
    3 ~. l' x$ H, n- [9 d" Y
  218.     }
    # b) Q2 ^) [  ]. a+ e
  219.     SceneManager.scene.spriteset.refresh_effects if refresh" h6 L9 a* e9 c4 _! V  e0 N
  220.   end" R, n, N* P! ^8 R6 p; |* W
  221.    ( Z4 N* o5 c8 C) H3 a$ B1 T
  222.    : c$ p, b4 l, y7 D0 _2 \. }
  223.   def do_shadows(refresh = true), V) x7 L+ ~7 i' a
  224.     @events.values.each { |e|# `! o9 X9 |/ m8 `
  225.       next if !e.list5 c$ F6 D: Y( d" F* d+ H
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/* o$ |1 S9 n8 O/ e
  227.         e.shadow = true
    " ]' X" D4 @8 Y4 ]  c$ h: b
  228.       else
    ' b3 {+ |! g. N/ w1 P5 q
  229.         e.shadow = false
    ) U$ v9 i6 ]$ h, K# E% _( M; x
  230.       end
    3 \' L9 B4 S; ]; u
  231.     }. p& Q& ]+ U3 x3 @+ C9 i( {: B
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    * I0 k  J# r" h
  233.   end
    , S4 K  z; D! h$ x2 ^
  234.    ( f# f& h# H$ U
  235.   def do_reflects(refresh = true)
    0 V5 n! Q6 q  `4 t/ D, a
  236.     @events.values.each { |e|
    5 x2 s4 z9 _/ H9 B5 l7 B8 }
  237.       next if !e.list
    6 v9 f) z1 D) S
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/, {% X& k. |8 v1 u" e3 `# E
  239.         e.reflect = true( S9 H% q  {4 U; t" e) W9 O7 S
  240.       else
    % U; S( D: z( D6 N
  241.         e.reflect = false
    % J1 M3 P" N, B2 S& J! l
  242.       end
    1 w1 C- N  Y- F# o/ ?/ w
  243.     }. @+ Z0 Y* Q  U+ x& Q% h: w
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    + a  E; }. F; r) Y. c9 R
  245.   end0 ^% O. U9 A( M
  246.    & g' n& E! l( f" P  m
  247.   def do_all_chareffects5 V0 o5 \; e, V8 p8 ?
  248.     do_icons(false)  u8 o( a% C  B, r2 v$ @6 {5 F
  249.     do_shadows(false). C" }: I' A, `/ ~9 ~. A- X5 z
  250.     do_reflects(false)
    ) g# W8 y! J  e) o; t
  251.   end
    - V) m- Q$ j6 C% C/ P
  252.    
    . c% }0 |4 G6 j; R
  253. end # Game_Map
    1 i2 ?, {- m* d+ d

  254. ! E) k& D. E: U" c4 v' e
  255. 2 T& h6 O! T# r/ r; A9 M, j

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-11-23 22:01

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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