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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

' \. y' \; e1 v. C" a/ b8 R4 S! \这个代码怎么用啊,有大神知道吗。我从国外找的。7 ^9 y1 }% z/ h( _
http://galvs-scripts.com/2013/02/21/character-effects/2 {4 a) j( u9 \  C
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    # D( t- z, V# y3 f  g* m6 w- x
  2. #  Galv's Character Effects
    % p) [; A! z' k- M% f( G) n
  3. #------------------------------------------------------------------------------#6 o, Z' X% S% I- Y3 b8 E
  4. #  For: RPGMAKER VX ACE
    # K: W3 H! L* L5 J0 ~* _7 k
  5. #  Version 2.1
    + i, J1 ~7 a, S* @9 X
  6. #------------------------------------------------------------------------------#
    . ~' M$ N( ?: ~' N1 @) M& s" k4 [1 U
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows2 m) I% ~/ p/ o
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects+ b- B+ w7 p5 O) s+ `5 o5 [+ E
  9. #                           - Fixed shadow facing bug' e9 _& ]4 ^8 q" t4 }- X7 M- @
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows7 ~; ]( A9 d  H5 \0 [
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows' x' p+ X% L& f& M! B0 v6 t2 x
  12. #  2013-02-22 - Version 1.7 - bug fixes
    + c6 \0 Q" s* ]
  13. #  2013-02-22 - Version 1.6 - added icon effect& }# G; b" y1 U+ A
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    3 O) a8 W- w6 U; \: O8 Y
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles# }% x. S% K3 v) E( E8 B
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    : U0 o2 u  j' c/ Y. R0 @; `4 Z
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    / @# p/ R  Z/ _, ?5 r
  18. #  2013-02-21 - Version 1.1 - updated flicker effect# t; Y  C. K% i
  19. #  2013-02-21 - Version 1.0 - release5 F2 |( M1 Z8 O5 ]
  20. #------------------------------------------------------------------------------#
    6 G% @5 O  }8 x. u% \9 a
  21. #  This script was made to provide some additional effects for characters such
    / ]+ i2 W' k/ u2 o
  22. #  as events, followers and the player on the map.
    - U, U% i: J3 P0 d
  23. #  Currently it includes:
    5 d' @% @0 Z& t/ E+ F+ ^
  24. #
    & Q! G: j, ]" d4 o' s' l: p3 X! @& r
  25. #  Shadows
    5 ?7 f0 G- D* q: C/ x' x* f
  26. #  Shadows that appear under player and events in a directions depending on$ c2 e; P0 h4 y* Q
  27. #  a light source that you choose.2 n# k9 n* c+ \2 u7 N' O6 k5 J4 g1 l
  28. #  J* b; o9 ?+ w( i2 [
  29. #  Parallax Reflect
      Y% V8 d  [! ~, e; V# M7 O
  30. #  Reflections that appear on the parallax layer for events and actors to be
    : e& ~5 o& j) c4 l5 |
  31. #  used for things like reflections in the water or glass floor etc. To get
    . O( z7 b9 v. I8 ~
  32. #  effects like the demo, you need to edit the charset graphic to make the water' ?& t& i4 r- r! t
  33. #  partially transparent.
    + \$ R4 E) z5 q# n1 A. M. U/ N8 \% s
  34. #. ]8 C" l' t7 N3 o
  35. #  Parallax Mirrors" {# v( \* g7 p) t. @/ J6 M
  36. #  Much like reflect but are instead actors and event are reflected in a mirror2 _/ q1 I3 U$ ~  ?: H+ ^
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    ; R& J. `7 j+ d5 @! A# k6 {, Q+ N
  38. #  changed so actors and events can use different charsets for their reflections$ \' K, H, m) z2 }3 V, O& \
  39. #
    * l  S. B" R4 ~# [; V
  40. #------------------------------------------------------------------------------#; q5 \6 Z2 t  m8 F: k5 A  e5 o# b
  41.   
    - |" `' G; G1 U/ N" n0 i8 b

  42. 4 y; J+ ~8 I) f4 r$ ^! t
  43. #------------------------------------------------------------------------------#7 D* \3 s. g; ~: r# ]/ c4 F: ?; r
  44. #  NEW - First event command as a COMMENT
    6 e  e! k/ S7 M, ?6 \
  45. #------------------------------------------------------------------------------#
    ) r* p. |+ p  P( G4 @7 p% v
  46. #  You can add a comment as the first event command on an event page to set if
    & N- h% h/ t; Z. _( B- O# k
  47. #  that event has an icon, shadow or reflection active. The tags to use are9 `# q! @; o+ ]
  48. #  below, all must be on the same line in the comment.
    - T# D% P& S; G$ L& W; v9 c3 V$ s
  49. #
    / q7 a& V: Z3 V1 e
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)& T9 Q2 A# Q5 ?- D) a  |6 j( b
  51. # <shadow>           # set the event to display a shadow5 B8 k0 A5 i1 A0 E5 B. w) a4 b
  52. # <reflect>          # set the event to display reflections. H+ _* w$ Z! @
  53. #
    % {, p7 q1 O1 j2 t
  54. #------------------------------------------------------------------------------#" N/ e5 K- [3 U2 j0 e4 s( s
  55. #  EXAMPLE:
    5 a" R1 u7 Y. ]" `$ w4 E
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event, D6 x+ c0 ~* _& D) k0 @" l
  57. #------------------------------------------------------------------------------#
    ( L2 o- p/ o  Y( f! |

  58. 4 A+ X5 a$ P6 [( @% G

  59. ; K) H! B, S2 M- ?' q, P* X
  60. #------------------------------------------------------------------------------#
    ' {3 ?- g& D  `9 G8 P6 I8 j
  61. #  SCRIPT CALLS:
    2 f6 X  m. ?2 P
  62. #------------------------------------------------------------------------------#
    6 O* C1 u' k" L" ]
  63. #8 N- q; P  q4 m3 x( Q
  64. #  char_effects(x,x,x,status)
    9 r  C  c- G+ k- o
  65. #
    1 G6 _+ e- c- d$ }, A& L
  66. #------------------------------------------------------------------------------#
    # X+ Q# p  V1 t5 _2 N( V9 ?- m4 k
  67. #  # each effect can be true or false to enable/disable them during the game.
    8 y. x1 y. f  k; g6 X
  68. #  # you can change multiples of effects at once, x being the effect number
    4 R8 X2 y' j& P* y; [; f
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons/ B9 d' h4 h( o8 O
  70. #------------------------------------------------------------------------------#
    1 a$ Y9 c5 g7 H# R9 r$ d  q  J8 b
  71. #  EXAMPLES:
    ) z; [7 ^) }/ G# a. e
  72. #  char_effects(0,true)              # turn reflections on. z' p) K' y; E; f. J9 F$ {
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    5 u- D8 v# m% A6 ?0 I$ D
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    8 @" S0 u+ @; }
  75. #------------------------------------------------------------------------------#3 v: P, y* |( S) c/ F
  76. #2 \8 X' X- q! d) `- O
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    2 \6 t/ a% {- T" v- Z
  78. #; M" D* t$ T! N( ]' G
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    8 y, }* N! C+ O, ]6 r; j% h& P
  80. #
    9 y* c  u8 p- s, M6 S: a- M) l  }
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset9 b: ~$ h) E7 x% \2 `7 P2 [
  82. #
    + S8 D3 h* J: W( ?! q! V! G- h) J$ W
  83. #------------------------------------------------------------------------------#2 T4 H, n- l% x# H. I
  84. #  EXAMPLES:% T/ A# X. v$ m
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite- \( _  [. I, c) x8 a
  86. #                                    # in position 2 of "Actor2" charset.
    / n6 S, i1 g) O& n4 P! z' I
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    ) ~  j, E3 k( l/ L$ ~) D
  88. #                                    # "Actor4" charset.
    % K4 O' {- q3 C
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of7 P% u) }& L7 w: o5 Q
  90. #                                    # "Vehicle" charset.5 Y3 n- E; l& s
  91. #------------------------------------------------------------------------------#( Z6 \" I7 s7 p. V7 m. z2 H% Q/ b
  92.   & a6 i3 |3 b+ K2 X& Y4 w
  93. #------------------------------------------------------------------------------#' W$ G1 w  O1 e! n7 Y$ H
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS$ b2 F0 T7 M4 s0 H# I1 o3 M
  95. #------------------------------------------------------------------------------#
    3 V% t9 Z! ?# m7 Z8 X
  96. #, a! K6 H4 L# W1 o
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off$ _. y$ o: q" ~- c) O! ~; R) v
  98. #                          # use this to specify for mirror and reflect.
    4 ~* D) }& h! o0 `
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    $ H; E1 ?" a  k
  100. #                          # to change all events use :all
    7 J5 r6 g. d% v, x! x8 T
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    ; ~- B& c* N+ l! g: u* z5 T0 E& }/ j
  102. #                          # it 0 for no icon.% y. E# }* L* p( s: u3 j
  103. #- k. e+ f" y2 ~5 N1 ~& d
  104. #------------------------------------------------------------------------------#' Y) {9 z9 |% j2 ?- O: C4 T# c7 q
  105. #  EXAMPLES:
    / r* G% R7 F$ t* _$ w# l
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON# [: p6 \7 Y! N) X
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    8 a1 X  g+ M2 x
  108. #  reflect(:all,true)      # Turn all event reflections ON
    ; ]# H+ W7 E- b1 P
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear- Q# K6 w) E3 ?
  110. #
    . L- V4 l: X3 `0 w: J) L* I- W
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering7 }6 ~5 ]9 Z7 l( d6 V7 o9 \: P
  112. #        a map. This is a design decision to try to keep lag to a minimum. You: l$ s. L+ M0 d) Y; h; g  s
  113. #        should use these effects sparingly and only activate them on events
    3 @- `; |; e9 d9 I  A1 W
  114. #        that require them.( [$ z/ }% _3 N5 ?
  115. #------------------------------------------------------------------------------#+ `% B! S. m4 \: G! M: j; q$ n& D, M
  116.   + H5 g3 T5 G2 S7 a) j
  117. #------------------------------------------------------------------------------#/ o  f: k3 R: ]
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    + y/ i- z3 T4 O$ \
  119. #------------------------------------------------------------------------------#8 w; G' p  b8 u# P/ |7 r1 N
  120. #7 |3 [2 ?& @, y$ ^6 X7 V' v( ?* k5 I
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default , W# c# u, Q# W  p  Y8 \
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    * b3 h0 U' g( l
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    - ?3 F0 f. ]5 i$ W9 a
  124. #
    ( R; d& e5 O) \: r$ J
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects2 Q# E( s7 d, f4 I( @
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    # w! l4 w7 `  p% m( m# f- _. A
  127. #  v_icon(x,x,x,icon_id)! O6 @* N3 e" _! d% z
  128. #: g: \) e% \  C% n7 J
  129. #------------------------------------------------------------------------------#
    - F: U4 U2 Y! g- }' }$ c
  130.   & m, [3 l  I; e1 X7 v8 j+ o( e( @
  131. #------------------------------------------------------------------------------#, e$ ^1 S/ Z& `9 X
  132. #  SCRIPT CALLS for shadow options
    7 {$ B+ F' C( R' J
  133. #------------------------------------------------------------------------------#! A+ x# Y6 i4 G$ n
  134. #
    . z3 u% [6 _; W7 T4 d% I
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the ; ?/ M% w% o. B9 Y0 L& J2 S
  136. #                              # light source number you wish to change (for
    # g* U: }/ p4 ~
  137. #                              # more than one). These are reset on map change.1 d6 v$ Z5 M( w% e
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.% o, P% I- m" u3 s
  139. #                              # This will need to be in parallel process if you
    $ E2 F2 E/ Q( e& t. H4 e8 k
  140. #                              # want it to be a moving light.
    & V4 x& u- M" c3 z+ t- n1 [
  141. #. y6 T0 M  m- q$ j# k# r
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below. P3 N: M5 m; ?/ s2 O: X
  143. #
    - ^* i# z6 d' K9 j6 R! w, P$ g
  144. #    # intensity = opacity when standing next to the light source (255 is black): B1 J$ d6 B2 R, H, B5 G8 T, W
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    0 |6 u3 Q" ]. @! `' C' ]
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.% F6 w# V' f$ p6 L; w
  147. #9 R1 W3 f. W# j; F
  148. #------------------------------------------------------------------------------#
    - f: {$ ^/ a; X, L
  149. #  EXAMPLE:
    * k& o# P" d; J) G8 ^$ M
  150. #  shadow_options(80,10,false)    # This is the default setting.
    3 R& u# m# j+ G* v- P
  151. #------------------------------------------------------------------------------#- x7 O, Z( N- t) Y
  152.   
    / |: `5 N% d- c3 a- M1 a, F
  153. #------------------------------------------------------------------------------#) d# [  h/ Q2 b: O. E4 O5 y- O
  154. #  SCRIPT CALLS for reflect options
    + E- O! M& K5 Q- M
  155. #------------------------------------------------------------------------------#7 T2 I7 t+ k. [: c! X& Y; I) D
  156. #+ r% {0 [! C  y$ c3 b
  157. #  reflect_options(wave_pwr)
    ( }2 W7 b' E8 S6 L1 m$ Q
  158. #
    0 [! J3 W' ~2 f0 q
  159. #    # wave_pwr = how strong the wave movement is. 0 is off+ ~$ V/ R. D& F. [
  160. #
    / k5 _4 f* f  M1 X: J5 z6 s
  161. #------------------------------------------------------------------------------#
    5 J7 U, @0 s/ e, b; Z
  162. #  EXAMPLE:
    ! q* ~: U9 ]  m5 H! u9 x) P
  163. #  reflect_options(1) # Turn wave power to 1
    ; t( [5 e$ D: e3 F9 z( w
  164. #------------------------------------------------------------------------------#) K3 q, y1 z. o! Z7 `
  165.   
    . [9 `" n6 h/ ^2 J* o  Z# }5 _
  166.   " `2 K, _/ v) t: M% s
  167. #------------------------------------------------------------------------------#
    ( W: R; F! \9 v3 y/ l
  168. #  NOTETAG for ACTORS4 v; a2 J. W6 q* p3 `' r
  169. #------------------------------------------------------------------------------#: X  W3 i# Y( }6 V9 u: v
  170. #6 y* t/ j( f  j" ^
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    6 l) T' o0 I8 t6 M: q6 d
  172. #0 \" n" r% R2 N. w4 `
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
      z4 Q5 F, f& V  E' B! Y
  174. #                                  # and use the character in position 'pos'
    * i. i: y( Z" K* x% q; Z
  175. #$ \7 T( `; q4 e( _- E& n" d5 F5 e
  176. #------------------------------------------------------------------------------#
    " r& I1 e. k0 Q$ }) E
  177. #  EXAMPLES:" a+ X: y  `: d+ b: v
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    7 N& R1 E3 U  l$ [1 x/ {: J1 A
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    " ?& t- H. n1 p7 ]9 t
  180. #------------------------------------------------------------------------------#  F3 d2 Y5 M1 B+ a
  181.   
    - Q( [9 u2 h. X. Q5 s" R
  182.   
    : n* x9 P0 w2 k4 ]; U
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    9 f* L- {+ f0 n8 t
  184. module Galv_CEffects" `/ h0 X1 O4 T( J
  185.   0 E, B0 y9 A8 e  A3 W" s; L
  186. #------------------------------------------------------------------------------#  ( g7 E) r* h, R& g( C0 B& I
  187. #  SETUP OPTIONS5 l  v3 s( o) Y( r
  188. #------------------------------------------------------------------------------#5 j( L  m- h7 u4 P7 W
  189.   
    * j  Q* \, E: W9 o) N) }  K+ r
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the, n" ]  _3 U6 Y- f) i2 ^' F
  191.                         # region on the wall you want to make reflective (and" H5 [: [. S) m! }
  192.                         # then use tiles/mapping that make the parallax visible)2 u5 a- e: C: X/ [
  193.   ) E. y& J% d) }( a$ l: Y
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    ! l: F; u3 x; U+ ~+ y* e: o
  195.     2 o2 a8 s( ~2 q, T8 g/ W
  196.   REFLECT_Z = -10       # Z level of reflections" |( y1 \3 {0 B" b
  197.   SHADOW_Z = 0          # Z level of shadows
    ' O; h3 {2 T* N. b5 b4 v# I8 Y
  198.   
    ( Y( ?( k. x. ~! f, G
  199. #------------------------------------------------------------------------------#  
    7 S$ P1 w' |2 K# t+ \# O! y
  200. #  END SETUP OPTIONS
    ' s* D8 j4 Y: X( r9 q! s; M
  201. #------------------------------------------------------------------------------#+ L# ^+ m5 E8 D" Y7 _: f
  202. end& N7 h- a, D4 L: w# ^9 Q
  203.   
    $ `9 G, n, X9 m$ ~1 y
  204.   9 i0 q# e& x1 }4 l9 _+ r6 t
  205. , G, I* {% J1 F$ O1 Y. m; B- r& @' ]

  206.   w9 q. {8 R& K9 K, e
  207. class Game_Map; Z+ U( e' T$ L* B& v" A2 a: x
  208.   def do_icons(refresh = true)
    ! G9 f6 m2 d) p5 U! t8 |
  209.     @events.values.each { |e|2 s0 B4 L8 r4 c8 F1 b3 K4 g
  210.       next if !e.list! I4 J+ ?9 \9 K
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/) k- |! R0 j; o6 u
  212.         e.icon = $1.to_i. a1 C/ K, s3 b5 W) D* ^* i
  213.         e.icon_offset = [$2.to_i,$3.to_i]. y% G" j4 u' H$ ~
  214.       else
    , B6 q3 z4 h* J- Y! c
  215.         e.icon = 0
    ! g! X% K* j. I8 n
  216.         e.icon_offset = [0,0]
    : E/ i& O) T- J. {  ~: p
  217.       end6 |9 q+ c/ J2 n6 {5 N' q, A
  218.     }
    % u$ F) y0 B2 h# s4 e9 R+ H
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    # W; X* L8 H' U. e5 S
  220.   end
    / {5 N( ~& L9 P- p' l/ @
  221.    0 v4 R) n1 C# ^4 h& z8 g; k
  222.    
    1 q  H( s  |  I
  223.   def do_shadows(refresh = true)
    4 @8 i, ?- p+ i5 G; m& w4 o
  224.     @events.values.each { |e|
    ' `; ~+ h/ R" O5 _
  225.       next if !e.list! L) u: T- {9 ?0 A0 Z8 {- u$ s- T
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/) z" }2 V0 k6 e4 b, E. k
  227.         e.shadow = true% ~% ~6 O/ P% Q$ f" b' P( }5 ~
  228.       else, _# N* u- x- {" w7 t" S5 L
  229.         e.shadow = false% b/ L5 b+ V' V1 ^- T
  230.       end
    " ?. i4 \! m$ u4 g1 p* K/ T# Z* p
  231.     }
    - b+ q4 t* A8 i7 c" E
  232.     SceneManager.scene.spriteset.refresh_effects if refresh8 d; j" o/ F# Z$ x( u- H' m
  233.   end
    : h4 _5 y6 A1 d$ Y& e5 x, c
  234.    9 P9 b1 F6 y) i( }0 r* G
  235.   def do_reflects(refresh = true); t, j. T- z' |: \
  236.     @events.values.each { |e|+ J0 f- b- N- b0 e& M% i
  237.       next if !e.list1 @" P7 }1 S8 ~. O! [
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/0 q9 m' M+ \  |% M
  239.         e.reflect = true
    ' F8 a$ O5 D; q- U4 o" G
  240.       else/ l! h3 _4 e6 Y# M3 p- @( h
  241.         e.reflect = false, M) Y# K, s& C2 q4 e# V0 t  Q! B
  242.       end
    1 n0 O% i7 m6 l4 K, M% l
  243.     }; h  z: m/ D2 U6 S6 I
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    ' u) e  v5 V7 W) L/ P1 R+ I
  245.   end
    , ^8 W) ~; h) t; Q' U/ g6 a  j* {
  246.    * D+ j2 D, Q8 B. u
  247.   def do_all_chareffects/ m; O* S+ F3 p) c% ^# \
  248.     do_icons(false)
    & P' o# m8 n, y% g$ e$ i
  249.     do_shadows(false)
    ' x1 j  v. U  O* a
  250.     do_reflects(false)8 T( k! L  K3 y9 D" O5 W
  251.   end" O- r/ [4 i/ L( V$ m  ?
  252.    
      @. h+ U/ s" r2 R3 [8 M7 f/ K9 a
  253. end # Game_Map/ c# U7 d* Y$ b- ?" P
  254. # f0 }+ q# y% v$ C1 W6 ?. o
  255. & f2 D1 q5 q$ p% X; |0 r% r

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-6-5 22:40

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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