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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

& ~  n; e2 B0 W* Z6 `( U这个代码怎么用啊,有大神知道吗。我从国外找的。
9 n( D+ p6 g5 y& }1 p2 y& `$ jhttp://galvs-scripts.com/2013/02/21/character-effects/9 c+ K9 ~$ Q3 B! Y& `& y
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#/ c6 i( e. F3 _9 Y8 S+ _- w
  2. #  Galv's Character Effects
    / S+ a4 |4 t2 O, ~9 g' n; ~& W
  3. #------------------------------------------------------------------------------#$ q8 L0 B+ T3 s  s$ O; o4 P8 _) Q2 }' C
  4. #  For: RPGMAKER VX ACE
    ! w. `( C5 @& \1 N0 e# W
  5. #  Version 2.1' m7 G9 K( [( y% z3 J
  6. #------------------------------------------------------------------------------#
    ! r( K* E* I; v4 D! L! Z' J% a
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows- |7 B  O! S- _
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    , A0 V4 w% _# k0 V2 s( P$ m
  9. #                           - Fixed shadow facing bug; Q$ o" u$ q; Z: q5 k, S
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    * [8 k5 W; w( q: G# b7 d/ f) N
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    4 [+ |; j! q4 f% a
  12. #  2013-02-22 - Version 1.7 - bug fixes
    " [) t  ~- o5 f
  13. #  2013-02-22 - Version 1.6 - added icon effect
    ! c# h3 }# u  u5 V7 Q! P2 ^3 i! @
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    5 t/ p1 E1 g  s8 W: y6 \
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles7 |& K( K* ^0 _8 R3 ]: i
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks5 s, R& h. ~6 j+ z9 {
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)% T& ]! R7 [# Z+ {0 `6 G) \9 B2 Y
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    $ U2 J/ P7 h6 e; s# ~2 T( I% i
  19. #  2013-02-21 - Version 1.0 - release
    & y( s- g: K8 E$ R8 {5 v1 L' U  c# R
  20. #------------------------------------------------------------------------------#
    # O7 k, @; w! c( a
  21. #  This script was made to provide some additional effects for characters such: w  E0 S+ M" Z6 W
  22. #  as events, followers and the player on the map., u5 G' b9 e+ o3 ~: y
  23. #  Currently it includes:
    # q* ?9 H5 j# z& y+ W% r
  24. #4 `& \* K( j4 y6 N5 z( F4 W
  25. #  Shadows9 l2 V/ {9 x, r
  26. #  Shadows that appear under player and events in a directions depending on* y  {! q2 w4 n4 J8 z  l9 ?0 j
  27. #  a light source that you choose.
    1 [+ \: F6 M- V1 c/ j  S; v
  28. #$ }( e4 j  v+ S# N2 p! K
  29. #  Parallax Reflect# ~* I- ]) A4 }: U" U) \
  30. #  Reflections that appear on the parallax layer for events and actors to be
    7 V3 d& O( R% T' r$ B
  31. #  used for things like reflections in the water or glass floor etc. To get
    " T: K- C' C3 F  g3 W
  32. #  effects like the demo, you need to edit the charset graphic to make the water5 Q0 ]# ^$ M& ?: k! \5 J. q
  33. #  partially transparent.% I$ z6 `3 _% u1 A
  34. #
    + B  H* _/ ^& v5 ~; ]
  35. #  Parallax Mirrors
    $ i% q7 u" M* W; W; U6 y
  36. #  Much like reflect but are instead actors and event are reflected in a mirror& H3 l; R6 R, M  Z  B$ E
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    5 x  q1 B  e5 L0 H/ |- |
  38. #  changed so actors and events can use different charsets for their reflections
    ! b: p" r2 \5 r6 ?6 f0 }& V
  39. #
    7 j  E9 X4 k( {6 {& y0 ?
  40. #------------------------------------------------------------------------------#
    + ^$ ]. i* e+ ^& C' a! E) i
  41.   : `- w% G: N# B" z' w/ F4 A
  42. ( ~3 e. {" R; I4 u' d' ^
  43. #------------------------------------------------------------------------------#" G% z) a5 }  I! W4 a
  44. #  NEW - First event command as a COMMENT
    , Z) s: G4 z$ P. K/ w
  45. #------------------------------------------------------------------------------#
    / s2 B& {3 g9 K' ]2 k; u
  46. #  You can add a comment as the first event command on an event page to set if7 a. P5 S4 v$ A: u6 Q: H$ g, T# ~+ a
  47. #  that event has an icon, shadow or reflection active. The tags to use are; D) n0 r5 M- }* y: q) s$ s# v! @9 W
  48. #  below, all must be on the same line in the comment.
    7 c/ q3 N/ i! |7 S* d
  49. #; X  A6 v" D4 X
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    # t; d# ^0 A9 s% ^0 |" l5 g# o* i
  51. # <shadow>           # set the event to display a shadow
    % ~: \+ v' }6 f) ?' c
  52. # <reflect>          # set the event to display reflections3 K3 u0 o2 k0 X$ ^0 V* ?7 [6 V
  53. #
    , b  A4 S" F/ u& A& B  Y0 o7 f
  54. #------------------------------------------------------------------------------#
    3 S8 l  K" a; |
  55. #  EXAMPLE:# J( _& g& I9 V- U! A; D9 N
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event3 I* W/ n# e: m) I3 I0 u/ ^3 f
  57. #------------------------------------------------------------------------------#
    # i- @4 F, f3 L* c* i& Q3 ^+ [
  58. * F! z4 \. B  \1 d6 f

  59. 3 e* `9 m2 H) w5 H, C2 l# O( W
  60. #------------------------------------------------------------------------------#8 _" F2 A2 N# W' Y+ R
  61. #  SCRIPT CALLS:
    ) ^1 V( e, C3 H& D1 U) A! z% y
  62. #------------------------------------------------------------------------------#. j$ ?& x$ a! |
  63. #" Q1 X5 t2 }0 Q
  64. #  char_effects(x,x,x,status)7 {3 W) b* o% Y0 H: A
  65. #) f- m: K, _. I) ~$ [4 l
  66. #------------------------------------------------------------------------------#, \( q/ |- r9 z1 _5 @
  67. #  # each effect can be true or false to enable/disable them during the game.
    / B0 o" x5 x9 r1 {6 r2 i% e$ g- u  V2 r
  68. #  # you can change multiples of effects at once, x being the effect number
    7 f/ a  G# ^# h, V
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    % |; c. L* U4 T( k1 k: T  t
  70. #------------------------------------------------------------------------------#9 D: H) {  {- D, m3 T; J! f! u1 o
  71. #  EXAMPLES:
    6 D: h: H& m0 Q
  72. #  char_effects(0,true)              # turn reflections on
    4 ]1 Z1 ^' @3 ~4 J& f
  73. #  char_effects(0,2,true)            # turn reflections and mirror on8 H/ f* Q4 K! l/ J
  74. #  char_effects(1,3,false)           # turn shadows and icons off- m" l& {/ S6 C
  75. #------------------------------------------------------------------------------#
    4 `+ l; C# G$ |6 q0 @+ L$ C$ y
  76. #
    2 ?" y8 _  T5 `% A- m/ W& N+ J
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    + U" t) x; w! J# u- B' x' p7 N
  78. #. i! `9 L3 g, g5 E
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset( V! n: |6 x3 ?8 S" |+ T
  80. #0 {( s5 W, g1 c1 j# ^5 g: o4 q9 z2 R
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset$ D: @$ @0 i4 p: A, e6 Y4 g
  82. #
    $ }* \9 ^3 q  O1 o1 ^3 S# R8 a7 E8 j1 A
  83. #------------------------------------------------------------------------------#4 J) v3 U- w2 I* Y+ E! G2 z
  84. #  EXAMPLES:& u; {/ D  c" K+ {+ j$ o
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    * P. f' a* S1 y( s* `0 ^
  86. #                                    # in position 2 of "Actor2" charset.
    / q4 Q) W+ H1 h* w& g" U
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of  \! I$ Z: n5 Z  j' z8 d  C# i4 H
  88. #                                    # "Actor4" charset.2 k5 i9 K2 {! b. a
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of! m+ _, g! R5 F6 s" R% y: q% U, @
  90. #                                    # "Vehicle" charset., H5 l& B" w/ J" i  x1 H6 h
  91. #------------------------------------------------------------------------------#. W* s  ?5 M  r2 o
  92.   ! V* n. A% ^% }7 g
  93. #------------------------------------------------------------------------------#
    & B/ I1 i5 B7 \- |
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    $ R$ N0 f/ B5 C8 _0 x; Y; q/ g- Z
  95. #------------------------------------------------------------------------------#3 q$ O/ P4 k7 G% f; D, u4 M
  96. #
    ) N: \; S3 B' ^! x9 f
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off" l! C* q+ a" e  V8 a2 _
  98. #                          # use this to specify for mirror and reflect.4 n# G8 V' ]* W2 N& X- B9 i
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    ; d( M+ p# X# p) X! ]! o6 ?
  100. #                          # to change all events use :all/ j: ?! E& }% R1 b. D% E
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make3 ]/ ?0 y! p' J! s  F9 M- R  ^
  102. #                          # it 0 for no icon.# W0 |9 C* H  a! {6 e, ~
  103. #
    & H4 G5 B/ B) v& h
  104. #------------------------------------------------------------------------------#
    % m6 |5 C" I: q$ Z6 c7 z
  105. #  EXAMPLES:
    " r( o5 O7 C( ~% ?$ `
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON/ T0 |$ Z5 I3 Q$ u* O& B$ m; x
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    9 d4 n1 A* {, H- k" K' p5 Q) a
  108. #  reflect(:all,true)      # Turn all event reflections ON
    4 ?/ i% l  A' ^7 o: n8 u" _+ w
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    9 a! ~$ {2 i2 U
  110. #) f2 v, g# l# d  F
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    0 w  L5 N) D# W
  112. #        a map. This is a design decision to try to keep lag to a minimum. You! B5 L4 F# C2 w) h2 y
  113. #        should use these effects sparingly and only activate them on events
    & W) z( L" k9 ?+ c, M7 A
  114. #        that require them.
    * Y& ~& |9 f% V3 e( t; j0 n
  115. #------------------------------------------------------------------------------#  ~! |& h4 h- s, R3 g
  116.   / G& H9 Y! X  O8 n4 O
  117. #------------------------------------------------------------------------------#; {( g# v5 J9 \9 C
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES7 R! d" \0 @4 P5 C9 u- k
  119. #------------------------------------------------------------------------------#
    : I1 X. v& ]3 ^: u. Y8 ~2 U; L) v
  120. #( g% q$ ^# k; J" S+ c
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default " e& D: `  B% S
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 3 i+ Y6 M8 ~, q: c' ?! z6 B* N
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    : f% u' s0 a* I" E4 v1 @6 L& f4 V" H
  124. #' c: ]  \0 }. W( z
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    1 J# D6 r) e: ?0 u( ?% [! d
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    6 X4 E9 v# d4 Y) S
  127. #  v_icon(x,x,x,icon_id)% b5 h) s3 G, k3 L; V' O
  128. #
    . b; x# l* c6 H  \: }6 j) b
  129. #------------------------------------------------------------------------------#( N  N5 s. Y5 L6 X8 c% h6 R: Z3 h" W
  130.   / u+ U' {- ?+ w; a% g0 K5 |2 q5 A
  131. #------------------------------------------------------------------------------#
    & t! t3 f6 r0 o( R, G
  132. #  SCRIPT CALLS for shadow options0 y! G  D. z6 X4 q2 w4 y0 ?. u
  133. #------------------------------------------------------------------------------#1 D+ B1 M& g3 O8 C
  134. #* m* Y$ K3 x; L& q
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    # t: @& Z; d* O% o, O
  136. #                              # light source number you wish to change (for
    ' p: l; Z; u# Y$ }
  137. #                              # more than one). These are reset on map change.1 h7 {: R/ G& @0 T! m% s
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.0 s# u# d+ `) [8 B$ F  d
  139. #                              # This will need to be in parallel process if you$ v# b' c' ?. I$ t# k" B/ @
  140. #                              # want it to be a moving light.0 \4 H! q% q0 H9 a
  141. #$ P% j8 H" O9 ]$ ^# y- f
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below; f7 T! ^3 ?& w- O; [5 E* [/ ?
  143. ## a9 s  L8 [+ T3 J/ a6 k/ }
  144. #    # intensity = opacity when standing next to the light source (255 is black)0 }/ G% R0 {) r
  145. #    # fade = amount shadow becomes more transparent the further away you are.2 X; M" r) w$ @: N& s% M
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    3 R) ], b+ s9 |) R7 V1 `$ N
  147. ## r, Q* s% ^; M1 t% s! d$ R
  148. #------------------------------------------------------------------------------#( Q6 b3 D( I; r. m4 o
  149. #  EXAMPLE:) ^8 ?& g# {8 e0 D6 t# W
  150. #  shadow_options(80,10,false)    # This is the default setting.3 y- E5 d$ j* D; R: F7 X
  151. #------------------------------------------------------------------------------#
    , S, K2 p" X' }& G! G- N
  152.   
    8 b; y3 s- \6 ^- G
  153. #------------------------------------------------------------------------------#
    ( H: L) j. v9 m4 F0 t/ T9 V  X
  154. #  SCRIPT CALLS for reflect options+ q; T9 S% R8 N! z
  155. #------------------------------------------------------------------------------#0 i, u( H9 C7 C8 Y' q
  156. #" l3 i/ f: p* n7 P: f
  157. #  reflect_options(wave_pwr)
    + U+ E  l6 J" Z( g/ C/ t; |
  158. #! ]+ {: Z" q  B. c. |6 r
  159. #    # wave_pwr = how strong the wave movement is. 0 is off6 R+ _' Y, a0 o+ g+ z3 {
  160. #
    1 Y) \# r2 D/ v% ?  H: r( V- m
  161. #------------------------------------------------------------------------------#
    % _% I4 K* R1 Y4 b
  162. #  EXAMPLE:
    2 e" X- @$ o& b, ~, a) \
  163. #  reflect_options(1) # Turn wave power to 14 `$ ]8 v2 E- J) v' @
  164. #------------------------------------------------------------------------------#
    : i5 O( @0 y$ N
  165.   
    * Z$ |3 X- E) V
  166.   
    + A0 Y# Z; M3 E1 _6 |- g$ p
  167. #------------------------------------------------------------------------------#
    # J- L. z6 ^  E: Z" C! i8 a% T0 c
  168. #  NOTETAG for ACTORS
    0 ?. p5 e+ c8 O* U
  169. #------------------------------------------------------------------------------#9 M& L' a% n" U6 l8 {
  170. #% Y0 a% X* C% v; I) ?5 }( P0 k* L
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
      i" p1 I$ z, F4 R
  172. #
      b( j: I6 I. J$ ~3 @* Q3 g( M
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections  m3 _$ g( Z8 x0 U3 s
  174. #                                  # and use the character in position 'pos'1 P( |  M- P3 g( t
  175. #
    ! D& S4 Q! x8 T. v+ F' ~: y% z
  176. #------------------------------------------------------------------------------#
    # f, b# d& k) U
  177. #  EXAMPLES:% f' E" r- N% E
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    5 c) ]2 q8 o& F/ M
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    2 p. s' y* r; X" Z7 S+ y* Q
  180. #------------------------------------------------------------------------------#
    8 {* e6 s: U& @1 s, H' ]
  181.   ! M5 @* i+ \+ G8 c1 W5 z
  182.   
      f4 y/ B1 P4 B4 u& _
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    : B" x' a# _6 `
  184. module Galv_CEffects; C/ U8 p8 L3 z$ @& U( W
  185.   
    - T6 I0 O  U5 a$ `  \' Q* t, L
  186. #------------------------------------------------------------------------------#  - D0 ~9 u! N7 Q# C0 I5 w1 e
  187. #  SETUP OPTIONS
      k# ~* Y2 y9 k/ x5 k
  188. #------------------------------------------------------------------------------#/ T, N. [0 o1 @: ]: q, a; z
  189.   2 t% y9 K; A6 t* g. o' V
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    4 c$ |$ e3 I+ N* H
  191.                         # region on the wall you want to make reflective (and
    " ]# T* s. {$ X3 H
  192.                         # then use tiles/mapping that make the parallax visible)5 e; ?5 q$ Y- P* O
  193.   3 i; L  S; K5 J5 I: F( }
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters3 `  f( y( D+ N. t4 M. L0 E/ {- n2 q: H
  195.     ( o" R0 p4 [! X2 `6 t% H' a7 C
  196.   REFLECT_Z = -10       # Z level of reflections
    * ]3 P# [5 I( G* Q4 O
  197.   SHADOW_Z = 0          # Z level of shadows
    # o6 h0 J2 m8 J. _8 K
  198.   $ s, F1 r1 ?" s: X
  199. #------------------------------------------------------------------------------#  
    " ]; W" O0 g" {. H; s
  200. #  END SETUP OPTIONS& k& @1 K! o6 j& ~1 k! m! q
  201. #------------------------------------------------------------------------------#
    , E) ^2 \6 [( H6 H  a/ l
  202. end5 L( t$ k6 F) d
  203.   4 z" U0 u" ?- d- n$ m
  204.   # e- V6 T. Q2 [% [* y' e4 ?; V

  205. 3 p# w' m7 |/ E" g. R

  206. # d3 b7 `/ z% H! l# O9 z6 o
  207. class Game_Map
    + u9 L1 e3 O+ L( F# m
  208.   def do_icons(refresh = true)
    " A' p' ^- {6 k: [/ O  C; f* O
  209.     @events.values.each { |e|
    + _* v: C% {4 e& f3 x& Q
  210.       next if !e.list
      Q$ G6 F( P3 _: X$ {
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    % @) ?# x: d, _$ ?- b! b
  212.         e.icon = $1.to_i
    ' H0 p, I' `* s% P+ m8 o
  213.         e.icon_offset = [$2.to_i,$3.to_i]% x. P$ G' Z, O1 F$ J
  214.       else
    6 z  M! h$ A* N# N: Q( Q9 ?. z
  215.         e.icon = 0' ~! Y3 _0 h3 d- u! g
  216.         e.icon_offset = [0,0]3 f7 F; d; K5 C6 ~
  217.       end% Y  h$ [6 \6 A$ i, ?) w
  218.     }7 {7 C2 j$ F  d* T  m2 h7 i) R. K
  219.     SceneManager.scene.spriteset.refresh_effects if refresh/ \  D3 P$ E& U
  220.   end
    8 y. u* ]2 i4 G
  221.    . f& |, p% t# n7 a+ B" O. z
  222.    
    ) C  B" ~3 F# G5 q
  223.   def do_shadows(refresh = true)! x$ W7 H" c% Q
  224.     @events.values.each { |e|
    - s, j* Z: N; s  W
  225.       next if !e.list
    3 E5 u+ K$ y8 l8 O3 n2 M2 c8 O2 o
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    % G) u: N1 a. r& k0 ~( I$ i
  227.         e.shadow = true; e/ @- Q1 E& H- Q3 M
  228.       else+ R& K- T! h! H7 X$ P; k3 X- z
  229.         e.shadow = false! W0 R5 c' q. p6 q4 f3 ~  U2 I. u
  230.       end4 `' [4 n+ r. H$ h0 F8 B
  231.     }/ k: h; f$ e  a! Y8 I2 k- ~) E1 L
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    - c. q( y+ C. f( |( [/ U$ I6 t9 a
  233.   end
    # Y) T& _% [  z
  234.    1 @6 c8 M: q& L( J9 X% u
  235.   def do_reflects(refresh = true)/ p! r5 w4 u% U" `3 \; w
  236.     @events.values.each { |e|
    9 m) S) M% D; Z- e
  237.       next if !e.list
    : Y+ L$ c9 U* f$ k/ V
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    # r/ F1 ~5 |* K7 n& }
  239.         e.reflect = true2 V) s% C+ ?9 u5 d/ J- I
  240.       else' ~/ H/ V4 @# l8 d- k/ f7 r
  241.         e.reflect = false7 n, K4 s) q& _3 Z
  242.       end2 i' E5 p0 ^# x7 ?" j
  243.     }
    8 ~: w, m2 c- _: q3 y  n: |
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    2 U) v/ @& X/ X( w, c0 D" t9 F! _  n
  245.   end
    0 W6 C8 A, H# a  y
  246.    0 T! Y6 Y$ Y7 C
  247.   def do_all_chareffects8 p* \: B( W2 K, @
  248.     do_icons(false)
    ( a& q: O0 q: U
  249.     do_shadows(false)
    ' v3 j9 l6 Q6 S9 y; Y
  250.     do_reflects(false)
    3 R* E' ~/ ?: q7 T+ W
  251.   end
      z3 I6 @5 R( n( _3 ~0 T
  252.    . f) L& }9 o; Y2 Q4 V
  253. end # Game_Map  F: F* u% `+ m2 q/ B5 `

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-10-29 01:50

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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