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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

# _$ f8 f/ j. N$ I" f5 S& A这个代码怎么用啊,有大神知道吗。我从国外找的。
5 h3 c' r2 `4 g; I4 Nhttp://galvs-scripts.com/2013/02/21/character-effects/
  S( v! @7 D' ]7 f是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    0 A- k6 O; y6 p2 r3 ~% t$ [" G
  2. #  Galv's Character Effects$ y! [. s& Q$ a& J7 E. t
  3. #------------------------------------------------------------------------------#
    % ^  s3 f2 p$ F- l% ~4 Z7 `) g2 h6 B
  4. #  For: RPGMAKER VX ACE% c( U1 h  v7 N, T/ H9 @! c9 I
  5. #  Version 2.1! T# H/ _, T8 w, F- o5 f, O0 {
  6. #------------------------------------------------------------------------------#
    9 ~7 B9 n& n' h& A8 \' ]
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    9 i" o6 f7 J; y
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects& ]$ p2 W, W$ B- O
  9. #                           - Fixed shadow facing bug
    9 D* I* f5 N9 t" S) `
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    : U% R$ b0 ~* i! \1 B$ O; R
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows2 z; Q& w/ J' [6 U
  12. #  2013-02-22 - Version 1.7 - bug fixes
    9 \# P8 v# A& Q% G4 P
  13. #  2013-02-22 - Version 1.6 - added icon effect
    * p% g: J( Q( m) I8 }, N% o
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    9 b* P, Q/ u+ I1 e# v# c
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    . S7 K6 ~! U  \) a
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks/ Y+ b! P" }0 w8 C" g4 D
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)+ b% J& s  s# V; \
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    9 I3 G) w9 S" ~2 T0 v
  19. #  2013-02-21 - Version 1.0 - release
    $ e8 o- K: E, R6 N
  20. #------------------------------------------------------------------------------#- j$ g0 ~# n/ \+ E) _: J
  21. #  This script was made to provide some additional effects for characters such+ ]  Q) W* v6 f  I' _+ G$ c2 B; a
  22. #  as events, followers and the player on the map.
    3 b4 L: C; H7 a& H3 A+ R2 _
  23. #  Currently it includes:
      o0 s. v1 V3 i2 W8 @4 w4 Y
  24. #9 s' Z* o0 F7 E7 t+ M) Q3 \( A( X
  25. #  Shadows
    ) t" T# g; T- Q% t# _, v
  26. #  Shadows that appear under player and events in a directions depending on
    ( ^  y- n! z, u* Q! I' _9 V% g8 D4 Q! Z
  27. #  a light source that you choose.3 ?% ]  `* S! A2 C% W& N- H% j
  28. #
    ) _0 O9 Q- S' ]9 b) r
  29. #  Parallax Reflect  n% t6 D3 A6 W# R
  30. #  Reflections that appear on the parallax layer for events and actors to be9 A/ A7 o6 o1 p0 N0 P
  31. #  used for things like reflections in the water or glass floor etc. To get3 Y, _8 `, j# [7 O$ d1 l0 j
  32. #  effects like the demo, you need to edit the charset graphic to make the water1 j( S  m3 c- {) F( k+ S6 f  @8 y
  33. #  partially transparent.
    / L! _# a8 Z/ l7 F/ |
  34. #
    + L" u2 i, P2 h) u, u
  35. #  Parallax Mirrors
    " q7 D  N. F4 e2 y6 w) R6 q
  36. #  Much like reflect but are instead actors and event are reflected in a mirror% _4 d0 s* ~$ C) [) V
  37. #  on a wall designated by a region. Both mirror and reflect effects can be  s8 Q# r4 Y8 A1 m1 }
  38. #  changed so actors and events can use different charsets for their reflections$ C* I! Y  j$ H- W1 R0 [# y. i- z
  39. #
    ' a4 n6 Y/ [7 ^
  40. #------------------------------------------------------------------------------#
    , q" Y( ~" M5 z* e" p
  41.   
    & p* K5 Q- d( V- U" Q- @/ l$ M
  42. . U! r- Z  q6 `
  43. #------------------------------------------------------------------------------#1 f+ W/ b5 P+ V& k
  44. #  NEW - First event command as a COMMENT
    ! u0 ?' l/ J; _# I0 D, M! ?
  45. #------------------------------------------------------------------------------#
    ' ~3 M! v1 f9 F1 @2 Q
  46. #  You can add a comment as the first event command on an event page to set if% P" o: b- Q3 ?0 J3 F
  47. #  that event has an icon, shadow or reflection active. The tags to use are  P( ?# [% B3 c0 A1 q$ z
  48. #  below, all must be on the same line in the comment.
    . W7 q- m! `! q( n0 w
  49. #4 c% v# ]! h$ U% G
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    9 U( M! [& v7 T6 h0 v# e% p
  51. # <shadow>           # set the event to display a shadow
    6 `( E8 Z5 N% a1 O
  52. # <reflect>          # set the event to display reflections: H$ `9 c" x) X9 {
  53. #
    ( A4 Z& d+ L. h- ~" Y4 j' r
  54. #------------------------------------------------------------------------------#$ s! T& x' z0 F3 K' f
  55. #  EXAMPLE:5 v7 U  k. @$ X. E: [4 J
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    ! P+ K$ W9 e2 ^, R- T) r, r: M# g
  57. #------------------------------------------------------------------------------#7 F  D, c' S( R3 i- X
  58. 3 _) S8 }- y; r* ]

  59. 0 [) \7 ]7 Q, j0 ^9 |9 q' m
  60. #------------------------------------------------------------------------------#
    8 R* ^! H/ y" O7 W* E( a$ h$ U; _
  61. #  SCRIPT CALLS:
    0 K6 G& L% }4 E
  62. #------------------------------------------------------------------------------#. {- y) Q  l( z3 U7 [. {/ a1 f
  63. #5 o- ^$ A9 y0 e/ j9 ]/ J
  64. #  char_effects(x,x,x,status)( k- F; N5 R  P, _6 x
  65. #9 Q/ [) V8 Z  N1 L3 _2 B
  66. #------------------------------------------------------------------------------#1 g; v1 I3 h, c, [" w2 u0 O
  67. #  # each effect can be true or false to enable/disable them during the game.2 |" p5 v8 Q3 F
  68. #  # you can change multiples of effects at once, x being the effect number6 o! B, [# x# J, K$ F! M) w
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    0 l( d; X3 A: L* P
  70. #------------------------------------------------------------------------------#* j. f9 r3 }3 l: A9 q% Z
  71. #  EXAMPLES:! c( u7 h2 Q8 z: T: u5 b8 }
  72. #  char_effects(0,true)              # turn reflections on0 }9 A' J( F, z- y9 }
  73. #  char_effects(0,2,true)            # turn reflections and mirror on. X& C" g: t3 U4 u5 h
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    , T8 |! m1 _8 `) w; |7 @; m) y; [
  75. #------------------------------------------------------------------------------#
    " y& \; Z- m6 ]6 l- C1 g  G" q' o
  76. #
    9 e$ u1 Q5 [$ G: Q  E9 S
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    , L1 G" ~) Q- r/ Q5 _# g
  78. #
    5 |8 `$ G. d" `! d' {" d, m
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    1 h! ?4 Z: Y/ S! i
  80. #
    ! u) Z* {8 w# p7 I& Y# ?
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset: H. ?$ X+ I6 D/ a1 f
  82. #
    / L3 l; n. S+ g. N8 b8 |9 c+ y# m
  83. #------------------------------------------------------------------------------#
    / W  a3 _; ]9 W  q" {! l8 x
  84. #  EXAMPLES:
    , A9 U& [% s9 d; ]7 K$ r
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    ( p- E3 w5 q9 h  `( M9 w
  86. #                                    # in position 2 of "Actor2" charset.( M4 Q! [3 ^. M, V$ ^$ w& F
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    ( j, E$ W( g" y; ?7 ~# p
  88. #                                    # "Actor4" charset.# p/ E0 t: B7 F. k" M( B
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of$ G! y8 w. e* c& t" }# T6 Q7 D9 Q
  90. #                                    # "Vehicle" charset.# e" `1 _2 \- b) d3 p& e% S! L
  91. #------------------------------------------------------------------------------#: ~7 _, c$ g" ~1 O! h
  92.   1 ^; I/ Y3 C, q7 Z6 u2 q5 e) d+ t
  93. #------------------------------------------------------------------------------#* E$ N. m2 D6 b5 d' c
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    . W$ E, O; g1 u. ~4 {( s, j# M
  95. #------------------------------------------------------------------------------#3 f) A+ j1 I8 ^% g& f
  96. #) E$ i8 q7 l8 m' ]( f* T2 Q' ~- L% W& O
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    4 U, V7 ~0 D4 _5 [
  98. #                          # use this to specify for mirror and reflect.6 ~' P3 Y( G0 F4 e9 _" [, J
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    # ~3 S0 z; E9 N4 [' L! N- g
  100. #                          # to change all events use :all8 W5 r5 p% {  O! @# ~$ R4 u
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make. m, F4 t- i; G5 G
  102. #                          # it 0 for no icon.% _9 Q7 r1 L' ~; a1 c
  103. #5 k# S" L  D  l/ c: _3 Q! X0 o
  104. #------------------------------------------------------------------------------#1 V) K" f$ R. w% }8 v* o2 n
  105. #  EXAMPLES:) I( j- ~1 e( j( O. t
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    , q2 U  \3 i6 w
  107. #  shadow(1,false)         # Turn event 1 shadow OFF; D  l$ W3 u- d" B4 ?1 q
  108. #  reflect(:all,true)      # Turn all event reflections ON
    $ k9 U; N! C) c
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    - k6 G" X) x% j' g3 f! g
  110. #& |6 [. E% g. ~, f( l& j* q
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering  P1 b( k4 ?) Z. }2 O: k2 @1 R
  112. #        a map. This is a design decision to try to keep lag to a minimum. You1 b. a2 s0 H- e( X- Z
  113. #        should use these effects sparingly and only activate them on events
    ) V8 @1 M; X& R- U' V1 x, Y
  114. #        that require them.( f: w- C) R+ y/ n" g7 G
  115. #------------------------------------------------------------------------------#
      o$ D- O0 b0 K) d+ C; s8 Y7 H3 H7 x
  116.   
    / q2 n9 g0 V/ k+ A+ K
  117. #------------------------------------------------------------------------------#
    4 W9 k2 K; a: X3 L5 w/ f' d3 x+ ?9 |% A
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    ) q* }8 y. q  q4 K
  119. #------------------------------------------------------------------------------#7 w; h. m/ P( [/ q
  120. #. K1 Z5 q: q7 T& k
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 6 w* D. G4 t$ M& Y
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off ) T4 }- }# u' Q* i3 }
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.  g- u  ^) b. P' J5 G8 K
  124. #
    6 L* V  Q3 j0 V: r0 h
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects# Q# f9 e; F0 P* S* Q  E
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.& S9 [4 U0 [! c
  127. #  v_icon(x,x,x,icon_id)' F6 {5 W* Y) k& @, J5 A& h# ~* z7 u
  128. #7 [% {( i/ P5 \! v3 l, J3 D' R9 v
  129. #------------------------------------------------------------------------------#
    5 y: V; T+ w# X7 n1 i
  130.   
    : Z$ w  ]  M  a. w- u
  131. #------------------------------------------------------------------------------#
    2 v( ^4 D. U+ {8 B4 U( ~
  132. #  SCRIPT CALLS for shadow options
    5 k6 v& |+ o/ S2 `" x" X; ~
  133. #------------------------------------------------------------------------------#
    1 [0 E: x% q$ K: ^8 h8 m2 T
  134. #
    % T/ J) g- n2 k3 k
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the 6 A8 N( Z3 s5 @1 @* s1 a) Z0 u0 }
  136. #                              # light source number you wish to change (for; a6 D& \( }/ c( |' P
  137. #                              # more than one). These are reset on map change.% L- F0 S7 z' D* ?2 A- c$ S+ A
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.+ `8 z$ o" @. w' a
  139. #                              # This will need to be in parallel process if you) h$ r1 e' A! y$ u& h) B
  140. #                              # want it to be a moving light.5 `$ h8 Y1 K+ |" J* `6 T1 o; p: V
  141. #
    ) U8 c7 S( F! |9 j  p0 g
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    " N7 B* E* z0 S' v/ i. g/ j* B
  143. #
    4 K) Q2 |& T2 Q; ^2 c; y( M# k
  144. #    # intensity = opacity when standing next to the light source (255 is black)& S8 H9 _9 A7 m
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    2 u4 D: D' M  H
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    9 d7 `, O8 |* p1 y
  147. #1 m4 a! \6 n; w, q* L
  148. #------------------------------------------------------------------------------#
    ; _' P' Z# K. r6 I& `# d
  149. #  EXAMPLE:
    / Y/ _, j$ S, t, }# b* U
  150. #  shadow_options(80,10,false)    # This is the default setting.
    # |& o. {& G" {9 r( }0 s3 y
  151. #------------------------------------------------------------------------------#' z* c6 \: n( u
  152.   ) F# a4 T$ |6 d9 j8 P
  153. #------------------------------------------------------------------------------#  T% w+ U2 r$ K% O+ c3 P9 G
  154. #  SCRIPT CALLS for reflect options
    , c" n) n5 q/ T
  155. #------------------------------------------------------------------------------#1 R3 p; ^6 c' m, j
  156. #% F$ L7 L1 [9 `( w0 ^
  157. #  reflect_options(wave_pwr)
    % q- I# l  F9 ^% l, {
  158. #
    0 g$ R# Z  M0 |4 h
  159. #    # wave_pwr = how strong the wave movement is. 0 is off- J& D$ H8 v: \3 ~, z1 U
  160. #
    $ p* b4 k' _9 D5 T0 k$ }$ B
  161. #------------------------------------------------------------------------------#
    # h4 D/ s; L+ B# c
  162. #  EXAMPLE:% P* u1 r0 P4 d) ~$ D$ M3 P
  163. #  reflect_options(1) # Turn wave power to 15 J. K* Y( ~# h+ c& \& `! j" [, Y' j
  164. #------------------------------------------------------------------------------#
    ( E& a% n  W1 _$ {$ y* h2 @
  165.   
    " j7 b# \" [6 A1 |
  166.   6 e* v7 D2 {) o6 J/ q
  167. #------------------------------------------------------------------------------#& J9 `  M5 f  D" O1 @
  168. #  NOTETAG for ACTORS
    / ~8 h- m( d1 H' p% F
  169. #------------------------------------------------------------------------------#
    , m/ P& _8 ?! w/ \) J- S. I
  170. #. G3 B% J: H3 x1 R$ I  L
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)0 N1 b: `4 y8 K5 B: ^! i
  172. #7 c- g# H, s5 h, [4 Y
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections4 I. C% V# y* j9 Q# m9 I& F3 R
  174. #                                  # and use the character in position 'pos') u9 c) ?2 @. J: x2 o: I0 u; ~, q
  175. #
    ; i1 x) {1 S% X3 A
  176. #------------------------------------------------------------------------------#' |- _3 |+ T1 ^+ B; y/ H: U
  177. #  EXAMPLES:
    : F8 L( |6 v# J2 ]/ |- s
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset  j4 \( @. z& {$ t0 @5 t# D1 v, n
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset9 i6 E) t" B* |) N: j7 O! |: I
  180. #------------------------------------------------------------------------------#
    4 a: k1 d: y+ ?5 a
  181.   % p! R; u. ^( C* [/ V: r
  182.   
    , m, o5 _5 t2 |/ i$ _' [
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    + w! D6 J6 b& S6 Y1 x, q9 t
  184. module Galv_CEffects; \: Z8 S5 D6 L/ U
  185.   + L# r( O2 R8 d3 g/ [6 K6 m+ B! g
  186. #------------------------------------------------------------------------------#  
    $ w7 w/ ~: O% P1 e; C' P
  187. #  SETUP OPTIONS
    / v. \9 c, f( _7 H, X5 X
  188. #------------------------------------------------------------------------------#. @) ^% v4 _) G
  189.   
    * R) {! L2 A  S" p; x
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    , f$ L7 [8 }- n+ @2 `
  191.                         # region on the wall you want to make reflective (and
    : Y2 U2 n* u' e; j3 Q
  192.                         # then use tiles/mapping that make the parallax visible)
    % [6 A, B% x+ z
  193.   ; R3 i9 r" u4 {
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    # _$ o- _* u7 l% l  p/ E' \4 f
  195.     # O4 [- J2 d( r) `1 J
  196.   REFLECT_Z = -10       # Z level of reflections$ n5 ~* B) _- X6 W5 W2 x
  197.   SHADOW_Z = 0          # Z level of shadows
    / p5 X( @$ m9 G" G& {6 T! f- e
  198.   7 D% Q2 Q1 u2 X2 t/ Z" f* t) E' I! F
  199. #------------------------------------------------------------------------------#  5 d* P" l5 z' k/ E5 G6 N8 H
  200. #  END SETUP OPTIONS/ H8 I8 v: d' L
  201. #------------------------------------------------------------------------------#& B! F2 r! l. |; e5 ~9 x3 i
  202. end: ?: o- u* q& ^0 R$ o0 ?  d. n% U
  203.   / j; T) r0 C7 }
  204.   $ Y) n/ h0 r" {6 ?) q, X9 s
  205. % [+ @/ ?0 @2 f2 I- S9 I

  206. 3 |1 O6 W' Q6 {: s9 ]6 Y  ^
  207. class Game_Map5 ^$ E0 n! _8 ]% T
  208.   def do_icons(refresh = true)) b0 M7 O3 Z  R
  209.     @events.values.each { |e|7 k* W0 y  \. f
  210.       next if !e.list0 [" r  P" E( E
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    0 J9 o! M, a; ^- l
  212.         e.icon = $1.to_i  M1 q$ Y# R) p+ a4 D
  213.         e.icon_offset = [$2.to_i,$3.to_i]1 L& k  |  U3 X! P2 E& U. O9 `5 d
  214.       else% g5 Z5 m! A0 c& w) n4 r
  215.         e.icon = 07 ~( t  H  }; @5 A" v, h3 g# I/ W% s
  216.         e.icon_offset = [0,0]% c0 N7 E0 L8 N: O. j& o9 A- Q
  217.       end
    / P+ R8 n- \$ Z3 `9 A
  218.     }' j) \$ V7 T/ s4 K2 K
  219.     SceneManager.scene.spriteset.refresh_effects if refresh0 _2 a# c: ]5 z; r5 I( d
  220.   end
    3 ?2 ?7 ~1 {+ P/ K6 k: {! F9 n1 c; |) z
  221.    
    9 v, h3 V. J! {3 b4 m
  222.    ( I3 I+ `' U/ l2 b, r2 F" t2 M
  223.   def do_shadows(refresh = true)
    ( m1 x8 u" H  a  A1 x+ m( c
  224.     @events.values.each { |e|2 O% u# r* c+ C: A
  225.       next if !e.list
    ! U7 M' j+ h+ Y+ e$ Y* Q0 d$ q  X
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/" s( ~* t$ d2 }  e
  227.         e.shadow = true
    ! g  u/ K! h: v
  228.       else" L6 G+ A& F- S3 L
  229.         e.shadow = false
    - z( E% X( X$ d3 J! h0 I, E1 J
  230.       end2 o, {7 c" |* B& n
  231.     }
    , j7 [. s, ?& T" F
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    ) }& t9 q- C% f9 y$ o6 X1 p
  233.   end9 N4 T& P3 F& l6 m- W& |
  234.    + G6 T7 k9 G; x- ?  i* s
  235.   def do_reflects(refresh = true)
    - _$ F5 S( G: A4 s
  236.     @events.values.each { |e|
    4 S& f4 h9 k+ ?; E. N
  237.       next if !e.list! u" P. U% c$ R8 o
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    2 P  d8 e6 `- [
  239.         e.reflect = true. ]5 `, u6 M  C7 N5 h
  240.       else
    : g. @( q$ x9 E, N- A; v
  241.         e.reflect = false! \2 ~, y1 i4 H9 h
  242.       end
    8 o7 y0 D/ I& m5 T2 e
  243.     }
    $ K! g6 n: L8 G8 {) V- N
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    8 h, G5 w- G- i% W2 B* @
  245.   end
    8 Q- Q: c' f- H5 }
  246.    3 H$ f! t: i5 B' e' i! z% ?
  247.   def do_all_chareffects& d3 [( _: `) l: o# K
  248.     do_icons(false); E4 [. i1 d3 e4 z3 F" ]7 Z! f
  249.     do_shadows(false)
    4 N6 z  B  ^) O* P! S; q" K
  250.     do_reflects(false)
    & k+ a1 V; g' Y* N8 s5 B
  251.   end
    + m) ?1 g1 ^, C" T0 N2 B
  252.    
    0 d; ]1 j4 j8 u! X; i8 W7 j/ E
  253. end # Game_Map3 s/ Q# `3 J& D  U2 Y4 l) O
  254. , H8 ~* U. \! ~; R) v: e7 u

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2024-11-23 05:48

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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