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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

& @; ]8 J2 `! ^1 y这个代码怎么用啊,有大神知道吗。我从国外找的。
# k( z  [9 i1 E% `0 f+ vhttp://galvs-scripts.com/2013/02/21/character-effects/
7 D  ^. v+ e! t  A; R* i3 s是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
3
 楼主| 发表于 2014-6-25 11:35:49 | 只看该作者
记得口袋妖怪的池塘是有倒影的
回复 支持 反对

使用道具 举报

梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    " ~& a6 a6 R. X. V* s* V
  2. #  Galv's Character Effects
    & f2 Z0 p! H+ J* t" ]: y. a
  3. #------------------------------------------------------------------------------#& e4 L! L) w6 h2 k, H6 {
  4. #  For: RPGMAKER VX ACE
    ! c# o5 W& _5 U) V
  5. #  Version 2.1. }  n4 O3 N; R: h, q0 ]# G$ ]5 L
  6. #------------------------------------------------------------------------------#) O/ `  v8 y$ ?6 _0 C
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows- G# J! S: d, h% R- J6 v" r
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
      F. Z8 u( i+ k: f  k6 x. A1 i' K
  9. #                           - Fixed shadow facing bug; ?: _9 l) r% V) @2 x
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows% h3 V" Y, Z1 D, d+ [& |
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows4 K5 w. Y/ `7 d. T' W) x) M" I
  12. #  2013-02-22 - Version 1.7 - bug fixes# y/ H* ]# g) K' m2 S" ?  \
  13. #  2013-02-22 - Version 1.6 - added icon effect
    " {1 }  G8 A5 f$ x  V9 `/ j8 X
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps" k8 S$ O  a( b2 k
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    $ \  c! K) r/ x# \
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    7 q2 q8 g, c* w2 T/ i- s
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    " @, c: S* h( g
  18. #  2013-02-21 - Version 1.1 - updated flicker effect: z1 L/ H1 ^& g& g' P9 p5 G# {
  19. #  2013-02-21 - Version 1.0 - release. v! W3 f6 J4 J! N5 s% j
  20. #------------------------------------------------------------------------------#
    ) b6 |& @7 t& ]* Y
  21. #  This script was made to provide some additional effects for characters such4 c1 I; j; b; @
  22. #  as events, followers and the player on the map.# w  V% x" J7 Z" V$ P+ w; @
  23. #  Currently it includes:
    ) Z2 q# Y2 l8 j% b- d% v
  24. #/ e/ E2 z6 @% F8 O' H6 b  E! b
  25. #  Shadows
    4 B: j+ ]; ~! D1 l- {# `6 z. {
  26. #  Shadows that appear under player and events in a directions depending on
      \! }! m. ]1 E2 a2 U$ j1 g6 H- N
  27. #  a light source that you choose.
    8 Q1 E5 A4 o% X' Z( i
  28. #7 E3 N' c" f0 R$ f. x' W4 _
  29. #  Parallax Reflect
    . \- J4 ], X& d" y6 i
  30. #  Reflections that appear on the parallax layer for events and actors to be
    6 y; r" Z/ B4 x5 J2 A% f" W$ I
  31. #  used for things like reflections in the water or glass floor etc. To get
    ! C& p' h/ }3 \# m+ g' I3 j: |" [
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    ) s: M' U# f% L9 g9 H
  33. #  partially transparent.$ }. d" r0 J+ c% g* k, j
  34. #
    & P1 O! X% Q3 C" A2 U% o( ?
  35. #  Parallax Mirrors+ x2 D- t- D( f# z/ w
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    , d/ U! t2 O( V# @2 ?
  37. #  on a wall designated by a region. Both mirror and reflect effects can be- _# s$ c1 n1 x* G6 U; Q+ b
  38. #  changed so actors and events can use different charsets for their reflections
    9 W3 W) v3 m! p2 Q
  39. #
    + c& `7 I8 o. O# a! u) \3 ~
  40. #------------------------------------------------------------------------------#
      d! F  z$ A4 Y& H
  41.   
    2 [" C% _% {6 Y) \) j; t! r
  42. % U& s" I8 [  }4 [* k& m4 k
  43. #------------------------------------------------------------------------------#
    ' G! T/ g' n4 G% M8 ~! T
  44. #  NEW - First event command as a COMMENT0 q; t/ q) t3 y
  45. #------------------------------------------------------------------------------#
    - `  @$ {6 h0 k
  46. #  You can add a comment as the first event command on an event page to set if
    & c& v4 r: ]; @5 w' `  }
  47. #  that event has an icon, shadow or reflection active. The tags to use are) h4 B' d1 C3 Y' g/ D6 I  D. k
  48. #  below, all must be on the same line in the comment.5 K, M: h  `4 w3 Y  a% M$ j
  49. #8 B1 |8 M9 Z0 O5 f
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)9 z# z; x2 s, @: F; B
  51. # <shadow>           # set the event to display a shadow, |' h/ R/ f. B+ R7 a) Q* {2 F
  52. # <reflect>          # set the event to display reflections
    $ u& G" l8 G, x& Q2 s8 V
  53. #
    - C. E  p0 c9 x! O
  54. #------------------------------------------------------------------------------#
      B4 E* z% \5 `; c- K
  55. #  EXAMPLE:
    , V1 M  g( G. u4 m! q; t
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event, [- Y- ]5 S! Z$ B- d8 j
  57. #------------------------------------------------------------------------------#" c: B0 {) L2 I8 \/ ]* B: I

  58. 3 d4 T6 D5 f+ p

  59. " t1 L) H; n' A9 h6 g& |! d
  60. #------------------------------------------------------------------------------#
    2 B# c/ K" Q/ l' Y. p; r
  61. #  SCRIPT CALLS:
    - a  K- |& l1 w* K# f( V
  62. #------------------------------------------------------------------------------#
    ! K3 w) n+ G, V4 y: \: x1 U
  63. #
    7 {* ?. H* g& q0 V' g& H
  64. #  char_effects(x,x,x,status)6 e6 N5 {/ [# f/ ^2 S, g1 {6 J
  65. #
    7 P+ F! Z6 S# A9 I4 U3 W% s# P
  66. #------------------------------------------------------------------------------#* O8 z$ O" U$ `, `& b
  67. #  # each effect can be true or false to enable/disable them during the game.
    ( J+ T9 b3 Z; V5 h1 L
  68. #  # you can change multiples of effects at once, x being the effect number* O% @3 X9 [/ S- m. R+ ^
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons. a- v* g3 t' j  @) V
  70. #------------------------------------------------------------------------------#
    - q4 o$ j5 a) w! A( F( Z5 j& m
  71. #  EXAMPLES:0 N+ A. _3 \$ W" i# ?$ a2 u
  72. #  char_effects(0,true)              # turn reflections on5 I( u' g$ l2 @6 A- u( l9 M* \% s
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    , J) n9 B) X+ v: M1 ]! J4 ~
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    $ p7 R& l/ r6 g' i
  75. #------------------------------------------------------------------------------#
    ( u9 N: \; V. T
  76. #1 V6 l8 \# D7 v3 {7 t) F
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset& d( @' V# G4 D, E/ t  o! M
  78. #2 U8 G: }2 V2 v7 T; a
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    . W# J7 G. [$ W) y
  80. #
    8 r& y, o7 J' U  v5 h0 ?& S
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
      _2 W( p7 N+ M; q
  82. #
    4 z( p1 s9 N- S3 H( I
  83. #------------------------------------------------------------------------------#
    7 Q% |, [3 Y. Z) W( A8 @9 i8 O
  84. #  EXAMPLES:
    ( X4 u- x- L) d6 T8 h
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    + v, H9 s; c: p9 V0 v0 i
  86. #                                    # in position 2 of "Actor2" charset.
    0 Z8 B* ]; R, f/ y/ _8 ~- @
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    - K5 A% G) `/ V5 b
  88. #                                    # "Actor4" charset.
    + u  r8 r4 V, \: X7 v7 T, W
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    3 [* L4 b' ]% x$ A( X
  90. #                                    # "Vehicle" charset.$ |% A7 ^/ T1 @" N
  91. #------------------------------------------------------------------------------#: A, q3 F6 ?4 [# t% Q! j- I
  92.   
    7 O1 g; E( O; w: G  s
  93. #------------------------------------------------------------------------------#
    / ^3 P* v( R: X. k. V1 k% S  n
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    3 y7 W! I2 l) b- @, H' p
  95. #------------------------------------------------------------------------------#
    " b+ v; t, r: R9 K/ v; k( b2 p1 ?: N6 f
  96. #
    , U8 ?7 [3 G% `# h$ x6 F& b
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    4 `$ z+ }4 I) Q
  98. #                          # use this to specify for mirror and reflect.
    7 n+ I3 T! H1 q' T1 l  o
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change* E( _% D7 f" r) S2 S: v$ a; g
  100. #                          # to change all events use :all
    ; [' F6 F* ]4 K# u# z0 B! j' Y
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    2 V3 f5 ^" a& W: A1 k' z  E
  102. #                          # it 0 for no icon./ q- `9 A# \  p3 T: ?$ Q
  103. #4 ?  u4 C1 X' g, r; m
  104. #------------------------------------------------------------------------------#  X6 T5 i" K, P# f4 {. g8 W
  105. #  EXAMPLES:
    % [5 g, m+ }" ~
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    9 L  s9 n) w0 {$ `; L
  107. #  shadow(1,false)         # Turn event 1 shadow OFF& _+ t6 v- K  }. t, `4 n# K
  108. #  reflect(:all,true)      # Turn all event reflections ON
    # a1 W2 @; i) z0 [5 I( m; L7 _) e
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear/ }4 b% X6 t- s
  110. #
    & F+ k0 Q$ G2 K$ S' d, N
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
      G7 S8 H2 m9 E6 K! R
  112. #        a map. This is a design decision to try to keep lag to a minimum. You8 b0 |' ~! g! a% v. U. L
  113. #        should use these effects sparingly and only activate them on events
    9 o. \& c8 J0 g, z7 ^
  114. #        that require them.) b' L5 Z1 |: i* h/ {4 y
  115. #------------------------------------------------------------------------------#
    6 K* ^) K: c4 r  v
  116.   
    4 o& j/ C5 c/ V6 |! H7 e  j6 X
  117. #------------------------------------------------------------------------------#, y( }: q$ b3 u! h0 Q$ d5 F
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    1 [. f9 B* y1 w+ q
  119. #------------------------------------------------------------------------------#
    # J0 h) N1 C( u9 |* |; L
  120. #
    2 j; h/ m, W, {; m( Q
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    & R$ ^+ p7 k+ ~6 n
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    4 k# Y, `$ T( d2 W  |
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    7 b$ Y" d7 U0 q/ ]
  124. #& F! L5 u* S5 A/ y9 I9 f- q/ H
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    % P* y( V) o  a/ I9 L6 O2 `  n, Q
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.6 P- A8 Y: P- Z4 z0 n
  127. #  v_icon(x,x,x,icon_id)
    4 v( G" M# a: H8 O8 [, N
  128. #
    + c6 G: g) F0 n
  129. #------------------------------------------------------------------------------#8 f$ y" K5 B- M$ I3 x
  130.   
    , b# Y* u; R- S4 `% n
  131. #------------------------------------------------------------------------------## p3 D8 w' q# `2 @! [' E& X5 ~+ w
  132. #  SCRIPT CALLS for shadow options
    % F7 O' n8 ?0 U
  133. #------------------------------------------------------------------------------#
    - H3 A6 u& z/ J. O' Z  h# {& G
  134. ## N& U2 G* \# A( |) ^5 t" W1 `
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    5 J$ S5 m/ c+ l, K) k1 I/ J% N
  136. #                              # light source number you wish to change (for" s6 ]& ]3 x% {7 S- ?
  137. #                              # more than one). These are reset on map change.: V$ d0 Z  F5 ~  r
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.: f1 ]3 q' o+ S2 T, H
  139. #                              # This will need to be in parallel process if you' S9 X- B) M* N7 g
  140. #                              # want it to be a moving light./ \' Y1 T1 N1 M2 I+ B. r
  141. #
    1 W5 r$ p2 v9 @+ z2 l" q
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    / y7 G3 F# u3 T
  143. #: k# s* a" ?$ r  M: g. g
  144. #    # intensity = opacity when standing next to the light source (255 is black)  |8 l1 ]- [/ t% }2 f+ t% z
  145. #    # fade = amount shadow becomes more transparent the further away you are.# |5 g6 @* E) R  ~5 g' t) y$ H- M+ O* q
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    , H  b! V1 D5 f4 @' T& X8 S
  147. #* }& f: S7 S3 r- ^3 @# G
  148. #------------------------------------------------------------------------------#
    * P9 s! f* t0 P! F( D9 W  `% R- ^4 w2 f
  149. #  EXAMPLE:) e; d* o. E: c& Q, e
  150. #  shadow_options(80,10,false)    # This is the default setting.! H) h8 D2 h8 K: Y8 `
  151. #------------------------------------------------------------------------------#
    / S" Z* z2 O/ j2 O+ g0 w
  152.   4 Q: X4 d* {- i& Z
  153. #------------------------------------------------------------------------------#, x+ L, n6 `; Z% N+ k
  154. #  SCRIPT CALLS for reflect options/ M+ D: x9 \$ Z" A2 v
  155. #------------------------------------------------------------------------------#
    ' {5 z; I. \6 o! |" D- {( l1 E
  156. #) t) V0 z1 c" _$ `& ~' x
  157. #  reflect_options(wave_pwr)
    % ~6 U6 v- v, ?) K9 E3 W
  158. #
    " I2 r% R9 J% P% a( x2 {& @
  159. #    # wave_pwr = how strong the wave movement is. 0 is off# M. o! z$ ^8 M: g$ S0 S
  160. #
    9 k/ [4 i7 t1 Z: j, r0 P  v1 z+ S: L
  161. #------------------------------------------------------------------------------#
    ' W7 {5 f& c8 v; Q. [% b
  162. #  EXAMPLE:+ S/ h' R2 q: N4 o# D* d  @
  163. #  reflect_options(1) # Turn wave power to 1- h0 x/ e/ j/ T( K9 q: ]+ `
  164. #------------------------------------------------------------------------------#
    , w% N7 o+ o6 q  r% ]! j8 L- D. P
  165.   
    ; a) c& i: o7 C
  166.   $ e' l  `# ?' M! U
  167. #------------------------------------------------------------------------------#
    " l, a' s% Z  ^8 ?; `; \# p- g
  168. #  NOTETAG for ACTORS
    & w: X3 j* I2 y2 S
  169. #------------------------------------------------------------------------------#2 D5 g$ Z. ~7 E/ ]
  170. #
    % d5 U: X5 E  p! G" x
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)/ U/ h7 P9 ~/ x# }
  172. #
    ( Y9 H! ~2 I% P. A& E* x! j, t
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    / j( n6 x2 A- c8 G
  174. #                                  # and use the character in position 'pos'
    1 w+ e& ?9 g+ w
  175. #
    7 i8 d5 I: O' G
  176. #------------------------------------------------------------------------------#3 g/ e. j: B0 j3 Q$ v
  177. #  EXAMPLES:7 G% h. k. f' q4 Q: \
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset# B% L1 h1 o) [! d0 t+ w" S
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    7 {$ @8 {) R6 ~: g; j  w
  180. #------------------------------------------------------------------------------#7 K+ Y" X( \2 c' [3 ]
  181.   
    % q3 e/ l! _# r5 S1 k
  182.   
    % b' ?; c1 s9 y3 N- h. `" ?; X9 V
  183. ($imported ||= {})["Galv_Character_Effects"] = true9 }( a' t# F( K) c% r, A$ j7 n
  184. module Galv_CEffects
    : m3 z4 G; {1 e) {/ F, u
  185.   
      {  N2 v8 k! \8 W) R! a4 m" \$ @
  186. #------------------------------------------------------------------------------#  
    3 ]! [2 b; p0 L: C  ]  |0 D6 [9 h
  187. #  SETUP OPTIONS
    . O) u( }9 h/ v9 j
  188. #------------------------------------------------------------------------------#5 h; p3 B  P9 X5 ]1 d0 u
  189.   
    7 u6 G5 l; c, y/ A# S+ @
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the9 s. ?$ p/ X: r" E3 o+ C8 ^' x
  191.                         # region on the wall you want to make reflective (and7 q$ H6 A; h/ T1 E: P* I
  192.                         # then use tiles/mapping that make the parallax visible)
    ( W6 q( |- H% o2 u  O2 Z; o  c( G
  193.   
    & l. i$ O: S( F" L( g' ^  i/ @
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters3 V6 j: m. r- r; K2 B# S
  195.     / I5 N& |1 E- Y9 t  F* Z5 m/ Z+ p
  196.   REFLECT_Z = -10       # Z level of reflections
    # y0 I6 h' ~0 U8 j1 Z
  197.   SHADOW_Z = 0          # Z level of shadows
    % n2 f) X  ]+ p+ V% g( t
  198.   6 F1 f+ \8 [0 Q# S
  199. #------------------------------------------------------------------------------#  
    ( I2 h8 i6 X$ ^" Y& c
  200. #  END SETUP OPTIONS
    $ d! x9 V, t2 ~
  201. #------------------------------------------------------------------------------#
    " ]; }* E. B' i
  202. end
      z) y, l7 [/ ?% d& _8 U( j1 v) T: ?/ Z% M" p
  203.   ) i  Y3 z; a# G) S1 z, P1 }
  204.   
    $ j- O4 \2 K8 j( t8 ]9 l

  205. 5 y+ I8 A$ o% X2 \, [

  206.   h0 P0 [$ d0 C' z$ O
  207. class Game_Map# P7 Y! [8 m  X
  208.   def do_icons(refresh = true)0 ]* E/ e, l5 Q9 {* S# l: U
  209.     @events.values.each { |e|
    " r5 q! p& N, e- h) l7 g, Y
  210.       next if !e.list
    / `. D6 w  d: R# |' ~7 t) _4 }# X, E
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/+ V" V$ I  c& b- R6 {
  212.         e.icon = $1.to_i1 [7 A+ s% S- R; U0 }, c* j
  213.         e.icon_offset = [$2.to_i,$3.to_i]- y+ I$ }  z; f$ q: x
  214.       else. e/ j0 O3 G1 h( K' `) {( c
  215.         e.icon = 06 V8 [+ P* I/ @5 E; A) Q
  216.         e.icon_offset = [0,0]
    " Q* x& F6 k$ ^: J
  217.       end
    - W  k. r6 A; ]
  218.     }5 x" p/ \/ b9 l
  219.     SceneManager.scene.spriteset.refresh_effects if refresh1 o2 n) j$ S5 u- P' U
  220.   end
    ( f9 r1 Z+ N2 H( q4 w: ]" T# e
  221.    ) n+ {; P$ m8 v* b3 S$ t
  222.    2 c2 M$ \9 f3 B6 i8 [$ }
  223.   def do_shadows(refresh = true)) Z/ a. y- q  R
  224.     @events.values.each { |e|
    ; \6 k4 }7 b" X8 _1 m
  225.       next if !e.list1 e- ]5 \  c3 Y' c5 e
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/5 h7 G1 q9 M* @
  227.         e.shadow = true% _. C& U" k$ e
  228.       else
    ; j2 w8 s$ c5 x% d! k( W! ~
  229.         e.shadow = false! e: R5 G* p6 D5 v3 L
  230.       end
    - D/ L) R8 E' k& n, p3 u
  231.     }7 x" d6 {8 H& W6 V
  232.     SceneManager.scene.spriteset.refresh_effects if refresh; f  {6 k5 U1 n& E' T) L  E  a
  233.   end
    & r7 M& L/ `7 g+ [" a; T( N
  234.    
    ( z$ W! ?  }: _+ \
  235.   def do_reflects(refresh = true), F$ q4 ]; R/ ~0 v1 D! h: w, \% A
  236.     @events.values.each { |e|2 M; N1 c+ A, h( @* N& d- ?
  237.       next if !e.list
    . F/ U* }3 A, f: ?
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/! X4 e) o% O2 b. G
  239.         e.reflect = true
    ; I, L3 K9 N- I! P$ r# P
  240.       else6 g; o8 ^/ K  s( B8 [4 k
  241.         e.reflect = false
    / N  w2 _8 I! b6 n' c; U; i
  242.       end
    ( r  }" N  G- H  B: s5 d  O; Y0 j
  243.     }7 j/ ^/ l% t2 Q! @
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    ; |, @& f" [( N$ _& |( M" H
  245.   end8 j! z9 ?+ N* X- X. T( d: v; Q
  246.    
    6 |) C# ^. ~+ Q/ e
  247.   def do_all_chareffects
    2 E# P- ~8 V2 a% z1 ?$ s
  248.     do_icons(false)* m' D3 h8 H, K; T( Y8 F
  249.     do_shadows(false)
    ( l0 J! S7 I; V8 t
  250.     do_reflects(false)
    $ K( n' K- f" l
  251.   end
    5 D9 G, N3 n! v
  252.    
    4 @  d# R% T- I
  253. end # Game_Map& J( k2 k/ p7 E3 x
  254. $ a" Q" m# i0 g0 k, R/ X

  255. 1 N& B5 b. V/ J2 Z: h5 o, d

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

使用道具 举报

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

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

GMT+8, 2025-10-28 09:26

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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