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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
: j1 n: n. r1 ^+ l8 x
这个代码怎么用啊,有大神知道吗。我从国外找的。
0 x& b& a& i% E" a1 m$ zhttp://galvs-scripts.com/2013/02/21/character-effects/
" {9 J; f6 |: a是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    * S' Z& [0 N( T; Z8 E
  2. #  Galv's Character Effects
    4 G: j3 n9 K/ Q. c, o
  3. #------------------------------------------------------------------------------#& z6 }3 [5 m5 a8 V. U1 X8 h# B
  4. #  For: RPGMAKER VX ACE
    ! q* P! ?, B, R0 H2 N: [' m
  5. #  Version 2.1( F) S3 H( b, @/ A0 Q1 h1 ]1 D
  6. #------------------------------------------------------------------------------#
    ' D# R/ x1 S& i5 p. L: I
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows$ o1 r' F8 F. k/ o
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ' d, U' ?1 G5 T
  9. #                           - Fixed shadow facing bug
    ( D8 ?/ m- U, d  h' h  }0 X! O9 X
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    % c6 I$ ]+ [6 y
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows5 N+ a7 O# w( j/ P
  12. #  2013-02-22 - Version 1.7 - bug fixes+ ]: w5 d: v: S4 c0 ~
  13. #  2013-02-22 - Version 1.6 - added icon effect, i0 K4 y/ [4 H8 o' }% o
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    5 M& w6 @/ k0 F. N, ^9 b1 F
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles; v; c  l, C$ @: y# w, I
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    9 c& A$ ?: X! x9 `
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    8 @- I3 N6 @3 p  z+ ~4 l; M
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    ) h: E5 B) q% k% Q
  19. #  2013-02-21 - Version 1.0 - release
    + Z6 x& }2 {) s" G: H$ S
  20. #------------------------------------------------------------------------------#
    ) v+ ?1 O9 ^; O& b- T% O
  21. #  This script was made to provide some additional effects for characters such# W! y) @) b! t# G1 L
  22. #  as events, followers and the player on the map.
    1 P1 `5 ^6 f' b1 K" u
  23. #  Currently it includes:, }, p( J$ o4 }( O' }% T  G
  24. #
    . g0 x7 W4 H$ \* w0 L) D3 o
  25. #  Shadows) Y8 u7 [. J8 N
  26. #  Shadows that appear under player and events in a directions depending on" O# h4 a2 c9 e2 p, ^
  27. #  a light source that you choose.
    1 P1 W8 Q. B7 ]
  28. #0 L) {" N+ V1 b
  29. #  Parallax Reflect
    % g$ X) \0 p) O* R, x, Z! s# l
  30. #  Reflections that appear on the parallax layer for events and actors to be1 o0 R* C6 e$ z( r5 I3 G
  31. #  used for things like reflections in the water or glass floor etc. To get/ Y% s! ?# d- p
  32. #  effects like the demo, you need to edit the charset graphic to make the water( D* X- n; v0 B% X- u
  33. #  partially transparent.
    / b9 U  ?$ U( d3 F
  34. #
    8 g  ~- p8 U. r! a
  35. #  Parallax Mirrors
      W4 H, l/ r0 F+ b' Y, J. h5 \$ ^
  36. #  Much like reflect but are instead actors and event are reflected in a mirror. Q3 D; Q5 u! `. ]3 [) `9 C: U
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    & \& B1 Q& `3 ?* r6 [
  38. #  changed so actors and events can use different charsets for their reflections
    2 u+ D% j$ P4 i8 L2 E3 _) l$ s
  39. #
    3 j& a& j: x! T4 [# o
  40. #------------------------------------------------------------------------------#1 Q! F/ {  K( o4 [: Q$ v
  41.   & ?4 q- Q8 o/ t  ^( v

  42. 2 j( z- t; g3 c! c+ z
  43. #------------------------------------------------------------------------------#
    0 j% o* M7 s5 C' \% p7 A! G9 }
  44. #  NEW - First event command as a COMMENT$ S& V. s. ?* u, |+ s
  45. #------------------------------------------------------------------------------#( A2 T  I) i; r( p5 g/ E1 X
  46. #  You can add a comment as the first event command on an event page to set if
    . M# @3 q) y5 V
  47. #  that event has an icon, shadow or reflection active. The tags to use are5 E4 D$ O0 {" Z; J
  48. #  below, all must be on the same line in the comment.
    3 N& V. p- P/ ?) I
  49. #
    ' U. ~; e; I2 Q; V
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)# G. [5 o  l( J8 O
  51. # <shadow>           # set the event to display a shadow
    ) U! D; a: _- q. [0 Y  Q0 Q3 j
  52. # <reflect>          # set the event to display reflections
    % ?, s5 O& C& C9 \5 p0 l# |
  53. #7 k. \% |2 F2 m' w! z8 p
  54. #------------------------------------------------------------------------------#
    . x7 y  ^4 k9 y( _5 c* y9 [
  55. #  EXAMPLE:4 [2 f5 k. o6 d! q/ |; A
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event) N" \' B( b2 h: j$ N3 `
  57. #------------------------------------------------------------------------------#
    5 [$ K1 y8 q4 x

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-10-28 14:40

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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