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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
" q" W0 h1 `# H5 j
这个代码怎么用啊,有大神知道吗。我从国外找的。% l3 E* p' V- c8 a
http://galvs-scripts.com/2013/02/21/character-effects/
) |7 l/ E/ K. a/ U+ n1 q2 Q$ U: y是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------## f/ a" g& r8 ]' d9 f
  2. #  Galv's Character Effects
    2 g* Y4 n# u* K0 M7 k
  3. #------------------------------------------------------------------------------#5 j" }5 S' L0 C- ~
  4. #  For: RPGMAKER VX ACE
    + Y3 _7 |: U. a% [7 `  {2 k& t
  5. #  Version 2.1
    5 I+ k6 L! |3 H8 _) [7 J* K
  6. #------------------------------------------------------------------------------#( ~! G4 `4 x/ v
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows! R6 |- M) V; I/ q+ ^' a
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    " Y6 H. X6 o# T' M! G
  9. #                           - Fixed shadow facing bug$ R3 @- F* v5 ^) V8 l- D
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows! ^9 W9 \( Q" z# z  @, u# m6 T! Q0 N
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows: s( X. i( T8 m
  12. #  2013-02-22 - Version 1.7 - bug fixes
    0 K0 j4 |! K+ m4 ~. E/ n" G7 T" \+ y
  13. #  2013-02-22 - Version 1.6 - added icon effect
    " U0 K, r  s/ U7 \) I0 w. r. S* U
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps2 x9 S: K% v4 k* H
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles2 `" b; _* k$ D8 W! \) T
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    $ B5 W9 W/ ^! O4 t
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)1 m3 g! G7 o- B2 b' r  `3 S  `% y
  18. #  2013-02-21 - Version 1.1 - updated flicker effect* {* q) ~  @- T  Y; s
  19. #  2013-02-21 - Version 1.0 - release
    / y3 @! n" W9 [4 g/ n" [  Z
  20. #------------------------------------------------------------------------------#
    7 `7 v, T5 _9 ^, S* i
  21. #  This script was made to provide some additional effects for characters such
    0 v& v2 L5 `& P% i( U7 [. G0 m3 F
  22. #  as events, followers and the player on the map.
    4 [  V4 x$ k8 C( y  n' N2 z' b+ E8 W
  23. #  Currently it includes:
    # q) J( w- X  I+ s6 ?1 i! B
  24. #/ N* G2 E% y1 l/ ~) L, X6 X# @
  25. #  Shadows
    / w" h. j, E& B9 g, a& G  d
  26. #  Shadows that appear under player and events in a directions depending on- w% x/ E! H  z' R) G
  27. #  a light source that you choose.
    9 `$ E0 C7 c, q1 ^: a/ y" L, N: t: t( q
  28. #/ F; s$ A- U, V" G5 e; B9 o" S
  29. #  Parallax Reflect
    ( [- m8 T7 x' U
  30. #  Reflections that appear on the parallax layer for events and actors to be
    " p- g3 v# f* X9 y2 q, m9 Y0 P8 j
  31. #  used for things like reflections in the water or glass floor etc. To get. }: F) M& E- A- z. E
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    3 O# W  n/ B/ [' B8 k; t4 [* L
  33. #  partially transparent.
    " x; @& d" k1 u* e
  34. #5 L! ]4 H' d8 D4 c
  35. #  Parallax Mirrors
    0 ?# E+ j9 r1 f8 c, G8 I$ X7 U6 Y
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    , M& A( H, ^! _! ?: @
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    ; F5 u& S$ k! J2 [: T4 t. T- ]
  38. #  changed so actors and events can use different charsets for their reflections
    5 F4 ]4 P) v8 R- T: l, w
  39. #  ^* U5 Q' r8 V6 i( S# }! {/ I
  40. #------------------------------------------------------------------------------#
      A" H) v1 Q6 f, S! z/ o
  41.   1 R; P/ @- E* _+ ^9 d$ ?
  42. 6 O0 S2 _+ a9 E
  43. #------------------------------------------------------------------------------#
    % F$ N; _$ o2 E* t% Z
  44. #  NEW - First event command as a COMMENT
      S" I0 ]$ v4 w) K
  45. #------------------------------------------------------------------------------#
    1 I, q2 C  o" Z, S
  46. #  You can add a comment as the first event command on an event page to set if
    ( [# x9 j/ T' U9 m% r$ r4 J
  47. #  that event has an icon, shadow or reflection active. The tags to use are# F6 f8 s0 C6 q9 V
  48. #  below, all must be on the same line in the comment.: C5 X* t( n$ u6 l% v0 y& Q& X& s, J
  49. #
    / j" k# o( s; }
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)% ^. _) Z! h) W- R
  51. # <shadow>           # set the event to display a shadow( C. Z: |( p$ b0 `, H
  52. # <reflect>          # set the event to display reflections& F3 g, u/ d( \# S
  53. #) _/ ^9 ~: X% A8 J) k3 Y
  54. #------------------------------------------------------------------------------#
    , M* D# y- m& ^; b
  55. #  EXAMPLE:
    / _9 C2 {& ^5 ^% w
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event4 c: Z& o6 b  Y2 N0 j. j
  57. #------------------------------------------------------------------------------#
    . c; I% F8 x' {4 Z8 ?/ @

  58. . K6 W; p5 j6 n
  59. ' {. I" y4 _  ^
  60. #------------------------------------------------------------------------------#
    : E& X( M; W7 w4 E7 {- C
  61. #  SCRIPT CALLS:
    ! {7 u# ?" b, B9 o8 e4 y8 i
  62. #------------------------------------------------------------------------------#5 j: N" G% M) H) F: T! Z
  63. #
    $ ]0 V* d' T1 w4 \8 [* A
  64. #  char_effects(x,x,x,status)
      O% K' }7 A, ^5 h: P2 Z) Z! g. n
  65. #! `/ u& v' v% g  F; w2 M
  66. #------------------------------------------------------------------------------#, S1 w, b  |% B( `  \1 j
  67. #  # each effect can be true or false to enable/disable them during the game.
    6 ?7 T) Z. k! R0 _: W: K
  68. #  # you can change multiples of effects at once, x being the effect number) I2 S9 C  m6 p; H6 \. |
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    ' y/ i4 P0 i% m* z0 r9 ~
  70. #------------------------------------------------------------------------------#( `$ t8 F+ v- S! w, E8 h
  71. #  EXAMPLES:3 R, A% y6 s, D9 Y- q  D) d
  72. #  char_effects(0,true)              # turn reflections on3 Q" k7 f/ l+ f( j$ Z7 V
  73. #  char_effects(0,2,true)            # turn reflections and mirror on; p' Z8 C8 U# o( R7 R5 y3 P) K
  74. #  char_effects(1,3,false)           # turn shadows and icons off$ ]$ [& t+ j0 f5 U% v
  75. #------------------------------------------------------------------------------#$ e3 W- L* N* V( F/ {' @, V4 H
  76. #! F7 k, R* k9 p' J# N1 W# L1 {' b' R
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset% ^1 G+ E0 O$ S6 [' y
  78. #" \3 S$ L" u! i% Y; f$ }
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset, M# A' R  r$ Y
  80. #1 P  r1 S# w2 L. o' d
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset7 a/ l. [- W, `/ \  `( j
  82. #
    % N4 y; x+ ^' s9 _- ?1 `
  83. #------------------------------------------------------------------------------#
    / C6 s) l) Y8 i; f3 I
  84. #  EXAMPLES:2 n5 J: n" Z( ~4 F4 O+ |. ]) Y
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite- H' }! \' Y, a4 M
  86. #                                    # in position 2 of "Actor2" charset.
    9 Z5 }3 L5 H' _4 m4 R( q
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
      a' a5 I3 L' i* g1 j3 s
  88. #                                    # "Actor4" charset.; I% s6 I* M* ^/ D
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of; K. W& N4 w; h5 k: U
  90. #                                    # "Vehicle" charset.
    1 n9 M- Y& b  U* A
  91. #------------------------------------------------------------------------------#
    2 f4 y* O0 C: `5 I+ Q1 h" Q
  92.   
    7 X' ~- A5 U- f% i3 X5 C8 R& v
  93. #------------------------------------------------------------------------------#
    / {* c! W! o7 N' E/ O
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    . g/ ?/ S+ Y- o! Z, T
  95. #------------------------------------------------------------------------------#
    $ L' u2 f% U$ T1 l
  96. #
    2 r$ ]5 u" e" T( ~1 d
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off0 C# u' M0 e+ G: D( T
  98. #                          # use this to specify for mirror and reflect.
    " a) a$ B2 w2 B" [0 A& F6 E
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change# `2 X2 H2 |1 w; |) Q$ k
  100. #                          # to change all events use :all
    $ J1 T' n" f- B! F  d; g7 I  w
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make, P- T3 e$ B" N( T$ Z
  102. #                          # it 0 for no icon.
    6 \+ n$ p8 v1 A. T
  103. #: @5 Z7 ?4 ?9 [* o$ R0 H
  104. #------------------------------------------------------------------------------#
    6 @3 g$ T: M$ l) \- h4 C/ F3 S+ Q
  105. #  EXAMPLES:0 R7 y! j1 T  c7 m
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON  d% D2 R0 s4 P2 W( a
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    . }( n5 Y) f  J4 \3 p8 l
  108. #  reflect(:all,true)      # Turn all event reflections ON' y0 ]! x/ S" q5 w3 \
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear& W; [+ q' o5 M, m% n2 T
  110. #% ^' ]% B' s8 ~* L4 Y% ]$ z" Z2 L
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    ' e5 E' |0 _* D+ \9 H* u
  112. #        a map. This is a design decision to try to keep lag to a minimum. You; F3 x: Q2 I) ]1 O
  113. #        should use these effects sparingly and only activate them on events
    : j' D6 b' ?5 w5 V
  114. #        that require them.
    , }1 I# U; ~: R6 M
  115. #------------------------------------------------------------------------------#
    4 s* Q) L5 U) B8 t) P% `
  116.   
    4 H: G* |/ x# e) m
  117. #------------------------------------------------------------------------------#: l& H( t% P. ^7 I  G
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    % I' K7 r. E/ _9 l
  119. #------------------------------------------------------------------------------#& O! k+ Y% N4 c$ j% l# E
  120. #
    ( j* ]/ h1 ^$ T6 g9 C/ S: M0 J
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    5 X$ ^1 }7 g0 _* Z
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off ' ^6 p3 ?2 }, `7 k3 _
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.! b/ I1 n# I( ?) ^! Q2 K  E
  124. #
    6 N! f, q! n* J4 @1 E" Z
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    % _, Q/ R4 q, O& E# x6 ?! U- X
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.# h( b$ S* l! I" y
  127. #  v_icon(x,x,x,icon_id)& B) {+ q( W" o! Q/ l! ?2 d0 \: N
  128. #3 A; W+ P  G- h% N- o/ u
  129. #------------------------------------------------------------------------------#( b. i4 P, b% R1 A  W/ z4 @& l
  130.   
    2 k5 d$ b" \. n
  131. #------------------------------------------------------------------------------#
    3 A, C% c* ?- C" D6 B7 k. e; p
  132. #  SCRIPT CALLS for shadow options* t6 T: ^8 [' e+ R! W
  133. #------------------------------------------------------------------------------#
    " g# g# V8 K; s7 I2 ]
  134. #) v6 ]+ ~: Q  s
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    3 `; k1 r8 f9 w; w& \' Y: W' @
  136. #                              # light source number you wish to change (for
      A1 U* b4 i3 r! X. [
  137. #                              # more than one). These are reset on map change.
    ; ]7 y$ |8 e; {- N$ Q; y
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    ! Q$ E( Y4 r' X) z% i$ s
  139. #                              # This will need to be in parallel process if you
    5 X' D8 P% _7 M* A1 ^
  140. #                              # want it to be a moving light.
    5 A: q" n) F2 r
  141. #
    3 X" B: n, }7 u% Z8 m" ?# Z
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below  [1 i3 h  ]( p4 g
  143. #4 u. j" J% C* M* D6 t2 T& k
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    - q5 m( A# Y6 J' N# `$ \4 @9 V
  145. #    # fade = amount shadow becomes more transparent the further away you are./ ^  \' h: n* M1 n
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.  \, V( i6 ?# }" \; f
  147. #
    ) z. Y* h" t  j0 ~3 v6 Z
  148. #------------------------------------------------------------------------------#; N, n" H- \* k, B* c
  149. #  EXAMPLE:
    * _* \7 g$ Q5 E* S1 E& @9 {
  150. #  shadow_options(80,10,false)    # This is the default setting.5 S% g$ V. U# L- B' ]) {% F
  151. #------------------------------------------------------------------------------#
    ; e' J) B! X4 b4 N
  152.   
    . r0 s$ `' a, n. L6 ?! f
  153. #------------------------------------------------------------------------------#
    & D( [7 A& U8 w1 W; B0 k
  154. #  SCRIPT CALLS for reflect options( A' a+ b& Q, E& Q- o- y, J
  155. #------------------------------------------------------------------------------#) h5 M3 q; D, \; Q" Z" s
  156. #4 D- k9 P: S( s8 `+ O
  157. #  reflect_options(wave_pwr)
    + `. _9 s5 g5 ~( ~" K" K4 l4 ?8 O
  158. #
    4 n1 U, i3 U1 \  T2 J1 y
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    / X: k# Z3 p' P& z3 h  H, q
  160. #
    # |! O& V- O; G
  161. #------------------------------------------------------------------------------#
    $ N# R. x8 w% X
  162. #  EXAMPLE:
    : ]. k# ?& z" a. l3 @
  163. #  reflect_options(1) # Turn wave power to 12 p$ m* o! C& ~6 w4 {8 ^
  164. #------------------------------------------------------------------------------#1 a7 j* ?: ?$ }2 T
  165.   
    ! o% v# j4 N- O5 R0 M' G; [) T
  166.   
    $ z" R. ]3 B% }0 ^' T  C+ F
  167. #------------------------------------------------------------------------------#/ g# m6 b! w' {8 |
  168. #  NOTETAG for ACTORS
    / C. r# d! S; `% o
  169. #------------------------------------------------------------------------------#
    " W! r  r6 L- |. K
  170. #
    ; O2 o+ O1 l; n) |- [, m. y
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    % v' T9 N  Y% j/ ]
  172. #$ W& n$ T' `* i' M3 p/ a
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections8 v4 {+ r+ F1 L4 z$ \+ J
  174. #                                  # and use the character in position 'pos'6 q9 V4 y9 s2 H0 n2 }0 w1 v
  175. #
    ' ?: j+ L7 Y! h# u1 b; K
  176. #------------------------------------------------------------------------------#
      [3 I. V! x# R; g  M4 p
  177. #  EXAMPLES:
    , Z% f' }& T7 g3 ~+ t3 C& m8 E" L
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    7 [9 u1 X# B5 k; L
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    2 ]. u$ J3 w# j! o) b/ k
  180. #------------------------------------------------------------------------------#% E; a5 {2 b$ _% K% ^4 y+ _
  181.   
    ; X7 H$ [  T2 G; A+ [. ~
  182.   
    ; v# z. \7 M! I& o0 M
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    4 ~& N2 _+ O5 u! j* X# c2 P9 \
  184. module Galv_CEffects
    2 |& t: D7 `, d8 I" q
  185.   
    6 h6 e' L$ Z! Z# \
  186. #------------------------------------------------------------------------------#  8 l, Z% X# }* ?
  187. #  SETUP OPTIONS
    4 V# ~+ {' W$ _* f2 H# u$ |
  188. #------------------------------------------------------------------------------#0 [" _, Y$ k5 B3 \. B
  189.   * _# C4 d! Y0 G
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    1 E( [' [3 w# G
  191.                         # region on the wall you want to make reflective (and0 u, y4 A. G* o9 A# C% Y9 J0 A
  192.                         # then use tiles/mapping that make the parallax visible)2 \6 U( R% S9 D0 t& l
  193.   
    " J6 ]8 j- l0 [8 L) d/ X# C
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    * U9 I' ^" m3 B
  195.     " `; ^: O# _/ K1 ^# G' `
  196.   REFLECT_Z = -10       # Z level of reflections* T6 g0 q; d+ c1 i8 s. C
  197.   SHADOW_Z = 0          # Z level of shadows
    ' S% h, I# ~7 z; B& K9 H* F/ a
  198.   
    # X( m3 e" x8 U5 H* ]
  199. #------------------------------------------------------------------------------#  5 D: M( @2 f9 V$ l5 A
  200. #  END SETUP OPTIONS! A8 P  [, e$ c3 r$ D; B8 E' [* N
  201. #------------------------------------------------------------------------------#' p) R" t1 {9 S4 t
  202. end& @  |4 R: v' [1 i  g  t0 I8 [
  203.   . _+ J$ W% u. t+ R+ D6 ?3 q
  204.   7 k+ X0 K0 ~1 Y9 H2 P/ {9 _

  205. $ @* W* b0 v9 _
  206. 0 A& M' g& ]6 A$ I* H" U: e# I
  207. class Game_Map
      u; b4 |8 S8 S7 i, T/ @5 x
  208.   def do_icons(refresh = true)! E  C% F' q# U7 ~" J
  209.     @events.values.each { |e|" o- y' |# E6 C$ g" v- M# z& [$ C
  210.       next if !e.list
    % M& b) v- ^8 [) \+ M: x8 c
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/) V' M* u. I8 D
  212.         e.icon = $1.to_i& H# r; n1 w  a
  213.         e.icon_offset = [$2.to_i,$3.to_i]1 N+ L! {1 r9 z. F$ H7 i
  214.       else# r- G5 E5 J+ U2 {
  215.         e.icon = 07 q) z2 v" Q4 U$ T5 O
  216.         e.icon_offset = [0,0]
    9 D1 d3 l# s' B( P& n7 a
  217.       end
    2 |/ e- f' g: f, C# {4 ^2 [
  218.     }5 b6 s  K$ _! N7 T+ }5 ?
  219.     SceneManager.scene.spriteset.refresh_effects if refresh8 q; h8 p+ n& r
  220.   end
    ' t; R' u0 _2 a
  221.    ) {1 {' `6 P/ z+ q# p
  222.    4 N# e( ^' b) @9 ^- T9 j" l
  223.   def do_shadows(refresh = true)3 j0 I2 u) z1 M! F
  224.     @events.values.each { |e|$ s2 \6 t3 o" y/ v
  225.       next if !e.list0 n6 T  e* P. D1 `
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    : _. @% u1 m7 @, D
  227.         e.shadow = true8 v% H$ |! y  @& F: x: \5 H
  228.       else2 A0 A$ }: B" Z" G
  229.         e.shadow = false
    , x, h+ D* b: D0 ~& z5 ?
  230.       end
    + F0 Q0 }8 c) {- T; Y4 q2 x9 D
  231.     }
    6 s' {6 O- _, D2 m. K, {
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    6 e1 ?* S2 `) \9 f4 K
  233.   end
    , }+ Q1 b/ w" z+ L0 r7 }& v
  234.    2 ~5 C( o! ^( c" n. z
  235.   def do_reflects(refresh = true)! O. ?: K2 ^7 }- b  j  i5 F4 d
  236.     @events.values.each { |e|6 A* F5 X/ y* J" e
  237.       next if !e.list
    ) v: r4 P, {* M1 c' s' P7 R4 M9 R
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/# f5 `9 w: w4 ^0 d4 O; |9 `
  239.         e.reflect = true
    9 j( W; t7 }3 k0 ?) I" J) c
  240.       else
    4 k( X: A( H4 U" ?
  241.         e.reflect = false$ u, i- L( y/ @0 d: k" P0 d
  242.       end
    1 P% g3 |4 o- {7 o7 z* g2 U( {$ m; f
  243.     }
    ; a/ u7 v+ Q' W6 `( L4 v2 `7 x4 [
  244.     SceneManager.scene.spriteset.refresh_effects if refresh) V# U/ L8 H  y& ?2 e* {7 c
  245.   end( I. |& J! P. v8 I
  246.    
    8 z8 F5 p% F7 d' |6 @3 [
  247.   def do_all_chareffects9 C# Q* u7 n/ o4 [) N& ^8 S
  248.     do_icons(false)
    ' @+ g0 V8 C! ]! ?* H5 q
  249.     do_shadows(false)
      ^1 u! I$ {! |/ ]( E" M# j4 S
  250.     do_reflects(false)1 {# l) g" U& H$ a
  251.   end: h7 J4 q) c! }( q9 o* M
  252.    % w$ ]) ~7 G2 O
  253. end # Game_Map
    1 v0 Z. P; }4 S- Z  T

  254. ! |% U4 F- W4 i/ ~6 C7 x5 d
  255. ) `* N+ z5 v/ M6 t% K5 s. U3 }  ?1 n

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2024-11-25 16:58

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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