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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

1 O/ s# e6 r2 X: L这个代码怎么用啊,有大神知道吗。我从国外找的。
% W- \+ W. F# x* Q  _" thttp://galvs-scripts.com/2013/02/21/character-effects// F' v$ ]( A$ D$ {7 n% _3 j
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    3 f4 _( o  c; l  r) [( l6 I
  2. #  Galv's Character Effects
    $ h* c; m% i* f
  3. #------------------------------------------------------------------------------#
    + W2 C2 a5 Z6 o) F! R' {' m
  4. #  For: RPGMAKER VX ACE
    - m: J! d- y& c" Y% }
  5. #  Version 2.1% U  y. }( O" t' F+ M4 a
  6. #------------------------------------------------------------------------------#
    & Q+ S4 b) W" D1 G4 Z
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    ( n  q7 r) P$ L" t2 S4 O
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects2 m! C7 E0 t2 c
  9. #                           - Fixed shadow facing bug
    + k) v2 O, R0 d( @* J0 U( P+ A
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    6 m$ j4 i8 T" h! H6 \
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    - x" y% r; Y: b. n/ g/ t
  12. #  2013-02-22 - Version 1.7 - bug fixes$ L1 X7 i  ~' E9 J
  13. #  2013-02-22 - Version 1.6 - added icon effect6 @" Y0 D! Q9 R% g
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    7 Y5 U8 I$ }0 f8 Q. N4 H) X
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles7 M) L% m0 J: L1 o6 o& p. L
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    * D" S# O4 B+ n/ b2 r
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)6 x) V$ x8 y% B& x/ j! k
  18. #  2013-02-21 - Version 1.1 - updated flicker effect7 G; n! u( q5 Q$ Q
  19. #  2013-02-21 - Version 1.0 - release
    & Z$ c0 N. u# o4 E) W3 K$ H
  20. #------------------------------------------------------------------------------## p" o! C1 m  Z* O
  21. #  This script was made to provide some additional effects for characters such
    2 B/ t& u; H& T5 Y- q
  22. #  as events, followers and the player on the map.
    ) a( J- I1 p' |3 d( Q/ h1 C
  23. #  Currently it includes:& X! t( H  P- U# |0 ?2 u
  24. #
    4 z" D! N# Z  u! j( a
  25. #  Shadows
      Z. U0 I; l9 {9 ~4 p# h, b+ Y4 l
  26. #  Shadows that appear under player and events in a directions depending on# B+ d3 R! O" \; z  o- S
  27. #  a light source that you choose.* h+ l/ c* a& o0 F) Z4 q
  28. #
    - z$ F1 m! ~* F4 v  B% D7 ~
  29. #  Parallax Reflect
    $ k- ]# F: G) p
  30. #  Reflections that appear on the parallax layer for events and actors to be
    ' E2 \. u5 D- d' {
  31. #  used for things like reflections in the water or glass floor etc. To get
    ) ~% l/ k3 O& P7 q7 s$ f' N
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    * M3 c1 G# o0 L" a: m' ^
  33. #  partially transparent.
    - B" U1 R2 Z* u$ Z$ Y& }7 I. B8 t
  34. #
    % o! Z2 I6 i& p" w/ j$ P
  35. #  Parallax Mirrors
    7 A  q6 p1 |, H5 y9 h7 s
  36. #  Much like reflect but are instead actors and event are reflected in a mirror1 M0 q* y! h: N% b9 W! N$ a
  37. #  on a wall designated by a region. Both mirror and reflect effects can be7 z# e! ^- A3 p  K2 I. e
  38. #  changed so actors and events can use different charsets for their reflections7 p6 K7 o+ a4 r$ q+ b. M( Y) n) L9 O% s
  39. #
    5 M$ a& Q8 E5 ^% h# G
  40. #------------------------------------------------------------------------------#
    - }" s) r: }* h; j1 S7 @, ]
  41.   + g! L( w4 H# Y
  42. 6 B4 q5 i9 Q* e; S
  43. #------------------------------------------------------------------------------#
    " I! r* E% y% T  G# s: ?  Z* N
  44. #  NEW - First event command as a COMMENT8 T8 c  U0 O; C0 J" T. a1 L3 Y2 b
  45. #------------------------------------------------------------------------------#
    % @' B! M+ A9 A4 D1 O
  46. #  You can add a comment as the first event command on an event page to set if
    ) P/ J6 ]# s) t
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    6 x; a% R$ o: B, }# o* e  i* R
  48. #  below, all must be on the same line in the comment.
    / i5 Y' t3 e% Z8 s% p/ w
  49. #2 D2 e5 Y+ [0 S3 a. R
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)2 m( K# m" h8 Q, f7 O' ~. l
  51. # <shadow>           # set the event to display a shadow
    ( K; G1 s$ g9 p- e: s" H! Y1 r
  52. # <reflect>          # set the event to display reflections
    7 H% g; W$ I6 s3 N
  53. #
    - g; E' p# U8 c# s* a
  54. #------------------------------------------------------------------------------#
    ) Q. U. [$ W* m# k: D( o$ k
  55. #  EXAMPLE:9 k+ i0 d% q1 v
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    4 c% ?( C% B. y7 Z* y! w1 Q1 l; O
  57. #------------------------------------------------------------------------------#& Q2 A4 ]- ?/ A5 F: y- ~  R
  58. 8 B# L5 }# d; T, D

  59. 5 h/ |8 L" p9 ]5 w+ d& y. R
  60. #------------------------------------------------------------------------------#, A: S0 u7 T6 U6 v* \( f9 ?
  61. #  SCRIPT CALLS:+ o$ ~% w0 F) C
  62. #------------------------------------------------------------------------------#9 e( R: C" p9 M0 V$ i/ \
  63. #
    0 }% [+ O, x7 v" ]4 }7 E; k
  64. #  char_effects(x,x,x,status)
    2 [7 [) k1 g+ T$ b' C
  65. #" B4 L+ N) h0 r3 U
  66. #------------------------------------------------------------------------------#  b6 A# S0 o+ |0 E8 ~9 b. m
  67. #  # each effect can be true or false to enable/disable them during the game.
    . }8 D. [* n. z7 a. b6 K
  68. #  # you can change multiples of effects at once, x being the effect number) n, c, x4 N, R' o$ N0 L4 L7 U, Q
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons1 R$ Z  W1 P: d/ [% i3 V1 l
  70. #------------------------------------------------------------------------------#
    8 A# y  R) r* ?* }
  71. #  EXAMPLES:( K3 @$ G) j* N0 Q- s2 |1 q
  72. #  char_effects(0,true)              # turn reflections on
      U: E+ J2 I& F4 v
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    - f; I' y6 E9 ^
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    * z4 X+ V" P/ O% ?' B+ K2 M
  75. #------------------------------------------------------------------------------#* o" g4 a+ r. g& X: @0 y; v
  76. #$ y* E* P9 ]+ d. D+ Z
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    4 s) K4 \: Y9 H' k6 o
  78. #$ U2 D1 C& M$ W' G1 A" x
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    ( @7 s! w3 v5 H' E. \4 l& Q
  80. #
    % d! Y3 K; j, |
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    ( ]8 ^( u4 `6 G: G7 X
  82. #7 A) f( Q. O' O; r2 F% k2 G
  83. #------------------------------------------------------------------------------#8 L2 h$ W; Z6 E$ \, _' l# L
  84. #  EXAMPLES:
    % ]! v, \: k$ Q! i: B
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite+ m9 ?+ l/ q5 U; E! A0 V, V
  86. #                                    # in position 2 of "Actor2" charset.
    : J: y# x6 P) G% d4 ~2 [
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    1 p) i- ?7 O- ^
  88. #                                    # "Actor4" charset.& w) R7 }" W# M( W" y
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of- _; b3 C8 \3 c8 X0 A: B8 Z" K
  90. #                                    # "Vehicle" charset.' S/ M/ D4 L( q7 `
  91. #------------------------------------------------------------------------------#
    . u- a2 `3 |& O+ ]
  92.   , n+ A$ v% Q' ~
  93. #------------------------------------------------------------------------------#
    . o0 F! P! l0 }  H. N7 Z
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    & F% Y7 H! \, y1 W  S
  95. #------------------------------------------------------------------------------#" s! c1 y$ |$ W' Y% @- y- ?* q2 _
  96. #
    3 P. m$ }! }9 H  b( }
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off% W* y' F2 [' s. e4 N, H
  98. #                          # use this to specify for mirror and reflect.
    ! f  m6 N# i% u/ `
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change" L! U" r7 J( Y: g$ u- W
  100. #                          # to change all events use :all( q) j8 M& p4 K  B- {' B
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    : O3 R8 R: Y& e+ H* v( U% m
  102. #                          # it 0 for no icon.$ |( E5 Y4 y7 R6 `1 q' t
  103. #6 v+ V! n4 q/ J7 V; T
  104. #------------------------------------------------------------------------------#, i# n. l# y' f' n2 N7 {: r% W
  105. #  EXAMPLES:" {5 h. P7 W" O
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON* L" y5 l7 J5 e: s* O# [$ E0 Z# A
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    ' [7 E$ v& @- P
  108. #  reflect(:all,true)      # Turn all event reflections ON
    ! X4 n- R) i* |
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear3 l2 I0 I' L# N! X
  110. #- Q* a! \8 Z% x* f/ c
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    ; m) ]: z3 [9 I$ H
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    1 Z! v; Y7 f9 B. o8 R' Q' S
  113. #        should use these effects sparingly and only activate them on events
    ! j  e7 s/ C: L- n4 [9 [" f5 T
  114. #        that require them.
    ( l# \. {% ]: I8 }+ r% L/ d
  115. #------------------------------------------------------------------------------#3 o3 j5 r4 n# Y; ^$ O9 k2 E9 v
  116.   
    ; f9 w* U& ?4 Z8 \9 x1 u$ m
  117. #------------------------------------------------------------------------------#
    ! B( n4 E3 R% y) a
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES' q3 ^! d* B- A  \3 J
  119. #------------------------------------------------------------------------------#$ h- Q' e7 T' L% @
  120. #
    7 \/ a% o, U$ e5 V6 H, j
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default ! v9 z! P# S: \5 u
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    & H! d1 G' Z1 w) w9 f
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    , F2 P0 N) `% D, d- r$ ?
  124. #) }- O9 {: A5 g4 _3 G9 Z
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects8 A. V* o! O' o2 ?
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.5 J1 g% X! E7 P4 ]2 \" P9 z
  127. #  v_icon(x,x,x,icon_id); O: d9 t7 M* K1 A+ a
  128. #
    ( p' \. J0 |# n) ~
  129. #------------------------------------------------------------------------------#" M# L* O! b6 A& x4 o+ ?0 p
  130.   ! d1 W8 f, K* ?: N2 l
  131. #------------------------------------------------------------------------------#
    " U5 X; X# f7 ^. W) o4 t
  132. #  SCRIPT CALLS for shadow options$ |4 F/ `8 u( ^' ~, J; A
  133. #------------------------------------------------------------------------------#6 J2 `" m% N+ F) J+ s: d
  134. #; _) ~' [7 V. o' N! T; I
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    . D0 u6 U/ J) V) c$ b
  136. #                              # light source number you wish to change (for% ?; G) G( v; l( e2 Z# d
  137. #                              # more than one). These are reset on map change.3 P$ U- D; m+ `2 |: G7 z
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    - x) o' }* l! ~& i( S4 i( ~
  139. #                              # This will need to be in parallel process if you- h* W7 m8 w$ S, a+ W+ V
  140. #                              # want it to be a moving light.
    2 E# p; h; s9 k9 g6 r6 |
  141. #
    + u( R( n; Y0 z- O, c! H$ p' H' x2 ~
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below  F; U5 W7 k% f2 T+ z$ s& Y
  143. #
    7 I, r* y0 d2 k
  144. #    # intensity = opacity when standing next to the light source (255 is black)3 H& _# q; N# G( z" ~# U5 S
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    $ s- U! ?# U% Y7 P! }( b3 @
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    5 U! O# H! ?9 h# l* Y
  147. #
    1 |6 f( \9 o6 y! |
  148. #------------------------------------------------------------------------------#4 A( G( n* m; H9 \
  149. #  EXAMPLE:, I) z& a3 G. D4 _8 S5 u2 B5 v
  150. #  shadow_options(80,10,false)    # This is the default setting.
    + ~6 N& N1 d0 C
  151. #------------------------------------------------------------------------------#
    9 j2 r6 B6 v7 D- M
  152.   4 ?( a+ [) Y6 n" y# s- o
  153. #------------------------------------------------------------------------------#, [" Y; ~* n7 g$ Q
  154. #  SCRIPT CALLS for reflect options
    2 i: ~* j; l/ T; \0 Y1 @
  155. #------------------------------------------------------------------------------## f2 Y* J: F0 c% Q2 U
  156. #
    2 S4 F2 z. I8 @+ o
  157. #  reflect_options(wave_pwr)   A! ]: A7 b2 {7 z  ]
  158. #( ~/ D- a) w+ N4 V$ e
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    ( l, K+ C, S' S7 x( }% V. x
  160. #- \5 ^9 M4 p) o' \7 s$ S
  161. #------------------------------------------------------------------------------#% L5 L& T" Z& U( k$ p
  162. #  EXAMPLE:
    - T$ |' o+ L# O& l: g2 C
  163. #  reflect_options(1) # Turn wave power to 1
    - T4 ]1 z  H/ K  l+ w. ^
  164. #------------------------------------------------------------------------------#+ A! f2 S  P; S+ Q, z
  165.   
    $ V8 g5 D$ a; k5 d/ `8 b
  166.   - F: v( K4 I- k( _) q
  167. #------------------------------------------------------------------------------#
    6 G: l# [0 w6 l( ^  r9 z7 h7 R
  168. #  NOTETAG for ACTORS
    6 h% J( C* q6 T$ d% e# ]
  169. #------------------------------------------------------------------------------#, L; E7 Q) @! J2 n' C( p" m% V+ P
  170. #" t. Y, @# h; v
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)$ P, j% D0 v( `2 W
  172. #
    - h  K5 q/ m# c) H/ ]+ |
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections  N5 q: V! l* j2 v
  174. #                                  # and use the character in position 'pos'5 ?0 o! {# Y1 ?& Y% @1 \2 G& f
  175. #
    " P/ A) j3 q9 Q" z
  176. #------------------------------------------------------------------------------#/ j6 r4 M3 z' F6 Q* a
  177. #  EXAMPLES:$ t+ P5 l3 h/ b0 ~2 g- J7 `! U
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset* [/ R/ j0 N- k6 [* {
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset8 X& W  C' `% M7 I. _
  180. #------------------------------------------------------------------------------#( E% w$ y1 C% n! h8 J1 k
  181.   3 |7 q! k3 v; T
  182.   
    1 K" J5 w: T9 b: F; N
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    0 e9 w4 D, X3 m. e2 T8 P6 ?
  184. module Galv_CEffects& G8 w3 o$ b0 v$ _$ J
  185.   
    ) E  R5 d3 i, W$ P" W
  186. #------------------------------------------------------------------------------#  
    # I" T9 h: q% p) L$ g1 e
  187. #  SETUP OPTIONS
    % D. L3 A. D( n7 k
  188. #------------------------------------------------------------------------------#! V0 d4 a: c: g+ A# }: X
  189.   
    4 o5 R% L; R* y4 Q) H  o% ^1 i$ c0 n
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the- M7 O5 P6 t$ L
  191.                         # region on the wall you want to make reflective (and
    4 o+ z# i$ ^6 C$ z& Z9 r% o8 |* c
  192.                         # then use tiles/mapping that make the parallax visible)
    : [3 O8 n& x" R) V2 x6 C
  193.   
    ' M/ E: `" ]/ @8 Q
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    . X& A1 t+ [6 @/ ]
  195.     1 A% n( G2 m, y6 v- z7 o2 T3 ?& {
  196.   REFLECT_Z = -10       # Z level of reflections
    * C$ p3 G* @9 y8 O  u# W: P. w
  197.   SHADOW_Z = 0          # Z level of shadows" X5 [/ S' G, X$ k
  198.   8 ?% H: ^# c* C/ N$ `
  199. #------------------------------------------------------------------------------#  
    # A2 K$ L* T5 c+ a: I
  200. #  END SETUP OPTIONS" {; o; j) `' L, U9 T' U
  201. #------------------------------------------------------------------------------#
    1 e5 x- G* f9 f7 Z0 L5 O
  202. end% \! r' B1 U! [; t0 J& ?. g
  203.   
    2 j4 U+ R0 W9 f7 v4 p
  204.   ) d' Q  I0 k, p/ M

  205. 5 p& }" ?3 G5 P) e. Q2 Q& i
  206. - L% f% o. M# ^+ ?: m2 G
  207. class Game_Map
    # E. _+ b. D. l* N% U
  208.   def do_icons(refresh = true)
    2 }* k( `8 O9 E) M1 i* M* F
  209.     @events.values.each { |e|
    2 \+ |2 B, A9 h- Y
  210.       next if !e.list5 J; K" N4 k6 X% ?
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    3 P8 Y& i" |8 I) T
  212.         e.icon = $1.to_i5 i2 L8 i, w. b) v6 [: T4 b
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    6 t1 c& k" ~( s
  214.       else4 P. @1 S5 M9 S% ~6 E- B. r
  215.         e.icon = 0& ?- a) U- ^2 Y+ o6 p$ Q
  216.         e.icon_offset = [0,0]  s5 {* Q5 p/ @5 ^
  217.       end$ t, e% z* Q) i! a' u' }
  218.     }2 t2 f2 I& Y) S* c0 u
  219.     SceneManager.scene.spriteset.refresh_effects if refresh% W1 V# x( g: U/ W
  220.   end
    7 m/ p; L9 j' P5 b9 \, g
  221.    
    0 X# F1 a& \& R4 [7 y3 q5 h9 e
  222.    ( P* h$ G! K, s! e; w8 ~
  223.   def do_shadows(refresh = true)  k9 L& \- `  g. n* X& K6 n
  224.     @events.values.each { |e|1 ]* w, |8 J6 M. S+ e
  225.       next if !e.list
    ; V, H7 U+ L& m+ j& o
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
      O, a1 g/ k3 W: i1 P
  227.         e.shadow = true
    3 B' s0 b+ ?, Z. B" s" A
  228.       else- _' g4 Q  U; Z, X
  229.         e.shadow = false% y  U' j# w! r6 H; x- P2 b
  230.       end5 S! N$ ?8 A- e( u6 _
  231.     }* e! L6 g& C  J  \: ^: ^
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    6 Z0 `( l$ p8 D/ a2 [9 ~* P" [/ a
  233.   end
    " S5 T% K3 b0 |4 n3 a
  234.    & }' i' s+ w/ p- g! G4 {5 n7 ^
  235.   def do_reflects(refresh = true)" b5 `! F' b) f3 B9 l
  236.     @events.values.each { |e|' D9 N, B9 s3 z+ U3 i: a% r
  237.       next if !e.list& s& G9 L5 J7 {# F- ]) b
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/# I# e" l" Q+ n3 N
  239.         e.reflect = true) g+ J" o( X: Z# H2 D
  240.       else, W, B! Y/ E; ^, `6 f6 H0 b
  241.         e.reflect = false5 c( p+ F: i% t" o- `
  242.       end  _. {" c+ z; E' z* g7 y/ I- H. F
  243.     }' t/ l* A# B  t1 V  O
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    1 t) G! [% W" d- D9 O/ E, g
  245.   end
    2 N' m$ |* z0 i4 H8 F
  246.    8 k+ v% D% I3 a) ]- K& h
  247.   def do_all_chareffects
    : i" K$ j; h/ N+ B6 A
  248.     do_icons(false)
    0 }$ |# @2 d& ^& {9 p
  249.     do_shadows(false)  k, H/ X* h* W& n1 {4 w+ F
  250.     do_reflects(false)
    . L/ Q1 V- w, m, B& c
  251.   end
    1 K! k" @* K3 S. i8 {; P
  252.    
    0 c$ L5 Y% o4 S# k. e( H+ S" n
  253. end # Game_Map
    ) X5 }% X1 o" y+ P

  254. * R, f' m0 F3 z2 T) U; x
  255.   b2 L4 _# w5 s: V; e

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

使用道具 举报

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

使用道具 举报

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

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

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

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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