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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

' y; b0 M, W7 b这个代码怎么用啊,有大神知道吗。我从国外找的。* H, Y% a# c$ c# Q- n3 _  [3 h- h
http://galvs-scripts.com/2013/02/21/character-effects/
& X2 K* _2 f* t是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    8 D7 X, J  ?1 k, t: ~# R
  2. #  Galv's Character Effects
    . v! g3 Z5 j. v5 V2 [6 \, v& l' T
  3. #------------------------------------------------------------------------------#
    5 `: T! h! U9 }( e9 V, A
  4. #  For: RPGMAKER VX ACE
    9 z4 Z& Q' F4 L4 }: l
  5. #  Version 2.1" d1 ]( |1 H- F3 }8 {
  6. #------------------------------------------------------------------------------#' p6 q+ G4 k) q' b; m
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    ' p, P+ n8 M- N9 r6 W
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects; y$ r  V3 I7 e" k& q( c5 m- D. P, E
  9. #                           - Fixed shadow facing bug# m9 M4 _4 z% p4 W, B- h/ O
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    9 T  e% C6 `' D7 \. I
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    / o- E) I0 S! i
  12. #  2013-02-22 - Version 1.7 - bug fixes
    + l1 h7 _& h! Z/ ^% c: B
  13. #  2013-02-22 - Version 1.6 - added icon effect; G; h; r6 f* e# \/ E/ c
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    1 r# b/ Z$ @, }. w# L) }
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles0 Y9 m- `& Q+ o: Y# V
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    , u/ y! {0 d  U$ t7 x
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)/ j0 W" |$ f9 O, g# V( S- |3 l5 S" K
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    8 i/ j) B, s  _# [
  19. #  2013-02-21 - Version 1.0 - release
      B4 Y; k, y! |: v! G* q/ w3 X
  20. #------------------------------------------------------------------------------#
    0 z* \6 _/ R& S' c/ F
  21. #  This script was made to provide some additional effects for characters such+ `4 Q: a  W3 l" U" m2 N. K
  22. #  as events, followers and the player on the map." H% u/ ^4 j3 ]# u, q6 O
  23. #  Currently it includes:2 [$ j( {) M# t5 M: k
  24. #
    : P( w! m/ A  f0 T- u
  25. #  Shadows! B5 v4 @9 F( j: f+ F8 h
  26. #  Shadows that appear under player and events in a directions depending on
    $ \$ o, h8 t' k; h$ m$ Z  u
  27. #  a light source that you choose.1 ^6 O4 Y9 w- {* h- B" k6 C9 p, P# U
  28. #
    3 M# w0 A% ~7 ]  M8 Y1 Z9 `- H
  29. #  Parallax Reflect
    $ v: W8 p: n; }6 h/ v' t% {1 }# R# w
  30. #  Reflections that appear on the parallax layer for events and actors to be
    6 z5 F  p( F, P( l, v# N
  31. #  used for things like reflections in the water or glass floor etc. To get
    " L+ Z) m4 D, K& Y) @
  32. #  effects like the demo, you need to edit the charset graphic to make the water' W* m" a! s" v. h, W6 q
  33. #  partially transparent.
    & M- D- M6 J4 Z7 e& u" j8 ?
  34. #( V9 E- P# g7 u; h6 ?7 T2 P
  35. #  Parallax Mirrors
    : x! P* G. E( z. K+ c- q
  36. #  Much like reflect but are instead actors and event are reflected in a mirror6 c, Y! y4 x, G" y8 M8 |
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    : ^. S8 H$ q+ [/ x
  38. #  changed so actors and events can use different charsets for their reflections
    : y" H) ~) `5 d& x& Y0 B
  39. #
    $ d* o. z4 {8 g2 f
  40. #------------------------------------------------------------------------------#
    $ l& e& W  @# V/ H
  41.     r) M) H9 R0 m7 d

  42. - w6 C+ {( I1 o1 @7 R  K
  43. #------------------------------------------------------------------------------#' i: r9 e0 y9 _* n% y9 h/ O" [
  44. #  NEW - First event command as a COMMENT* T, {7 Y2 w3 _/ i
  45. #------------------------------------------------------------------------------#* D; V2 o5 r" V: ^9 t2 \  ?* f
  46. #  You can add a comment as the first event command on an event page to set if9 Y' m$ D3 T+ ?) }
  47. #  that event has an icon, shadow or reflection active. The tags to use are% y: @$ N# t, C: i! o; Q, {* \
  48. #  below, all must be on the same line in the comment.2 K( t0 @6 T& _
  49. #
    / c1 a5 s2 k0 s1 S1 Z
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    4 A9 L' }: W* M. u# R
  51. # <shadow>           # set the event to display a shadow8 X! r& u3 I  k& O0 T
  52. # <reflect>          # set the event to display reflections
    6 M. }5 m# V/ i1 N- j. \! _" O
  53. #* e1 j6 N6 y" B3 b+ l
  54. #------------------------------------------------------------------------------#( V( D" t1 y$ o& L
  55. #  EXAMPLE:3 W/ q- [/ a2 N8 x. Y  b- ?
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    # X: \: u6 Y: w" h6 A' M
  57. #------------------------------------------------------------------------------#
    0 ^# Y4 e8 |) \% l5 E

  58. % I+ ?+ L( w9 Q" a  J6 ?" r, @6 D! p
  59. % h# J9 D! Z4 x+ o8 E
  60. #------------------------------------------------------------------------------#' h5 q; |$ ~* g, B3 f9 L7 i& C! B0 Z
  61. #  SCRIPT CALLS:
    ! V: w4 N( N! b+ H1 M
  62. #------------------------------------------------------------------------------#8 g: ?/ b& \8 e% C" }( W
  63. #3 m3 l2 W3 I/ d1 ?$ W
  64. #  char_effects(x,x,x,status)( f! L( m+ s$ C0 V( w/ V
  65. #4 @1 H8 E$ O. f
  66. #------------------------------------------------------------------------------#3 g9 i& o5 w, k5 A$ C
  67. #  # each effect can be true or false to enable/disable them during the game.
    $ D9 E, z% K& N
  68. #  # you can change multiples of effects at once, x being the effect number
    . M+ {9 l/ I) d2 w/ l6 a
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons1 F/ y0 G% [5 Q0 G% f& [& a! F7 [
  70. #------------------------------------------------------------------------------#! t3 y3 t) {+ \( t2 _/ Y: }
  71. #  EXAMPLES:
    3 B7 I9 d/ _5 Z' }
  72. #  char_effects(0,true)              # turn reflections on
    ) A( ]. f, f9 B6 c% D
  73. #  char_effects(0,2,true)            # turn reflections and mirror on: q3 e, ~5 i# ^7 U$ B
  74. #  char_effects(1,3,false)           # turn shadows and icons off- z4 D: I2 J( ?* j5 d
  75. #------------------------------------------------------------------------------#
    1 ?1 r- Q: Q" g; B% H( o- V
  76. #& w% G6 M2 X1 q! ?" _
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset8 U5 i: U! [$ k: M+ H
  78. #
    3 [/ M. p9 _1 E9 X& a- c3 c
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset3 K, {, p. K& v" c! Z/ o
  80. #
    % ^8 Y7 f  X5 Y. M2 D2 r+ R
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset# G: L! j6 f. N) W/ d
  82. #
    ! e5 d3 ?; h6 s6 |3 j, t' ~- ]& |
  83. #------------------------------------------------------------------------------#
    * @+ \6 T. Q5 ~0 X+ j6 Y. W% W
  84. #  EXAMPLES:6 }  e% G: l! t. _3 T- _
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite# U0 p$ b% c6 g  F
  86. #                                    # in position 2 of "Actor2" charset.) [! t3 U/ E% K+ ?' H( v0 X
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    5 |  t: H. H% G. e+ i8 W: |  N; i
  88. #                                    # "Actor4" charset.6 h, c0 m8 U" z8 T9 D  u6 W1 t
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of+ h% ]  [7 O- b
  90. #                                    # "Vehicle" charset.) b7 h6 J9 D$ _+ x* Y; {6 F0 R1 f/ D
  91. #------------------------------------------------------------------------------#
    # O0 R/ v% A* _5 J$ N
  92.   
    - ^, Z; _  \! S5 P* t" M, e
  93. #------------------------------------------------------------------------------#$ v4 ~( @* a/ `$ F/ J% x8 _
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    9 F: n+ a6 e3 V1 |& j
  95. #------------------------------------------------------------------------------#& l) C  ^6 i% l+ I2 p
  96. #, I& G( u, E2 U3 d( f5 J4 h# a
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    & \$ ^. l! Y# i' N
  98. #                          # use this to specify for mirror and reflect./ ^2 q/ D3 t% K2 Y( u
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    . d) M8 d/ F& K) B7 `
  100. #                          # to change all events use :all6 n4 J, e. C( \; E' L1 B( ~2 @
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make* T3 X1 j, p* w
  102. #                          # it 0 for no icon.% \  O0 i$ h  @4 n% s
  103. #
    $ p8 t  B" ~$ B  z! R  e% a
  104. #------------------------------------------------------------------------------#
    4 I7 ~/ u  j8 r, Y; {. \
  105. #  EXAMPLES:
    ! M" _3 h5 j- l  b" X; J9 g4 A. D
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON$ s  g+ P8 W) {9 @
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    # @. Y5 K: q0 r# V  K& |3 u0 p' j7 }
  108. #  reflect(:all,true)      # Turn all event reflections ON
    9 j6 |6 _, d, [& w& B
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear3 E4 ~0 p, d: j; i( Q, C( O5 C2 E
  110. #
    " c* L5 h2 Z1 E7 C# _- b8 d8 ~
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    4 y& C0 S( Y3 R- y% v, L  C' d
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    2 f% O  g1 |+ F7 `  `6 }
  113. #        should use these effects sparingly and only activate them on events
    ; X, O1 d' b# _+ E$ l3 w0 p) b7 f6 C
  114. #        that require them." w0 Z/ g! q9 i6 o3 z/ e' R+ j
  115. #------------------------------------------------------------------------------#
    + ^; [- a) I* u  c7 l. J* \3 H
  116.   
    ( N. P$ V  y, j0 R1 i9 ?. n9 Q
  117. #------------------------------------------------------------------------------#' e3 `/ C& d( L; F( ?
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES  e. _2 s" F7 L0 Y4 S) _* w
  119. #------------------------------------------------------------------------------#
    & S2 a" K/ {- K
  120. #
    9 f- W0 a% Y! b6 ?4 \
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 1 s4 ?& h  u9 G( V/ \9 W
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off " o3 x. Q* Z$ _  i
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    6 U# {  ^' P- M: i/ V5 X/ p
  124. #- W- h2 S$ e, c; a  S
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    ' A4 z$ ~! m( F6 O
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.& c4 a% i+ j0 I# \4 P, u9 \$ e
  127. #  v_icon(x,x,x,icon_id)
    ( ]4 S# ~) |% H2 v$ A
  128. #
    5 ~/ u. g, P/ D9 ?
  129. #------------------------------------------------------------------------------#
    $ Q/ ~  i3 X1 ^% A. i
  130.   3 ]3 X( u* D. L
  131. #------------------------------------------------------------------------------#
    - ]) ?. z/ s$ H
  132. #  SCRIPT CALLS for shadow options- r+ N4 [% y2 r8 }% ?0 `
  133. #------------------------------------------------------------------------------#& E  ~4 \9 z: {! H6 V1 o8 N" r6 w
  134. #
    8 S- d! t; \+ \5 E' G
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the " d: R$ C0 F( @1 X
  136. #                              # light source number you wish to change (for4 Y* y- m4 y  }
  137. #                              # more than one). These are reset on map change.
    ( {& c) e, Y5 h% X8 a" {7 F
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.  Z* N% U7 T5 V3 B! I
  139. #                              # This will need to be in parallel process if you2 z; y  ?7 W- q4 O5 X) q# n' o- e+ k) x
  140. #                              # want it to be a moving light.( d7 b1 X1 ^' }
  141. #, K7 I4 `! _& z) b4 Q8 r
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below% V, j; C* A0 z! v
  143. #
    , r% S6 z) M7 I( {( d' @7 _
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    9 g, ~2 m, N" ^* j8 c1 E8 S" F2 C. i
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    2 p2 R; n2 k7 m) \. q
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    . r5 T* a: V( c8 x/ ~
  147. #' }4 d1 @7 A9 G# t; c
  148. #------------------------------------------------------------------------------#: j% I8 i' `5 R+ y+ m, W( w
  149. #  EXAMPLE:
    + a) @3 I8 ]6 o/ ^
  150. #  shadow_options(80,10,false)    # This is the default setting.
    1 U' O1 L+ t* _: P6 r( J, K
  151. #------------------------------------------------------------------------------#
    2 O1 W! l3 O% l# D# c
  152.   
    , j* C: h9 \+ T+ H% a4 X
  153. #------------------------------------------------------------------------------#
    ! S" F, X2 O9 _0 |: A: o' D( ~: p. K
  154. #  SCRIPT CALLS for reflect options
    4 ~% U1 u+ {5 E, G, @8 X( ?
  155. #------------------------------------------------------------------------------#
    + y* K" y5 N6 _+ M2 X1 x" {
  156. #
    9 o2 c- K' P' K3 g- V4 H+ C4 K
  157. #  reflect_options(wave_pwr) 3 m: h) d3 D0 k' I: C- L' Q1 [
  158. ## u. C1 w% {$ }+ B! w, |  g
  159. #    # wave_pwr = how strong the wave movement is. 0 is off9 A- Y9 ^1 w0 _5 v8 {' o
  160. #
    7 C5 [5 S. f& R, ^/ q
  161. #------------------------------------------------------------------------------#
    0 {' ?+ M( s% s1 j4 v/ d
  162. #  EXAMPLE:
    + t& B, E9 L" F7 f
  163. #  reflect_options(1) # Turn wave power to 1
    * O3 S" E1 Z+ z
  164. #------------------------------------------------------------------------------#
    * c+ V8 v. g8 U6 ^# l5 v
  165.   ' C' {3 L5 Q8 t1 k8 R' y  e' t
  166.     Q7 Q, n4 O' C9 ^+ s
  167. #------------------------------------------------------------------------------#+ T/ p/ g: {, N) T3 Q4 W: v
  168. #  NOTETAG for ACTORS4 ?- W. x; m4 C0 M
  169. #------------------------------------------------------------------------------#
    ; h9 m$ c- V  G0 p9 M
  170. #
    ! N9 ?9 u0 D# p
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)# r; K, D0 b, O  b& W8 g. j+ X1 ~
  172. #
    ; \$ v5 [9 ^2 [* G
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    ' f) E5 b7 f3 q6 X+ Y( c
  174. #                                  # and use the character in position 'pos'
    2 i5 T, e+ R+ v4 I8 G: }: L
  175. #
    $ g( \# Q  I9 g5 K4 |, |9 Y0 k  N0 F
  176. #------------------------------------------------------------------------------#3 m+ @/ V- z% n  p
  177. #  EXAMPLES:
    * S4 X$ H: \7 [# x: Z; a7 F% W
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset: x$ g! m' }! N6 E' Q6 m
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    , q) b9 z/ ]- e. i2 m  u% E1 @8 O
  180. #------------------------------------------------------------------------------#
    & \+ _+ i/ u- b. ]# D+ _
  181.   
    / d) M* O; `( {& J- H6 K6 n
  182.   
    3 K% P; c$ F+ v. r
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    6 H7 e1 j( R& t4 |. B4 C( r& P  y
  184. module Galv_CEffects$ I9 E3 a2 ]( W0 R; g6 K$ v
  185.   
    1 O0 L! Q" c. Q) r" w/ f
  186. #------------------------------------------------------------------------------#    ~$ k* Y9 B4 c
  187. #  SETUP OPTIONS
    / K  ^" n1 [' E3 U% T7 h
  188. #------------------------------------------------------------------------------## M0 p- o" }. E: G& [% h4 d
  189.   ; T- A! A2 g% M
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    ! V3 ~" G, f$ S, r- f$ X; @; n, n
  191.                         # region on the wall you want to make reflective (and
    4 J+ h2 z5 d. d2 D4 X5 ]/ O; m' @
  192.                         # then use tiles/mapping that make the parallax visible)
    2 w# i; c) q! L
  193.   * X) P5 x/ q& m8 |* Y
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters1 @  g) p( A8 ^: l4 [9 n7 C- |
  195.    
    0 x: S+ A+ Q" z5 V# I# C
  196.   REFLECT_Z = -10       # Z level of reflections
    $ }+ L8 ~8 y" s2 o+ k. ^% s
  197.   SHADOW_Z = 0          # Z level of shadows; c1 `5 T  }8 S& E# B
  198.   ; _, c" S. ?0 r7 w- E$ O
  199. #------------------------------------------------------------------------------#  ' m+ M6 C, ~! s) `4 T' S' ^& D& _
  200. #  END SETUP OPTIONS  t# R8 ~3 Y, o) h- w, X0 ~8 y
  201. #------------------------------------------------------------------------------#
    & R5 I7 D3 N9 k# D3 `9 B/ |0 q. W
  202. end) \9 p" r/ D! n7 q) y8 a
  203.   / U0 c+ F8 ?' @6 E2 g& D- ]
  204.   # P( o9 d1 C+ g0 u

  205. 6 J( }; }0 L( x+ N& F
  206. ( d- c" r* T9 |. {% g# e' R5 \
  207. class Game_Map
      _! i% G/ c+ q9 L- A
  208.   def do_icons(refresh = true)( @8 ^2 r% I1 ^* k
  209.     @events.values.each { |e|/ V7 N' K: e1 j
  210.       next if !e.list! C- G4 u" d/ c+ j4 v* w
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/! W* D+ J  S0 {
  212.         e.icon = $1.to_i
    7 y; {4 U9 C! ]: g, s
  213.         e.icon_offset = [$2.to_i,$3.to_i]5 W9 G7 _$ X# ^$ w
  214.       else
    1 [& N4 x9 N5 @) ]9 E( e
  215.         e.icon = 0, S3 O, M5 ~: R8 |* P& p
  216.         e.icon_offset = [0,0]! Y+ @: q* I( c* d( G6 J9 B" n
  217.       end/ s4 U  w: c3 Q+ q0 A0 L$ }: [
  218.     }
    5 X2 @; T6 s" G5 o/ ]2 E
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    & m; B. B/ T0 @6 E
  220.   end8 j! n( W- h$ o6 R) F5 |9 r
  221.    # c+ B- y% k7 o5 m* A
  222.    
    ; q7 e* `! A# d3 c, _! ~% e
  223.   def do_shadows(refresh = true)( k6 i; t1 i3 n. z5 O! `- [
  224.     @events.values.each { |e|
    2 L% W  f8 a) L7 q* @
  225.       next if !e.list& d; ?1 K4 c) j* X
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/& E! m( x! O1 ^
  227.         e.shadow = true
    - ~4 ?& X# I' U, M+ J9 X9 F- d
  228.       else8 w- s7 |5 z  g
  229.         e.shadow = false# ^6 X2 O/ V, E0 T3 U4 \
  230.       end
      ?+ k% j- k) v9 M( G9 _7 j- `' A
  231.     }2 D$ z: M. S/ J
  232.     SceneManager.scene.spriteset.refresh_effects if refresh1 ~+ Z* j+ h# h' }% t- s" K* R9 T. V
  233.   end& V7 M. A2 ~/ g& X+ v+ {  D5 ^8 C% t
  234.    1 K6 e9 B  T' h2 l& V. N  h
  235.   def do_reflects(refresh = true)% ?* P8 @5 e# K+ [1 F8 Z1 A
  236.     @events.values.each { |e|2 z$ x' W+ a( o" M, Q
  237.       next if !e.list
    , w, H0 F, b' G0 J+ S4 r4 t
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/3 |% a, c, F- O3 Y/ R% l
  239.         e.reflect = true( n4 [) o! \# F
  240.       else3 d4 t3 ~# p) s! f4 Z
  241.         e.reflect = false
    . T' M1 c& l, V4 V7 D: E: X( n; e3 B& A
  242.       end; |6 c" y& l3 H' b
  243.     }" s  t2 O8 ^8 R1 P9 w
  244.     SceneManager.scene.spriteset.refresh_effects if refresh' e& y* H& @8 v
  245.   end% z# A9 U2 x4 l; u) z5 @7 |
  246.    
    9 @! {' e% ]1 [6 S
  247.   def do_all_chareffects! B5 y% E) ]# z5 s
  248.     do_icons(false)
    # F6 [: r5 M; e5 l/ d
  249.     do_shadows(false), F, t  H* ~9 [9 W4 P
  250.     do_reflects(false)5 W: \$ v% I% n: j1 d
  251.   end
    " I, f# }, q* X4 z
  252.    0 W3 p- j5 U# O
  253. end # Game_Map. p1 _; \1 Y( y* B; v. }3 i: H8 h
  254. : \$ H, ^& b2 `  u# l2 d; J3 E

  255. . O- }# F4 E1 [: B4 z3 f9 P, ]

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-6-5 05:23

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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