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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
0 C/ y% W5 [; H. P) v% P" |( `+ a- V
这个代码怎么用啊,有大神知道吗。我从国外找的。4 _  M4 p% s' r' P0 G: y
http://galvs-scripts.com/2013/02/21/character-effects/3 D1 G! B+ w% o+ `+ z
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#  a4 o/ m% T! P1 d
  2. #  Galv's Character Effects/ j) h: H% m9 P% a
  3. #------------------------------------------------------------------------------#
    / L1 z8 r9 h5 |- V+ l- Z
  4. #  For: RPGMAKER VX ACE
    ! M$ c( n4 X( R' [- r1 O" M
  5. #  Version 2.1* Y  e( {5 b7 ~9 s2 h4 h
  6. #------------------------------------------------------------------------------#
    7 `% z8 p0 C3 y1 q7 ?
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    5 l8 v- x& J: G) ^
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    5 l3 v) _" X2 d* }; Q$ m" g( Q
  9. #                           - Fixed shadow facing bug
      }* P1 d& p) L3 b" u2 L; q
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    : ~; p# _7 q  X9 s$ o
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows' t) [  p- ^  p5 y5 v( H
  12. #  2013-02-22 - Version 1.7 - bug fixes
    " I; M' O! ~  d7 p1 N' g
  13. #  2013-02-22 - Version 1.6 - added icon effect; u7 s7 W9 W' ^' {/ h
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    ! K1 D0 _7 ]9 n! k2 k7 U
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles& U0 c2 M. f) {( `$ e
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks% Q( l- P1 |+ ]4 H. r' F
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    * O( W+ t8 I: D% z3 g) M
  18. #  2013-02-21 - Version 1.1 - updated flicker effect, [* e# J6 U" t
  19. #  2013-02-21 - Version 1.0 - release& ]7 t: `, m" S4 R* v: F: D3 b
  20. #------------------------------------------------------------------------------#
    - d" f( n( i$ Y* l
  21. #  This script was made to provide some additional effects for characters such
    0 S3 z/ a, o, `+ [
  22. #  as events, followers and the player on the map.
    3 A, G5 @' V& }6 H- W
  23. #  Currently it includes:4 O" ?9 {; d. ?) E- R4 L
  24. #1 e8 I+ z; A6 N- i* I1 t, p: Q' l/ j
  25. #  Shadows9 @) l$ a, i7 r- Z  T
  26. #  Shadows that appear under player and events in a directions depending on
    " p, x( [* C) Q+ ], I
  27. #  a light source that you choose.. O  O# k9 @/ M( P1 y
  28. #3 ?1 f0 p0 B' o' Y
  29. #  Parallax Reflect
    / Y& [! Q) |8 @3 H: R" Y. j2 Y9 c
  30. #  Reflections that appear on the parallax layer for events and actors to be. y! ~2 ?, B; x! C
  31. #  used for things like reflections in the water or glass floor etc. To get
    4 G: \& S: e- b. _2 E
  32. #  effects like the demo, you need to edit the charset graphic to make the water) ^( \4 a$ o* j" F
  33. #  partially transparent.
    9 d! I/ k/ d4 Y! Y3 X  y
  34. #
    7 X* |6 J/ y/ b; y, W& G+ V  M8 N- ^
  35. #  Parallax Mirrors) f! m& d! C# W2 F1 U
  36. #  Much like reflect but are instead actors and event are reflected in a mirror' C$ P$ C! {- _' V0 |2 m3 V
  37. #  on a wall designated by a region. Both mirror and reflect effects can be  V1 D  B2 }( `
  38. #  changed so actors and events can use different charsets for their reflections- g5 |" J' U& r( Q
  39. #6 A4 A. ?+ `$ h* ?+ K7 Q
  40. #------------------------------------------------------------------------------#3 P6 v; W8 b9 N: W/ b2 Z
  41.   
    ' J& ~0 C. W' E2 k3 y, v

  42. 5 f1 ?; L; {1 L  v
  43. #------------------------------------------------------------------------------#( R  {! R3 X8 V5 b$ q- H3 j
  44. #  NEW - First event command as a COMMENT$ z( k' I% j" l* s8 S  O7 s
  45. #------------------------------------------------------------------------------#
      P+ `: a. {% e5 x
  46. #  You can add a comment as the first event command on an event page to set if0 {0 e; y7 C# x& b* P5 |
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    5 |7 k7 i! S0 @5 @, a3 H3 m
  48. #  below, all must be on the same line in the comment.; N! {. G0 H+ c
  49. #
    ; P9 Y" w( @* r3 N
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)/ |& C4 j2 j7 w# K2 x$ \7 Y
  51. # <shadow>           # set the event to display a shadow
    ; y- k5 H. T4 `7 j6 g
  52. # <reflect>          # set the event to display reflections* \8 W/ o' {5 X! ^' U
  53. #
    & S& x; b! H6 P9 B+ ^6 @* r/ a  N( K
  54. #------------------------------------------------------------------------------#- W" C: O3 V/ x, `
  55. #  EXAMPLE:
    , V) V$ |- l) ?
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    . Y$ I) P5 d$ N# D0 z
  57. #------------------------------------------------------------------------------#: L! o9 ^# f+ \9 e

  58. . W: v& b9 ?9 x

  59. 3 I' C. u+ M6 D: B
  60. #------------------------------------------------------------------------------#& J9 q+ @4 R! N* e6 p9 G
  61. #  SCRIPT CALLS:# ^+ H( f% d" p) }2 \  o1 s# X: M
  62. #------------------------------------------------------------------------------#: Y% R5 }9 j8 `( p9 I: P5 x+ h8 B( a7 w
  63. #
    2 X( k% t, v9 @1 c
  64. #  char_effects(x,x,x,status)
    ( z  X! x4 j) n4 r3 Q- Q3 ]3 x
  65. #) B5 ^$ D1 @! {. L$ v" D
  66. #------------------------------------------------------------------------------#0 j, r6 e  \2 `1 O
  67. #  # each effect can be true or false to enable/disable them during the game.
    , W3 j8 G: m$ V6 S: s+ c* K
  68. #  # you can change multiples of effects at once, x being the effect number
    # i9 s) c9 S* W- T
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons8 X, @2 v* {; A" [3 Y% a$ n4 t7 Y  h4 d: l
  70. #------------------------------------------------------------------------------#7 ]0 Q+ Y( J* E, W1 T
  71. #  EXAMPLES:
    / Q8 X7 \9 K7 @$ I9 ^
  72. #  char_effects(0,true)              # turn reflections on4 V# Y% ~' Z8 A6 i- a! H9 ]
  73. #  char_effects(0,2,true)            # turn reflections and mirror on- b7 c$ Q6 A0 w4 G- A0 Z& G) B
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    9 u4 Z8 R& o) M  u
  75. #------------------------------------------------------------------------------#
    8 C4 a& j$ J2 ~- E- P6 r
  76. #
    $ w3 `4 @1 Z, c
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset" \/ E  ]* `6 N8 @  n" r
  78. #
    5 n* q/ X5 g, @2 l  G+ k
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    + c$ |, \: L+ a- X6 W5 g  `- d3 b: M
  80. #
    / Y6 Y$ x# P  I9 I
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    2 N! P2 k1 L: \# ^5 w6 w
  82. #
    4 Z/ {# E7 A- Y$ Q2 a5 o9 f
  83. #------------------------------------------------------------------------------#! Z  D0 Z- G6 w, N) R. A
  84. #  EXAMPLES:) g% o1 M  A- u" W; I
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    8 L& g$ Q8 \  Z* {
  86. #                                    # in position 2 of "Actor2" charset.
    ) a* A# i5 {" B; X6 g5 h/ C
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    6 D# c* g7 L* n( k* ^6 ~
  88. #                                    # "Actor4" charset.
    . X  h1 C) A3 g4 I
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of" \' d& U1 E* ~+ u1 `
  90. #                                    # "Vehicle" charset.
    $ P8 m  G! q* Q
  91. #------------------------------------------------------------------------------#
    1 s. o+ B3 K0 Y! a& ~
  92.   8 L& i/ x6 i3 R# f! H% S% x! ?: E
  93. #------------------------------------------------------------------------------#5 q# I2 O! H/ R, b6 P+ Q2 {: U
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS# V8 j! m/ `' o! I+ ^
  95. #------------------------------------------------------------------------------#" ]& l! Y9 B9 s, ~
  96. #
    , V! S2 t. Y. ]
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    . ~0 K9 R2 c, L' H+ F5 Q# j
  98. #                          # use this to specify for mirror and reflect.7 ]8 G! i( y$ @0 ~" `7 Z- n6 a" |
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change2 Z+ Q$ _0 ^+ k6 Y* o' S4 m
  100. #                          # to change all events use :all
    * _) U% Q( M  b( m9 h
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make; w! n8 q2 m; }
  102. #                          # it 0 for no icon.
    : L1 X. r  q$ z
  103. #
    . l5 Y7 q% m& X* i( [
  104. #------------------------------------------------------------------------------#( G9 z: i! F" j
  105. #  EXAMPLES:% d; V0 V& z1 W
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    : H; @  j6 T, a* w5 ?  {4 k3 {& J
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    + C. R. q* J0 m' w! Z! a, m# i
  108. #  reflect(:all,true)      # Turn all event reflections ON
    ( h1 A0 A  }2 x) x, Q( W8 Z
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    8 {# B. q3 C* i
  110. #2 Y+ m2 X& W2 e9 h$ F
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering) O* a3 W5 v. |
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    % A3 `" i/ G' w: s+ B& ]3 S
  113. #        should use these effects sparingly and only activate them on events
    2 a2 q* y- q# E0 G9 E
  114. #        that require them./ D6 U0 D. q0 \/ ?+ P2 v
  115. #------------------------------------------------------------------------------#
    1 V$ r' g+ F5 T8 G% W1 h) k
  116.   9 V6 q$ V  R( v; o. }/ f  P) Y. e  N
  117. #------------------------------------------------------------------------------#1 G4 i9 R, b- w( d3 ]3 X% y
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    # r" V9 K: m; l2 m+ T
  119. #------------------------------------------------------------------------------#
    ' l  m4 B3 @( l! \
  120. #, O+ ]( J, ~" ]. \
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default # V- U, ~6 ^! V" f6 b9 Z
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    , Z! b6 q: E; c) y: K
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    - _# }- D9 I/ w, J1 G
  124. #; e  E' a1 t  Z3 [1 F, m
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    $ V, A- }' U' N) i" I
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.+ }, l" N% n6 Y
  127. #  v_icon(x,x,x,icon_id)
    9 i9 |* z4 A( m# [6 I& R3 \
  128. #
    9 L, c! j' A7 j8 o. \3 a- o) T- y
  129. #------------------------------------------------------------------------------#
    3 ?/ ?2 q; e: M
  130.   
    - r% c7 @2 M7 [- t7 u
  131. #------------------------------------------------------------------------------#* A( J9 D8 o1 c6 |! y
  132. #  SCRIPT CALLS for shadow options
    7 j6 z( m' _( `
  133. #------------------------------------------------------------------------------#
    3 ?8 k* I# d3 ?7 \" d
  134. #
    # ]' b( \. Y6 l% ~5 k' ~7 O
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    + Y5 F6 Y; v0 O9 N
  136. #                              # light source number you wish to change (for, o4 P) Q% G$ m
  137. #                              # more than one). These are reset on map change.
    / h1 d  h1 w$ r# L
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    9 P9 y; ^; y6 H  z+ N+ |& w
  139. #                              # This will need to be in parallel process if you
    $ C) }' y! g4 I3 K
  140. #                              # want it to be a moving light.) s5 g" F9 C7 ~) T7 }- r) F
  141. #
      M* E. [. {1 A+ Y% G( j5 p
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
      ]( {9 b1 ~. j, {  ^4 q) A( W
  143. #
    4 {) ^5 b+ T4 [
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    4 W4 o* G. Y# u+ I6 _9 l
  145. #    # fade = amount shadow becomes more transparent the further away you are.
      ^" i7 P5 T. e& G) ~7 J
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    0 e2 u5 F1 E0 G7 F6 j, ~
  147. #
    1 h0 `1 Q- C, D5 o
  148. #------------------------------------------------------------------------------#7 R0 ^& a2 w% m/ h0 F! p) o% F$ X
  149. #  EXAMPLE:& s. }' Z2 d# `1 F
  150. #  shadow_options(80,10,false)    # This is the default setting.
    ' U( Z1 Y: f6 |" O5 L% s
  151. #------------------------------------------------------------------------------#
    / b' C) I5 y  ~# h4 h5 P$ H1 `' F( o! d
  152.   
    - L2 J! a& B: J. K
  153. #------------------------------------------------------------------------------#
    9 @8 e& s3 E3 M; t2 [
  154. #  SCRIPT CALLS for reflect options
    8 n( p8 c- X8 N* q0 U3 f
  155. #------------------------------------------------------------------------------#
    - L! n, R0 A) h& u3 O# V9 c
  156. #
    % J( W# f8 K6 k8 p
  157. #  reflect_options(wave_pwr) 5 v4 ]5 z, Y4 n
  158. #
    . R' }( f) M3 T( F; s9 |
  159. #    # wave_pwr = how strong the wave movement is. 0 is off2 T5 i9 {3 O, C9 ?0 G* A
  160. #$ R% M) _) |/ X9 t1 B" @
  161. #------------------------------------------------------------------------------#/ T/ i$ {4 Z6 E2 m
  162. #  EXAMPLE:2 k: x5 n7 y* E# u* P. @8 Q
  163. #  reflect_options(1) # Turn wave power to 1* g# E- h& E7 Y4 ?1 e* i
  164. #------------------------------------------------------------------------------#
    / P  w. h2 E  s' X
  165.   
    9 V, S: b) p3 N9 d4 P
  166.   1 D5 C. U4 v7 |' O7 r1 I) F
  167. #------------------------------------------------------------------------------#3 c6 a& s3 |1 u
  168. #  NOTETAG for ACTORS
    2 R: c! \" x4 E: n/ A: o" g
  169. #------------------------------------------------------------------------------#
    ( q: f# l& ]) r8 _9 e1 ?4 J. n$ G
  170. #0 L% r+ ?& p1 e' X( y
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    $ J2 r. S# S" z1 q) n$ b
  172. #
    " O( B* H; q7 W5 [9 s/ d; W/ w
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    ! G% `/ e7 \8 U* k5 `2 n' `2 Y
  174. #                                  # and use the character in position 'pos'3 b$ w3 s" g. |) }8 l
  175. #
      W8 g- y9 B5 ?8 F
  176. #------------------------------------------------------------------------------#
    . g# N/ X+ R9 {- n# @
  177. #  EXAMPLES:
    ! ~- T1 n" G/ Q% }' _3 [& h* [
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    3 p' l& }. X; V! h4 y
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    ' R& |7 r( `1 m6 ?& o: y
  180. #------------------------------------------------------------------------------#2 w* |3 O" a5 m$ k3 o
  181.   
    6 K9 Q, D+ G0 B  F" Y
  182.   * ?3 t; r1 o7 l) X2 X" T2 J
  183. ($imported ||= {})["Galv_Character_Effects"] = true- n  D4 V* {. {  Z
  184. module Galv_CEffects
    / I4 z' Z, z$ o( v8 B& ]# V
  185.   1 [: j* y# N/ g1 ?6 }1 b/ Z
  186. #------------------------------------------------------------------------------#  7 ]. ]8 z" Q6 `% _- ~
  187. #  SETUP OPTIONS
    3 Z5 y; p& Z: Y6 g" k% F" v4 i
  188. #------------------------------------------------------------------------------#( z3 @7 X4 G/ V' @5 Z
  189.   
    7 x/ \% ?7 O# `' f" k: ?
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    8 s4 [" E0 r& _- C  q
  191.                         # region on the wall you want to make reflective (and$ W" I8 K( S# j* h' P
  192.                         # then use tiles/mapping that make the parallax visible)& `$ _' ~: |8 v$ I( v, F7 k: K1 Q1 S
  193.   3 i; y7 F% S0 W( f, I" z
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    4 q8 Y' T0 ?2 L3 G2 f% [2 _
  195.    
    , T1 \: i. T- J$ ^  D
  196.   REFLECT_Z = -10       # Z level of reflections
    9 X. b; G2 Z7 J4 j1 u) n
  197.   SHADOW_Z = 0          # Z level of shadows1 G, ~$ Q- _* H$ g
  198.   
    $ S' [: k% Q/ l( {3 D- }  {
  199. #------------------------------------------------------------------------------#  - M5 ~% ?/ o8 L. G& \) h
  200. #  END SETUP OPTIONS
    " A0 h/ K. m* j' z+ v# r- B
  201. #------------------------------------------------------------------------------#2 Y" ]9 f% a  F
  202. end3 V/ _6 P' L6 K2 B: |+ W
  203.   2 J' i6 @0 ?9 {" `# Q
  204.   ! W* E4 j7 U: p$ Q) p( j# `3 m* F
  205. % f" h) s# Y6 j, C) Y( e
  206. , d) V! D  n7 S
  207. class Game_Map
    & C+ P: ]) i( t3 n8 I
  208.   def do_icons(refresh = true)
    & N/ q; P/ ]+ t3 B3 V4 P; g7 S
  209.     @events.values.each { |e|
    ) `. H7 |) p  `: ~3 ~% ~
  210.       next if !e.list0 `' z3 Z6 c' ], m+ M6 {2 S4 L) B0 Y
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/) x4 z! B9 k5 p% }* d
  212.         e.icon = $1.to_i& e; y" D; N5 y" @
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    7 G, o6 X9 j' n& L/ E4 c
  214.       else
    ) x7 r0 g  P: E
  215.         e.icon = 0
    " g  T+ p0 B6 {0 Q
  216.         e.icon_offset = [0,0]
    # \: S1 X( p' |" ^
  217.       end$ O  o# w9 ]+ p! Q8 ]1 }9 z7 x; P2 X
  218.     }3 Y  z2 d. c, V8 g; c; g8 O/ i/ e
  219.     SceneManager.scene.spriteset.refresh_effects if refresh0 `: M+ v' `/ t2 z
  220.   end
    , h1 o! q, k# g. c# }
  221.    8 C: i; G# d3 L
  222.    / ?" ?3 p  ]$ F3 W
  223.   def do_shadows(refresh = true)
    / g  E" h- ]; F/ h: X* ^
  224.     @events.values.each { |e|; g1 C' Z. @, q* n
  225.       next if !e.list
    ( a& B) e& x; W7 N) h
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    . M% i( R3 C$ g% X& i( i
  227.         e.shadow = true
    $ o# M; x& b8 {+ y: s
  228.       else8 W) a: a  \  g" y
  229.         e.shadow = false
    $ J7 u) W6 C  k5 G! M2 _2 b! e
  230.       end
    . q/ u1 @. u. Y1 a. T7 F, {1 P. {# m
  231.     }; D' X/ C4 J' F7 l5 K: n. E
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    + A; }* y1 _$ R1 u
  233.   end
    - E  i# X; ~/ f' q
  234.    
    / y0 f( z* S' B+ C. `
  235.   def do_reflects(refresh = true)
    / m; u: ?7 c+ Y- O
  236.     @events.values.each { |e|. d2 M5 t7 V" U! R
  237.       next if !e.list  e: Z/ T9 x* e2 F; {- [0 d* g- x
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/' |) T$ X# j) i! @  k1 o. R
  239.         e.reflect = true
    9 p+ T+ \+ m4 Q6 w. F8 u
  240.       else
    3 D; A6 a6 N! h* K
  241.         e.reflect = false
    ( y) t& S: t3 \( m; W  M0 O$ q
  242.       end4 K: Q/ u7 F! ]1 q$ L' R4 h. w
  243.     }' _+ a! L9 s+ H4 V, a
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    ' O, |$ |+ P; g
  245.   end
    2 V6 X$ {: S  O- ?8 w1 g
  246.    
    4 A: |" b; L  g/ O
  247.   def do_all_chareffects
      I* @# R; O' l4 Q6 ^. e
  248.     do_icons(false)4 I- L" A. \- G: m7 A
  249.     do_shadows(false)
    3 x: }8 j/ J$ c+ W& u) h5 f3 ~
  250.     do_reflects(false)6 c4 R/ P& a+ X  _0 r( g
  251.   end
    5 X; M$ F: i5 p  Z& ?
  252.    7 f2 K! p( U6 `& A  L2 h+ P4 O1 e! g
  253. end # Game_Map
    8 y, ]2 M$ @- [

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

使用道具 举报

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

使用道具 举报

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

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

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

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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