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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

- ^3 P$ X/ i# G' Z7 g这个代码怎么用啊,有大神知道吗。我从国外找的。7 \6 [8 D! m/ T9 f9 q
http://galvs-scripts.com/2013/02/21/character-effects/: m( O- d" T8 e# }1 k% \5 J
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    4 w( j) @6 W0 R7 I
  2. #  Galv's Character Effects. I4 |$ {% a* U: p6 ]. |
  3. #------------------------------------------------------------------------------#
    . t5 g& `6 l, ?7 m$ }0 a' ]
  4. #  For: RPGMAKER VX ACE: Q+ @+ [6 U& N. i3 }( g1 S
  5. #  Version 2.1
    / \( S' |8 B, l7 \1 |2 X) W4 m4 ]+ @
  6. #------------------------------------------------------------------------------#
    # y) ~% P3 r0 c
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    ' C) m9 B, D# Z! s
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ; u, H4 r" ?4 X4 S! Y/ I
  9. #                           - Fixed shadow facing bug  A; u5 p- V: k) I2 s# g' H8 I
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    : ^* `  `4 e0 O- C# v! c' [! Z. {
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    ' i4 L! M3 Y7 [$ P5 S* e* Y" d# U/ M
  12. #  2013-02-22 - Version 1.7 - bug fixes2 ~% _2 J1 i+ X2 \) w# a5 l  `
  13. #  2013-02-22 - Version 1.6 - added icon effect
    & F0 u  H- W" ]3 j
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps( t2 ]! {- l7 f# D! L
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles+ r/ ?8 P) m9 o( G* S8 ^  \9 h
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks8 D1 r% R! p. ^5 u/ u- A
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)+ U% V. Q0 w$ r5 E
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    % A4 a( y8 d) z+ m0 x
  19. #  2013-02-21 - Version 1.0 - release7 i( U4 D) D- `4 p
  20. #------------------------------------------------------------------------------#
    9 A5 V9 p. W( V- h! [0 ~6 U
  21. #  This script was made to provide some additional effects for characters such9 c; M! s& r) J+ N
  22. #  as events, followers and the player on the map.
    6 @; b+ y$ M. x+ n- A: ^
  23. #  Currently it includes:
    3 ?5 P& N$ J7 \3 f0 ^! Q+ t" ?3 t& H8 d
  24. #+ r! R% `. y# Q) S+ |! {- H
  25. #  Shadows
    * v8 l( k; q, M( ]& v
  26. #  Shadows that appear under player and events in a directions depending on4 A! ~# x( z* t2 w8 K9 n+ G
  27. #  a light source that you choose.& r& q$ S4 |7 [
  28. #" S2 ^  x; w" j) p+ W5 N
  29. #  Parallax Reflect
    , u" g& d+ p' x5 w9 T
  30. #  Reflections that appear on the parallax layer for events and actors to be
    + G3 C+ [$ q) |3 {+ S1 Y. A
  31. #  used for things like reflections in the water or glass floor etc. To get+ Y1 S4 T" @% q' M0 W- I2 U5 z. \
  32. #  effects like the demo, you need to edit the charset graphic to make the water2 G) k) S. s+ U; n
  33. #  partially transparent.
    2 P$ g: U" ]# D. h- S
  34. #
    0 I# {: |0 M6 {2 }% T. z" N: @
  35. #  Parallax Mirrors  s+ Z7 t6 V- |# S- R: u
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    * }: r1 G8 \! l3 |' q
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    : [6 U' o; B( i3 c
  38. #  changed so actors and events can use different charsets for their reflections
    0 s! Y3 w0 ]$ s
  39. #
    9 Z4 X3 i( x# M1 r7 g" B
  40. #------------------------------------------------------------------------------#
    & l6 h3 I) @* S2 }& G; s3 `0 c
  41.   - ^% O5 p& P  c3 j6 W! d! b' _
  42. : `" d- o5 e' a5 c- q* z
  43. #------------------------------------------------------------------------------#6 v  `1 W: m+ \! T. t
  44. #  NEW - First event command as a COMMENT
    0 J! j$ ^+ E) ~- I; S
  45. #------------------------------------------------------------------------------#% i: i) J5 U" e7 |$ r
  46. #  You can add a comment as the first event command on an event page to set if
    0 r# d( }: _* n2 G
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    4 u2 G. @1 s' j. C
  48. #  below, all must be on the same line in the comment.
    2 K- [$ u7 `, e5 p" z+ _' k& y
  49. #
    / |- O5 U( K& @7 |
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    $ `4 `1 |# l/ ~- v
  51. # <shadow>           # set the event to display a shadow
    5 R2 Y) Y2 N" h, D2 O" e% D
  52. # <reflect>          # set the event to display reflections
    + p- C* V! @) b3 i2 w
  53. #
    0 e! n( I$ `3 e  g( z
  54. #------------------------------------------------------------------------------#
    * I6 `* U0 U- s- I1 n, ]3 f
  55. #  EXAMPLE:
    8 @( v8 R* s+ i* ?  c! T' n
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    1 R+ {, Y+ D, }. y$ ~
  57. #------------------------------------------------------------------------------#
    0 K* g6 X3 T0 o( Y$ D
  58. 8 f. R/ a- j( a- w
  59. : \/ J2 Y8 B7 M/ U
  60. #------------------------------------------------------------------------------#
    & u" d; E/ S" D( P8 p" Z* T
  61. #  SCRIPT CALLS:
    9 g# Z$ g- `9 E& e7 ^/ u
  62. #------------------------------------------------------------------------------#: @3 y) y9 @+ U* d0 _0 N% ^1 p0 V
  63. #* v0 S: r: W; [9 x* ^
  64. #  char_effects(x,x,x,status)
    . b* M  z. V9 F% W6 @! X
  65. #
      F7 O/ g/ \; v' x- c' W3 f: C' K
  66. #------------------------------------------------------------------------------#
    % {& j# s9 t/ O: j! @
  67. #  # each effect can be true or false to enable/disable them during the game.. h) [/ D6 E* m( |
  68. #  # you can change multiples of effects at once, x being the effect number
    % Z; }, [; ], E5 t( Y) _$ |
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons+ r2 r0 w1 A$ J* K
  70. #------------------------------------------------------------------------------#
    $ Z$ H& P( B( P& H. X
  71. #  EXAMPLES:
    0 l7 k  j% p9 N8 W
  72. #  char_effects(0,true)              # turn reflections on2 P6 Z$ c$ @4 A5 C- _9 S9 A. X
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    , G3 t0 f1 K# f0 u1 Y8 m
  74. #  char_effects(1,3,false)           # turn shadows and icons off0 W1 u0 l7 e  U" g2 P4 l4 w- U
  75. #------------------------------------------------------------------------------#" k, L# m1 ?) J$ o8 k3 K% f" ~% m
  76. #
    : H7 m/ u1 I0 y. B
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset8 J& o  z+ U: X9 x& }) Q1 l
  78. #8 j5 H$ V, }( H5 I
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    6 N" ~! z" C! ^1 x: |3 X
  80. #! e: W3 V- _1 r$ p/ i
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    0 j; e6 f  j9 \, q; [9 s
  82. #
    8 G. z0 q: g1 [) Z
  83. #------------------------------------------------------------------------------#
    1 A. H! x( Z6 s( a7 Z( j
  84. #  EXAMPLES:
    $ c6 Y' ?! D* D
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite4 h% h) y' {+ L8 l& l0 u! \
  86. #                                    # in position 2 of "Actor2" charset.
    2 y) ]& |* I6 d9 w4 ]( |9 N9 N( T9 i
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    7 q1 Z0 [  s! @
  88. #                                    # "Actor4" charset.9 h8 t! L/ U+ ~+ W+ o/ G
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of7 t  M* e4 ^7 A& P
  90. #                                    # "Vehicle" charset.
    4 u! P+ u; U% N# r2 q
  91. #------------------------------------------------------------------------------#0 g" r: ]* J4 `1 J
  92.   
    8 x7 v0 T6 O, ~& l
  93. #------------------------------------------------------------------------------#
    ' y8 C/ ^- D+ ~" i5 ]' n, Q
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    2 }& q0 L: u* i* F$ l$ `2 _1 Q
  95. #------------------------------------------------------------------------------#* S8 R% C: i8 G5 ?- ]) K
  96. #4 V2 l# P% d) w
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    8 M3 B8 j+ Y3 ]% ?4 P
  98. #                          # use this to specify for mirror and reflect.0 l* J' d' w: m: \9 W$ L$ o- |1 g
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    " j) x8 m9 d( X' b! Z- E7 ?, c
  100. #                          # to change all events use :all
    0 v- g- y: V# g9 l; b6 j, R0 D4 `5 E
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    + m4 d5 i3 y- z6 o% C* J
  102. #                          # it 0 for no icon./ u6 G/ o' I+ `, i+ q$ @
  103. #
    2 O% i4 W3 Y% o2 P2 r% M7 {
  104. #------------------------------------------------------------------------------#
    4 s1 Y2 K* v; i' M  y7 _
  105. #  EXAMPLES:  U! h/ {- S5 v( h1 m
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON; x  @! l- |* a7 c7 I3 ^' `0 E
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    " S1 A# J$ b; D  W0 q9 Y$ a9 B
  108. #  reflect(:all,true)      # Turn all event reflections ON. x0 o! E7 W3 v* v6 C
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    ) M0 c) a  `7 ~
  110. #
    1 O# F# i9 x+ c! C2 [
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    , O' f4 `" o3 ^+ ^
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    / b; I/ Z1 I; N, L2 w) k
  113. #        should use these effects sparingly and only activate them on events; Z  z, D2 k8 v. ^. ~) `, u- m" f
  114. #        that require them.
    8 O: l- {+ S( J, |0 P% G
  115. #------------------------------------------------------------------------------#
    ( G6 [! t  Y% r/ M: K. i, D3 [) R
  116.   4 z. s* v4 @; Z( z- y- S/ m
  117. #------------------------------------------------------------------------------#2 @0 d1 c5 `: ^0 `$ O+ k* l) ?
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES& w* |% ]; c( J/ r" C" x
  119. #------------------------------------------------------------------------------#1 b, Z1 f7 m) ?2 P/ I
  120. #
    1 {- ]1 T, t6 O6 l
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 3 V# b! U  P" k: c) `6 h2 H
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    " m/ p; A; e0 Q; J  I
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them., f- {0 o2 a0 ^$ b5 E
  124. #' _# u4 X: q  o" c
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    - \+ w* x% U- L5 ?
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    4 C3 l1 ?' V! P
  127. #  v_icon(x,x,x,icon_id)/ l& V4 i5 Z( H$ V" A/ j/ J; l# d
  128. #$ A5 G& {9 T8 R8 S
  129. #------------------------------------------------------------------------------#2 h  ^2 X3 c9 S
  130.   
    - p  X8 n' h' {. c
  131. #------------------------------------------------------------------------------#
    7 P; r  x% g9 o$ @
  132. #  SCRIPT CALLS for shadow options
    : f3 B( p0 h3 b0 H3 v" R# _
  133. #------------------------------------------------------------------------------#
    9 Z( o8 m0 R6 D5 o; k6 s
  134. #
    ' l; C' w2 y+ E
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the " S3 z5 B' {! j% n. ~2 l
  136. #                              # light source number you wish to change (for+ _5 y$ H2 M, F1 D( U
  137. #                              # more than one). These are reset on map change.
    / ~% x5 \- q. v9 `" W% l+ T
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    : \, w( B4 ~" x/ m) ?+ y: F3 |
  139. #                              # This will need to be in parallel process if you! S' G1 ]2 k0 Q2 @6 m6 F0 M1 P
  140. #                              # want it to be a moving light.
    / U7 E. l- S4 X& f  l
  141. #
    ; ~5 {1 W2 ^5 L( T
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    5 g& q$ `" O, N+ h) a
  143. #
    ' r$ ^0 Q2 C  X' Z
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    8 `' k+ d9 P- Y- u. |, P) u  D9 _" P6 B
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    ' Z  ]4 a' ^9 s* p7 Z; N$ p5 ]! P
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    ( R2 w2 e" w, F; y8 q
  147. #% Q, N" w& ~8 o8 q3 u# Y
  148. #------------------------------------------------------------------------------#3 r3 m# n& I, T5 A# K; a' e
  149. #  EXAMPLE:
    # Y) c, \7 ?( e2 a  L+ z
  150. #  shadow_options(80,10,false)    # This is the default setting." {4 S3 e$ Z% t, j& W
  151. #------------------------------------------------------------------------------#4 ?, K6 T  X' W. ]) ~
  152.   ; `0 l* b1 s& F3 z9 O( i
  153. #------------------------------------------------------------------------------#' j: O8 x* H8 S2 Q( A4 P  L' ^7 x
  154. #  SCRIPT CALLS for reflect options
    " G2 e! y0 z) r+ e! a
  155. #------------------------------------------------------------------------------#& Z8 d6 V, d: h7 k
  156. #; }+ h: j; S% d0 ~4 a, E* ~
  157. #  reflect_options(wave_pwr) " _- Q0 {5 A; j8 b+ V
  158. #
      K4 \, f% }% u& @7 |
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    5 H# X6 u; C. i3 r" s: ?6 i3 h
  160. #: }% x( j" K  k1 D( S8 c8 H
  161. #------------------------------------------------------------------------------#( u. }1 x5 c( N9 W& y9 b( c% D8 W
  162. #  EXAMPLE:
    1 k  g, R9 Q& n4 `: ~* t% i
  163. #  reflect_options(1) # Turn wave power to 1& q* _( I8 F; r/ H! W
  164. #------------------------------------------------------------------------------#1 Z6 O! ?2 p1 i  ]( }) H  x
  165.   / A  m/ I8 u$ k+ W& N% K
  166.   8 f. K) F: F+ Q" L) I5 f& |
  167. #------------------------------------------------------------------------------#) ~6 `( L2 N1 v# N0 x# z
  168. #  NOTETAG for ACTORS
    ' z0 Q9 m6 G* b' s, f9 a, X. O
  169. #------------------------------------------------------------------------------#7 L* P$ @) c, x# `: p
  170. #
    & T. S9 h7 ]! Y; Y
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    ( c* E# w0 a0 d; Q
  172. #4 d* E% R: |. Y7 \/ B7 {/ s
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections6 V' c0 }$ _+ l0 Z1 A! x
  174. #                                  # and use the character in position 'pos'6 h  ?! s; ^  d& N0 C, Y. O  m7 V
  175. #
    4 L* x- F8 N& q! X$ M
  176. #------------------------------------------------------------------------------#3 ^8 f% B( g; g0 M0 L
  177. #  EXAMPLES:2 I5 S3 W/ a; L1 h! e
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset) R( f6 o+ {3 z# {& _
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset( K/ G) K+ ^- q, A1 a
  180. #------------------------------------------------------------------------------#
    , i" \- }$ w+ `' Q$ @; v1 m
  181.   9 g) B3 J9 Z( g, S7 K: V  \- _
  182.   
    + v- N/ M5 l  F5 f7 C, r
  183. ($imported ||= {})["Galv_Character_Effects"] = true) f6 {6 _  H0 ]' t5 \+ f9 a4 R6 X) v9 i
  184. module Galv_CEffects$ E, u3 P7 n- n' v( b
  185.   0 p" a( y/ s6 i! t( F7 u& d3 }
  186. #------------------------------------------------------------------------------#  
    $ N" |  O* w  q4 ?3 \6 W5 p
  187. #  SETUP OPTIONS
    ; Z9 z4 n0 {$ V0 X9 u
  188. #------------------------------------------------------------------------------#; N2 {! ^+ j( O$ h& N
  189.   
    0 V( I' O. U. q7 z. `
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the% w% [9 {% x" e6 O
  191.                         # region on the wall you want to make reflective (and5 R( D; P& Y+ k% ?2 k
  192.                         # then use tiles/mapping that make the parallax visible)
    8 m6 C; e1 g8 q' p  H1 m7 c
  193.   
    % p4 t7 H  S% d# q( }5 I( N
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    5 q5 x: c# @; ^' g+ J
  195.    
    3 O5 S' w/ C! W* u9 M3 r
  196.   REFLECT_Z = -10       # Z level of reflections8 @# i& P* B1 K
  197.   SHADOW_Z = 0          # Z level of shadows5 I- a  ~+ y' s4 O) T5 h% l
  198.   6 }- K. J& \$ N
  199. #------------------------------------------------------------------------------#  
    8 Z- n+ z1 \; n( b  N% w$ V: ?, I
  200. #  END SETUP OPTIONS5 _* I& ~) u, m2 R" S& {' \
  201. #------------------------------------------------------------------------------#  u& x8 p& G! @+ J  d) C- k# ?) l
  202. end9 n' @7 T2 d: H. p( Q9 J
  203.   
      `9 y9 e) C# |# N, ~0 k4 h
  204.   - q# r7 P0 B" [0 E4 G
  205. 3 \" J- u' F( [0 N  Z0 E

  206. 8 |1 f/ _( L; t, E; r% J8 E
  207. class Game_Map
    ! C1 ]* |; e0 ?$ u
  208.   def do_icons(refresh = true)
    + x0 |" M8 c$ H9 r# N
  209.     @events.values.each { |e|
    : b5 N9 _- e5 E$ F( @4 _- W
  210.       next if !e.list
    + D& W) S4 j/ {- u' z( L
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/# i5 A8 J; J" E. J
  212.         e.icon = $1.to_i/ m* {0 z: O) V: S. n3 q6 r
  213.         e.icon_offset = [$2.to_i,$3.to_i]* u( `9 z. k6 W8 A" h
  214.       else
    , j* ?& C. u4 @* F6 k
  215.         e.icon = 0
    3 H* Y) g- k& O
  216.         e.icon_offset = [0,0]
    % @7 v- v) g& p  h/ z7 J
  217.       end. e+ b" }" L+ [2 [  r& k4 I7 `" k" R6 t
  218.     }/ g1 y0 G0 X- G7 x  \; k
  219.     SceneManager.scene.spriteset.refresh_effects if refresh1 H( c# u+ A1 o5 T* q
  220.   end
    % v% ^8 P$ o$ p5 e
  221.    ; `! F' Q4 `0 N3 T0 [
  222.    
    2 L& [- u0 u' {; F6 w+ `4 A6 |
  223.   def do_shadows(refresh = true)
    # e& u. h4 R2 D4 W8 I
  224.     @events.values.each { |e|- S1 d% y; j' T7 q* p
  225.       next if !e.list8 `6 J: h. X) w/ A' Q
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/4 d. G9 a) n2 W! g) k% E4 @
  227.         e.shadow = true! g! g; y& j' G2 |/ x4 Y: ^3 _
  228.       else
    1 V4 Z" ~) S8 K0 h# h# D8 \
  229.         e.shadow = false' C- ]3 t+ [) l' S- p
  230.       end
    ) S" h  a* O5 ^# n, P. h5 X
  231.     }
    9 m! ~# w! o  g' }' H
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    - ~: \2 f- l: K7 Z4 d+ n! \3 D
  233.   end
    + Z" Y" f0 X8 b9 U: S* k) x
  234.    7 c1 U# w  E' h* X" D* {6 R
  235.   def do_reflects(refresh = true)
    2 ~& K9 J, U% S
  236.     @events.values.each { |e|3 Y3 J$ }( E% G
  237.       next if !e.list4 D9 s0 w; J! k
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/8 E$ y/ [9 \: w6 n2 i+ O' _
  239.         e.reflect = true  p- o% ^( B# a, I; `& l" K& J4 B
  240.       else5 x9 v2 n+ a6 z
  241.         e.reflect = false3 \( `7 n5 m4 D4 u
  242.       end  Q' ^* D# y+ f) y
  243.     }5 r$ R* ^& J+ i1 {6 A
  244.     SceneManager.scene.spriteset.refresh_effects if refresh3 ^7 \7 M+ ]  p1 s. C5 I
  245.   end
    ( `9 `2 Q% d  ?- M) u% k
  246.    
    8 m- ^% e# c" ^. f  B' \7 J$ M
  247.   def do_all_chareffects
    ! y. C0 ~% x7 B  A
  248.     do_icons(false): ^& R# U! R# ], X! N; Y2 N7 x
  249.     do_shadows(false)
    + R5 _  ?" O, w4 A% O
  250.     do_reflects(false)
    " _& v3 x& Q& |
  251.   end
    ) H& @4 l+ b2 a# m" W
  252.    ' b, j9 u3 f8 S2 [7 C" C1 F
  253. end # Game_Map
    ! ^# \# g1 h$ E/ i7 z

  254. ; L' [, M* B& c5 u. r& c) _/ S: s0 M
  255. 8 @6 P! b! u+ W& _% z

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-6-4 22:57

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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