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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

! _+ E( u% D8 P  q* _0 F1 s这个代码怎么用啊,有大神知道吗。我从国外找的。
9 N/ V$ E+ T& j# E) W3 Yhttp://galvs-scripts.com/2013/02/21/character-effects/
6 u" @  D4 t' J( A是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#: s) _8 m3 [0 I$ [3 y2 U+ r! ~6 z
  2. #  Galv's Character Effects
    " i+ g# I" E, m" E+ X. _0 y) y. g
  3. #------------------------------------------------------------------------------#1 X( E( g# X$ a5 y* _' x
  4. #  For: RPGMAKER VX ACE
    # {9 l, Z( e0 S! u9 H/ ~
  5. #  Version 2.1
    , b4 F9 ?$ s7 T
  6. #------------------------------------------------------------------------------#
    7 G1 S4 R. Q: T+ t* w! ^* p  P  y
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows( I. }+ b; I8 i/ V5 m8 i) B
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    6 \) `! z3 |# o: H
  9. #                           - Fixed shadow facing bug6 o4 H  y, d* ^, {7 L
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows' I( G) n" ]; g2 b, L. u2 I5 c; n
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows8 h, I/ n* B0 T% r9 r5 O
  12. #  2013-02-22 - Version 1.7 - bug fixes' x1 n& W8 J8 a
  13. #  2013-02-22 - Version 1.6 - added icon effect
    # J( v0 d8 h" @8 a. \
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    4 Y) R7 f2 ~& R& P5 }& k: q& j& i
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    8 e% D$ o; Z; V8 ~3 {! N; I3 |- Z( g
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    0 D! P( M+ r2 z  e: ?
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)/ g$ r8 w. F& B* \7 N% g
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    ( e- {4 A' S" A0 T( e, s
  19. #  2013-02-21 - Version 1.0 - release( [7 n* t5 S; [2 i* P4 n
  20. #------------------------------------------------------------------------------#
    0 A( A2 w# i* U; S
  21. #  This script was made to provide some additional effects for characters such5 M/ ]# J' F9 p% B
  22. #  as events, followers and the player on the map.  F: P/ _' C# Q! a# Z' s. r! F; ~+ C! a
  23. #  Currently it includes:
    * a/ x) m% C0 _- K8 \, n
  24. #/ p: k3 K- `% \
  25. #  Shadows
    0 _! ]$ g! k, k& I5 U
  26. #  Shadows that appear under player and events in a directions depending on
    ; Y1 s4 ^/ l: k4 j
  27. #  a light source that you choose.' K& M' \5 @" j0 w  l! ^$ V
  28. #
    9 t/ h3 v# ]$ a% N% h3 b! E) F, c
  29. #  Parallax Reflect
    " }/ q" d5 y) Q& {9 T0 ]
  30. #  Reflections that appear on the parallax layer for events and actors to be
    ; L  ^1 m& \$ ^' y' k( v
  31. #  used for things like reflections in the water or glass floor etc. To get& d9 `- A3 E* N* g' o! x7 M* _! y- c
  32. #  effects like the demo, you need to edit the charset graphic to make the water6 F0 z: h8 A- t' v
  33. #  partially transparent.& l# Z/ o; q3 b9 J. ]& c8 g
  34. #
    2 b: r- J$ ^2 b: z+ |$ X5 p1 ~
  35. #  Parallax Mirrors* ]' F) g# L. |8 x% o5 s
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    ( L3 V2 H3 X# X/ o% ?1 S3 s
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    4 M. Y( o+ f& {+ P" H+ J  J+ h
  38. #  changed so actors and events can use different charsets for their reflections* x4 y( v6 t4 h. h
  39. #. T: P2 [/ m) L7 B
  40. #------------------------------------------------------------------------------#) |) Z, r' u( m/ _
  41.   + F) u2 O! o8 f! B: [1 O+ p
  42. * E, q0 T: t+ E' W3 v" B
  43. #------------------------------------------------------------------------------#
    # K! o: v# C" o3 \. k) W7 `9 s  c" d2 B
  44. #  NEW - First event command as a COMMENT# a5 \: ]* |* v( M3 p
  45. #------------------------------------------------------------------------------#8 x$ k3 `+ L! n! N& U
  46. #  You can add a comment as the first event command on an event page to set if3 @8 p( W* B) e) i2 z  ~8 m
  47. #  that event has an icon, shadow or reflection active. The tags to use are1 ]4 S: b% b" w1 U+ c' X( C
  48. #  below, all must be on the same line in the comment.
    ) f+ q# m/ ]$ J, D0 F7 V6 s
  49. #* }# L6 Z/ @2 b3 B) d4 [) N8 J9 N
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)* _, f+ h& I- n
  51. # <shadow>           # set the event to display a shadow
    . H5 e$ t- {0 h
  52. # <reflect>          # set the event to display reflections0 J9 ]8 x0 u7 I6 j) T7 e* n
  53. #
    / d& ^3 z+ X& o
  54. #------------------------------------------------------------------------------#
    0 [) X- y. e. `  A7 B7 s
  55. #  EXAMPLE:) L6 A' ], `3 D
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    2 j6 k8 _) K2 R; ^( |: B  N  |& b
  57. #------------------------------------------------------------------------------#
    0 m" D4 w  d" z3 g6 _" a1 ^

  58. : D: Z% E2 I0 k% ?' g
  59. 4 ?; Y0 K% ]) T3 C- ]) ~0 k% r$ g. J
  60. #------------------------------------------------------------------------------#
    ' Y! _; {( F7 z6 a6 T+ z& x' n
  61. #  SCRIPT CALLS:/ _! N! C/ U. f, y/ d; Q  x' X
  62. #------------------------------------------------------------------------------#
    8 t% m; ^  v) s0 R
  63. #
      \1 ~4 K7 D" u
  64. #  char_effects(x,x,x,status)$ Z6 `4 Q; q' R) @5 Y3 E$ V
  65. #; P" @' F) J. o3 h
  66. #------------------------------------------------------------------------------#0 ]# x  A" r1 b7 b' m
  67. #  # each effect can be true or false to enable/disable them during the game.
    ( R" J1 }  c! ?; ^
  68. #  # you can change multiples of effects at once, x being the effect number) ^, ?/ F$ v8 j; A, \! J4 l. o* a
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    5 ^# v5 }, d9 s9 ?: O. G! i6 D7 D: l) M
  70. #------------------------------------------------------------------------------#& W8 P2 @. D. ^/ o8 N! q" n2 p+ f3 e
  71. #  EXAMPLES:
    ( F7 x/ f: q" z/ Y/ \! a
  72. #  char_effects(0,true)              # turn reflections on
    * m' C' p7 a' C7 W7 ]1 A3 `
  73. #  char_effects(0,2,true)            # turn reflections and mirror on9 F. Y/ T- G4 K3 Q$ I" k
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    $ q$ r9 B: L$ x  Y/ B7 e# ~
  75. #------------------------------------------------------------------------------#: M4 N" m" M2 i6 n9 E7 ^& I
  76. ## k; p) B# X% U/ }5 O0 M3 [
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset/ y& u. @3 ^8 [/ f
  78. #& M, S" d! x0 s  [' J
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
      l8 J% ?6 E! U: J
  80. #
    , z& E3 t2 Z, {8 j4 W3 ?  C) W- D
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    ( _% o5 H9 U7 Q, I& G  S
  82. #
      t# K) ?+ a8 K
  83. #------------------------------------------------------------------------------#+ j2 W+ c( }& U6 S# V
  84. #  EXAMPLES:4 u& v; Y5 ?1 [
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite4 ^/ W' A9 k( \
  86. #                                    # in position 2 of "Actor2" charset.& G' m' b# v* }9 g) p  p, v7 _* G- b2 @  E
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of# a9 m3 |- M! {. T5 r
  88. #                                    # "Actor4" charset.
    ; |; U% v4 U" O* o: I' \
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    " w4 K4 O  `  ?9 w& e) Z7 {6 ^
  90. #                                    # "Vehicle" charset.; F( D0 j! Z$ c' }
  91. #------------------------------------------------------------------------------#( j1 p2 N0 x! t9 Z
  92.   
    . Q! a0 ^& h& _  m- d* U
  93. #------------------------------------------------------------------------------#
    $ f# `! }9 a. J0 w' Q( S
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    6 E! y2 a) v& [
  95. #------------------------------------------------------------------------------#+ |7 J: U4 s! n7 z
  96. #5 M- r+ ~3 @% j4 x) H) b# k
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off( x- y! [0 J' K( X: T0 A7 X
  98. #                          # use this to specify for mirror and reflect.% P: J) H2 ~6 ?) h7 x2 z, Q5 P
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change2 m& \: k; X& f, S9 O$ h4 h
  100. #                          # to change all events use :all1 _2 l3 f4 F- \$ |# u6 ^0 t. }
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    # M1 B, F! V( Z+ _( D
  102. #                          # it 0 for no icon.; r! [2 c( c, E; B9 g; P
  103. #: g) M0 ^5 S* l3 c+ B0 V+ N6 e
  104. #------------------------------------------------------------------------------#) H  g) e/ j, U. Q) t5 Y1 F5 N/ s
  105. #  EXAMPLES:( N4 w4 O. S/ B" b8 c$ ]$ F
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    5 S, v1 q7 ^) r' P" E
  107. #  shadow(1,false)         # Turn event 1 shadow OFF3 ^: z6 ?/ J* Q
  108. #  reflect(:all,true)      # Turn all event reflections ON8 l- h5 r1 K9 d+ B
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear. T( T+ o$ T, q4 E) o5 ~/ j
  110. #  ^, l8 g  _) h& M
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    : v3 W! g3 I6 ?7 r+ Z: K
  112. #        a map. This is a design decision to try to keep lag to a minimum. You8 p, g8 X8 i; {  U$ L2 h
  113. #        should use these effects sparingly and only activate them on events
    ; x8 J: d" R5 k0 \
  114. #        that require them.
    8 @6 S" R% G9 Q
  115. #------------------------------------------------------------------------------#2 j% g& T. h. O5 u7 B& p  N* F& x
  116.   
    / B0 q, n# N: D' q; X0 h
  117. #------------------------------------------------------------------------------#
    * D8 c1 X$ k, s0 C. x! n) y/ b
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    6 G6 l. g3 X) F, U7 g
  119. #------------------------------------------------------------------------------#, D/ a" M; j6 p  C
  120. #6 N7 c& Z" x/ |  J# F
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default $ M5 t" n' F: c/ F0 }- |
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 9 g% z+ e* ]$ m& a
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them." e0 S, h4 V7 ^5 a; A
  124. #( j/ Z. d: R# Y  h0 T
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects) [* P; t* X% L
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    , ~/ u& V9 ?, w
  127. #  v_icon(x,x,x,icon_id). T- C" Y7 E1 ^/ \: m$ \
  128. #- o, U+ B5 J- p6 w2 G
  129. #------------------------------------------------------------------------------#
    0 C; B. j" Q9 R
  130.   - e& _1 K: ?+ Q/ G# B0 b
  131. #------------------------------------------------------------------------------#" D1 l2 A' ^' N/ P
  132. #  SCRIPT CALLS for shadow options
    ' A: v4 d! M3 [* [
  133. #------------------------------------------------------------------------------#
      A% t# Y( ?" |4 n  V  U$ [3 {5 N
  134. #
    + Q: D4 b1 K( l. W
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the 8 l+ d7 `5 |  N: u- {
  136. #                              # light source number you wish to change (for% G9 o6 \& s+ k% `
  137. #                              # more than one). These are reset on map change.% ~9 y. g  {6 f% R: E* a- L
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.: ~7 B0 e% _/ ]6 ~
  139. #                              # This will need to be in parallel process if you
    3 }9 V8 R+ p+ ^2 _
  140. #                              # want it to be a moving light.6 o! a9 f4 a" R: w3 P* ~$ G3 |
  141. #
    / F- {. `/ \1 J) M5 I
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below1 a& i3 q7 b% G0 B
  143. #
    " b4 H9 ^, A' o9 }1 w! R; e
  144. #    # intensity = opacity when standing next to the light source (255 is black)/ i* }6 b* w; H# n" M
  145. #    # fade = amount shadow becomes more transparent the further away you are.' \6 T. c, `. B3 ~' o: L
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    , |9 t! O& K# s1 @. r( e& G0 e
  147. #
    1 ]% Z) c6 K$ _7 H
  148. #------------------------------------------------------------------------------#
    , e; d/ K1 }0 U" p' m$ \
  149. #  EXAMPLE:" ]5 y5 s3 ^# X8 n! l
  150. #  shadow_options(80,10,false)    # This is the default setting.8 s. q! Q" f* w% s$ D# ^6 P1 r/ b
  151. #------------------------------------------------------------------------------#
    9 w3 `9 k% C: s/ w$ E
  152.   
    , L, H' ^+ T7 |6 H9 n5 Z3 }
  153. #------------------------------------------------------------------------------#2 ?% A+ K! X  ]" V3 f
  154. #  SCRIPT CALLS for reflect options
    # p* K& c# W$ A8 T1 K) R
  155. #------------------------------------------------------------------------------#
    ; x+ k( f+ z0 T: I
  156. #
    : s! T( |) a1 x! e, O% I
  157. #  reflect_options(wave_pwr) 1 Z. P* u+ p$ W
  158. #
    , o; d0 T# W! A3 f" ]+ c
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    & }  f! A" j9 E2 j" p( Q
  160. #8 _4 c/ ~/ R& d1 V6 q5 Q
  161. #------------------------------------------------------------------------------#
    & N( V" A: ?! b% q4 M* l( C9 g
  162. #  EXAMPLE:
    / E+ r2 r$ B6 N$ ?/ n
  163. #  reflect_options(1) # Turn wave power to 1
    + K: P* M3 i8 z
  164. #------------------------------------------------------------------------------#2 r, g5 X, p$ I* l4 e3 T( H7 e
  165.   8 \5 Z2 b0 h+ c: u  m
  166.     |$ i8 P2 _, E  X) S
  167. #------------------------------------------------------------------------------#2 ^6 \$ r' r( Y. Z& Q* R* s
  168. #  NOTETAG for ACTORS# j) i7 I5 U# @9 _
  169. #------------------------------------------------------------------------------#
    3 V1 b- ~* F( Q0 _
  170. #7 s& L) _. M, K  I1 c
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    / {4 X6 k0 K  B# v* Y6 x
  172. #
    & Z) g' ^: Z. j+ X& M! g, K
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections9 e7 v$ K+ ]4 Y6 g" J5 q. \/ l! e
  174. #                                  # and use the character in position 'pos'3 @0 U: L) j/ A( y
  175. #
    ! d% l! B# o9 a  T
  176. #------------------------------------------------------------------------------#5 I3 X$ t0 \3 @9 A* U: U
  177. #  EXAMPLES:
    # v( z' \8 s# X+ E
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    ( s; J% n: ^$ f( I! [& `4 c
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    1 H& p4 r) I: e3 F3 d
  180. #------------------------------------------------------------------------------#/ G! w- V  }( V1 m/ k% B
  181.   
    4 r( V1 e" H$ r1 C3 G9 D
  182.   
    ; i+ i9 x0 u( v" S
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    4 o( G$ X+ b. D# e9 s
  184. module Galv_CEffects. Q: H8 _% U4 s7 _- L
  185.   % a9 W$ j: r5 E+ V: l& W( n
  186. #------------------------------------------------------------------------------#  
    / e3 p  ]3 ~8 y* X
  187. #  SETUP OPTIONS
    - g- o2 E8 S; q% v; \
  188. #------------------------------------------------------------------------------#, [* U6 G2 ~* _/ S
  189.   & P" m! n% N1 i4 {" W) Y
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    5 x0 r. e- i7 p" l$ b  A
  191.                         # region on the wall you want to make reflective (and
    % `8 r- _) f1 L# z
  192.                         # then use tiles/mapping that make the parallax visible)
    , I9 L4 m/ H8 T# d
  193.   5 t" \  v+ D3 i; |8 P6 ^
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    1 A3 M! m' ~& h3 J. o  n2 U+ l% Q
  195.    
      C+ ]7 l, c& z% @. ]% R! U
  196.   REFLECT_Z = -10       # Z level of reflections! @) H  E: W" o$ ?# D
  197.   SHADOW_Z = 0          # Z level of shadows  A2 Y! l2 G( M; X- `7 t' l( f. S
  198.   
    ; z* ^+ }. O: l: {) s1 F' i1 P+ w: A
  199. #------------------------------------------------------------------------------#  - \9 E/ Y( `2 x; e1 O$ I5 _
  200. #  END SETUP OPTIONS3 }7 B$ z1 E3 D- w3 Z' V
  201. #------------------------------------------------------------------------------#1 C0 L- S/ V1 n1 z- c/ ?
  202. end( [7 N: G; S( ~: y6 t# s' s3 h, x
  203.   9 [  \% X; z8 q( q' _: b! `, F1 K
  204.   - G+ P, m: p. z
  205. 6 D' [9 j9 K2 w: U, e0 W
  206. 2 B) d4 v) o+ e. ~
  207. class Game_Map) E7 P. [% q" h. O: a
  208.   def do_icons(refresh = true)
    # ^4 P- a9 {4 O. G1 \0 r5 N7 N. w
  209.     @events.values.each { |e|+ v, x: y* d" Q5 H
  210.       next if !e.list
    7 Q" R1 b$ I5 l
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    8 Y) t' t+ A! @' x9 J
  212.         e.icon = $1.to_i6 ~, w! B: u  b" u
  213.         e.icon_offset = [$2.to_i,$3.to_i]) E& S+ h0 u( f% ]3 @5 L& v
  214.       else9 {) d5 c; W+ x0 U
  215.         e.icon = 0
    6 r* F) N+ j7 c* A+ L8 H; ~" |
  216.         e.icon_offset = [0,0]
    + }) f/ |  b  ?, ~; Y0 F
  217.       end
    9 ^4 V  ?1 I# T6 u- [# D- S
  218.     }: U4 \5 d4 I  [6 i! w
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    & d- Y- D" ]) y- m: W) ], M9 T
  220.   end* _4 ]0 r/ N  d& ]- Y9 X. i
  221.    
    . v. q) w6 O" O) l: |
  222.    & K: `) Y* U2 Y% _* e* V
  223.   def do_shadows(refresh = true)0 n7 w" p8 G* Y- T
  224.     @events.values.each { |e|6 I6 Z* ]' S$ B: N) i& A) S
  225.       next if !e.list& z9 O8 x- I& F
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/3 ?0 |; P1 ]* R
  227.         e.shadow = true' q+ |9 b4 A0 C; ]& x0 D
  228.       else  Z4 n: X$ F* ~0 G* ^4 T
  229.         e.shadow = false
    $ U# {+ |4 e- a& M. m
  230.       end' i# ]  F; |& Z1 ~( _& l
  231.     }5 H4 I1 T% e2 V
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    7 Y# S4 S4 C7 A2 B
  233.   end$ K# x. i5 K  G' j* `# ~( \5 B
  234.    + B0 w! F- M0 D& w
  235.   def do_reflects(refresh = true)
    ( A5 Q' t& X; {
  236.     @events.values.each { |e|
    0 @5 o9 |2 `. O$ Q. d
  237.       next if !e.list( E% o0 ?9 _( D5 b8 u, x% @
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    . ^% U, [) R& Q
  239.         e.reflect = true
    1 w; x$ i% b5 W" x+ n: N
  240.       else
    9 t) w, G- @' J# m5 R( d4 O3 ^
  241.         e.reflect = false3 y! _* i6 y6 F8 R) w
  242.       end
    8 w+ m+ x0 C' U2 C; I" w2 v
  243.     }
    8 ?3 q0 _2 \$ x0 x/ v2 ?0 c- j
  244.     SceneManager.scene.spriteset.refresh_effects if refresh' b' I) r4 u8 a$ K
  245.   end
    ) J( {- j" t0 j9 t- |
  246.    
    7 w+ g2 E( j- y: h0 H. e6 m9 z" Z
  247.   def do_all_chareffects' n0 J) I4 U3 K/ X. R1 H2 _
  248.     do_icons(false)
    + _. B$ T4 S( w3 \7 D4 s0 A
  249.     do_shadows(false)( `) X, g+ R$ _. {* {/ n$ l. A  y
  250.     do_reflects(false)  W+ k% H( l  b7 L5 O7 u( V
  251.   end# w+ }, h* W& ]; |
  252.    
    + l( `/ N' ~0 Q
  253. end # Game_Map$ e, ~1 h1 g. D
  254. + Z2 v* w8 h$ f& R+ O: r" I5 o1 G& z
  255. 4 k  w: E) q+ S8 O
  256. * q. w+ R5 V1 H# t: l$ _8 \- W
  257.   
    0 _" D* \. J/ {- H9 k
  258. class Game_Interpreter7 n2 d; I: ]& j) s: e
  259.    
    2 \# Q: |  c0 `1 A
  260.   def remove_icon
    - T4 ]' ]% s( A6 j* Y
  261.     icon(@event_id,0)2 @4 d0 r/ l, F0 M
  262.   end
    % V3 q3 k* @$ m! i" O# t
  263.   
    2 A4 H" X8 S& G- p( y/ x; t
  264. #-----------------------------------#
    ! t+ B4 p; J; ^4 L9 e) e" e+ m5 w
  265. #  REFLECTIONS
    1 k. _7 D/ |* J# O, V
  266. #-----------------------------------#
    , W, V% t! q  M  K0 D* v
  267.   . t) \3 Q8 ~, Z( p' B0 @5 r. J
  268.   # Add/Remove Reflections from selected events- v& g( L2 o, [, G
  269.   def reflect(*args,status)
    ) Q9 _! S3 i* k3 A9 c4 s9 m
  270.     char_ids = [*args]
    ( G2 q  r7 \6 z( c! c
  271.     if char_ids == [:all]
    8 r" z( `6 G/ {9 R3 S
  272.       $game_map.events.values.each { |e| e.reflect = status }
    8 ~0 s1 y0 C! I( |. l, x3 {
  273.     else# l' ]# ~0 Q4 ~. r% y
  274.       char_ids.each {|c| $game_map.events[c].reflect = status }; @: N0 u% R+ J2 l9 S- N
  275.     end
    0 u8 Y/ N( x- r) f% [
  276.     SceneManager.scene.spriteset.refresh_effects
    4 e) B" }( u8 m3 a! H/ \3 @9 \. a# R0 u
  277.   end/ J4 w$ Z$ m" n, r( Q) d; w
  278.    
    ; L/ ~8 d4 o/ x7 s, Q
  279.   # Change forever actor's reflect status
    : p8 g7 f2 U/ w& g. Z' j: i
  280.   def actor_reflect(actor_id,status), C$ i$ l& z" o. E
  281.     $game_actors[actor_id].reflect = status7 H% N% X9 x' @  g# R1 X
  282.     $game_player.refresh2 _/ V/ S( X; R& b; S+ f5 l* Y+ [
  283.   end
    6 I0 h; `: K1 I* s5 C0 @9 q
  284.     % Y, |8 q2 a* d0 ~5 j* o: U
  285.   # Change forever vehicle's reflect status
    ) _8 a8 l( s, J% j' n/ ^
  286.   def v_reflect(*args,status). h' @- ^6 \1 M* f# b+ }7 p& y
  287.     char_ids = [*args]
    6 Y' w- p5 Y, H  a0 x6 D5 @+ z
  288.     if char_ids == [:all]& O  z/ o% m0 a
  289.       $game_map.vehicles.each { |v| v.reflect = status }
    3 [4 t. q& u, h/ w" l  @
  290.     else
    ; b0 ^! q  `' \& a3 w2 }; s
  291.       char_ids.each { |v| $game_map.vehicles[v].reflect = status }! q9 e( g* y6 J! ^) ~0 v
  292.     end! y9 E# c% {8 {$ P; Z8 x2 i
  293.     SceneManager.scene.spriteset.refresh_effects: I1 m' R5 W1 X6 u
  294.   end: w' A; j% K/ u$ ~
  295.   9 E7 J1 T2 W2 D; [$ I
  296.   def reflect_options(*args); N" n* q/ Z6 ~% H+ p) i
  297.     $game_map.reflect_options = [*args]& Q: T. {. x/ d! X1 n5 u  t3 o
  298.     SceneManager.scene.spriteset.refresh_effects9 _& H9 N. k( }; Z" _
  299.   end3 n7 F8 c! s) M8 z' n
  300.    
    1 ]' G' ~( }  f
  301.   # Actor reflect sprite change
    % r/ n$ L# p% C, m# ]
  302.   def reflect_sprite(actor_id,filename,pos)- q8 s  t- g) ?$ M$ D) ~  ]
  303.     $game_actors[actor_id].reflect_sprite = [filename,pos]+ O- W/ A$ Y, t. Y8 q$ a; p5 Y
  304.     $game_player.refresh% |" \' w, h, k- k3 T' o5 h; e
  305.   end
    " O# w9 h' ~- u8 j. S) i# }( V
  306.     ( D$ f/ z3 ^. [0 c4 n$ B
  307.   # Event reflect sprite change' d$ R7 d8 k3 [4 |  j6 i4 q7 y
  308.   def reflect_esprite(event_id,filename,pos)
    + g) z3 C  E: |0 ^+ r# \3 T
  309.     $game_map.events[event_id].reflect_sprite = [filename,pos]$ x! }- o0 o0 u, @: F2 p8 Q
  310.     $game_map.events[event_id].reflect = true7 c! F8 J$ Z/ o  d$ G& s# D, o
  311.     SceneManager.scene.spriteset.refresh_characters
    4 k! b, |" @! C2 L6 o/ Z- S
  312.   end
    - w2 M% j5 Y* e) Z! Y
  313.     " U! y  m5 c+ n0 T6 S# e2 {
  314.   # Vehicle reflect sprite change! N, h/ B6 z) e( ]: l$ n
  315.   def reflect_vsprite(v_id,filename,pos), v% e* R# |* G9 u8 E
  316.     $game_map.vehicles[v_id].reflect_sprite = [filename,pos]* X, c# f1 A, i" q* A4 `8 G* y0 B
  317.     SceneManager.scene.spriteset.refresh_characters
    / Y5 T9 l" \9 n
  318.   end
    5 n5 |: b' Z  H
  319.   
    0 r3 R" T; u' E  l: K
  320. #-----------------------------------#8 J6 X8 E- a* o4 |+ g, M( ]
  321. #  SHADOWS& {$ Z" C, q* j; J$ o3 g% y
  322. #-----------------------------------#
    ; U" D7 U, q" d4 i* b0 V* ?
  323.   3 v/ C; ^7 Z3 Y  l
  324.   # Add/Remove Shadows from selected characters
    & I, Y: V: b+ K  U2 |& N5 s  b
  325.   def shadow(*args,status)
    1 _2 |5 M, g/ C' Y! S& ]" l
  326.     char_ids = [*args]
    . i- y" D) ?5 _
  327.     if char_ids == [:all]
    + s. U7 u0 f: p( |' p
  328.       $game_map.events.values.each { |e| e.shadow = status }4 o/ J! f. y2 [8 y+ y
  329.     else$ E/ x6 y. E8 b
  330.       char_ids.each {|c| $game_map.events[c].shadow = status }
    1 V6 P. h& J/ \6 {/ L
  331.     end3 {3 W) x& n$ Q$ _: R3 R. U
  332.     SceneManager.scene.spriteset.refresh_effects
    ) }! a5 [. t& W7 `/ |, Y
  333.   end3 L4 k5 J* `& e- @" |2 l% I1 a
  334.       B% H) q. x# b1 x4 V4 `, T; N
  335.   # Change player and follower shadows
    $ e+ t" Q+ a7 E, ~
  336.   def actor_shadows(status)
    4 q! Q! N2 D+ h
  337.     $game_player.shadow = status
    % |9 A$ L3 A0 t* |% _, v
  338.     $game_player.followers.each { |f| f.shadow = status }
    + N) N6 \8 R5 A% p
  339.     SceneManager.scene.spriteset.refresh_effects
    ' I9 E" m/ C& f3 Q9 {
  340.   end
    * i% U7 s% _0 d8 R9 Y
  341.    
    5 O: b: n/ G! T4 w7 @3 k6 f! y' [3 ]
  342.   # Change vehicle's shadow status
    . M' M% o, r4 |- s! v) K1 r
  343.   def v_shadow(*args,status)* Y+ b  Q% E9 G( z0 u, ?: X
  344.     char_ids = [*args]9 Y. ^8 ]) F: E' |
  345.     if char_ids == [:all]
    ' p- _9 {* q3 [, m/ Q- _
  346.       $game_map.vehicles.each { |v| v.shadow = status }: d, F3 r7 b/ a4 A+ s
  347.     else+ R, V, F2 i6 S+ K4 Z4 ~
  348.       char_ids.each { |v| $game_map.vehicles[v].shadow = status }0 y" ~) z5 p2 c+ p1 v1 m
  349.     end, n  i3 b8 x( N3 G
  350.     SceneManager.scene.spriteset.refresh_effects
    * D2 U& l0 [, c9 E& m0 f8 ^! n! g
  351.   end( v0 `9 Y/ O* e8 T9 P
  352.     # U6 o) x! o4 N8 u' i
  353.   def shadow_options(*args)2 i3 a$ }3 `* `; N0 V
  354.     $game_map.shadow_options = [*args]
    ; F8 T3 K+ }% x% L" R
  355.     SceneManager.scene.spriteset.refresh_effects! f$ T+ `5 c3 s; Z& p: w7 p
  356.   end" }) |& T- w7 N/ l1 R1 D
  357.   
    $ x$ o7 V" ~3 o% S# t
  358.   def shadow_source(*args,shad_id)* `. s0 F8 C) w7 \& |' F5 ?
  359.     shadsource = [*args]9 f1 ]2 U# B# @2 n
  360.   / Y, G) P4 A# G% P# ]6 v# r
  361.     if shadsource.count == 1( P8 W& `& S8 D* ]5 r7 j" o
  362.       $game_map.light_source[shad_id] = [$game_map.events[shadsource[0]].real_x,
    & A- w! N2 z: v4 F# j
  363.         $game_map.events[shadsource[0]].real_y]
    : _; Q5 s* r6 y( F1 I8 I
  364.     elsif shadsource.count > 1
    ! K6 v% n3 ?: Q* G, M. l/ A" L
  365.       $game_map.light_source[shad_id] = shadsource5 \' @0 [& m7 |$ h
  366.     else( A% k5 }: R  E+ t- u
  367.       $game_map.light_source = []& B1 G6 V, v6 G6 E, ?) l$ C' z) b. i6 n
  368.     end8 y$ h# \9 k, H0 X3 d. _
  369.   end
    % x/ k8 H/ c6 V$ B1 D2 E
  370.   # j: ?7 n1 A! X% x
  371.   
    7 k7 c) B2 s: a* p
  372. #-----------------------------------#
    : v  P$ ^$ g( c+ I0 j1 o4 K/ i5 h9 E
  373. #  ICONS4 J/ x" d8 T2 F- ]# H) w" |
  374. #-----------------------------------#
    ! b( s- [" O+ Z# g  c: }
  375.   0 y( L* P4 S6 C" M
  376.   # Add/Remove Icons from selected events$ ]. S# A7 I- T% S
  377.   def icon(*args,icon_id)
    2 M2 ?: R7 h: ]: u0 A
  378.     char_ids = [*args]1 E$ \- Q. L: p3 u
  379.     if char_ids == [:all]
    - G$ U2 n9 K3 L! A6 C+ s
  380.       $game_map.events.values.each { |e|
    % z  ?! H: K1 b4 k6 ?9 \) }" R
  381.       if e.icon <= 0' ?' I& I3 Y8 j( P9 e
  382.         e.icon = nil4 _  g$ P  i# X; P
  383.       else
    , l" ^# f$ k5 i* m# ]
  384.         e.icon = icon_id2 x5 d/ r/ s8 o/ z0 |% a* p9 W* Q
  385.       end
    ! Z% Z0 q5 n% x" B& h( @
  386.     }
    1 K' G" h4 B3 c: J2 j0 e2 t
  387.     else( ]; T+ k5 U2 {6 W3 c
  388.       char_ids.each {|c| $game_map.events[c].icon = icon_id }. `7 @7 n$ l: G, X) _$ {7 C
  389.     end
    % i; V( a! j- G. u8 M& Z, t5 o
  390.     SceneManager.scene.spriteset.refresh_effects% Q+ ]8 g: f1 E2 }. x
  391.   end
    " d9 L$ j! |, P6 C% D0 o! V
  392.     * ]/ q  Z9 o, p3 ?, ?9 \5 a  l+ U+ D
  393.   # Change forever actor's icon
    7 w- Y1 t* Y) d/ Y
  394.   def actor_icon(actor_id,icon_id)
    $ r( d7 c: q# N, \
  395.     $game_actors[actor_id].icon = icon_id
    0 Q$ r" R' M+ m' r, W
  396.     $game_player.refresh& w  ~! E# Z5 \# i9 S5 L( M
  397.   end' c- h0 P. K3 _( o2 _, c
  398.    
    5 d. J$ R) ?7 w* `/ V
  399.   # Change forever vehicle's icon
    . v& W$ B5 x5 A; V. @+ Q
  400.   def v_icon(*args,icon_id)
    , {: n3 k# C" h5 \) z8 E- l% }+ X
  401.     char_ids = [*args]
    1 x  w; @- q4 ^( q0 v
  402.     if char_ids == [:all]
    9 V* i8 a- R) D7 n( c1 \
  403.       $game_map.vehicles.each { |v| v.icon = icon_id }
    9 u/ y0 ]! D5 S- b. B& `
  404.     else
    " K; |5 W& V5 m3 ^6 `1 ]
  405.       char_ids.each { |v| $game_map.vehicles[v].icon = icon_id }, t! R/ N9 s& {4 J
  406.     end  _- {5 N# \! ]0 c0 j! _3 G
  407.     SceneManager.scene.spriteset.refresh_effects
    6 X. u' _( Q$ V, |
  408.   end
    ( c5 @! M9 x: A5 t4 J
  409.   / q, F+ o+ B! @. w) z6 @
  410. #-----------------------------------#
    + s0 N- e% g) F6 m# y0 \
  411. #  GENERAL+ \, ?5 |4 Q1 {# U; X2 {, c; g
  412. #-----------------------------------#% D0 a7 M" Y) Z7 Q
  413.   
    1 O: F0 U& g" p- U$ Y9 H9 r
  414.   # Turn on/off effects
    . U+ r% p) X- m2 s* _
  415.     # 0 = reflect
    1 m& P. G4 m& K6 V( `+ ?
  416.     # 1 = shadow6 B' T- Y( Y8 L4 ^% Q  Z/ K0 l
  417.     # 2 = mirror
    1 C' N2 d  J/ A- A" z7 ]2 T
  418.     # 3 = icon8 N% W4 `# j! v" X" |  z( ?
  419.       * ?' O  a! |0 p* u( A7 |
  420.   def char_effects(*args,status)2 _( r* K/ [" G: }: G& \/ x
  421.     [*args].each { |e| $game_map.char_effects[e] = status }
    / j* _) B. Q: `
  422.     SceneManager.scene.spriteset.refresh_effects
    , o4 g; G# G; @* v* P" J
  423.   end2 F% R7 X" }6 e+ J, k7 |+ ^
  424.   
    , f0 i$ z& x' e9 @
  425.     5 o4 E$ n0 G( A, p' w, e
  426. end # Game_Interpreter
    0 K" N9 Y; K+ v* O4 C
  427.   & W$ D, Q6 ^9 e* e7 W
  428.   " N) [& s2 D1 I2 g
  429. #-------------------------------------------------------------------------------
    ' e" S! ~: [" {6 b
  430. #  Spriteset_Map* J0 H+ [9 Y- h. |/ Q9 O
  431. #-------------------------------------------------------------------------------' t: L" c( ^: q( Z' Y# [
  432.   
    . P. J: g! k  M4 j# P# \
  433. class Spriteset_Map
    , w& f3 H% M3 l$ A& R* u, }8 t
  434.   alias galv_reflect_sm_initialize initialize4 B- @$ `" k% X1 G- h+ H! C* u3 x
  435.   def initialize
    ' w+ L+ F4 |2 u' c
  436.     create_effects, f1 D+ f! I' \2 V1 n% H
  437.     galv_reflect_sm_initialize/ _# Y! P, J, ]  h
  438.     refresh_characters
    + j+ t! {9 L6 ?
  439.   end
    1 M# V2 u3 {, X3 e& O/ @& n/ t
  440.     8 ^* f+ ^* j5 Z: F' n2 M; a
  441.   alias galv_reflect_sm_refresh_characters refresh_characters
    % I, h* T' M" _2 g+ E4 j3 [# k( Y
  442.   def refresh_characters
    . D: j6 S: H2 S( G* b
  443.     galv_reflect_sm_refresh_characters& ?% _0 x& K4 Q( R& Q% p" i$ E
  444.     create_effects; X/ V+ q& v5 f( O/ i* k0 T
  445.   end
    , U( U5 e& q. c  i# E
  446.     ; V( I; [% M+ W4 K# q2 T
  447.   def refresh_effects# n8 k+ @- G" q
  448.     dispose_effects
    . i1 |' f0 s: ?" B; w" D
  449.     create_effects, Y# W! x) l5 u4 X
  450.   end0 q% ~, z# ^& d. N5 `  u
  451.    
    % ?7 Y. c. S! n
  452.   def create_effects
    , g1 T0 C  @& L. S1 x) V
  453.     @shadow_sprites = []
    * t4 y/ F9 z/ D6 M
  454.     @reflect_sprites = []
    - P/ B6 \! v2 q2 N' `
  455.     @mirror_sprites = []  b. h3 f: {  t, i8 X
  456.     @icon_sprites = []
    ' C( N6 C9 `7 G9 f
  457.       
    ) \% Y$ T% {9 T* w; g/ D
  458.     # Do reflections! Z( ]/ e. p2 L# H0 O9 o5 y6 k
  459.     if $game_map.char_effects[0]
    % k  K0 C! l: w7 p8 }
  460.       $game_map.events.values.each { |e|
    2 j+ A# z1 l8 u$ ]2 r
  461.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, e)) if e.reflect
    ; A; a; |/ S+ \. y* L; B9 J: y: H
  462.       }
    5 t  o3 x* K& ]2 i* r7 v6 O
  463.       $game_player.followers.each { |f|/ ?- B* Q5 S( ^+ H! O
  464.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, f)) if f.reflect
      B; D) Y$ z% L' k$ F
  465.       }
    1 _' k" ^6 t$ W$ X+ P
  466.       if $game_player.reflect
    . \7 [, u" I! s0 B) n
  467.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, $game_player))9 u+ H9 Z& {. M8 T& f  z7 M" z
  468.       end2 a2 C# E7 x0 L! q8 Z- n( V, H2 A
  469.       $game_map.vehicles.each { |v|4 @5 i2 E/ L. U9 t$ A' n- p9 x
  470.         @reflect_sprites.push(Sprite_Reflect.new(@viewport1, v)) if v.reflect
    3 T' h& R# A- R$ N' X0 s
  471.       }
    $ E9 w6 O- \/ V
  472.     end
    4 `5 n1 u3 a. H+ V+ N. E
  473.       
    * P3 X; ^3 _$ s7 ], V# C/ I' x) R
  474.     # Do mirrors
    . z9 [5 t, r" m
  475.     if $game_map.char_effects[2]
    2 N) ]- H0 X5 ~9 E+ y3 |
  476.       $game_map.events.values.each { |e|
    : q. y7 h$ p9 q, F, Z2 ~
  477.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, e)) if e.reflect& ^, Z* F6 H3 c& K, y& a' F
  478.       }+ M$ @6 _6 x8 B, o
  479.       $game_player.followers.each { |f|, h" |/ J8 Z! f. b2 W( O$ u
  480.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, f)) if f.reflect
    " A, k% w- q, ]& l8 Q
  481.       }
    ) H9 Z+ I4 o# a$ @- Y2 O
  482.       if $game_player.reflect
    6 y' Z: _# Z' q0 M% \& W
  483.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, $game_player))( Y. H" z% r7 E# S' m
  484.       end
    % }. H$ m8 b2 d5 a0 F+ C
  485.       $game_map.vehicles.each { |v|
    0 Z: e- d: J* E6 H% P# h8 R
  486.         @mirror_sprites.push(Sprite_Mirror.new(@viewport1, v)) if v.reflect
    1 Y3 i  k% J( [( s
  487.       }- j  E# J+ b) A. d. ]
  488.     end9 X7 a. V6 m9 V9 [5 O  j. C; M$ g6 u
  489.       
    + ~  @* ^# E6 ?& E+ A4 V
  490.     # Do Shadows
    9 q/ L' G/ ?! z) Y0 R# E3 U
  491.     if $game_map.char_effects[1]! O# T5 Y8 }4 K) Z) D
  492.       return if $game_map.light_source.empty?* ?" G2 v6 d! t: o& S5 v
  493.       $game_map.light_source.count.times { |s|/ @- Z% Z  a; T# g
  494.         $game_map.events.values.each { |e|0 \! L8 o+ ]" K; j( _* c/ J
  495.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, e, s)) if e.shadow
    6 ~) P! P# c1 S  ?
  496.         }
    3 @2 L  d% ], K- q1 B/ i- n
  497.         $game_player.followers.each { |f|
    + k( y; P8 @/ H) M3 ]$ Q
  498.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, f, s)) if f.shadow
    ! Q" Y. L4 v  }* O# E0 G2 {9 \/ ]
  499.         }  I9 w$ z! Q3 y, m- P
  500.         if $game_player.shadow
    & J+ v4 T  C( e4 u2 I9 ~
  501.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, $game_player, s))- P/ P. B/ f* Q3 I0 x
  502.         end0 B8 z, ?* O& J3 D" [
  503.         $game_map.vehicles.each { |v|
    ' `0 E9 O6 l- w4 n
  504.           @shadow_sprites.push(Sprite_Shadow.new(@viewport1, v, s)) if v.shadow9 o, b9 O# E( P1 {+ |" V% A
  505.         }
    + }, \3 v! a# n
  506.       }8 J8 k! A0 X1 C( P2 h
  507.     end( p- U" V* E; J6 T/ y+ O, G0 I
  508.         a! a9 x& ^: j
  509.     # Do icons8 q4 y  R  y; A: S
  510.     if $game_map.char_effects[3]5 i% Y3 k) I! z) H( g& u
  511.       $game_map.events.values.each { |e|! `" w: c5 L. N% K0 Y# i' k6 }+ v) q
  512.         @icon_sprites.push(Sprite_Icon.new(@viewport1, e)) if e.icon- e) ~, T" g& D7 W& X' P) \( d' A
  513.       }
    0 m5 N; T5 E; P5 c' G) v( z1 _
  514.       $game_player.followers.each { |f|
    : G7 g* R; _$ ~$ `1 }- Y: |
  515.         @icon_sprites.push(Sprite_Icon.new(@viewport1, f)) if f.icon
    & l4 ?" F7 z. s8 b# u
  516.       }0 _+ ?, Y( H$ b$ I) ]
  517.       if $game_player.icon4 V7 S# E% f9 ~
  518.         @icon_sprites.push(Sprite_Icon.new(@viewport1, $game_player))
    7 [$ v$ v0 c9 S5 o. ]
  519.       end
    - b0 o: N2 t& ?
  520.       $game_map.vehicles.each { |v|
    $ P% e) W. w0 X
  521.         @icon_sprites.push(Sprite_Icon.new(@viewport1, v)) if v.icon
    9 `; k9 E6 Y' L% P1 `0 m8 J0 S
  522.       }4 ^# y/ e( P8 x6 v+ |1 ]6 n
  523.     end
    # Z/ s8 z- A! {3 \1 `( M
  524.   end
    ' }) {( T  k5 B* a6 A% z$ t
  525.     - P8 h$ _! S6 \( z
  526.   alias galv_reflect_sm_update update
      U# @. L1 `4 z5 b: ]
  527.   def update% y" j6 [3 c6 z7 t. V0 J! V4 F
  528.     galv_reflect_sm_update
    : n& ^5 p0 k& G/ N/ H
  529.     @reflect_sprites.each {|s| s.update} if $game_map.char_effects[0]
    8 h1 z6 a4 ?* _! D: x4 ?
  530.     @mirror_sprites.each {|s| s.update} if $game_map.char_effects[2], c0 p% r! T* _7 Y) v
  531.     @shadow_sprites.each {|s| s.update} if $game_map.char_effects[1]& y) [" |$ p5 {0 {6 q( p
  532.     @icon_sprites.each {|s| s.update} if $game_map.char_effects[3]3 j4 q* y  M0 s8 b- g1 n# |: s, j
  533.   end
    7 `: w: E0 a% a1 r4 L; m% O8 t0 k
  534.   2 c7 L" r1 V& y! u# F" U
  535.   alias galv_reflect_sm_dispose_characters dispose_characters: A) W& v4 y/ q8 t# r- a
  536.   def dispose_characters
    1 t8 C6 ]  W) s2 l. T
  537.     galv_reflect_sm_dispose_characters1 B& E# N" n7 r1 w
  538.     dispose_effects
    + b4 m. x' J. v# U% H' s) D2 O
  539.   end
    6 Z4 D( L: N* e2 y: |# w
  540.     ) ]  c. W  {# {( a% t* o
  541.   def dispose_effects1 u6 m$ R1 v) i5 q
  542.     @reflect_sprites.each {|s| s.dispose}
    % J: N4 m+ {$ ~2 W( g1 H+ k  D
  543.     @shadow_sprites.each {|s| s.dispose}! D, T/ w& b9 D( G$ ^" v6 M
  544.     @mirror_sprites.each {|s| s.dispose}
    # f$ W% }$ I9 Q* |- d
  545.     @icon_sprites.each {|s| s.dispose}
    - s- q$ p9 U1 t$ x
  546.   end
    4 g& s6 j7 U% ~* Z6 k
  547. end # Spriteset_Map/ f' z$ f* }% A( i" q
  548.   
    % d4 I5 ~& A( F
  549.   
    % K7 _6 O9 s4 y  u$ k: k7 i( A1 {
  550. #-------------------------------------------------------------------------------6 [$ @. o" X/ }& w
  551. #  Sprite_Reflect
    5 j: O, C" e; _# j7 Z) h+ |
  552. #-------------------------------------------------------------------------------
    4 j- s/ I6 K* G) r$ A6 H1 s( U
  553.   4 P. K/ p' r' `  H# y) J  j
  554. class Sprite_Reflect < Sprite_Character# g6 q$ B  U' B2 t+ k& M' ~
  555.   def initialize(viewport, character = nil)( u5 D/ L- b6 y' b/ K0 r: ~4 b% N
  556.     super(viewport, character)
    # E" W! j5 P8 u" V2 X
  557.   end
    : Q$ a# L6 B6 W: ^8 R/ _/ X
  558.   * D- _  O# q$ v7 x7 N' A7 b
  559.   def update' W7 W2 m2 r% C1 ^% W. b2 X4 j6 X; w
  560.     super
    / T1 V$ n7 i1 W( _3 H! S3 R
  561.   end8 L  ]6 W9 h% n8 |- K
  562.     # H9 G. G: ]4 n3 M" ]. w
  563.   def update_balloon; end% F9 o2 b" X1 ~) z. |
  564.   def setup_new_effect; end& ]. N9 y4 ]; H" f& F
  565.     / m: \  I/ e) l
  566.   def set_character_bitmap% \" s; n# {. b
  567.     if @character.reflect_sprite0 ]# N  [) a+ A3 M
  568.       self.bitmap = Cache.character(@character.reflect_sprite[0])" H. a1 c3 f& X5 J
  569.     else; ~- Z. E7 s, B1 A
  570.       self.bitmap = Cache.character(@character_name)* L4 e7 V1 k* W" e
  571.     end
    # O  d  Y7 P0 I- i8 Y3 i
  572.     self.mirror = true
    2 y( y6 I( J, H) T( K4 o/ X
  573.     self.angle = 1801 X! K7 V! k6 G- T7 h/ B
  574.     self.opacity = 2200 e: D& [% F1 ?
  575.     self.z = Galv_CEffects::REFLECT_Z7 I" U- }' |; w$ c7 L7 H
  576.     self.wave_amp = $game_map.reflect_options[0]
    . B# b' C/ @" u8 V  O
  577.       ! \" B0 Q& c8 S2 G# S" x3 P
  578.     sign = @character_name[/^[\!\$]./]
    * E: V& z, M7 |& t$ R! S
  579.     if sign && sign.include?(')# n4 Z9 ]5 D$ L
  580.       @cw = bitmap.width / 3  G  ?$ U* P* l/ A7 p
  581.       @ch = bitmap.height / 45 m6 r4 Q) q# s2 L$ m+ Z
  582.     else
    - B/ s8 o2 B1 }$ T. k
  583.       @cw = bitmap.width / 12$ N% Y/ o- q, L7 P" E
  584.       @ch = bitmap.height / 8
    2 t. v% L% i0 V8 x# l9 b
  585.     end; n' O/ e2 |3 V: g
  586.     self.ox = @cw / 24 L% V) `/ Z0 _
  587.     self.oy = @ch" T% h1 f( A, s6 C) g. g, p
  588.   end
    , f% \  P1 s* b0 y. Y
  589.   ) d* [  r* k! y1 G, B9 k/ |
  590.   def update_position3 E0 y; o0 p! ?& l
  591.     self.x = @character.screen_x* _( j( g9 @* p, T- L+ z
  592.     jump = @character.jumping? ? @character.jump_height * 2 : 0
    . J  x% g8 M9 ^
  593.     alt = @character.altitude ? @character.altitude * 2 : 05 S; X9 y( ], @1 W
  594.     self.y = @character.screen_y - 3 + jump + alt: _: ?- E% i1 X2 }8 [- [9 ]: L  f' `
  595.   end& h2 P  N2 w7 Y5 `. E
  596.   . j2 s; |$ I1 R7 g# j1 T7 B) j' H/ r
  597.   def update_other; _. V3 {, t) q
  598.     self.blend_type = @character.blend_type
    0 H+ ~1 n: \: ~6 w* s
  599.     self.visible = [email protected]" r3 m, T" J! T7 u% B
  600.   end9 W. a+ _+ r$ w
  601.    
    8 N7 s8 J/ V8 k9 a! A9 Q9 ~
  602.   def update_src_rect
    * Q. @2 d- q( X. z2 G3 V3 c
  603.     if @character.reflect_sprite
    6 o+ j: W/ R/ W8 E8 f4 g
  604.       index = @character.reflect_sprite[1]! I, W( u7 a9 L% U9 b1 e( R
  605.     else# y/ N3 h- B' H7 s- q6 i, K: V2 c3 x
  606.       index = @character.character_index# E4 B6 R! H3 n! L* L- D$ q% N
  607.     end
      k8 z8 A/ G, k3 r0 j1 z" E/ W& \' ^
  608.     pattern = @character.pattern < 3 ? @character.pattern : 13 A% E( V5 U0 V% m5 S
  609.     sx = (index % 4 * 3 + pattern) * @cw0 m% m; H0 O" N" r
  610.     sy = (index / 4 * 4 + (@character.direction - 2) / 2) * @ch1 ~% j+ @* q! @) D2 U% s$ J
  611.     self.src_rect.set(sx, sy, @cw, @ch)0 _: |5 e7 {9 f* }) f% ~
  612.   end3 a: H; y+ y# R$ y; a, y
  613. end # Sprite_Reflect < Sprite_Character! M5 ?$ `  _3 c4 c+ J
  614.   . U1 J) s+ Q0 X& @+ q) F
  615.   % R4 F8 |# p& K
  616. #-------------------------------------------------------------------------------
    ' i8 a8 _5 o5 Z5 r, s
  617. #  Sprite_Mirror2 i- |6 l% V3 H9 l% @. u' ?1 b
  618. #-------------------------------------------------------------------------------
    0 G3 ~+ W. Z0 z7 E1 n) G3 E8 ^6 B5 c
  619.   ) \1 S% t. \0 R* l+ |7 P
  620. class Sprite_Mirror < Sprite_Character* H" G0 `1 I. A9 A" O
  621.   def initialize(viewport, character = nil)
    7 K, N/ d- o% R( }9 k' t
  622.     @distance = 0
    2 X  p; ~0 r% p( [. \. J+ ]
  623.     super(viewport, character)# S) U# a7 [/ {: e. Y* e
  624.   end
    & s: _  ?4 ^3 p  b
  625.     L' x) s( k8 ^! w# g3 a& R
  626.   def update0 F; K+ @$ s1 n1 H4 k" l0 T6 \
  627.     super8 N# U5 F! n9 z+ J$ s
  628.   end# h% g/ k. [( T( o1 J( E! \- ~; d
  629.     ; }/ i/ P( k7 n
  630.   def update_balloon; end. m+ n6 d3 F7 w5 K
  631.   def setup_new_effect; end
    8 ^0 _' H) Y; T4 V- a& o
  632.     * y" Q) E% x7 [" D) e
  633.   def set_character_bitmap
    0 [, c2 x  C$ o2 |# s( ?/ S6 u
  634.     if @character.reflect_sprite% B  t3 W" A) l5 A
  635.       self.bitmap = Cache.character(@character.reflect_sprite[0])
    : `( x: L' k1 E0 o5 `! \& ~
  636.     else, U6 I9 |8 s7 f6 {
  637.       self.bitmap = Cache.character(@character_name), [# _' N# Y' j2 c
  638.     end
    ! r, ^5 s/ n. y6 k/ l+ m0 @
  639.     self.mirror = true, Y( K' ~: r) @# \: Y
  640.     self.opacity = 255
    # V6 x9 ]" C) u9 Q, U  H9 A
  641.     self.z = Galv_CEffects::REFLECT_Z
      t" R$ ]; G' l$ J
  642.       
    1 o6 A& y* q1 j. Z9 ?
  643.     sign = @character_name[/^[\!\$]./]
    / H% E- o) d7 J  [
  644.     if sign && sign.include?(')' \6 x) y) ]3 X; G& }
  645.       @cw = bitmap.width / 3
    1 ]& E# u4 @, f% D% u& j
  646.       @ch = bitmap.height / 48 V8 f3 A) `( m5 p
  647.     else
    1 y- p% j- G* p' N# z4 n2 C
  648.       @cw = bitmap.width / 12
    : `2 ^3 g2 \" y* m
  649.       @ch = bitmap.height / 8$ v, u2 B+ u/ \7 E' n
  650.     end+ Q$ T- ]% P' h; J5 W5 o& o
  651.     self.ox = @cw / 2
    1 Q* W+ X/ E& l% ?) P* m1 @9 S1 Q
  652.     self.oy = @ch5 m  f- w5 q9 m# g
  653.   end
    . i* |4 B2 \" g; ]- X% Y/ a
  654.   
    9 @. s. d" `( c  T1 t( G9 I
  655.   def update_src_rect' X2 Z& @( G4 c' ]/ a/ i
  656.     if @character.reflect_sprite" L9 j% O0 f' y. r8 ]3 M
  657.       index = @character.reflect_sprite[1]
    5 T# p  c( P! `7 F) n/ G; |: n7 u
  658.     else
    3 X- _' a, {8 ^- K7 k
  659.       index = @character.character_index9 m5 X8 K  N) I. l/ n6 g) X# r
  660.     end0 n$ b3 I! Z- R6 Z4 o
  661.     pattern = @character.pattern < 3 ? @character.pattern : 1
    ! ^' N: S, g( y  ?/ B$ t6 F
  662.     sx = (index % 4 * 3 + pattern) * @cw
    4 `% O# C9 T# C* }. K
  663.     sy = (index / 4 * 4 + (10 - @character.direction - 2) / 2) * @ch
    ; d9 }5 X3 h! k; W; y( W5 ?" N
  664.     self.src_rect.set(sx, sy, @cw, @ch)
    9 Y1 O9 w" X- }7 M6 A0 ?$ C
  665.   end
    ) Q& H  }1 K* j7 N: y+ k7 f* h
  666.     2 T3 G5 _/ X( O& @. p2 k
  667.   def get_mirror_y
    6 ]- D! W) @7 H
  668.     20.times {|i|
    : r% j( B0 L, I1 o# u4 f7 u; l
  669.       if $game_map.region_id(@character.x, @character.y - i) == Galv_CEffects::MIRROR_REGION5 d9 W6 B9 v7 d' z1 g
  670.         @distance = (i - 1) * 0.05
    1 k( u( g4 c5 b+ N
  671.         [url=home.php?mod=space&uid=502659]@DISPLAY[/url] = @character.y - i - $game_map.display_y + $game_map.height' F2 F! L1 E5 j! C: s9 w3 k
  672.         self.opacity = 255$ a4 Y1 G* O( w( T! z2 w( B
  673.         return (@character.y - i + 1 - $game_map.display_y) * 32 - i * 4
    3 E% ?: M7 S& Z/ {3 @
  674.       end1 Z( @# F6 e# T
  675.     }* z* x7 S* K1 \0 R$ E% ~/ D, s/ W5 W
  676.     self.opacity = 0
    ! D% t2 B: T3 Z5 @3 H
  677.     return @ch8 {, ^" ^8 X  i! m0 z
  678.   end
    / f! i; p+ H6 s# g3 F+ O# c5 j: b
  679.     ' ]1 m, d& }+ e  R3 f9 e; k' B9 G
  680.   def update_position
    ; H, r# C3 L% F) q2 D& d
  681.     self.x = @character.screen_x" D1 W$ R$ O; w: J, I* h$ C, |
  682.     self.y = get_mirror_y - 6( b7 T8 x9 u+ e( z$ w- m6 ?, T' [
  683.     self.zoom_x = 1 - @distance
    $ a$ r' k, j( Y& j$ f7 S
  684.     self.zoom_y = 1 - @distance! k) c6 g6 p4 Z/ Q4 {2 S* B
  685.   end. F  f9 N0 l: b
  686.   
    , z9 l) b' e9 F$ B6 o& }) F" [
  687.   def update_other
    5 n; B1 q0 _9 [; U# F1 K0 O
  688.     self.blend_type = @character.blend_type
    1 n; d4 {) E# A1 t& N
  689.     self.visible = [email protected]3 a, g. ^/ u7 ]" h% W( E
  690.   end
    % w$ I9 e, u+ k2 i  y2 M2 i% z
  691. end # Sprite_Mirror < Sprite_Character- h+ g( F" N9 f# u
  692.   
    $ \9 |: U) @: o& g  |4 m
  693.   
    4 z9 W, U3 N1 \, B- s
  694. #-------------------------------------------------------------------------------
    4 f3 r( ^; u) q
  695. #  Sprite_Shadow
    6 A/ m3 {1 O# {6 k
  696. #-------------------------------------------------------------------------------# d8 X1 t/ R: @+ v; a- t, B
  697.   : `7 `% T# X+ W. l
  698. class Sprite_Shadow < Sprite_Character
    * s" }+ A" `, G6 n
  699.   def initialize(viewport, character = nil, source)
    , B5 R3 ^) D! v0 [
  700.     [url=home.php?mod=space&uid=14094]@flicker[/url] = 0
    ' W- P, c  J" D5 [
  701.     @famount = 0
    7 {8 w, W6 c: Q0 u6 J
  702.     @aamount = 05 m! Z0 D6 H/ z$ \, x" l
  703.     [url=home.php?mod=space&uid=171370]@source[/url] = source
    6 t4 _; E1 Z! {* T2 n  h8 Z4 I
  704.     super(viewport, character)
    % W' C' b1 ~) [! j/ C
  705.   end
    ! {1 }5 W4 H( U7 D
  706.    6 p9 L- Q) s& Y& J9 c
  707.   def update_balloon; end
    ) U, b. O6 ^8 }6 q* Q8 v" M) Q8 \
  708.   def setup_new_effect; end
    ) I5 i$ A, x! f8 Y. V  ~
  709.   6 j4 Z( ^% `# t8 Y4 e9 m+ k
  710.   def update) ?2 G6 ]0 S& H- L  \- b- @
  711.     super
    5 G: z8 K! Q2 U9 g5 m
  712.     update_bitmap
    + h; D: z* o2 o7 Z1 _* A
  713.     update_src_rect
    ) @! M& Y7 D6 k. {
  714.     update_position. w0 n; D# V/ y8 Z7 h+ o
  715.     update_other( g/ t) \% f7 ?) `- C
  716.     update_facing0 c, }+ G' E- f6 W
  717.   end
    ; H$ g- d! O  f! T; J7 M. ?( c: z
  718.    
    1 b7 ?* `% W& L2 m6 l5 p$ z, T
  719.   def set_character_bitmap
    ( G) q9 e4 |1 i
  720.     self.bitmap = Cache.character(@character_name)
    , A  T0 p" Q6 E# s8 X( S
  721.      
    3 K) `1 d- ?4 w* e% u2 _
  722.     self.color = Color.new(0, 0, 0, 255)* F# P0 U! d/ f4 x3 K7 {, ]) l
  723.     self.z = Galv_CEffects::SHADOW_Z
    % e# M$ j; ^1 @1 j5 r" Z
  724.     self.wave_amp = 1 if $game_map.shadow_options[2]
    ' ]& [9 T0 x! s
  725.     self.wave_speed = 10009 Q3 v- h- L; P8 u0 {
  726.       5 R& u4 ]( p4 \. R) q: F) e
  727.     sign = @character_name[/^[\!\$]./]
    : E& F' Z3 C" y5 m2 ?
  728.     if sign && sign.include?(')
    ! b  A6 M- Y4 P- o0 R' a. u3 w  E6 s
  729.       @cw = bitmap.width / 35 P) a$ _$ y5 m( [9 [
  730.       @ch = bitmap.height / 44 G: w; g+ ~. b; y& y; l3 d6 j8 q
  731.     else- a7 R9 P+ }7 I3 n* S- H; j, O* B1 y
  732.       @cw = bitmap.width / 12
    3 t/ X; O6 \1 ]+ q7 l3 y
  733.       @ch = bitmap.height / 8/ w7 R4 |# ]/ n' E' W; I
  734.     end2 F( c, F, ]: q4 m% N; f- m  B
  735.     self.ox = @cw / 2' h8 R% |& B  u( U* `7 u" A) i
  736.     self.oy = @ch$ q, C; }* K3 H& [
  737.   end
    4 j" f2 X: Y- F+ r1 y! I) e/ j/ D
  738.   
    " v6 W* A+ A. Q2 W+ c3 }) i! q' E. F
  739.   def update_position
    * N0 U5 ~. e- F. l1 p; X
  740.     self.x = @character.screen_x
    * w$ g2 U8 ~& S4 i- U1 k0 E6 ]5 R
  741.     self.y = @character.screen_y - 10
    ' t* z$ A' c0 y
  742.     get_angle
    5 {- E5 C4 [( @. ?8 r4 V
  743.   end
    / i) w& }: c5 Y
  744.     $ b% p; A& o$ H0 r; b! z  O
  745.   def get_angle$ c' V; S2 W; B- j: u! g( g
  746.     x = $game_map.light_source[@source][0] - @character.real_x
    % d7 B+ l8 l. X# h; H) I# }5 G
  747.     y = $game_map.light_source[@source][1] - @character.real_y$ m/ k* O/ Z3 B/ }3 }: D
  748.     self.opacity = $game_map.shadow_options[0] - ! }& Z0 F/ \3 O7 y; B. |7 |
  749.       Math::sqrt(x * x + y * y) * $game_map.shadow_options[1]
    4 q" n6 }) ]2 w( T
  750.       6 o! m/ U* C! ?
  751.     if x == 0 && y == 0 || self.opacity <= 0+ c8 f' p4 _: d1 ~% K" t
  752.       self.opacity = 0
    : `5 D" C* Q( o0 N: M
  753.     else
    1 ~7 P% Y& q! w% M3 d- m0 o
  754.       self.angle = Math::atan2(x, y) * 180 / Math::PI + @aamount
    " [6 |7 _& i( m+ S, l
  755.     end: Y% a' }% g/ a* E% O
  756.   end
    ) s  s: D6 f4 c; t2 A
  757.    $ D7 X1 L9 W+ p3 ?- ?
  758.   def update_facing
    / ^4 Z- x; d5 {! S/ w8 u1 t' [
  759.     if @character.y < $game_map.light_source[@source][1]
    5 n4 d+ g6 J3 _3 \' y+ _
  760.       self.mirror = false" c0 `* d: n0 h1 F3 u
  761.     else$ ~( a: O' O9 m1 b7 R1 |/ \
  762.       self.mirror = true- [7 X* ~3 P- |4 x0 m% N
  763.     end
    & e4 j8 l5 @2 t8 c' @$ W
  764.   end# i( b: z# k+ ]4 E: ^! n
  765.     , _" j! |- _; `3 A5 P8 {! A$ g
  766.   def update_other5 W- K7 H) c) I1 y: {& W
  767.     self.blend_type = @character.blend_type6 ?3 [  `0 w/ u2 ?
  768.     self.visible = [email protected]# A  H5 [! I9 K+ E: Y5 `3 }& O8 P
  769.   end: ~- |# R0 w  V: s% t7 d% v
  770. end # Sprite_Shadow < Sprite_Character
    2 V& z: E8 c$ A+ C4 ~- ^5 ^: P
  771.   % H) k2 v/ v  [, F% G) I3 W4 C, w
  772.   
    - N" X, ]7 R! W& y9 m5 ~2 t
  773. #-------------------------------------------------------------------------------; D4 w, m4 c5 L% x6 n
  774. #  Sprite_Icon$ Z# {# z3 j) W/ c  M( F9 d
  775. #-------------------------------------------------------------------------------
      O. y4 Z* W; y/ z+ y
  776.   
    % ~# c, C1 v, d
  777. class Sprite_Icon < Sprite_Character
    $ H9 T0 F" d% J+ e8 M! k0 @
  778.   def initialize(viewport, character = nil)& N6 c4 H* X% o
  779.     @icon_sprite ||= Sprite.new
    + v: V# B; ^. J: r9 g7 G8 y
  780.     @icon_sprite.bitmap ||= Cache.system("Iconset")  T- K6 ?3 n+ a( `* W! P' h5 U
  781.     @icon = nil+ K1 I2 Z- {& }" _' v) s6 n8 \
  782.     super(viewport, character)- W3 A2 U6 X; t/ m" Y
  783.   end) z7 [2 B$ P) B1 p. F) U9 i
  784.   6 @4 ~  W. ?  f9 i
  785.   def dispose  i0 h  D* c8 H5 b( c; }
  786.     super; m5 g5 F, {4 B3 y. S* i
  787.     if @icon_sprite
    - z' ~1 ^+ [4 q8 ]( O7 R
  788.       @icon_sprite.dispose6 e# m! g' o9 l8 M  y+ q
  789.       @icon_sprite = nil
    * ^; D* S6 ~, r& p7 D
  790.     end
    ; a$ K9 c; O) c- b+ F/ I# g
  791.   end3 V- q- S" l) G9 f/ C! I6 n3 p
  792.    
    ; {. ^6 ?! h  J$ L0 c. o
  793.   def update
    + G" @5 \; h& v$ O) R. M4 Y
  794.     super
    # v4 V; B6 l' n3 x: C4 Y' h
  795.     update_icon
    + J, `3 `: i  A! M1 F( F" a) z, h) I
  796.   end
    3 i1 O2 v: W$ w6 b" p
  797.    
    . W2 z3 A2 s/ i& e+ g1 O
  798.   def update_icon
    , ?$ i) ^3 s, y6 m1 \
  799.     return if [email protected]
    1 O. Q9 Y' ?8 f0 H4 }
  800.     draw_icon(@character.icon)
    2 A' D* y, O' s/ p- @4 t
  801.   end
    - G3 Y- u0 A( y5 `1 V; k9 ~% b$ y
  802.     1 e" z: {6 c% n
  803.   def draw_icon(icon_index)! F1 u8 [' W) q1 h7 a
  804.     return if [email protected]?6 `# j0 U7 A6 k
  805.     rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    * _6 m! m7 s) @  U( e
  806.     @icon_sprite.src_rect  = rect
    0 K/ e" f# X1 r. J5 x5 l
  807.     @icon = icon_index
    9 m% P; e' @6 ~
  808.   end
    ' L: V3 a; {4 u( K
  809.     0 X4 S. G$ ]- l/ K1 I
  810.   def update_position& P, M/ ]# V: U2 ?3 w, [
  811.     @icon_sprite.x = @character.screen_x - 121 P4 t& r: ?3 C/ Z3 x& E% \4 k
  812.     @icon_sprite.y = @character.screen_y + Galv_CEffects::ICON_OFFSET. S; g7 Z7 W: ~$ W  R- V
  813.   end( d: N# O) a  g! U1 ^# K7 [
  814.   " V& ]2 T0 `# T, j$ O, V1 k: d
  815.   def update_other
    & J& a, n9 c# J% n9 B% a/ R4 O; Z
  816.     self.blend_type = @character.blend_type
    $ \% N9 L6 M  z& F+ g- z
  817.     @icon_sprite.visible = [email protected]
    # K3 b. l) d# n0 Z
  818.   end  R& s* v9 ?, X1 ], }
  819. end # Sprite_Icon < Sprite_Character
    8 x# F# E( t  F8 x  ]+ {2 O
  820.   ; o/ q. c; D& E. x1 I% y! @
  821.   
    ' G4 m$ q. g) v
  822. #-------------------------------------------------------------------------------
    , s/ o. v3 c! Y7 G$ t5 Q
  823. #  Other Stuff
    % f% T9 ]+ N1 i6 ]; r' `
  824. #-------------------------------------------------------------------------------+ Y# [1 K" z9 c
  825.   * I1 o2 l# _' T2 G& {  y4 E
  826.   
    ! s' w. c/ s2 x. a* ]" ?. B* @
  827. class Game_Character < Game_CharacterBase
    7 j  Y+ H/ Z5 c  `
  828.   attr_reader    :altitude& j" W. V; }4 ?
  829.   attr_accessor  :reflect
    . D. h, ^2 B& E; M3 n6 i( A7 H% E
  830.   attr_accessor  :reflect_sprite
    $ V9 A. |" ]: h  m
  831.   attr_accessor  :shadow
    2 R+ g5 \6 n& `/ I5 H' J9 A) c( g! E
  832.   attr_accessor  :icon! l0 r$ k4 R) i( m
  833.   attr_accessor  :icon_offset0 p: _( A4 w: w
  834. end  V5 I3 C  w/ w. f2 m
  835.   
    0 I: t+ N" S" I7 N, K2 S+ m
  836.   
    - p% n2 P* Z2 ]( K
  837. class Game_Event < Game_Character
    . a- S6 H$ Y: M# t
  838.   alias galv_reflect_ge_initialize initialize
    2 d" J5 d4 n& O
  839.   def initialize(map_id, event)( Y: c$ f0 z$ U- ]0 M$ A
  840.     @reflect = false
    0 f+ w+ Q( y2 j# z1 P3 \# _8 s9 ?
  841.     [url=home.php?mod=space&uid=31758]@Shadow[/url] = false
    3 ~- O, `# M" ], @3 _) i
  842.     @icon_offset = [0,0]
    $ W, y8 }" T8 Q) c) r$ L
  843.     galv_reflect_ge_initialize(map_id, event)/ B+ n, h0 ]" q5 |
  844.   end
    5 `& v( W3 g1 T% e& h5 W7 n
  845. end # Game_Event < Game_Character
    6 c# ]1 ]/ r6 n# N* f
  846.   ' p  e0 Z* O; b$ J8 z: i
  847.   7 j8 N* g) ]& x' I1 C* \
  848. class Game_Vehicle < Game_Character
    6 ]4 [9 U! i& B9 @
  849.   attr_reader :map_id9 u% i5 P7 ~3 K/ S# Q1 C; e- l
  850.    
    : C* }% W" e; y0 _% @+ Y
  851.   alias galv_reflect_gv_initialize initialize$ K2 i% t* o( n$ G. b
  852.   def initialize(type)
    % }' w5 [8 x% U( @2 v1 D
  853.     @reflect = true
    ; v! c& I! _1 W+ N
  854.     @shadow = true
    ' v! p2 E& o! U# {+ |$ R- j) B$ f
  855.     @icon_offset = [0,0]( l8 y, L* k' w  i4 y- v% T' B
  856.     galv_reflect_gv_initialize(type)
    ' Z$ l& n. z% Q2 _1 C5 Y# P
  857.   end+ F( f. |/ {! P: F" v  q; d! X
  858. end # Game_Vehicle < Game_Character# \4 @4 A: N8 f- i" ~5 N3 K
  859.   $ _/ e6 U7 q3 z& e7 ~. P# M
  860.   " d& J4 n* |) S' ^
  861. class Game_Follower < Game_Character+ M1 t& }/ P& P, T) J2 e3 p  T
  862.   alias galv_reflect_gf_initialize initialize3 W/ X8 m. t8 @& S$ i
  863.   def initialize(member_index, preceding_character)
    / u- |  g2 Y5 K* q
  864.     galv_reflect_gf_initialize(member_index, preceding_character)$ j5 O6 y: f/ K- Z5 i, q
  865.     @reflect = true
    ( E2 a8 w0 G' K: O
  866.     @shadow = true; Y, v8 D# f9 Y
  867.   end
    : ]' F" d) t/ E' {
  868.     5 y5 x2 U1 j7 }9 G/ {% J
  869.   alias galv_reflect_gf_refresh refresh
      g; U+ O, [$ t, W! ^( [
  870.   def refresh
    / V" R! ~* S7 H, _4 U6 e
  871.     galv_reflect_gf_refresh' q7 }, C9 b4 N; B! d/ |
  872.     return if actor.nil?- y/ d- \2 W8 g
  873.     @reflect = actor.reflect
    / n3 |4 o3 [+ s
  874.     @reflect_sprite = actor.reflect_sprite
    ! t. P+ \* c: l  i
  875.     @icon = actor.icon
    ) K5 A( y0 o0 G
  876.     if SceneManager.scene_is?(Scene_Map)
    & z( `' S% f2 `1 z2 C5 K
  877.       SceneManager.scene.spriteset.refresh_effects8 e, A; W  G" N* `
  878.     end8 |5 t) v+ G7 ], @0 g
  879.   end5 v* t9 W1 |$ I' b6 H
  880. end # Game_Follower < Game_Character- d! L" W4 W2 k" s, ^+ ?
  881.   
    ; x& W/ S5 U3 }+ L" Q" D
  882.   
    % I7 {: t; v0 k' u0 d
  883. class Game_Player < Game_Character  A9 \/ B% M: e' B+ R( y0 U+ D
  884.   alias galv_reflect_gp_initialize initialize
    : C5 R; U3 E2 _0 X& ~1 I) t/ [
  885.   def initialize& h" s) j0 b. E: H: n9 c8 Q
  886.     galv_reflect_gp_initialize
    1 q0 J8 T2 {9 M: g7 C) d
  887.     @reflect = true
    1 g) Q* K# C" D, ?4 q3 G$ ]% C- K
  888.     @shadow = true
    " W! s) ]8 }( Z; X) H7 l
  889.   end8 A; X( R, b$ @
  890.     - j$ J4 F$ b. e, u6 w$ k
  891.   alias galv_reflect_gp_refresh refresh1 A! h+ S! z$ Y& z
  892.   def refresh
    ( b2 w$ ?' |# R, `
  893.     galv_reflect_gp_refresh
    6 W1 F, z& l5 N: _* S
  894.     @reflect = actor.reflect
    # i( ?1 s* W8 _' w: E+ B
  895.     @reflect_sprite = actor.reflect_sprite
    : U. E4 J8 S: D8 C, E/ L+ _: e  c! B
  896.     @icon = actor.icon
    + [3 K2 M+ N7 Y6 b& `
  897.     if SceneManager.scene_is?(Scene_Map)
    ) v1 e" ~+ V# L3 T0 R. v4 k
  898.       SceneManager.scene.spriteset.refresh_effects/ G: l4 h( C1 H- _0 L! C
  899.     end
    . P8 C$ T8 h" t& h2 e4 O* _8 T$ @4 N
  900.   end
    1 N' D) }: R5 _! ]
  901. end # Game_Player < Game_Character
    , k$ T* N! K5 W2 U# N
  902.   ! ~0 p7 k; _- N' l/ C
  903.   
    . H* J7 Z( ]& [  @7 Z# ~. P
  904. class Scene_Map < Scene_Base9 }1 @: Z8 \5 u9 u" U  X2 U. E
  905.   attr_accessor :spriteset
    & `3 g; A) B" V# b" }
  906. end # Scene_Map6 K" h$ \, ?. e. d8 l2 T% m0 h
  907.   
    & ?3 C0 F# D' F: e" m" A9 U! _
  908.   
    1 ~& x7 l, J+ G0 b1 Q: r* i/ t
  909. class Game_Map1 j  @0 ~4 S0 Y% ]" ~
  910.   attr_accessor :char_effects) C& N' N1 p3 \- G
  911.   attr_accessor :light_source( d/ U% h' k5 o" W' W6 b" z* E
  912.   attr_accessor :shadow_options+ n! |# a6 v1 P( [# x6 V
  913.   attr_accessor :reflect_options
    2 G) o+ N' C% E1 }0 s* M$ {- Z
  914.    
    & G4 }& X& a: [, s6 J( m4 Y4 b
  915.   alias galv_reflect_game_map_initialize initialize
    + }: t2 d! T& G& M) p. Z% c) a
  916.   def initialize
    # O& L* X' J2 q1 I/ w* b
  917.     @light_source = []
    ; C  D0 N4 f; {8 w, p7 o
  918.     @shadow_options = [80,10,false]
    9 q% ]8 e  G7 j5 T8 _
  919.     @reflect_options = [0]
    ) g  V  W% l5 r$ J3 A
  920.     @char_effects = [false,false,false,false]
    3 L! _; k5 @; L4 U
  921.     #[reflect,shadow,mirror,icon]. b0 W$ M9 x: J# E" ]. K5 a0 S
  922.     galv_reflect_game_map_initialize
    , o# J1 }6 ]& @) i; P/ z
  923.   end! h: J: U5 S$ n
  924.    
    7 e6 `! b% c* i9 k% l
  925.    
    . u  Z  J& C; s8 N
  926.   alias galv_reflect_game_map_setup setup
    9 J. q* K3 r  f& M. B
  927.   def setup(map_id)
    ) f' \2 G' T* p) l5 d
  928.     galv_reflect_game_map_setup(map_id)
    2 `- N4 S9 ?1 h4 r0 `6 }+ R
  929.     reset_char_effects
    & I! [& K& r  q! o' Q( d! O
  930.     do_all_chareffects
    9 C2 H& Z; P1 Y* _5 R  A
  931.     if SceneManager.scene_is?(Scene_Map)
      }( x# K% s  i+ N: t
  932.       SceneManager.scene.spriteset.refresh_effects  ^% o9 d/ u7 r. ]: a; t! z
  933.     end
    8 Q* ^6 ~& P% u! P
  934.   end$ D$ y. j3 X1 c* [' m6 F( L
  935.     , y3 [; C8 M+ o2 e" W
  936.   def reset_char_effects
    : R/ w& u2 G1 w' W- o; n! ?
  937.     @light_source = []
    6 d" Q5 [0 \+ Q8 q. A8 ?% g
  938.     @events.values.each { |e|# O3 _0 R$ d+ B
  939.       e.reflect = false
    - {: e7 N) i* b  ~3 @# R1 I
  940.       e.icon = nil }
    - H$ X7 E2 |" g8 g
  941.   end9 ^. Z9 V1 I" X: B" J
  942. end # Game_Map
    ! A% Y/ M4 t, C6 c
  943.   
    3 s1 T  X9 K1 t1 R/ r$ h( a
  944.   6 n' K7 @8 Z( Q' |" _( v$ N
  945. class Game_Actor < Game_Battler: [$ Y% x) C, I. @# W" `. \
  946.   attr_accessor :reflect
    3 M  n9 _1 l: H' ?4 @) f/ f
  947.   attr_accessor :reflect_sprite) k/ l- V8 c8 o0 W6 ]+ t1 s' X! f( T
  948.   attr_accessor :icon5 E# @7 g+ J* l2 ~) M" u" ?9 J* ?
  949.    
    3 D: r' `- z$ b: g% O" d
  950.   alias galv_reflect_game_actor_initialize initialize8 W  b" p% |  w8 k8 T2 y
  951.   def initialize(actor_id)
    * r9 e" ^' f/ K! ^/ q! a) J
  952.     galv_reflect_game_actor_initialize(actor_id)
    / S/ l4 o) I  [
  953.     @reflect = $data_actors[actor_id].reflect! K& ^7 T( V$ l+ z; ?( I
  954.     @reflect_sprite = $data_actors[actor_id].reflect_sprite
    6 g! Y3 W" v5 G3 R
  955.     @icon_offset = [0,0]
    2 y6 W: F3 U7 x! s3 ?: n
  956.   end# m) I2 d; `( R( K
  957. end # Game_Actor < Game_Battler5 [& o' d& S5 Y: ]! a# U% `
  958.   
    ) V6 f/ o- m* P- H3 |( R8 }' ~
  959.     a# F$ ^- L9 s- @' I0 p+ `
  960. class RPG::Actor9 n8 f$ f/ o3 ^
  961.   def reflect_sprite1 ~6 c7 f7 B: C: E3 g$ o9 }
  962.     if @reflect_sprite.nil?
    # }1 ?2 G, {* ?# c) l
  963.       if @note =~ /<reflect_sprite:[ ](.*),(.*)>/i
    : |! Y! W; C; Y# u7 @* H
  964.         @reflect_sprite = [$1.to_s,$2.to_i]; s& g+ L. ?7 E
  965.       else
    $ I4 s0 A2 J3 ]  T
  966.         @reflect_sprite = nil
    ( k9 n1 G: K. W9 ]6 F3 }$ U" n
  967.       end! E- a  z, o  a8 l* T4 N5 d7 W/ x
  968.     end! ~& x7 l  B, }. o6 m8 F
  969.     @reflect_sprite1 Y# [- F; G7 h) |
  970.   end! S) w0 ~9 v. y1 q: O; f$ ^, Z/ ^3 |
  971.   def reflect" Q5 d$ \) E5 `) a
  972.     if @reflect.nil?& [8 i; V8 c" A7 [' t4 e' E; n
  973.       if @note =~ /<no_reflect>/i
    ! k/ x" f& V1 F* i- `5 N
  974.         @reflect = false! @$ j7 I; v: @3 G9 K
  975.       else
    / T6 V: g0 \2 O
  976.         @reflect = true9 A# H$ W3 x0 B% s
  977.       end. f- y; }" n+ ^$ m
  978.     end, `. A2 q, D6 P' {6 d
  979.     @reflect0 B1 s% w" n/ Y: X" @
  980.   end
    % F- G) [$ z: f, z0 B6 s
  981. end # RPG::Actor
    6 K1 B0 V: X) g8 [! V
复制代码
回复 支持 反对

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-7-16 21:23

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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