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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
- p! n/ f: |9 s& Y* N  o7 D5 o
这个代码怎么用啊,有大神知道吗。我从国外找的。, l2 l/ w+ J! g# s, W
http://galvs-scripts.com/2013/02/21/character-effects/
% N; H5 R- |' _2 Q4 l* y  J是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#5 R9 z9 E  a' e: z; s3 I
  2. #  Galv's Character Effects
    / x1 w7 X" o5 Q% t" k9 _. r
  3. #------------------------------------------------------------------------------#1 x9 ~1 o: u# h1 d3 {
  4. #  For: RPGMAKER VX ACE3 v$ I8 D6 B1 f( y6 A
  5. #  Version 2.1
    4 v3 H) l  E: N( Y8 f! u
  6. #------------------------------------------------------------------------------#. N; `- \3 G, g9 l/ V$ Z7 c
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    / c) }/ {1 @5 ^
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects) r/ H2 S/ H5 H4 h
  9. #                           - Fixed shadow facing bug
    1 H! T; Y# I& B
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    ' i" O/ R* ?& b9 o5 [
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows/ e, d  _9 m) J  }$ t
  12. #  2013-02-22 - Version 1.7 - bug fixes
    8 Z. o. a& _; c
  13. #  2013-02-22 - Version 1.6 - added icon effect8 U6 c9 s, g5 H
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    : N# e0 Q$ B/ l& k: Y' D" U. z
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
      C, x0 g( ~! d' O: h/ K
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks3 w6 s7 o7 ]2 F  {5 h" m
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    $ s# Z7 s5 @1 _
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    - r* F: M& `: ?) ^& c3 a
  19. #  2013-02-21 - Version 1.0 - release  @6 J* _. ^6 L2 f, ~, A& P" s3 i
  20. #------------------------------------------------------------------------------## o5 q2 u8 h! Z
  21. #  This script was made to provide some additional effects for characters such
    - u: C3 ]# ?3 ~; e
  22. #  as events, followers and the player on the map.# X  G' e5 E* R# c# A
  23. #  Currently it includes:+ Y  |, V5 y: `+ I  K. m
  24. #, t/ A- X/ F8 W6 d; }
  25. #  Shadows
    7 v$ N7 y8 F1 M) C  |
  26. #  Shadows that appear under player and events in a directions depending on
    6 o. W5 u3 I6 F0 F# c
  27. #  a light source that you choose., o- U, v$ r2 _- \
  28. #6 H4 D# x6 f0 ^6 c7 \6 l' j: Q1 E
  29. #  Parallax Reflect; j4 s( j8 f) J$ v' Z
  30. #  Reflections that appear on the parallax layer for events and actors to be5 T  E; R+ {, Q- c  _0 P) d9 w
  31. #  used for things like reflections in the water or glass floor etc. To get
    * t- E) `" c! R1 E' b
  32. #  effects like the demo, you need to edit the charset graphic to make the water# c: J4 R" ]- p' n. @
  33. #  partially transparent.
    . {) d; V3 F2 p3 @
  34. #
    ' t# l4 i7 M/ x2 ?' l0 O# q5 W2 B2 S
  35. #  Parallax Mirrors; [8 X1 N% I% g7 z6 ^  b. s% F# V0 n
  36. #  Much like reflect but are instead actors and event are reflected in a mirror: C) y8 o' U5 f8 C) p
  37. #  on a wall designated by a region. Both mirror and reflect effects can be8 a: F' z# D+ c0 b/ W  d
  38. #  changed so actors and events can use different charsets for their reflections, v, x9 h' e; Z# o0 K
  39. #4 ]2 }( k# |; B1 V/ U
  40. #------------------------------------------------------------------------------#/ O% H+ A. ~# O
  41.   
    . d2 |) h) O9 {2 C8 l+ t6 }3 ?

  42. % y: G( |8 y1 n% ?! c, y+ M
  43. #------------------------------------------------------------------------------#
    8 z% o% d/ I% r$ y) B# r$ ]
  44. #  NEW - First event command as a COMMENT
    . `; b; _( p, \5 b1 A% D3 t4 C+ K& b
  45. #------------------------------------------------------------------------------#
    9 Z$ `2 o' Z% r; Z2 I0 O! \# \
  46. #  You can add a comment as the first event command on an event page to set if. X3 D2 a5 }9 M1 P2 i
  47. #  that event has an icon, shadow or reflection active. The tags to use are1 C) \) a& Z/ Z' y9 p2 @- ^
  48. #  below, all must be on the same line in the comment.
    $ r" Q. Y+ P5 Z) C( N
  49. #
    6 J5 e/ P5 E$ h0 R' z
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    : }- \# G/ d5 ?
  51. # <shadow>           # set the event to display a shadow
    6 Z! A3 C8 B% s
  52. # <reflect>          # set the event to display reflections
    ) B9 O7 U4 D% c9 a$ N
  53. #
    ( K4 C7 x: b* y+ Z" B
  54. #------------------------------------------------------------------------------#
    + e- n, T4 ]1 |5 `) a* o- d6 o& H$ P
  55. #  EXAMPLE:
    ( C+ w7 C2 ]1 t
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event" {5 T" l3 ^4 B4 r+ {! w
  57. #------------------------------------------------------------------------------#
    ! k3 y: r& w/ H9 I) |2 M

  58. ; [! Y8 g0 h4 E$ w) D

  59. 8 X( t) i  }$ V; A' a- \7 f
  60. #------------------------------------------------------------------------------#
    ' y: T0 g5 E) [$ N4 i& G& r
  61. #  SCRIPT CALLS:
    0 j; T! p9 j& ^  F# p9 b) Y2 P
  62. #------------------------------------------------------------------------------#
    ' n# `$ H' P7 P7 L4 @2 b2 }
  63. #
    1 G# ?' z- T% M% S
  64. #  char_effects(x,x,x,status)+ }2 m6 }% ?& M0 w2 `( y$ K. ^
  65. #- T0 i; h7 v, d* @9 P7 ~
  66. #------------------------------------------------------------------------------#. P% \$ R" u1 T, c/ L" K0 j) `7 Y
  67. #  # each effect can be true or false to enable/disable them during the game.! P$ B2 R3 F& c4 N
  68. #  # you can change multiples of effects at once, x being the effect number8 T5 I0 A9 P+ U! @
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    7 s7 w: }) ^' F# n, M3 \! G
  70. #------------------------------------------------------------------------------#
    1 U+ S! |6 T, v- G$ h; i# P* y( }  q
  71. #  EXAMPLES:
    : l# j$ r9 o! Q" e3 L
  72. #  char_effects(0,true)              # turn reflections on  A$ g( Y1 J/ q6 x
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    ! `) i% U# D' B0 U7 Z8 g
  74. #  char_effects(1,3,false)           # turn shadows and icons off. ?  ]- v' q2 o9 q8 D+ V  }7 x/ L
  75. #------------------------------------------------------------------------------#
    : O9 Y8 o0 s2 D9 }
  76. #
    , r" B) C+ Q, g. ?% A( @5 g- @- Y
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    - c; Q7 P$ M5 Z" v! h8 M0 x0 j( R
  78. #
    * T9 q4 g" T! L9 J
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset, B7 e* S3 y0 L' l  h
  80. #
    + [2 k4 i4 v: [
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    & _* A& K  e+ C6 F
  82. #
    9 u9 w  W' S; H- b) w% ?8 q
  83. #------------------------------------------------------------------------------#+ G, o. }6 N) g  X  d2 ~+ f
  84. #  EXAMPLES:
    ! \( x, [3 O) u
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    0 d: d6 q$ R( `. k$ e, C) U1 s
  86. #                                    # in position 2 of "Actor2" charset.0 \; l! a: H3 k; n" e6 q
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of( h0 l1 G2 s3 u) A1 f
  88. #                                    # "Actor4" charset.
    6 a  h/ F; y( a2 i
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of! o, F# _4 l! b9 V2 S
  90. #                                    # "Vehicle" charset.
    8 {- j9 y9 T2 W0 E' l
  91. #------------------------------------------------------------------------------#
    3 r6 }* Q% V5 m0 Q
  92.     h9 }8 k- J# v" N7 F7 u
  93. #------------------------------------------------------------------------------#
    - h) X- A! O# M1 }, R
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS( w9 u4 O. _7 A& r" n; Z9 m) p, `
  95. #------------------------------------------------------------------------------#
    ' O1 B" J; ]; e# S
  96. #9 M  G& J. n) x0 }* a
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    , K. d, h, I4 S5 [4 N( l
  98. #                          # use this to specify for mirror and reflect.
    / I/ [& ]8 f. x9 w( p- _
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    4 B/ Q3 |4 H. R  a& N8 w/ N
  100. #                          # to change all events use :all
    # H: P6 v3 J% E) j. J$ ~* d
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    9 w1 O4 X* Z( `7 H
  102. #                          # it 0 for no icon.
    5 H% r- {& _' m' f( ?% |
  103. #+ J8 ?4 Q/ l; |4 y" [. o& F
  104. #------------------------------------------------------------------------------#4 d+ E9 T; H" {/ t: v0 w/ ?. p
  105. #  EXAMPLES:
    ( {0 K  A3 _' q7 ?  D4 h( I% Y
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    9 [% r7 B* Z3 V! N# s* p
  107. #  shadow(1,false)         # Turn event 1 shadow OFF! s+ x- [) I6 ]* [" x
  108. #  reflect(:all,true)      # Turn all event reflections ON
    0 R1 L0 Y' P3 w% Y3 I; Q* G
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear* C* _+ \# p0 |4 e9 n
  110. #
    $ g" N- x7 W7 P# P! f. ?$ r, V
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering% r; V3 ]+ |  d0 _
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    0 G- G: r! k4 I, ~3 C" I- y( I
  113. #        should use these effects sparingly and only activate them on events
    : Q$ S- Z" z! {/ b5 p0 k9 @
  114. #        that require them.
    4 X& J4 d. c0 {
  115. #------------------------------------------------------------------------------#
    7 @! P. L; q9 f' |3 s6 U1 o5 U
  116.   % {! a% _+ ?6 k
  117. #------------------------------------------------------------------------------#
    9 j- A% s* ]( V7 U5 L9 ~4 _
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
      F3 C$ e$ V$ a; ~9 o, O1 A0 |
  119. #------------------------------------------------------------------------------#3 `( ?' p# z. O8 O
  120. #
    - U3 G( e: ?- e9 v' o/ r
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default ; N& i! N% [5 t5 q. \
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    ! ]( q7 q" F  J
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    # c8 x6 _  f: p, C) V
  124. #
    & v7 z% v* N4 U$ f: w% ]6 V
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    7 W3 I& F. t7 }' k$ i) S7 p
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    4 S0 x+ K* V- _1 p
  127. #  v_icon(x,x,x,icon_id)
    / g$ ~( X$ \4 H4 e, }; n7 l; n
  128. #' _+ S$ \1 W6 u
  129. #------------------------------------------------------------------------------#
    9 b' O5 o5 B$ `9 e) j
  130.   8 R. ^# p: F$ q4 G" A3 L+ D
  131. #------------------------------------------------------------------------------#( w0 n4 H9 t5 ~5 J8 |# J
  132. #  SCRIPT CALLS for shadow options
    ! ~' w" e# v$ A& q, h* O
  133. #------------------------------------------------------------------------------#" g9 x: O, _! w8 O0 X8 v7 q" Q
  134. #
    % J$ d2 s6 M* g2 u/ f4 X# D
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the $ d6 p# r, J' K5 u
  136. #                              # light source number you wish to change (for. K6 V; y9 y4 p" i) }$ d5 I
  137. #                              # more than one). These are reset on map change.
    : E% j+ T; g; @% F  I: \. e: I# B
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.0 N% k  {( z5 t5 z) g
  139. #                              # This will need to be in parallel process if you
    7 g& [$ k2 P7 n1 e6 q. c" i! H
  140. #                              # want it to be a moving light.6 k& \7 W1 O$ G/ F' {
  141. #' }9 w9 j% F: o% F4 q
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below4 d7 w9 P- u8 D2 G
  143. #+ [& N) ]/ h; K. z9 }+ X/ F. D# N: |
  144. #    # intensity = opacity when standing next to the light source (255 is black); ^6 t; b1 R3 k0 W
  145. #    # fade = amount shadow becomes more transparent the further away you are.0 p+ s9 W$ x0 s: z! D
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    9 P( A) N( r  V: G* e; d5 `" h
  147. #! _9 |/ w1 X& S/ l. x
  148. #------------------------------------------------------------------------------#+ z! O+ ~5 M5 @6 T# S# l7 ?& A
  149. #  EXAMPLE:( q0 F' |: b: S, t# ^1 q
  150. #  shadow_options(80,10,false)    # This is the default setting.
    * L+ `' V( ~: G6 s
  151. #------------------------------------------------------------------------------#
    * D- \. c/ @' s- @* Y+ i
  152.   " ]5 g2 u0 J- }) |6 z$ q* ^
  153. #------------------------------------------------------------------------------#' N7 d( U9 [( I8 E
  154. #  SCRIPT CALLS for reflect options
    ; Y0 F+ E/ ^8 ^, F  |
  155. #------------------------------------------------------------------------------#
    ( F, C, x' O1 o6 R* [
  156. #
    1 V" |. y" ^; r1 t  q8 T$ |9 R  i) e
  157. #  reflect_options(wave_pwr) ( v" Y2 k( a  X4 e2 I7 X8 W5 V3 {
  158. #  M5 s, X% o6 F- p* H6 k- q5 q( j7 r
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    2 |. K* V" p9 J2 {$ b! F
  160. #
    7 ]% q- {4 D! W! s9 g, |' `1 Q
  161. #------------------------------------------------------------------------------#
    8 u4 V/ N- ~2 ]' K. b7 @
  162. #  EXAMPLE:
    2 g, F# J8 q! _" ]: m3 x
  163. #  reflect_options(1) # Turn wave power to 1
    7 j6 H- W6 e2 G$ ?
  164. #------------------------------------------------------------------------------#( q) q( z. v! {* J+ ?
  165.   
    $ t, q) [3 k! f4 _  E4 h$ [2 x! U
  166.   
    8 L; _& t1 k0 g. _7 v$ ^: F% Y
  167. #------------------------------------------------------------------------------#
    ; ]9 H5 d1 d" A+ s8 S& J$ L
  168. #  NOTETAG for ACTORS
    % @1 O) M) {7 P% B' I: e
  169. #------------------------------------------------------------------------------#" a# w9 W: A. ]! G( h1 f5 `
  170. #
    * |) G' _5 j& S7 H( K. K4 X
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!): k8 j% Z/ b7 }2 k- w/ Q
  172. #) R/ a* p3 ^8 Q% \& K  }
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections1 e1 k  X- N, g: C7 V* j' G
  174. #                                  # and use the character in position 'pos'& n! O6 @- o* `* j7 x4 v, u
  175. #
    # O- ^+ N( t" r5 c0 s! N7 m
  176. #------------------------------------------------------------------------------#4 ]% m3 E3 s5 }
  177. #  EXAMPLES:* n" T/ a, A1 j
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset0 H" C  v& V* E# ?% [" a- }% k9 E% G, [
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset) X' u' ]3 X  K0 l* _6 i
  180. #------------------------------------------------------------------------------#
    1 I8 O# H' {1 @$ O+ E0 _( i
  181.   * y! s/ H3 n" F1 B8 i+ E4 i- p
  182.   
    ; I% f1 ]  j; o4 d$ ^. u1 L+ s  _
  183. ($imported ||= {})["Galv_Character_Effects"] = true! i, Z- j. f& P6 ~
  184. module Galv_CEffects/ T% n$ a4 |' Y% W9 y" o, K5 ]. ]$ \
  185.   
    % E0 i; ?. z6 B$ d
  186. #------------------------------------------------------------------------------#  
    # `' }6 D# v$ a2 A4 B, S2 x
  187. #  SETUP OPTIONS; [6 ]* v2 L- e- A/ S  D
  188. #------------------------------------------------------------------------------#% B& E' j# G4 M: }3 v
  189.   ! X+ F- l, C8 I& s
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    ! b1 B: M+ u; ^) y% ^  g0 t+ Y$ ?
  191.                         # region on the wall you want to make reflective (and
    - h/ g' k) G7 ^# Q$ ^
  192.                         # then use tiles/mapping that make the parallax visible)
    0 @$ e+ f/ A- `4 ^$ D% ?; |
  193.   
    0 O& S/ _% w) D! Z# C3 j6 {
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    / M  \: C6 o6 f8 B/ M
  195.     1 d: X! g' A! b( E6 J. ^
  196.   REFLECT_Z = -10       # Z level of reflections
    + v9 d0 T/ J! X+ l* ~) L; u- M
  197.   SHADOW_Z = 0          # Z level of shadows/ T9 n* \5 g5 s
  198.   
    ! ?& F3 n" J. A) b
  199. #------------------------------------------------------------------------------#  . |0 n  X+ G! R% H$ k% t0 f
  200. #  END SETUP OPTIONS
    5 F! w  q8 m) V1 I. }; L4 W
  201. #------------------------------------------------------------------------------#; L! k+ u) M5 N5 S4 Q" K* i$ H
  202. end, r: G3 f) e) @# b
  203.   
    $ c, R9 w+ n  m- T
  204.   
    : h' \" f/ U' I  B5 L5 j' E$ I2 J: W2 Q
  205. 8 ^5 F2 A& @) |$ C( E! ~9 I* p
  206. , O7 ?/ h+ u) L* C
  207. class Game_Map
    % H2 q+ X9 u; N" N% I. x
  208.   def do_icons(refresh = true)
    . n7 O. c5 F4 M2 F
  209.     @events.values.each { |e|+ W$ s& M3 s1 C0 x/ _7 `; b* }
  210.       next if !e.list& X) ]) X9 _: m/ B" }3 `
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/" y) I, B- D! ~/ W: S
  212.         e.icon = $1.to_i2 z0 K- I# N! w% N5 Z
  213.         e.icon_offset = [$2.to_i,$3.to_i]1 k1 {) I  q/ ]9 `
  214.       else5 [# }0 C1 W6 s4 O% f
  215.         e.icon = 0
    3 D( Q$ Y5 N( ~$ L* B1 C
  216.         e.icon_offset = [0,0]$ t, |) ^" n4 i! X5 Q/ W5 P
  217.       end! k$ d2 F- f+ W+ q
  218.     }
    3 q& v$ P% L3 ~
  219.     SceneManager.scene.spriteset.refresh_effects if refresh; R% g: i3 Q0 l' H3 l
  220.   end+ R# q1 d1 y& }9 z
  221.    
    6 s9 H; B& E5 T/ Y
  222.    2 i2 K5 T; Z/ F& s0 i' [* v
  223.   def do_shadows(refresh = true)9 _/ }! |: n3 R; |
  224.     @events.values.each { |e|' y' b+ {& G+ v1 A8 ~
  225.       next if !e.list
    : _. j" p$ r6 M2 x5 U1 \! P1 c6 }
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    ' ^% z4 `. n2 [- B* z) w4 D" A
  227.         e.shadow = true
    ( A: C  o/ {. D$ j% a# T9 r
  228.       else1 @% ?+ A1 X- s) |2 w9 w
  229.         e.shadow = false0 O- I! H4 |# E" U: m; e3 w) \
  230.       end
    * A5 I( N5 g0 w5 r1 E! l
  231.     }
    ' ?( g' t* \  V
  232.     SceneManager.scene.spriteset.refresh_effects if refresh# J6 J- }! K/ }
  233.   end# ~: T2 e' Z- K5 x+ o+ p) |
  234.    * a/ _  K+ r) ]; `
  235.   def do_reflects(refresh = true)
    ( D, s; f6 u0 K' G4 l
  236.     @events.values.each { |e|
    8 J2 ~, ]2 E( P3 Z) S3 Y
  237.       next if !e.list# a; H4 `: Q% w! k
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/! `- X2 ^* g7 C4 W+ o- a& I
  239.         e.reflect = true
    " N/ }" r, y1 o6 c- l$ R- G9 V6 G3 [
  240.       else$ E# Z1 {+ F+ V1 j- s* x
  241.         e.reflect = false0 V" a: m9 m  V; ~% _
  242.       end
    2 _6 y, R# U: A7 W) }+ i3 o8 L3 V9 b
  243.     }$ Q; n' Q% Y* Q* \: D
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
      E5 b; i7 b0 n* d( X( z* W$ Y
  245.   end
    . L+ l- Q3 H. ~7 a" ~
  246.    
    : l- J/ C. P1 M% O3 [; C3 Z4 X
  247.   def do_all_chareffects
    9 ?$ J, O, O  D* k
  248.     do_icons(false)
    4 @" h9 m) C9 Z; z1 Y
  249.     do_shadows(false)
    0 C5 }& _  v0 x9 f9 }
  250.     do_reflects(false)
      J: I! l! \/ `) A9 Q5 N
  251.   end" |. }; K8 X9 q' [8 x
  252.    
    1 e- X7 `6 v7 d8 e# S( C& @# Z
  253. end # Game_Map
    7 }) O) ]& A. q- G+ b& \1 s6 k! j

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2024-4-28 23:43

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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