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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

6 i. _/ ^3 ^" y3 A; s' j) {& s6 E2 v这个代码怎么用啊,有大神知道吗。我从国外找的。
+ k% u) U1 s8 nhttp://galvs-scripts.com/2013/02/21/character-effects/1 _; G+ N" `/ T8 q9 h  I7 ?
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    6 @' c5 l: w( l, u+ m
  2. #  Galv's Character Effects
    3 j) L' \4 e2 X5 l$ c, o2 ?8 L: i
  3. #------------------------------------------------------------------------------#
    . M3 O# Q2 }5 J& }( X: G
  4. #  For: RPGMAKER VX ACE! a3 G, Z  r% }1 N1 S% w/ R
  5. #  Version 2.1) L" Q8 S$ e/ R% \! O8 G
  6. #------------------------------------------------------------------------------#
    ' s) q+ ^  b* `, y" r4 d+ B
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    # v' i! z$ W4 U+ C& e+ r0 N; I/ ~, W
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ; b9 `( i+ R$ a+ i4 ]6 \' j* |
  9. #                           - Fixed shadow facing bug
    ( M7 i/ p: c6 t
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows4 R. ^; \' m7 d! ^0 f( i8 K
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    ) ~) z  m( U+ z( d
  12. #  2013-02-22 - Version 1.7 - bug fixes: R8 y$ t3 o3 M3 l9 u4 U
  13. #  2013-02-22 - Version 1.6 - added icon effect
    3 G+ z  c; J8 O
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps' I, ^$ Q2 P" A  V
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles2 A7 k5 [4 G) [. `
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    ! \) I+ t( F+ i5 U  C# V( x
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)/ b/ a' z' I! o. P: L" s( t
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    ' Z. ^& j4 u$ b: J& B# l
  19. #  2013-02-21 - Version 1.0 - release/ z, o  C1 _2 w- \6 Z7 ^+ ~
  20. #------------------------------------------------------------------------------#3 q7 X. q; i* B# v# ~/ L
  21. #  This script was made to provide some additional effects for characters such
    - }$ z7 G2 j7 a; }; c7 s0 _  _
  22. #  as events, followers and the player on the map.+ O' g5 ^% b0 M8 o
  23. #  Currently it includes:
    # W/ i: B; U* J4 r8 j  I2 c3 M* N
  24. #
    ( V$ @6 z' |) F# @
  25. #  Shadows
    ! ]1 f  R  ^& V9 Y
  26. #  Shadows that appear under player and events in a directions depending on
    4 N: Z# E) {9 Y$ F
  27. #  a light source that you choose.( K" R% a  W! f, @0 c$ \# B1 _- a' Q
  28. #& p- W' J' ~/ {8 O
  29. #  Parallax Reflect, u0 _/ d$ y' ^) l/ ^
  30. #  Reflections that appear on the parallax layer for events and actors to be# L7 k7 p& k2 _" X' Y0 D
  31. #  used for things like reflections in the water or glass floor etc. To get& _" ^* d5 w- Q
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    5 K. |) x/ N% B% f' F0 `9 R- K9 a
  33. #  partially transparent.
    , i; c" f, W, D! f9 X8 x
  34. #
    - G: @% ^' ?! o1 ?: b# e- V2 X
  35. #  Parallax Mirrors& N. C0 R: _8 y1 H
  36. #  Much like reflect but are instead actors and event are reflected in a mirror/ O3 D* F3 e) O4 n8 o
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    1 {* c; z/ u9 D* h$ j
  38. #  changed so actors and events can use different charsets for their reflections$ h7 E# }+ u) l3 E* f& @
  39. #6 o. p1 _" H8 L
  40. #------------------------------------------------------------------------------#+ R" p, Q. D# y
  41.   
    7 J7 E9 S% R  r$ Z" J. |2 e7 d
  42. 7 ]; H* r3 V: c
  43. #------------------------------------------------------------------------------#. c# q/ y, q1 T
  44. #  NEW - First event command as a COMMENT
    % D' b" l6 B) o# I
  45. #------------------------------------------------------------------------------#8 q: M3 V" ^. B/ [4 K& l  s
  46. #  You can add a comment as the first event command on an event page to set if8 F' b) B/ \, \$ }& z1 ^$ ~  B
  47. #  that event has an icon, shadow or reflection active. The tags to use are/ b+ L2 c  a# Y* ^
  48. #  below, all must be on the same line in the comment.4 j9 X1 Z8 @  {; }0 y  C! ^: ^: N
  49. #
    ( Y" f# Y4 ]# V' i/ L/ K
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset); \% b  ]' P/ x* i  L
  51. # <shadow>           # set the event to display a shadow2 L% Q5 b& Y3 ~* z- J" x0 T
  52. # <reflect>          # set the event to display reflections7 U8 ^/ M3 d8 B; C" F: h" S/ E
  53. #  M4 P, \$ p$ {: Y; @7 E
  54. #------------------------------------------------------------------------------#- L( n0 U" F! K: Z
  55. #  EXAMPLE:; W0 m& [2 d* i# w: o
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    ' K( V) k2 |8 O0 w
  57. #------------------------------------------------------------------------------#
    4 f6 a  R! u" {" ?

  58. ( F3 Q% N/ @2 u
  59. 1 i: o% T5 ^; d; k1 \! x2 I
  60. #------------------------------------------------------------------------------#3 T8 l  v" h2 z' @- d3 t
  61. #  SCRIPT CALLS:
    ! T; F  N9 I/ `+ ?8 v, t0 V1 N
  62. #------------------------------------------------------------------------------#' V$ u2 z  b$ Y& Y! C$ v" S7 t  Q
  63. #4 g. e3 D! \8 w2 F8 s+ |9 A
  64. #  char_effects(x,x,x,status)
    , z1 e& B" e# `( ~
  65. #" _8 Y" R) g' ?) S2 u8 G# B
  66. #------------------------------------------------------------------------------#
    ! R9 G; `2 U2 m- ~
  67. #  # each effect can be true or false to enable/disable them during the game.% x! I1 f" @; Z
  68. #  # you can change multiples of effects at once, x being the effect number
    7 C7 j* \5 [+ q  m' L
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons) I* q9 |7 P  H; d6 d$ v
  70. #------------------------------------------------------------------------------#
    9 [7 z; g3 v: {! u5 N" G/ Q; I
  71. #  EXAMPLES:
    ; V% Y. ]) R4 w% H
  72. #  char_effects(0,true)              # turn reflections on
    4 p. ?4 }" Q0 ]8 N4 Y3 w7 v: b( n4 U
  73. #  char_effects(0,2,true)            # turn reflections and mirror on  e: t, k7 v( }! K0 k( i
  74. #  char_effects(1,3,false)           # turn shadows and icons off" t3 J( j5 x. g% m1 }9 {, q
  75. #------------------------------------------------------------------------------#2 j2 p- V. F# r' p
  76. #
      L8 d. T" M8 y( y; ]7 |1 c/ Z
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset  V( h9 @' C( o: k
  78. #
    & [# d) w+ i6 L) M
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset6 K# @* T3 d4 [+ _  K: |& I2 @
  80. #0 d% [7 q7 A9 v0 w" J% Y
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset) K; z* k4 O* J) J, z+ P( J+ j6 l+ G
  82. #
    3 ?8 e4 R' J& P+ J, L# Z& n
  83. #------------------------------------------------------------------------------## [7 ^3 ^& Q7 g& x& Y% H+ ]
  84. #  EXAMPLES:
    . Y9 W" Y7 X$ x; d4 i) @0 X
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite8 T9 u  y! a  v: D
  86. #                                    # in position 2 of "Actor2" charset.8 J. p* L. |0 K2 z! M& x
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    # k3 k$ z  }' N. k# E
  88. #                                    # "Actor4" charset.
    : C) o, ^7 y3 I* C6 J; Q1 N; }
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of  s, ]  T. \! C/ g7 w3 I' M1 F1 o
  90. #                                    # "Vehicle" charset.
    ) K) o: h/ i& x' d
  91. #------------------------------------------------------------------------------#' V4 P* w5 K1 i7 |1 s
  92.   - @% y( z% W& D' [& [2 M
  93. #------------------------------------------------------------------------------#: Z! L$ D+ h. j+ a0 d) y1 p# D' n
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS+ z. q% F" w' I% {- h4 R
  95. #------------------------------------------------------------------------------#6 q0 W% s/ u7 X  r8 Z: k
  96. #
    # B" A8 n! t# w4 q
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off1 _0 \3 ^$ `1 Q" `  _4 z, `3 k
  98. #                          # use this to specify for mirror and reflect.
    - g; G( b9 l8 f3 M. W
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change: v" u+ S# Y. |' K; h' B
  100. #                          # to change all events use :all1 {3 ^" }' T3 p( G7 b( G
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    6 O# n# Z. I' V) K( G5 ]
  102. #                          # it 0 for no icon.* o6 \1 S) w% Y  ]
  103. #
    ( L+ c( h# E$ q0 S) L
  104. #------------------------------------------------------------------------------#
    $ Y: Y/ j% A" ]' K; ?! y6 w
  105. #  EXAMPLES:, v! s0 T4 G# u$ X5 o3 Y
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    % T8 a# M4 G3 l( C" f4 Y4 w. t
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    , f( B* m) O0 L/ t* E8 z1 U$ G
  108. #  reflect(:all,true)      # Turn all event reflections ON
    " v' ?  G$ [3 }2 f  A: x
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear6 L3 B/ E$ I5 `7 m6 i+ p$ G" W
  110. #
    & S5 X. p1 ]- _) k5 y/ e; C
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    - N  n8 ^7 S. |7 a! `0 w( y& d+ D' D
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    & u9 u" m# v" d. ~8 i! I' H$ z  A
  113. #        should use these effects sparingly and only activate them on events
    5 a9 Q; Q6 L4 O0 o4 Q8 c1 B
  114. #        that require them.
    * L9 X6 E0 Q6 X: i1 i) z
  115. #------------------------------------------------------------------------------#
    8 f4 }' W! d3 K2 N+ ?" Z8 e2 m
  116.   . E6 y& f& C& r' ?$ V
  117. #------------------------------------------------------------------------------#
    6 c1 _/ V/ S- F% f3 \0 Y
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES" L( V9 \3 z) S- J; v$ K- J/ G( e
  119. #------------------------------------------------------------------------------#: x& x) E5 p3 Q3 t
  120. #  j$ x5 l; ~. l8 m! C+ e! e
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    9 ]7 U4 V7 N& h+ O4 q, \4 x
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off ( \; ^; k  G( K8 T9 ?' _7 b
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.; c- X* X) a# R7 }' W
  124. #' E2 i+ A( S3 ~$ R6 R* b/ P( Z
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    6 O1 C, J1 e6 Q% V) ]+ Y/ u
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    / F# G' g- `6 B5 B" `' r7 K
  127. #  v_icon(x,x,x,icon_id)
    + c2 v1 H- @3 w0 N" R# ]( z
  128. #
    ) w, w6 D; T. }3 V% ]" y8 E
  129. #------------------------------------------------------------------------------#
    + ~% M$ J/ C6 d
  130.   6 p  R( x8 V' _. t' t) d
  131. #------------------------------------------------------------------------------#  k+ ]  \6 L3 I- Q  K; O3 N: H
  132. #  SCRIPT CALLS for shadow options
    ) o( ~! q4 j2 I; z* P+ D6 j- F6 d
  133. #------------------------------------------------------------------------------#
    ' E# f, b1 A0 p  f6 K* f: q& q
  134. #! S- k# s! ]% d7 ]/ H3 p, u9 K
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    + _# B( v- O0 _( p, i) ]# P) Y
  136. #                              # light source number you wish to change (for7 K0 g8 f+ m! a/ p% \% }( L
  137. #                              # more than one). These are reset on map change.
    4 V5 I% c' G. n+ t8 n3 z
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    . g7 A2 V% k0 P! x
  139. #                              # This will need to be in parallel process if you
    1 u. e; {6 G5 f4 W% P/ N' m. T4 V
  140. #                              # want it to be a moving light.
    ! {% B2 M8 ?8 D- W# ^* y% I1 z
  141. #
    # |1 h) D/ S+ a! J+ H
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below* j* o$ b4 F& V4 e$ R8 d
  143. #
    0 t1 V4 _% j! m( R4 w& h/ S9 Z
  144. #    # intensity = opacity when standing next to the light source (255 is black)' O1 O; v4 x9 K  @2 s3 u/ O/ @/ A
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    + O5 e+ f3 R$ T6 C! r
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    ) z' f% e  h6 c
  147. #
    " C& W: w* S: A# `1 O/ F$ @( x7 m
  148. #------------------------------------------------------------------------------#8 _& i3 y5 w  j1 w! N
  149. #  EXAMPLE:& e* R9 a) w6 e* q. ], Z8 p# u
  150. #  shadow_options(80,10,false)    # This is the default setting.8 A# O# F6 ]/ g5 s0 v8 `: W
  151. #------------------------------------------------------------------------------#
    9 j! Y# w, n# F: n- U' Y& R' B
  152.   
    ' U" z) [5 b) }- J8 A8 O. D' J' K; Q
  153. #------------------------------------------------------------------------------#* |/ ~* s" k! A6 T) b/ i
  154. #  SCRIPT CALLS for reflect options6 E' K' ?8 p3 ^" p9 j. s, J/ R) [
  155. #------------------------------------------------------------------------------#" Q# ]  l3 Y. \# d$ ^( j
  156. #
      E0 M7 g8 n* L
  157. #  reflect_options(wave_pwr) 4 Y: {9 G5 ^, q3 Z3 Z1 j( g
  158. #% }: l0 t0 ^. n" G# j
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    - z* E% N/ B+ k# Z& f
  160. #
    4 b2 N4 `) }! i" t7 c
  161. #------------------------------------------------------------------------------#5 G/ I( z! p2 Z6 d" t" }* c
  162. #  EXAMPLE:9 _. G0 S2 G# B
  163. #  reflect_options(1) # Turn wave power to 1
    0 v) w% n  z3 u2 e5 ^* p' X
  164. #------------------------------------------------------------------------------#
    4 R/ y, N" a' F8 e3 \1 W: {
  165.   $ ?/ T/ k! {; k, r* V2 F
  166.   + [2 t! p1 u. }1 z
  167. #------------------------------------------------------------------------------#8 |* C( a# Q' D3 v
  168. #  NOTETAG for ACTORS' p* ~! O% F5 F4 a9 X9 U
  169. #------------------------------------------------------------------------------#: ?+ ~$ d" J; T
  170. #; m  X$ S/ @* d% q
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    3 [% N# w- q; `$ w5 m" b( o
  172. #; A( }: R. R/ @- c8 @3 I7 s
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    4 I1 w5 Q3 h7 r0 x
  174. #                                  # and use the character in position 'pos'
      f; M/ L" H  }6 |) G, i8 M3 q+ T
  175. #- w, s8 T4 k8 s1 \! B
  176. #------------------------------------------------------------------------------#& t6 P: ]6 @8 k/ }% I" }
  177. #  EXAMPLES:. f: N0 @4 M* B  _7 U
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    0 w! L) V) z; P$ H0 N" v# {" W
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset* Q) @) R  I5 V0 |! e% O" t5 V# I4 W
  180. #------------------------------------------------------------------------------#
    , N$ l# \' c4 Q% M  C
  181.   
    ) l, Q. P# S6 T1 y( ]$ `! j, a& u+ p
  182.   % U/ O/ x7 @; {# x) m/ [+ u9 F
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    4 d8 _; }, m- _1 a$ d
  184. module Galv_CEffects
    ' f( P3 S3 `2 v
  185.   " J* ^; c( r  g0 K* O# n* |& c( V
  186. #------------------------------------------------------------------------------#  . P' U- l, R7 g3 m" V/ ^9 D
  187. #  SETUP OPTIONS" u, F3 V  ~+ g' l: N( O
  188. #------------------------------------------------------------------------------#: P' ^. N) i8 ^  s
  189.   
    9 q# K8 o6 _; J+ K$ c
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the4 {. g  g' I4 p% b
  191.                         # region on the wall you want to make reflective (and
    . |3 e$ N! {8 r: e- `3 `
  192.                         # then use tiles/mapping that make the parallax visible)
    ! A1 G5 p$ R2 {: _" G1 @
  193.   
    8 E8 S, V4 v7 t" [
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters% O; s7 F  n7 N, T) Q3 e9 K+ b/ i
  195.     9 {/ E! T9 G; e+ U# A/ X, W
  196.   REFLECT_Z = -10       # Z level of reflections
    6 f5 v* e* V" \4 Q
  197.   SHADOW_Z = 0          # Z level of shadows
    " j1 ]: z  j$ a+ \) E% r* ?
  198.   
    1 n& {: g8 }( a9 Z( n2 N
  199. #------------------------------------------------------------------------------#  
    5 H7 L+ W, `) V- \( A* s% v$ q
  200. #  END SETUP OPTIONS
    ) Q) t4 b) p8 M1 ~3 @  a' A2 E
  201. #------------------------------------------------------------------------------#1 v1 I: D# a5 j; y
  202. end
    4 o. I1 L) }7 z: T  U* F) m
  203.   
    0 ^3 ?9 b- D# @
  204.   . ?: j3 u$ P3 {( p
  205. 9 x4 B. i$ N& [) O

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

使用道具 举报

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

使用道具 举报

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

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

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

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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