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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

* I7 ]# O8 h8 O: B' s, B这个代码怎么用啊,有大神知道吗。我从国外找的。0 t0 A) |& S4 L7 W
http://galvs-scripts.com/2013/02/21/character-effects/" @, b& q% Q% E
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------## @/ q7 H1 |3 @$ ^" @  M1 Q) R
  2. #  Galv's Character Effects
    3 s/ ~: O4 K; B0 w( L: f) X$ c
  3. #------------------------------------------------------------------------------#
    2 t: X. y. B+ F; S! R4 N- o. c! S
  4. #  For: RPGMAKER VX ACE
    . w) p& H1 ?8 W$ z6 y% w/ w
  5. #  Version 2.1- m8 X( g8 I8 I3 _, D. |7 [! G
  6. #------------------------------------------------------------------------------#7 K) k" E/ g; |/ h- @$ |% |/ _6 E
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    / R$ z0 R8 Z4 v- }2 x
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects' \7 o0 Y3 x# j$ L1 w) F; T* B
  9. #                           - Fixed shadow facing bug
    ( x6 X6 k! `1 U
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows- D4 `4 A7 H4 x
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    ( {  ~! Z  @! U6 H$ F
  12. #  2013-02-22 - Version 1.7 - bug fixes
    / \& m% W/ ^- X- W! E+ g
  13. #  2013-02-22 - Version 1.6 - added icon effect' V& p4 i7 u( H8 p9 i3 J; \, [) w' M
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    , c. u8 P4 I! d3 P- g/ q
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles0 r9 a& r5 k) l9 Q* k4 G& D
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks9 h7 u, ~. g' r% z3 V; [
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    0 T+ v3 m: d' ]2 G& r: ^  f# ~
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    / K* [- h4 R, P9 G2 G
  19. #  2013-02-21 - Version 1.0 - release
      b: O, C2 O6 R
  20. #------------------------------------------------------------------------------#, g( X% y9 c9 Y7 r; G! @: n2 a
  21. #  This script was made to provide some additional effects for characters such0 a" I2 n: |# W
  22. #  as events, followers and the player on the map.
    5 N3 r5 G9 C: C: f
  23. #  Currently it includes:
    4 y7 H7 f4 o' T
  24. #3 J& m8 y+ R3 U" \
  25. #  Shadows4 J) Q& X. P& S; x$ ^" V0 v
  26. #  Shadows that appear under player and events in a directions depending on
    + c9 x' @$ s! e5 D
  27. #  a light source that you choose.$ g# e" D3 R' ]. `, Q# O# U* B$ h
  28. #% r1 Z7 {% m0 Z
  29. #  Parallax Reflect
    * [/ Y5 K3 ~& ]. `0 O
  30. #  Reflections that appear on the parallax layer for events and actors to be6 D6 h" X& M: d0 P" x% o0 A. x
  31. #  used for things like reflections in the water or glass floor etc. To get
    : |) B) E6 X, X, c% b# g
  32. #  effects like the demo, you need to edit the charset graphic to make the water; z  T- m) z9 C( o: d+ P/ r3 y
  33. #  partially transparent.
    8 y% i& |/ K8 Y, [, l$ z+ D9 I
  34. #3 f( m' C- Z; v, Y$ s
  35. #  Parallax Mirrors' }* m3 ^. O/ |) ?
  36. #  Much like reflect but are instead actors and event are reflected in a mirror. L! S. s* y9 Y/ l8 \" v3 _$ t4 l
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    * M  S6 o4 @' a' e8 g
  38. #  changed so actors and events can use different charsets for their reflections
    % [# `2 z* k; B5 |
  39. #
    0 ^3 u# K2 z2 p0 ?" l2 @
  40. #------------------------------------------------------------------------------#
    8 S5 g- V2 e/ H# x
  41.   % ]3 w" D. b- g( b# R

  42. % z- ^2 X, f9 ~: f
  43. #------------------------------------------------------------------------------#8 b% b# d5 _' [6 F5 i
  44. #  NEW - First event command as a COMMENT
    ; b0 Y$ y8 d& j
  45. #------------------------------------------------------------------------------#
    ! i- u9 K) W0 X  S6 f
  46. #  You can add a comment as the first event command on an event page to set if
    & ?0 _1 S4 [8 t; p3 @
  47. #  that event has an icon, shadow or reflection active. The tags to use are  r. \8 \3 h! V& I( T% I
  48. #  below, all must be on the same line in the comment.
    ( o) n+ w# K  o9 A; h7 l
  49. #
    ; L# [% z* r7 ~% j0 ~1 v
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    3 L, `* F* ]# ]( j
  51. # <shadow>           # set the event to display a shadow+ _2 g* p  `& A& v* O3 c; C
  52. # <reflect>          # set the event to display reflections
    ; K2 A) T( e; H, A/ Q8 D
  53. #
    0 E% R6 F+ n; C. }1 u2 `
  54. #------------------------------------------------------------------------------#
    - a& h7 E4 H+ j) B# `4 W: i
  55. #  EXAMPLE:
    9 a7 |; z$ e% o! k) _
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    4 M. A" ^! ~# R! T
  57. #------------------------------------------------------------------------------## i+ J1 Y0 {6 k5 e
  58. ) K( I" |# @" }3 m8 v( n- S8 d
  59. 9 }1 }" h! Q# ^7 {5 d9 o& w
  60. #------------------------------------------------------------------------------#
    - B! g# S, [8 s& R" b  r! l
  61. #  SCRIPT CALLS:  z4 y( i7 b6 m; S* Z
  62. #------------------------------------------------------------------------------#4 S- S5 X6 c' X) O: ~6 G
  63. #; N- ?0 j! |; ~& L/ j
  64. #  char_effects(x,x,x,status), P) Z% f  U; B
  65. #
    4 j: n9 ^" `/ x% y+ z6 n0 ]
  66. #------------------------------------------------------------------------------#3 K* h! L" a9 `$ b: F6 h$ R, @
  67. #  # each effect can be true or false to enable/disable them during the game.5 h$ l% ]: N, N" e
  68. #  # you can change multiples of effects at once, x being the effect number
    9 k% t1 R  E  `9 m* d* p
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons7 F$ Y- g+ D  ?6 s& f6 x$ d/ `0 c
  70. #------------------------------------------------------------------------------#
    , p9 K8 c- K7 I8 D. Q7 I* M
  71. #  EXAMPLES:/ O3 x# l6 l1 F: t5 n5 D" Z
  72. #  char_effects(0,true)              # turn reflections on% c# j; O8 a) ?) H" @
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    / B6 H9 E/ L4 {5 K0 }
  74. #  char_effects(1,3,false)           # turn shadows and icons off8 _# P0 y$ `+ c5 b8 G
  75. #------------------------------------------------------------------------------#
    9 I6 D; M3 F. T# g
  76. #  X6 U+ c. N; c0 d, _
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    7 }% v9 s3 D8 P8 p6 ~) L2 V
  78. #9 a; u  Y) [9 C
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset) I8 O% g8 U5 f& I; G: C- f
  80. #
    , h( Z+ Z7 O) v$ K. P3 |1 R' H
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset& W' n- \& |/ D+ W! b3 H
  82. #* {" w- H; e% q) M* s! j% S' F6 L- J
  83. #------------------------------------------------------------------------------#& R$ A# _+ o3 p" E" G# ^. v
  84. #  EXAMPLES:' w: k& Z, Y0 l. v- L: \5 J# M
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite) ]$ u4 ^3 D# i
  86. #                                    # in position 2 of "Actor2" charset.' L' h9 [: r! V  e, G
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of4 A9 S5 i5 p+ _) L9 l
  88. #                                    # "Actor4" charset.% w& N5 h  o; J0 J7 m0 V
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of! Z& I" Y: Z1 [
  90. #                                    # "Vehicle" charset.3 W# P0 s) \7 G) \" X3 t7 w
  91. #------------------------------------------------------------------------------#2 S2 |* F0 _- u3 G3 l8 ]5 b
  92.   ( B, k- u" q0 }( G$ i: y2 Y9 Y
  93. #------------------------------------------------------------------------------#
    8 `! P/ X9 Z+ T3 f% q  o) {
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS' a, |! s* [1 I& C
  95. #------------------------------------------------------------------------------#
    % ]* z' h5 ?+ ~9 _9 n+ s0 l$ i5 N& P
  96. #
    $ \/ d) c2 f: D$ e- Q/ _* V" V* @
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    ' E' J8 b, c2 v% `
  98. #                          # use this to specify for mirror and reflect.0 m( \+ |: ]5 i# _
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    7 I6 L2 T, d2 Q( i5 ?
  100. #                          # to change all events use :all( b/ k' ]# {; w, B( d
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    ; V) _% S+ k# K3 d* F5 h: Z5 |1 H! _
  102. #                          # it 0 for no icon.9 f6 A! d- Q- E1 X; b, u* t
  103. #
    / \9 K( e/ W& \) }. k; }  g$ j
  104. #------------------------------------------------------------------------------#
    0 e' D7 `3 q$ ^1 V) p
  105. #  EXAMPLES:. t% @# }* [% Z  m
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON# c/ A$ Y& g( w8 O8 e
  107. #  shadow(1,false)         # Turn event 1 shadow OFF& t+ I! O0 B: S, m- T6 C
  108. #  reflect(:all,true)      # Turn all event reflections ON
    - w; L: H" F! T5 U( d
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear( f6 \6 q! S9 Z, g% |, x2 y# l0 A; v8 n
  110. #
    / B- H1 ]( @0 U  M5 Q, @0 p' j  P
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    , t2 f7 y7 r+ M8 s
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    + m$ H+ K4 `  s( {7 d
  113. #        should use these effects sparingly and only activate them on events
    2 W5 s* @5 W+ t. X, u" Y: l
  114. #        that require them." F: n' w7 P. g3 H, k
  115. #------------------------------------------------------------------------------#
    1 p3 ~7 B- |" }
  116.   : x, ?8 r6 b8 y0 N
  117. #------------------------------------------------------------------------------#
    0 I1 z2 q4 f8 i: p, ^9 ~  s9 V8 e9 i( T
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES) b3 V% I: ?) K8 a. g% b5 h9 P* K
  119. #------------------------------------------------------------------------------#
    * @- ?/ J, [- d$ N* ?% r
  120. #
    2 Q# t) c3 q% H  `, Z
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    0 L2 I! W6 r1 E  a& m: n- t( {9 W: U
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 4 _, {( M0 Q+ Y5 T% [
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.0 c  k  F1 B. i) [* F0 q
  124. #$ o  t6 ~; Y7 R
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects" d9 ?' v+ Z  P( r/ X1 e
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.0 w: K, y& b, V2 l8 M  z% B' E
  127. #  v_icon(x,x,x,icon_id)* k! r1 [9 {( D, h: L3 \. O1 P
  128. #
    3 y2 h: }  w5 b% J8 P
  129. #------------------------------------------------------------------------------#
    9 Y0 L$ s8 x9 w/ z. g; h1 e6 [
  130.   
    4 ~/ o% \+ H; L
  131. #------------------------------------------------------------------------------#' c  Y8 p- w  N# D
  132. #  SCRIPT CALLS for shadow options% |. M% b# o; L1 g' W0 _; v
  133. #------------------------------------------------------------------------------#
    & [4 A: F- c+ J: G# m
  134. #* @% O+ D8 I9 W
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    ) a( y% c2 n2 h% Q9 h  i9 e
  136. #                              # light source number you wish to change (for$ {1 T2 e+ v0 j5 `( i- |+ |
  137. #                              # more than one). These are reset on map change.) q9 l: A5 |5 |$ v7 {- }
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.3 P+ v7 m( T: M7 a3 D5 V
  139. #                              # This will need to be in parallel process if you
    1 \; E+ ?0 R: H/ n3 R
  140. #                              # want it to be a moving light.- i$ E. ^+ _3 x5 \5 w: @
  141. #$ Z$ u6 w  D$ O: y
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below" p, F# ~9 D/ K' D- Y
  143. #
    8 f- d2 H1 j# P/ r1 ]5 A7 o& D
  144. #    # intensity = opacity when standing next to the light source (255 is black)5 U- u2 d6 R$ p9 g! W5 N
  145. #    # fade = amount shadow becomes more transparent the further away you are.% {) k/ f9 s" R6 k" j
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    * l/ i2 K5 o% Y4 k' k4 ?
  147. #! e/ o% j( \6 n  }! j3 W
  148. #------------------------------------------------------------------------------#3 G2 ^! r" k6 a) d* S5 ~- C- K
  149. #  EXAMPLE:% M7 z  K+ |6 _) v2 t
  150. #  shadow_options(80,10,false)    # This is the default setting.% h, Q4 C6 o' _/ I
  151. #------------------------------------------------------------------------------#+ V* m# X7 Y* {! u& ?; R
  152.   
    & N& V# v: Z: V! J6 Q3 x* C# |% T; l. V
  153. #------------------------------------------------------------------------------#6 J: _3 ]( U, n6 u, {2 _
  154. #  SCRIPT CALLS for reflect options5 N6 `1 d3 m8 ?2 g' O  X0 Y
  155. #------------------------------------------------------------------------------#. C: I* t8 }# p' \; b) J
  156. #  K% j2 K) }; E$ p- W
  157. #  reflect_options(wave_pwr)
    ) |  q2 ]8 C. k* _/ D5 S3 L* }
  158. #
    : B8 _  N; n7 ], T
  159. #    # wave_pwr = how strong the wave movement is. 0 is off/ z3 W3 h" ?3 K8 S
  160. #& y/ S' T+ _$ \6 l( X, x6 D9 b
  161. #------------------------------------------------------------------------------#6 s; p' L3 f0 u9 d3 m7 S! b
  162. #  EXAMPLE:7 W5 s4 [7 E& ]1 Y
  163. #  reflect_options(1) # Turn wave power to 1
    % i$ p" B* U# p, r: B4 D( u
  164. #------------------------------------------------------------------------------#
    / F0 n5 s$ C7 w9 \5 z
  165.   
    , n& Y( `( w- \* V
  166.   
    , C+ G: w# P3 ^: z- U" x& k* z  X
  167. #------------------------------------------------------------------------------#
    * x! R  r3 o- p
  168. #  NOTETAG for ACTORS5 k1 Z+ M$ G! }, p* o
  169. #------------------------------------------------------------------------------#
    6 j" [2 F9 }- J
  170. #& Q+ f* ]1 u3 L$ _# X
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)5 l7 J6 D$ z0 g2 t$ L
  172. #, g$ G% ?- ?2 W
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections! u. v4 t" y1 p  O) `% m
  174. #                                  # and use the character in position 'pos'
    2 k% A8 j0 p: t' b& T; g' c8 }5 z
  175. #
    + D' F/ o- y' X" ?
  176. #------------------------------------------------------------------------------#" b3 M$ |. a* b7 Y' ?( _; U( E8 J
  177. #  EXAMPLES:$ _8 S; `  o( R3 s" M
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    6 V0 ^2 \6 P: t) K4 M. s3 f7 G2 q
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    8 Y2 i3 {- K) ^! G( k) M2 Y
  180. #------------------------------------------------------------------------------#
    % `" x2 O  {, U5 z# H1 R
  181.   
    & [0 Z9 C( T1 Y/ F4 j/ _" a
  182.   0 K6 }& j. A6 Y! C+ s
  183. ($imported ||= {})["Galv_Character_Effects"] = true4 H4 C1 ~" }! f* Z+ R- f7 H/ H
  184. module Galv_CEffects. J5 s1 s2 K# k! U
  185.   
    / I  N/ ]- s8 b7 o& ?) l+ u
  186. #------------------------------------------------------------------------------#  % r" d. f: Y, s* y
  187. #  SETUP OPTIONS
    5 U% B$ z5 Q5 y( Y
  188. #------------------------------------------------------------------------------#, g+ h7 t+ Q9 y, X+ n! k" v7 t
  189.   - L0 M* E  `2 J. M! \
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    8 _, w( b8 J% }* I. A
  191.                         # region on the wall you want to make reflective (and
    % x9 f. o4 Z$ ~$ i: \- W% e5 X9 ?
  192.                         # then use tiles/mapping that make the parallax visible)! }1 W2 [6 q# l/ C; }5 o* C
  193.   
    8 V7 {6 a% O/ Q( v: v# J" Q
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    : R. e' q3 H! `( u$ C3 c+ D
  195.    
    7 w% ?, ?9 ~# E. `* g
  196.   REFLECT_Z = -10       # Z level of reflections
    ) Z, x4 Y- l, ^; n. ^9 z
  197.   SHADOW_Z = 0          # Z level of shadows
    ; ]1 c/ f6 [* K6 x+ {
  198.   5 `- ~9 R2 }- V1 P0 D8 z8 J- S9 ]
  199. #------------------------------------------------------------------------------#  
    & Y0 T. E: |; D- ]) x  @5 @
  200. #  END SETUP OPTIONS
    . @8 h$ l. P+ q% j
  201. #------------------------------------------------------------------------------#
    2 O3 O; R. u$ A# F0 y
  202. end
    $ ]" y$ r8 m+ r* @  M: I" j
  203.   # S7 w$ h- `" x! |  K7 j
  204.   
    6 m% c  @8 D& h' w0 k$ R5 t) n
  205. ; u: i* J- I+ U7 D8 Q( _

  206. ; d3 Z1 X7 ^+ L  O
  207. class Game_Map- X, B1 y- P2 ?7 e& x) N# F
  208.   def do_icons(refresh = true)5 f+ T% }- Y( Z2 s( `
  209.     @events.values.each { |e|+ z5 n7 @" r, Y4 O4 R+ I' \
  210.       next if !e.list  n4 j) W/ x: U) |% V
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/2 S& F% E+ Z4 Y1 U: y8 j
  212.         e.icon = $1.to_i2 ^' [! c, q, U1 o* Z5 ^  G" p8 u  w
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    & Z7 n1 c/ q# B5 G- H& A! |
  214.       else
    0 T5 P' f1 V9 K/ O& F* y) @4 Y; N
  215.         e.icon = 0( J+ N  E5 f2 {: h
  216.         e.icon_offset = [0,0]0 {7 i3 p" b: `, b* Y6 J  y' E2 p$ Q
  217.       end
    ; Y- Z6 f$ Q4 U- S5 H+ d
  218.     }
    0 N. o1 d6 E4 ^  l2 Y; O
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    / Y# h- }$ \* i/ n: K
  220.   end3 p- i7 |+ g; }/ Y3 y; P. t* T5 C% [
  221.    # ?  |7 m& L' z& P: t1 {" m; T
  222.    
    2 R. [! I9 b. K
  223.   def do_shadows(refresh = true)
    0 I9 |0 S0 O  p) L7 U
  224.     @events.values.each { |e|
    7 U& T4 F/ c* ]( Y
  225.       next if !e.list
    2 h% i: }/ l, |' _0 _& g: x
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    1 v6 n6 i, b, B: X; v0 g0 Y4 o/ ]: e
  227.         e.shadow = true! ]) |/ m4 ~" R; d- F4 X9 E, H$ I
  228.       else
    2 C+ r6 [3 e5 v, _+ L7 b: N# w
  229.         e.shadow = false! N5 b! x" }7 y  k: `# U: T
  230.       end
    # @( W8 {# p: a- @
  231.     }
    2 }: o9 b) X( }; @5 S- K: v
  232.     SceneManager.scene.spriteset.refresh_effects if refresh9 t" M' ]. i$ ?& B
  233.   end# O) ?- c4 C: h5 Y4 r' D- j
  234.    ' R/ B2 N2 ?: h5 R$ R4 ]  T
  235.   def do_reflects(refresh = true)
    ! I% @' E6 x) Y. N8 Y
  236.     @events.values.each { |e|
    # v2 S, a& |; _0 }) x+ A' W. A
  237.       next if !e.list
    ; i* L  J8 i/ Q. N+ S: ~& `5 D
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/0 I5 `4 j" i, k
  239.         e.reflect = true# k8 a( w5 ^6 w0 @! T! ?
  240.       else
    ' _3 _# r9 `1 J6 k3 e( h1 H' z8 E
  241.         e.reflect = false
    7 |% g) P% b& t3 d
  242.       end
    + E, X' F' x9 d) b
  243.     }& X+ N- x7 |$ }# p3 E' k7 J
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    ; T4 H& O/ R$ F1 K
  245.   end, I; d0 K8 h7 n8 r( A" G
  246.    
    2 }$ D9 i1 ~9 f0 D2 ~
  247.   def do_all_chareffects
      [7 |) T9 D; B2 x# H
  248.     do_icons(false)
    - H8 _( F$ j  i0 E( \4 u
  249.     do_shadows(false)6 Z. C* m; K- R% o) R$ ^3 Q  P: y
  250.     do_reflects(false)2 C7 b/ A# C1 f! e8 F
  251.   end. O5 X- A+ ]! N& ^' t
  252.    
    ; B0 I7 a/ P' ]7 \* p) n
  253. end # Game_Map, N. J/ z0 K! b( x$ a, z

  254. " m3 N$ x2 f( C; W
  255. & r- f& X6 w: V7 o6 X6 u$ d1 L6 N

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-6-5 06:47

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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