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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
- _6 V: Y% G1 J
这个代码怎么用啊,有大神知道吗。我从国外找的。: j9 c: S$ {. W! j
http://galvs-scripts.com/2013/02/21/character-effects/0 |* E* L8 I8 s* I7 `' m' I4 t
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    ' a- n/ G" E! O/ M+ t1 g6 Q
  2. #  Galv's Character Effects+ F: @( w( G* [# C
  3. #------------------------------------------------------------------------------#: @0 n, D* {; L1 r9 w6 B
  4. #  For: RPGMAKER VX ACE
    / {" O' V$ F2 \: u  J
  5. #  Version 2.1$ d# F: q" W7 z/ b( P" Y1 C
  6. #------------------------------------------------------------------------------#
    ; F* S4 ]6 w  |, V* d
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows' }1 O# j8 k/ L" t
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects' W; C  ~7 r: }  s' u2 J
  9. #                           - Fixed shadow facing bug
    , Q3 a' C0 e, x
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    : T3 `8 t. F7 E! l- Q8 C5 x# D7 L
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    * N# I6 q6 u& a7 I
  12. #  2013-02-22 - Version 1.7 - bug fixes
    5 ~% O1 w- |% H' N" U% \* \( `
  13. #  2013-02-22 - Version 1.6 - added icon effect
    # O9 C. W9 \0 Z2 p' a6 ~
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps7 ?& E" `& |$ F, b( W! d, @
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles7 ~. k9 [* c6 j
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks2 u  K9 ~- s, E  l1 f, w% |
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    1 }% f7 w. N% y0 ?
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    4 p- D5 v9 Q0 x7 t  N
  19. #  2013-02-21 - Version 1.0 - release
    ; S. h  \( u6 u+ M! n2 Q
  20. #------------------------------------------------------------------------------#
    : p7 ~# u" O" }" t/ `- _
  21. #  This script was made to provide some additional effects for characters such. a1 o1 C; G2 h& W2 p( r: y* ^
  22. #  as events, followers and the player on the map.& [, K  r" x; i7 c
  23. #  Currently it includes:  X; n2 r. {" A( w7 z+ g9 l
  24. #6 u2 s- s' e! E9 m& O& U2 ?
  25. #  Shadows
    8 _+ a; m, i. K1 _
  26. #  Shadows that appear under player and events in a directions depending on
    ' G! n4 }2 l, B  q& ]
  27. #  a light source that you choose.
    . L2 O. e" _8 J. N
  28. #
    8 K% a% }" p" A0 t' {$ ?
  29. #  Parallax Reflect, |8 z) b+ [$ M. j+ S8 `
  30. #  Reflections that appear on the parallax layer for events and actors to be4 Z3 n; G6 ?% A+ ]  g. u8 S
  31. #  used for things like reflections in the water or glass floor etc. To get
    # y# D) ^/ v" M) Z- L4 R$ q- E$ L
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    , p0 a! b* E5 m, }* [! L2 q
  33. #  partially transparent.
    ; F" O$ V- P; m3 M$ h  o
  34. #( x7 G9 L8 Z' W: G$ I8 y* ?) X6 B
  35. #  Parallax Mirrors2 o, C& ~9 c! S  J8 U
  36. #  Much like reflect but are instead actors and event are reflected in a mirror, b& e4 r2 p5 V7 m7 ?9 v# ?. k/ \
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    / n, N5 R' y2 ~% O: k: w2 o
  38. #  changed so actors and events can use different charsets for their reflections
    1 `3 |4 ~& t2 Y- I  j& n6 y- `
  39. #
    ( Y1 O& Y& k( i
  40. #------------------------------------------------------------------------------## ?% p: x% x4 j2 U
  41.   
    0 X3 k' \1 z" \  @7 e; w/ f
  42. ' z  r* ?+ ?2 n( }' T+ i$ G
  43. #------------------------------------------------------------------------------#/ l) V+ @9 w6 t
  44. #  NEW - First event command as a COMMENT1 G) g5 [6 w- r/ [' C
  45. #------------------------------------------------------------------------------#
    3 @# I8 w4 h. b
  46. #  You can add a comment as the first event command on an event page to set if% j( T5 N8 a2 G
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    / {6 K) M0 B9 r" _" J/ i# ^
  48. #  below, all must be on the same line in the comment.4 {. P2 `; z6 i+ B
  49. #! _( H  J9 K; e/ a
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)0 j. Q& I; [) X$ S! T' m1 N
  51. # <shadow>           # set the event to display a shadow- B( ]2 Y! M* T! `! R9 P, r7 m
  52. # <reflect>          # set the event to display reflections
    8 ^; h1 ?" Z; G- V; w3 j3 |
  53. #
    ) l0 D0 ?* {: Q/ o2 y# W5 Y
  54. #------------------------------------------------------------------------------#: g# s- b0 ]2 D5 ]/ z! s* s$ _4 O: Y: L
  55. #  EXAMPLE:, R1 j% J- i* Q$ c' d. ]& z: v
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    ' P- E/ x7 |8 ?* b9 K8 T7 ^  R
  57. #------------------------------------------------------------------------------#' m) X5 U' |  w1 A8 I

  58. 1 z+ d2 C' x. _
  59. & N4 P4 T8 ?9 e2 |/ D
  60. #------------------------------------------------------------------------------#
    ! I- {% U  Y' _
  61. #  SCRIPT CALLS:
    1 l; g6 ~) M: w
  62. #------------------------------------------------------------------------------#
    7 F8 E" r1 L- b, V% }
  63. #+ ^+ ]. ~7 ]! D  B- {# n4 [) r
  64. #  char_effects(x,x,x,status)
    # Q% {5 \8 d6 z7 z  k9 e% O$ H! e
  65. #
    4 h" ^  K5 u3 c4 C7 M& a& S; E
  66. #------------------------------------------------------------------------------#3 ]" O0 r7 R5 H, p& A
  67. #  # each effect can be true or false to enable/disable them during the game.1 v2 D9 F- P! C4 Z9 y0 Q
  68. #  # you can change multiples of effects at once, x being the effect number/ P8 u% g3 P/ l) Q/ o. W
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    1 @& A% Z1 Z* r. s
  70. #------------------------------------------------------------------------------#0 {& Y& _" k  }$ R! v1 @
  71. #  EXAMPLES:
    " o8 ?" g+ I" S0 A$ g
  72. #  char_effects(0,true)              # turn reflections on4 l# Z. d$ N" H6 G$ p& B
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    5 Y! P% F5 W  F2 t6 y" [$ m
  74. #  char_effects(1,3,false)           # turn shadows and icons off$ \( ^2 j" ]# ~; P$ Z% _3 l" x
  75. #------------------------------------------------------------------------------## V8 y9 N$ v: {  [9 y* n
  76. #1 z9 X4 U: ]/ W
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    ( b; M' e* o$ d( {  l9 o
  78. #4 j2 E; k1 d6 ^# H
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    9 Z0 S. \5 X0 E. `
  80. #* R. e$ `  I$ ]; f2 I1 m, S
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    0 b. I- q* j4 V
  82. #  w7 k1 D: M, x4 H4 g' D
  83. #------------------------------------------------------------------------------#
    $ l& ~: z+ f$ Q$ U! f
  84. #  EXAMPLES:( M/ Z3 q, T# P! B3 j
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite0 }! l9 F0 t7 X  r' a# `  N/ k
  86. #                                    # in position 2 of "Actor2" charset.& O, J. d9 H9 N( Q+ G
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    3 a- V2 Y3 \& w% B
  88. #                                    # "Actor4" charset.9 J' G& g" S& h5 L. C9 p
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of: T8 G1 ?; s& Z4 w# P& c* R: a
  90. #                                    # "Vehicle" charset.
    / b/ }$ _* j8 U2 A
  91. #------------------------------------------------------------------------------#- E* U6 t: S, m7 y0 w, n; G* L3 u
  92.   
    & R/ h/ D$ Z1 \3 R1 _
  93. #------------------------------------------------------------------------------#, X4 W5 J% K9 v6 p9 W' }7 G& p
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS5 ?% d, Q  q: d( }* T
  95. #------------------------------------------------------------------------------#
    & F8 p" I* H9 E
  96. #
    ( y/ K; b* E# S! Y4 r
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    7 T) }  p4 S2 l7 b3 `
  98. #                          # use this to specify for mirror and reflect.* p# D! `) r  h1 V- y4 v1 n
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change* E# j. y9 F& ]
  100. #                          # to change all events use :all' s( L$ o: E- v4 U3 E4 S5 s( Q
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make; J. ^. N& s3 \$ \) B& j, Y, o
  102. #                          # it 0 for no icon./ F8 d1 B: A, u+ t$ F/ |6 n
  103. #
    ; j6 c' T% {; s5 |5 a! ~: k
  104. #------------------------------------------------------------------------------#
    5 W( N' Y: i7 J# V# X' Y1 j9 W
  105. #  EXAMPLES:
    : A, g/ F2 D1 b5 U3 ~
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON6 O0 o5 {( n/ \- h; m
  107. #  shadow(1,false)         # Turn event 1 shadow OFF1 Y( |' n% `" j3 k1 I
  108. #  reflect(:all,true)      # Turn all event reflections ON( G/ i; z  ~! B7 x9 y3 g6 V# W5 w6 X
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    - ?( ~1 c3 L6 i- p9 r  H" s
  110. #
    % @( F0 U# s7 e9 I5 E: Y* p6 ^( D( X$ j
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering; a- F1 O0 G( a8 s% G% H% z: L
  112. #        a map. This is a design decision to try to keep lag to a minimum. You2 |3 c2 Y. ?! h- ^$ ~' n9 j
  113. #        should use these effects sparingly and only activate them on events
    6 ?7 ?# ^; E$ t8 ^, m
  114. #        that require them.7 }( E( J; a# [$ N
  115. #------------------------------------------------------------------------------#
    6 M+ @  `9 b% Q$ x. o7 _
  116.   0 a! M* W$ _. K7 ^9 n4 [4 y9 s( Y
  117. #------------------------------------------------------------------------------#' t: V9 \6 b" [/ D+ I1 _+ U) W' i( `
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES& N# s) O' _* G( @
  119. #------------------------------------------------------------------------------#
    - M7 q# |' Y$ y1 n' ?, I. i
  120. #
    : q  e4 m; F5 z) {9 j
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    2 j9 g- }8 m8 G# q0 G9 Z
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off / p1 H9 t" y$ a( N* b1 z
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    / F  Z& @( P. `( T
  124. #
    * K: D1 }( |5 f+ Z
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
      _9 S8 t5 N( W: j
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
      r9 s/ O- m4 Z6 i. g
  127. #  v_icon(x,x,x,icon_id)
    6 g/ [: W# M6 l$ k2 q2 Q
  128. #' X6 Q& s. w; Y. k5 r) m
  129. #------------------------------------------------------------------------------#" Q9 h# f4 L# {  |6 g
  130.   ) _+ ^% u0 x) W0 g; [; I" N/ _
  131. #------------------------------------------------------------------------------#
    , p7 l/ Y( i0 K: B" K# T/ q( E
  132. #  SCRIPT CALLS for shadow options
    " Y# s& ?: B( \* [1 P: @
  133. #------------------------------------------------------------------------------#8 V" m0 t; R3 s  H$ T% Q
  134. #$ f8 ]. S+ C0 U# I: b: Y" _
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the 9 q- f. |  e$ U3 l3 x  n" c6 H
  136. #                              # light source number you wish to change (for
    * X' G7 H! V5 `0 }: b, S5 F
  137. #                              # more than one). These are reset on map change.
    ! g9 ^* w) d! h* V" k; i' l7 z: T
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    + A7 [2 P2 W4 |7 J# y; ~
  139. #                              # This will need to be in parallel process if you
    : s7 L: Q' s6 C6 h4 ^2 K2 V
  140. #                              # want it to be a moving light.; x, l5 ?, }' g, W
  141. #5 C: \1 D( d5 p" i% d
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    # O1 t/ W+ z* ]& J8 e
  143. #) }3 x& J# K/ i# o8 ~: h
  144. #    # intensity = opacity when standing next to the light source (255 is black)3 P" h2 W) i* i
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    ' m$ y! M9 z# O
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    ) p" [4 v4 H4 m' M% b
  147. #) s* w: S, ?% i0 ^( A
  148. #------------------------------------------------------------------------------#0 {, x$ x( P* \0 j2 V, {# L5 I
  149. #  EXAMPLE:
    2 ~# C1 |5 T7 U
  150. #  shadow_options(80,10,false)    # This is the default setting.' }: K) D( i+ n7 x9 w* r# B
  151. #------------------------------------------------------------------------------#
    1 I# v) L: n- |. ~2 K9 l
  152.   / b1 D' {3 r2 v+ {7 M* r0 M
  153. #------------------------------------------------------------------------------#( ~5 {6 J5 o. m% N
  154. #  SCRIPT CALLS for reflect options9 L# r4 u- i( Y
  155. #------------------------------------------------------------------------------#7 p3 ?8 x& V6 K2 x8 w3 D  B6 ?
  156. #7 [5 x' L* `4 R6 y: Z
  157. #  reflect_options(wave_pwr)   \' U7 V- ?* a) ^
  158. #
    2 z4 {* e5 I; `% ?1 U; {
  159. #    # wave_pwr = how strong the wave movement is. 0 is off7 ]' ?& ?& X2 n5 T% a! \
  160. #' f; W$ y3 }3 a# p2 P' G& _" |7 z( I. F
  161. #------------------------------------------------------------------------------#+ E9 L3 |$ ~; w0 ~: v; |# s7 G4 W0 @
  162. #  EXAMPLE:
    8 x$ y# \, I9 n# p
  163. #  reflect_options(1) # Turn wave power to 1
    8 q% L. H0 ]$ l7 A; ?7 W% l
  164. #------------------------------------------------------------------------------#0 r" C' O7 t+ p& B+ u8 K4 B. `
  165.   
    : P7 M' ~/ {7 T
  166.   
    8 O" d) M1 p& b
  167. #------------------------------------------------------------------------------#
    - O$ p3 f/ @5 E
  168. #  NOTETAG for ACTORS
    % K0 o& s' J8 I6 Z
  169. #------------------------------------------------------------------------------#6 N# A: ?, x+ [, R9 V- m
  170. #6 Z% M" M; v0 e+ j/ J' Q8 {0 j" c' A
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)) h# W. A1 n6 D% O, V
  172. #" x, h# A6 ^! e6 `7 q5 K: ]0 b
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    # J# o/ O' x" {
  174. #                                  # and use the character in position 'pos'4 W) ]" V6 ?/ S5 E% m
  175. #
    - J: J  d! \! g& B6 q
  176. #------------------------------------------------------------------------------#4 T0 F5 m5 _7 X
  177. #  EXAMPLES:- d- R( D" {' s5 X, c$ z7 \4 M8 y
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset2 y2 S' I# n4 h+ K' ?
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset6 L+ q; H: c( l) E# G8 x9 t
  180. #------------------------------------------------------------------------------#
      G& H( w4 W) t* A
  181.   2 g$ {, |, Y1 ?/ Q1 ?" x( P
  182.   
    : A/ ?0 a1 `2 z6 p& s& p5 U; F
  183. ($imported ||= {})["Galv_Character_Effects"] = true+ O: c: }$ s7 V7 L0 }" B
  184. module Galv_CEffects
      q/ Z9 ?2 H6 H( C' @* S
  185.   
    - X* ^, h; q& w: ]( A3 h
  186. #------------------------------------------------------------------------------#  
    # j4 R5 l7 z, w2 s/ i; {
  187. #  SETUP OPTIONS2 _/ S# A3 x5 S
  188. #------------------------------------------------------------------------------#
    1 \& O; V7 [8 w+ q8 h
  189.   3 N1 W/ n: x) S
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    % I% p, L$ B" y
  191.                         # region on the wall you want to make reflective (and
    4 v4 k9 R5 m" j+ `
  192.                         # then use tiles/mapping that make the parallax visible)3 E* [  ?% ^- V2 U, J: C
  193.   9 N+ O# O  _; @2 }, }% t+ w' V
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters/ D% j: \; }% s; c
  195.    
    1 e, H# Y$ Z  ~& Z
  196.   REFLECT_Z = -10       # Z level of reflections) [+ Z1 L  y& @' Z- v% Z3 g* P
  197.   SHADOW_Z = 0          # Z level of shadows
      L3 P+ [) I. `) E
  198.   
    + ?% ^* o! K3 T8 H
  199. #------------------------------------------------------------------------------#  3 l) ~0 A" K4 m( ?  X3 k+ q; B% g$ _
  200. #  END SETUP OPTIONS
    2 M& e3 F6 H: N; I; Z
  201. #------------------------------------------------------------------------------#
    # f5 c0 j, B& r" `) J
  202. end
    + r$ U9 o1 G6 z; K
  203.   
    * N+ j% K  w5 X4 O% ~& A$ h
  204.   $ a% T3 g& I5 W! M% B

  205. 6 l; j8 [0 u% L$ f/ T# o

  206. 3 P) K( C  @7 J. T& c4 u
  207. class Game_Map9 G2 R/ h4 b. b( Z, a, P" k+ P
  208.   def do_icons(refresh = true)3 v( }0 n6 K. E9 ?* C
  209.     @events.values.each { |e|
    + }" ^' d4 |! T" e5 @( V, \8 r: ~
  210.       next if !e.list( B& L; N! d. V' u4 ]& f
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/$ k5 I( V: r4 S: g, k7 ~  R2 P
  212.         e.icon = $1.to_i% M' t8 }, J$ p1 t' ?
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    8 e4 y( s/ J" g7 T' k
  214.       else3 R  D. Z7 O1 d  \8 V
  215.         e.icon = 03 S( J0 P3 R$ F( m
  216.         e.icon_offset = [0,0]1 ?) D$ p1 `0 X, ?
  217.       end
    ( x3 ?# i$ ^( M% [
  218.     }! y8 [; ?. Z3 k& |) @9 _
  219.     SceneManager.scene.spriteset.refresh_effects if refresh; ~$ _* |; f* @. d# E" _
  220.   end! Z9 L/ p! E- v
  221.    
    2 Y/ i' t1 Q+ H& a# p  Z
  222.    
    ! J3 F: p' {9 R) D8 B$ H9 Z
  223.   def do_shadows(refresh = true)3 q+ O) L+ p- I2 T2 l# j
  224.     @events.values.each { |e|! Y, B$ A4 P9 ]- s
  225.       next if !e.list
    2 b7 B7 E5 K9 v: k$ _8 P" e
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/! J" o" N) [9 w. X% A" F
  227.         e.shadow = true
    4 c* t& b; g$ x- U! n: r" h
  228.       else0 g9 ]$ L( s( E5 p- F
  229.         e.shadow = false% a: _/ `5 \( N6 k& j3 y
  230.       end* A1 e2 k+ ^9 c6 g& }' `: R
  231.     }
    " ]5 _. k$ T8 J0 E
  232.     SceneManager.scene.spriteset.refresh_effects if refresh, w1 L5 }$ b9 q
  233.   end
    + G+ f# S5 V% N
  234.    
    " ^3 ?$ ~" Y1 z1 W! Y
  235.   def do_reflects(refresh = true). z; a" @6 q7 ^8 B" ]
  236.     @events.values.each { |e|* o/ |* q% a! F8 }0 s, t; _$ m
  237.       next if !e.list) {+ D. M0 [, R0 b  K
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/9 v. d1 n% l2 d3 N" p1 N/ f
  239.         e.reflect = true6 f. S$ W8 l- e" R. f
  240.       else' r1 n5 u) ~$ l- d' C
  241.         e.reflect = false
    ) T! A; Y" T- v, r$ A  g3 I, h
  242.       end9 }$ x# X. V$ V- Q
  243.     }
    * w7 \' _- ^2 H/ B; Z6 W4 H
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    0 j. b9 \* J* ?! s2 ]8 c1 H
  245.   end$ |% R+ D7 t9 U6 x6 k" ?, N. M
  246.    
    % o2 W* v3 t2 Q1 H
  247.   def do_all_chareffects
    5 i8 l& n5 W6 C3 s4 L
  248.     do_icons(false)
    % E$ W5 n0 w9 q+ y: Q7 a
  249.     do_shadows(false)0 s+ _, h- b% ~6 ?3 T# R9 k  Z5 ~1 W, w
  250.     do_reflects(false)
      v7 z" L( [- e# r
  251.   end1 t# H3 N) K0 X6 e9 R. L
  252.    + V) r/ p: J: u  U0 U# b% J  J: x
  253. end # Game_Map  C0 g( i$ l6 D) t% a' f; ~
  254. ) @, d: q5 X/ A& B# T

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-7-22 05:21

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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