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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

' U! ?/ m) O+ P4 S; d) m这个代码怎么用啊,有大神知道吗。我从国外找的。
3 P" L; ]0 [, D% lhttp://galvs-scripts.com/2013/02/21/character-effects/
1 F1 N, Y  s/ A8 v是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    ! @5 \! c, G7 c. g2 _9 e
  2. #  Galv's Character Effects
    1 Q  X& \  d! H8 A
  3. #------------------------------------------------------------------------------#3 ~! I# R: Q3 M$ @& J2 m, Y' k
  4. #  For: RPGMAKER VX ACE% U6 n( J1 j# c. z8 e" `( ?
  5. #  Version 2.1: u9 y1 Y* c( l8 s' m' j
  6. #------------------------------------------------------------------------------#- n/ O* L! I& T2 p% N
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    1 O$ A' L* |  z$ _( r& m+ w  w
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects- G5 i2 A6 M+ K! T
  9. #                           - Fixed shadow facing bug
    8 K9 y# g) X% r  F/ X1 L
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    4 ?* Z% m: U5 ?( Z: U
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows$ l  k( I- ^) W/ X* b& |- E# G" A
  12. #  2013-02-22 - Version 1.7 - bug fixes0 L, I( l. o  V  ^
  13. #  2013-02-22 - Version 1.6 - added icon effect; h! h" x6 t$ m9 k
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    ' Q5 c& A( h7 W& X  B
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles5 ]0 r, I  c3 ^5 X
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks" o; c  f& S# W% F/ R
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)( W6 t0 ~4 W! X" ?1 n1 ]8 b
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    # X1 u. R$ I4 R7 p$ H- n) C
  19. #  2013-02-21 - Version 1.0 - release
    + O/ t% H9 j* L+ j
  20. #------------------------------------------------------------------------------#
    : V' [) r2 E5 T' R: y
  21. #  This script was made to provide some additional effects for characters such: z+ l, R( ]1 q* O( r/ t1 l. Y
  22. #  as events, followers and the player on the map.- L8 _8 z4 c# t1 P
  23. #  Currently it includes:
    * t. k+ \! ~6 ~# }8 x
  24. #* p# z2 D" x1 R+ k8 w7 g+ x
  25. #  Shadows: Q! {# W" [' R: @0 q% |/ {
  26. #  Shadows that appear under player and events in a directions depending on
    , W! V$ g0 c' ]8 Q3 D
  27. #  a light source that you choose.) S) \$ Z! s" ^8 n0 A3 T# ?/ m+ y
  28. #
    9 `% i# g! e3 Z
  29. #  Parallax Reflect! k0 V% x6 e- B+ |) w0 H
  30. #  Reflections that appear on the parallax layer for events and actors to be- b% ]6 e2 A9 M/ b4 r9 T' c" k
  31. #  used for things like reflections in the water or glass floor etc. To get
    ; c, f. s) d& n* r* f2 F% J
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    # }: e+ I$ c/ i! [) M
  33. #  partially transparent.
    ( i/ m, F  a% g7 `
  34. #
    : {' }: \7 t3 D
  35. #  Parallax Mirrors- v! D$ V" j0 b) a- A2 ?" ]
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    7 c5 y" w- }! n# X) }, ^, ]0 d
  37. #  on a wall designated by a region. Both mirror and reflect effects can be2 ]) x$ B8 }* g2 I4 w7 X
  38. #  changed so actors and events can use different charsets for their reflections
    : }7 B! {7 E: Z+ Q5 J
  39. #
    % e1 c3 i$ e  W( S% R7 J$ h
  40. #------------------------------------------------------------------------------#
    3 X5 R1 y1 w9 c# C8 C
  41.   ; e$ H+ e" l1 B3 x- H6 i9 D5 ^

  42. ( W' N9 Z( m  G  h/ R1 x
  43. #------------------------------------------------------------------------------#1 h  W, o& o. C: t0 G
  44. #  NEW - First event command as a COMMENT
    + Q1 L1 N# v2 ?& F; B
  45. #------------------------------------------------------------------------------#  `1 K2 G" a0 C9 Z" ~- E8 Y
  46. #  You can add a comment as the first event command on an event page to set if
      @  y( C" X1 Q" ?9 R
  47. #  that event has an icon, shadow or reflection active. The tags to use are; [6 c& W: Z7 E, B4 D0 E
  48. #  below, all must be on the same line in the comment.
    3 Z: N9 r4 M  F" K/ S7 z2 S/ T
  49. #
    4 g; {8 A; d) l5 S$ x0 ^# ?
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    2 j3 Y. [1 {# [8 U* z
  51. # <shadow>           # set the event to display a shadow4 ]& Q3 C/ G) U. h0 ]* @0 G
  52. # <reflect>          # set the event to display reflections! B6 K* e, X2 s* t
  53. #
    " m- {. X; ?+ c0 X* z7 ]
  54. #------------------------------------------------------------------------------#6 G  H9 E! ^* u+ B
  55. #  EXAMPLE:
    % q+ {: M' |9 V" Y* ?
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    , G4 D5 H0 L5 _, X
  57. #------------------------------------------------------------------------------#
    8 G) [& I- p2 a5 W( ~( k/ \
  58. 8 z( M+ k8 Z, j; K! C! K

  59. " J! Y/ ]% {+ R8 T1 [
  60. #------------------------------------------------------------------------------#
    , G) }+ m- v4 W2 d, y- l
  61. #  SCRIPT CALLS:
    / F, F9 l6 L9 S9 N+ W
  62. #------------------------------------------------------------------------------#% n. }8 n$ Q) q
  63. #8 V* X( U6 P# X; u/ p0 H
  64. #  char_effects(x,x,x,status)' t, {1 X5 ?: ^
  65. #
    # ], J1 o7 g% P6 C0 K/ O
  66. #------------------------------------------------------------------------------#
    & `" y% }# q2 M
  67. #  # each effect can be true or false to enable/disable them during the game.
    8 @7 b  w7 Z7 G+ Z
  68. #  # you can change multiples of effects at once, x being the effect number
    9 ~- d) g  \5 L! }) R
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    9 @3 a5 B3 ^2 j; l2 d# e( T3 _: |3 U
  70. #------------------------------------------------------------------------------#+ @* Q. d" K7 [$ Y& ^) y! K3 _
  71. #  EXAMPLES:  V& y; f! r, r9 |, t
  72. #  char_effects(0,true)              # turn reflections on
    8 C6 m# B, t2 c0 @
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    5 o) I6 p, m7 ]  I# j
  74. #  char_effects(1,3,false)           # turn shadows and icons off( h* D) E! X! ^" W: w2 l# A* }
  75. #------------------------------------------------------------------------------#
    + \) m& l  E# {* x
  76. #
    + [* B- F& ?7 l; Q* t
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    - ~6 i5 j- R- X4 x0 P1 q
  78. #
      B" B' F1 ~8 C7 p* X3 _
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    & h5 ]- J9 L" h# g9 I
  80. #
    # V# k: U+ e: F  {+ l- v+ q6 C
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset) G' {& O4 B2 ~  q/ y2 `
  82. #( o& x% {8 N! ]: u
  83. #------------------------------------------------------------------------------#
    ; d0 v' K  ]0 p0 W
  84. #  EXAMPLES:
    : Z3 i8 b6 P' T! E+ A
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite4 i9 M6 _, e7 M# Y
  86. #                                    # in position 2 of "Actor2" charset.9 I  L1 ]; o1 S' T/ y+ l: @
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    . F  {) S$ R# Y8 x7 f& S; `  `
  88. #                                    # "Actor4" charset.
    . r4 F2 T- F; P6 w1 Q9 q/ t
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of! e8 w( w3 E6 \
  90. #                                    # "Vehicle" charset.
    0 `) `8 H7 y( v6 r6 P
  91. #------------------------------------------------------------------------------#+ G# Y# I: Y% L+ K! S( V( e
  92.   ' R6 V2 r) T1 O8 @/ t
  93. #------------------------------------------------------------------------------#% t2 c9 H* E7 ]# ]$ }
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS$ }0 w$ b2 C0 g7 ]
  95. #------------------------------------------------------------------------------#
    ! x* r/ j$ w% g  z
  96. #. U9 G8 C& m0 e2 F! U8 D7 c: }
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    - s. d, Y) V+ h. u7 f4 ~
  98. #                          # use this to specify for mirror and reflect." {$ v( ~' w+ {& ^$ k
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    9 j: L9 N  J6 p# x9 M
  100. #                          # to change all events use :all+ Z& q" R9 d5 n( N3 |
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make- X% k' {5 K; q0 ^, o
  102. #                          # it 0 for no icon.$ _4 ]% C) H6 t( t  G' Z$ S7 @6 n
  103. #
    % w) x- L' ]+ Y' H7 c
  104. #------------------------------------------------------------------------------#8 {' ]: f2 k+ n6 u7 U
  105. #  EXAMPLES:
    7 \" r8 K3 S( ?+ l  p* ?. q
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    , }, H5 i( ^5 c8 q: N% E0 y) J
  107. #  shadow(1,false)         # Turn event 1 shadow OFF2 }7 l# o: u! }
  108. #  reflect(:all,true)      # Turn all event reflections ON- \$ N$ b: n' U, |2 H
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear- Y6 C1 H: R; ~
  110. #
    : F1 k1 k% n& h# B( W! Y9 a  h
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering: J! R* e- l  j& g9 B* `* `* S
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    6 W- L+ T1 ?- J
  113. #        should use these effects sparingly and only activate them on events
    # s5 x8 ]: r9 `5 ?# e$ i3 z
  114. #        that require them.- H; k) B  b7 ^& y
  115. #------------------------------------------------------------------------------#
    ! g, t* q% C4 T& M. C/ }
  116.   
    5 W( M' K# G% y' I* N  Q
  117. #------------------------------------------------------------------------------#4 s0 {5 \. `$ l0 i% q) g4 J
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    # Z8 P% p) Q0 F4 ~' r& ~9 C1 {, a
  119. #------------------------------------------------------------------------------#" `+ [/ {1 k! H  ]8 }
  120. #
    . Q" }5 d/ P/ e: M
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default   O) v: E. N, B* M" \! J# y
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off * E( @7 ]  z& W; ?' j
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.0 d, n4 z$ s: }; w" M5 h0 S
  124. #( [: J* b% h" v- N, F9 w
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    % @* ?! b. T: k' b0 r7 `8 I
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    1 b# }' C9 I/ O& V
  127. #  v_icon(x,x,x,icon_id): o" \- g% A3 H% f; o2 s
  128. #; \. p, j3 z$ Z) w& @$ r3 U
  129. #------------------------------------------------------------------------------#
    9 s5 ]8 _7 O, C6 v
  130.   4 k6 n2 {- Y1 P
  131. #------------------------------------------------------------------------------#0 p1 B+ Y& f3 v2 m1 e: [& V
  132. #  SCRIPT CALLS for shadow options: X0 n  S' M, ~. F' O& ?9 ]
  133. #------------------------------------------------------------------------------#6 ^4 u' ^9 j& g" R2 t  P4 [3 _" l
  134. #" [$ e" V" I; W$ h/ P. o. \" s% x2 a" f
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the : J7 i' `3 p( s# w
  136. #                              # light source number you wish to change (for8 T8 t8 s9 f' ^0 R! G- }# z
  137. #                              # more than one). These are reset on map change.
    , u9 c: ]$ U) R# `' I$ {# C) j9 [
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    8 t$ S1 U% Z- D; q, e
  139. #                              # This will need to be in parallel process if you. F6 H" v4 P+ w3 V. s
  140. #                              # want it to be a moving light.
    ) h) z% _! X# ]
  141. #
    ' r: n0 }, ?! U2 w
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below8 r+ W8 m' F" l4 U4 k. _/ _
  143. #% t9 x- C+ T# s7 x7 j+ V5 s- v: N
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    5 v8 Q- M# `. N7 U
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    ) y" I5 E( l/ ?8 P8 X
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.& M4 x, [  M* ~; |, ]2 b* _
  147. #6 [3 N: t5 B/ o
  148. #------------------------------------------------------------------------------#% l9 X8 c: P& O+ ^2 T: [4 b
  149. #  EXAMPLE:) O3 x; I6 E9 ^7 e6 _! @( n* R
  150. #  shadow_options(80,10,false)    # This is the default setting.
    0 J, E  T" `/ ^1 u" J4 {
  151. #------------------------------------------------------------------------------#
    ; F' c* p* H& n! f
  152.   1 L: l3 r& P0 M9 l* x$ j
  153. #------------------------------------------------------------------------------#
    # q# k( z$ c9 U: U4 S
  154. #  SCRIPT CALLS for reflect options( z: ?$ n6 C# ^/ t4 U( I: G
  155. #------------------------------------------------------------------------------## y; ~! d& c4 E+ m% i
  156. #: @( g! ^# t; J
  157. #  reflect_options(wave_pwr)
    & C8 i( z4 H! e0 s) z0 j5 @/ g; |
  158. #
    1 a9 q9 M; _: `9 s2 t
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    + `7 a7 K1 c, G5 k
  160. #
    . j: ]' {5 U6 y2 y6 ]2 R
  161. #------------------------------------------------------------------------------#2 h. l+ f4 Q3 K/ U6 x
  162. #  EXAMPLE:
    # v4 E4 G5 r0 N8 O1 f( |* O
  163. #  reflect_options(1) # Turn wave power to 1
    ; T. a/ a& p( O
  164. #------------------------------------------------------------------------------#
    . K7 I/ W: Z! o* _
  165.   
    : {: p9 Y2 o: E1 o  M, x& t
  166.   
    , T8 h7 i) W' H0 S& f
  167. #------------------------------------------------------------------------------#
    6 x9 j2 }( z2 S9 X$ e1 @0 |: f4 }
  168. #  NOTETAG for ACTORS
      a7 k0 Q% E# C& G
  169. #------------------------------------------------------------------------------#
    ' u+ _7 O  [- J( l# m8 C5 U
  170. #+ T& r* d* ?* T' u# B) X0 L% p
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)2 i' m/ U* q' W& M
  172. #) u3 `: d& [% g( e9 N3 n
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections6 h4 d; U3 w' T. |8 {* h8 o
  174. #                                  # and use the character in position 'pos'6 U! H1 ?+ \: ?0 J0 N) B2 q
  175. #/ U( ?1 Z/ x; m
  176. #------------------------------------------------------------------------------#
    , l* y5 N7 g! ^, D$ w( A+ [
  177. #  EXAMPLES:- s# U* c4 ~5 I* \7 G, p4 e$ n3 r
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    : X2 z& \. t0 r7 Y1 X* @
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    & ]- d# h; d1 t' H
  180. #------------------------------------------------------------------------------#
    & O8 `  |, n! Z' v
  181.   
    + M# H! {0 M+ [0 v) t8 `
  182.   ' k& q+ O( [, O/ l; [( i
  183. ($imported ||= {})["Galv_Character_Effects"] = true# F  Y$ A/ O4 m/ r. q; j
  184. module Galv_CEffects
    ; ^. m9 E, f' X+ V7 W/ g
  185.   4 n4 y4 e# d& B6 A0 y
  186. #------------------------------------------------------------------------------#  
    1 a: O' k% q. Y2 N0 R  w8 Y- W5 Q
  187. #  SETUP OPTIONS
    2 b& }2 Q* I& G6 m& x, ~) o
  188. #------------------------------------------------------------------------------## T  |$ C. f5 w* |( ]5 @2 w
  189.   
    / L- ]% U  p# Y0 ?' w( c
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    / U- c7 H# z6 Y; Q1 a6 Q, K. a7 @; W
  191.                         # region on the wall you want to make reflective (and* [9 X2 H- O* O0 l3 f) Z2 h2 F
  192.                         # then use tiles/mapping that make the parallax visible)
    8 D1 ~/ v% |! s4 h0 M7 @
  193.   % z! c3 g2 g- f
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters  n/ f, R4 m/ T% Q- }
  195.    
    6 M& e1 F2 S( M, K
  196.   REFLECT_Z = -10       # Z level of reflections- N" M$ n" L9 @0 l3 I
  197.   SHADOW_Z = 0          # Z level of shadows
      Z# a& i( Q1 Q2 M
  198.   " `* Q" P+ |3 j0 u
  199. #------------------------------------------------------------------------------#  & o0 R$ H; c: @" s+ Y
  200. #  END SETUP OPTIONS
    0 v/ W0 m" E9 N5 A7 C% e' |* ?; j: Y! x
  201. #------------------------------------------------------------------------------#
    ( s+ {2 q( @' x+ C; z
  202. end% w( u* E* U8 G7 b
  203.   8 e& g, i$ }4 t4 e
  204.   8 D" }- h% a3 u" y# p  Z
  205. . Y( T* P9 ~. i( A
  206. " N+ _7 S, `# \3 e8 S, c" P" {
  207. class Game_Map
    + r" ]; S( O# e! f
  208.   def do_icons(refresh = true)
    6 r$ _: ]5 h* c. V7 Y8 @' F" h9 F" d
  209.     @events.values.each { |e|
    + t9 j& n  C5 ~. ~& ~  E" ^! W6 d
  210.       next if !e.list6 i7 `* _7 i/ g# h# ^; F2 W3 T
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    + O4 d2 i0 q0 I: y
  212.         e.icon = $1.to_i( g: e$ {5 J8 L
  213.         e.icon_offset = [$2.to_i,$3.to_i]4 v, l0 U  s* t! P1 d8 L' Y( G- m# L
  214.       else
    ( F* B8 a1 l/ ?' D3 h. ^
  215.         e.icon = 0
    , F9 s- j5 h) ^' M0 ]
  216.         e.icon_offset = [0,0]/ f8 F+ \# N9 H2 d# t4 W
  217.       end
    & h1 F2 {1 r  p- n& n: |3 g
  218.     }! i9 g9 f" A& o; M! c
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    " z7 d- v( i$ J- L  E- v! P: V1 G
  220.   end
    / z( x* D2 K' Y+ U1 p& \9 j. V
  221.    # l3 r  l% x1 b4 x
  222.    " a! o3 }9 P9 g1 m
  223.   def do_shadows(refresh = true)
    - V; C8 ~* P; X
  224.     @events.values.each { |e|
    8 x# G- l  T# y, \
  225.       next if !e.list/ |2 y. R8 I4 k6 Q6 Y2 N  E( }* B
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    2 T8 W6 l. J8 r: d1 c
  227.         e.shadow = true
    - v4 }6 v8 ~& B/ o. {
  228.       else
    4 O5 Y- s8 v% @" v
  229.         e.shadow = false
    4 ?& B+ W% _* U8 T7 ?
  230.       end- w  q, y0 g6 J- e: O2 J( N/ S
  231.     }$ u! P$ T6 f6 h
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    $ U* w  u: N: a
  233.   end2 z9 ?- v! p& Q. M
  234.    ' ~2 n* |9 p9 d: P+ S8 {$ q' V
  235.   def do_reflects(refresh = true)
    % C, v) Z" e- F: k$ `
  236.     @events.values.each { |e|
    8 j) O( M$ y2 Q& R
  237.       next if !e.list2 ?. {# q% i" m/ ~8 L0 w) z
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    + j* l; K6 F5 k: B/ [
  239.         e.reflect = true
    ) [5 N- `" u2 K7 ^
  240.       else3 b% h" |7 t1 l! Y5 m& M
  241.         e.reflect = false
    0 g  l4 f: L! r" A; W: N( n+ h8 q
  242.       end
    ' J8 y8 \$ G( ^9 b
  243.     }  U* I% @) t9 ^0 u% m0 C
  244.     SceneManager.scene.spriteset.refresh_effects if refresh" I( o6 y' b! C% P- m) @
  245.   end
    * G+ Q8 U  ?3 X' H" W
  246.    $ D7 z+ T& \& M6 N% L1 k. \
  247.   def do_all_chareffects
    0 ~" L6 K. m9 d
  248.     do_icons(false)
      {( e0 S; q; n5 f2 T/ ]
  249.     do_shadows(false)% A1 O, b" U8 P3 M
  250.     do_reflects(false)
    : r) A6 Y1 r8 w! Z: Y6 C4 `2 x! n
  251.   end" ?* l: n9 ~6 `8 u% T, B
  252.    
    ( o5 {* g: X4 s! @% W
  253. end # Game_Map
    9 j5 X5 ~+ f  x, P
  254. . K# P' D- `* C/ k% C% U3 P

  255. 3 v/ i7 R3 B, S6 q3 A1 O

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-8-24 16:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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