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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

$ {1 r% F- d) C7 G' `7 N+ b这个代码怎么用啊,有大神知道吗。我从国外找的。
( O6 q3 g+ u- L; R! I) G' E0 v7 Nhttp://galvs-scripts.com/2013/02/21/character-effects/
) }- {, F6 g$ x$ ~  d0 v是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    0 ?9 o. @% }2 L+ c8 H9 K
  2. #  Galv's Character Effects) B; l- y4 w, i/ {$ I2 W
  3. #------------------------------------------------------------------------------#8 }6 `. o3 E0 m7 ~* N
  4. #  For: RPGMAKER VX ACE/ D% @+ L4 e* [4 |( z( g/ z* F
  5. #  Version 2.1$ A* _& U: f- X# N/ V* Z+ F3 a
  6. #------------------------------------------------------------------------------#% e4 I+ e+ v5 m, i! q: D; @. Q; M. I
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    0 J/ S2 l  O0 V) `# ^
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ' b' D$ a, t9 J! b: d7 Y+ }
  9. #                           - Fixed shadow facing bug% D6 m+ S2 U) d' p
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    7 |8 z0 a) }3 ]  p: t+ k) @. U
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows: b: C6 s) m  v7 h3 w
  12. #  2013-02-22 - Version 1.7 - bug fixes3 a5 O3 @5 u$ c, y$ r1 R
  13. #  2013-02-22 - Version 1.6 - added icon effect/ A2 H& e1 \2 P' p
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    " y5 K) \! m' p# p; R  X, U
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    + _1 Y  @" j8 P* Y! t: w
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    8 I7 h# w6 v# {8 q, L
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    2 l) B6 q# F0 ^% l
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    % r5 d3 m$ K4 j% i6 `
  19. #  2013-02-21 - Version 1.0 - release
    7 x. G. u0 e3 B0 S$ N; t
  20. #------------------------------------------------------------------------------#
    - v$ D! q) F4 \9 M1 R
  21. #  This script was made to provide some additional effects for characters such$ \8 J( k. t0 ~9 f% Q  A# m. C& S+ y
  22. #  as events, followers and the player on the map.( h. ]  r6 `" R4 O: r* k: x" v
  23. #  Currently it includes:4 E; U3 |0 y2 W/ N
  24. #
    4 E9 m  k9 h$ s0 f7 c
  25. #  Shadows
    3 g/ M, ^: {9 Y  `: F
  26. #  Shadows that appear under player and events in a directions depending on9 c3 C, m" ?1 h# w
  27. #  a light source that you choose.6 k8 D8 |/ A9 o; ~" F
  28. ## y  D9 C+ y4 o# _$ R7 w" L: ]
  29. #  Parallax Reflect
    ; X( `, |# j( u! r. e" u& Z
  30. #  Reflections that appear on the parallax layer for events and actors to be
      ]' D( w: u6 [$ r
  31. #  used for things like reflections in the water or glass floor etc. To get" ~9 |9 o# `2 e, d3 {
  32. #  effects like the demo, you need to edit the charset graphic to make the water5 n* n% T2 x" @' b  y
  33. #  partially transparent.9 U8 K2 O5 ~) d9 e
  34. #
    & C  T4 Y$ l* S' q$ n$ l
  35. #  Parallax Mirrors: z- B- d7 y, q% w/ W- L
  36. #  Much like reflect but are instead actors and event are reflected in a mirror) T8 s: F8 ?0 r( ^% M( E+ @* K* s0 o
  37. #  on a wall designated by a region. Both mirror and reflect effects can be2 l4 E& a! K. o) r- K6 Z; u
  38. #  changed so actors and events can use different charsets for their reflections
    : c) d% W9 A9 u+ a
  39. #
    # l; @8 \7 j2 M& \/ z
  40. #------------------------------------------------------------------------------#
    : a* C% n( [, R1 u1 A6 z
  41.   
    ' r$ p3 x6 b6 o. i) V# I( H  d

  42. 8 D% v6 C: K$ ?3 D
  43. #------------------------------------------------------------------------------#& R( u8 {6 _) ]! d" `
  44. #  NEW - First event command as a COMMENT! |3 |$ I7 x, y+ `4 l
  45. #------------------------------------------------------------------------------#; G8 m' \/ ~3 B) h0 W
  46. #  You can add a comment as the first event command on an event page to set if# e8 R. L* E4 r
  47. #  that event has an icon, shadow or reflection active. The tags to use are( f6 v  F. y5 t% g# G, M3 h  ?
  48. #  below, all must be on the same line in the comment.8 `. Y1 ], a2 y1 H- f3 j
  49. #
    5 `' \+ o; q; k$ M7 S/ C# `/ H1 {
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    " b/ ]3 w% a8 v0 r, Y5 r  _
  51. # <shadow>           # set the event to display a shadow. l# T0 o. d6 b" D
  52. # <reflect>          # set the event to display reflections
    ! N% k+ N. `2 \: z
  53. #
    0 ]8 \7 f5 X# K9 R
  54. #------------------------------------------------------------------------------#
    2 b* U4 r' F3 ~( q+ R
  55. #  EXAMPLE:
    ! g& y; J* U$ t! R0 ]1 c* Y
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    + H. N' `# i8 s  H' @, c% g# Y! i/ P
  57. #------------------------------------------------------------------------------#5 }' Z% r* E" C: l" U/ v. V% m

  58. ) a7 G3 H$ J: Q# Z' h) e
  59. $ V* L8 P% `, \6 G
  60. #------------------------------------------------------------------------------#
    . }: T9 W: ^9 s0 t% a& |0 O
  61. #  SCRIPT CALLS:
    0 v6 y5 a  e5 }7 R4 x
  62. #------------------------------------------------------------------------------#* T$ b" p# }/ J" p' z9 o2 S
  63. #4 i! S. X( o% A: Y: T
  64. #  char_effects(x,x,x,status)
    ' M* e- Q8 [# b+ R" J" A& @) V
  65. ## C7 }! x5 o6 \6 |7 P7 y$ ~7 L
  66. #------------------------------------------------------------------------------#9 v' S: n- B1 v' p8 F. N9 S
  67. #  # each effect can be true or false to enable/disable them during the game.- g$ x8 |* M! F* s( Z3 D
  68. #  # you can change multiples of effects at once, x being the effect number5 `8 E# o6 F( B0 ^1 j6 c: [( S) U
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons& `0 ^. f9 f& e2 q- ~
  70. #------------------------------------------------------------------------------#
    ' Z) v' t" f- I3 L" ^
  71. #  EXAMPLES:
    3 G/ g0 C9 D6 \: b
  72. #  char_effects(0,true)              # turn reflections on
    0 B, y: W/ B& @# F; x
  73. #  char_effects(0,2,true)            # turn reflections and mirror on- N% ^. n2 }% a% ~6 L
  74. #  char_effects(1,3,false)           # turn shadows and icons off* x" a  ^9 |- }: T3 `5 |0 q( {% P$ L
  75. #------------------------------------------------------------------------------#
    ; n6 Q: S' B3 \- \
  76. #
    7 e- }0 \: r- z( g$ B
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset, }  I6 e7 O+ l+ G$ G, d; P) H
  78. #
    4 c3 f- ~2 o- s# B* t& G% j  ~, c" K
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    8 H+ a* @/ O9 W/ S
  80. #) P4 k% ]+ O( m) X
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
      p0 ^2 @" A  {2 r+ L8 R! G. W
  82. #
    5 f- }3 h/ k0 U; u2 A( k$ \
  83. #------------------------------------------------------------------------------#
    $ A/ f- g$ x9 Z1 P5 K( K. s
  84. #  EXAMPLES:0 {' I' X" |- d' h2 t2 t# `& w
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite) h+ G6 M+ `3 h  O# w
  86. #                                    # in position 2 of "Actor2" charset.# |3 Z4 u( p: i# I2 X/ q
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    3 A% W0 f7 O4 t5 {1 {# l+ t2 R% C
  88. #                                    # "Actor4" charset.) \; F! ]% p# H  ~8 f1 r
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    1 U1 u5 {1 Y0 [
  90. #                                    # "Vehicle" charset.5 E+ U3 l0 [" p8 C6 e
  91. #------------------------------------------------------------------------------#* j9 C0 Y) `+ S1 @$ g& f
  92.   . c* k) R: n$ D0 C# j9 F
  93. #------------------------------------------------------------------------------#
    / @  o( M$ a" G$ Z* R6 y: E' I( T# l: k
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS" Z% Q3 U. U1 O% H& [
  95. #------------------------------------------------------------------------------#' K+ K8 I8 I6 V. s  E
  96. #: }8 M/ [) Z* w; l
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    , M$ t9 Q2 j0 V1 F; |* \
  98. #                          # use this to specify for mirror and reflect.
    & o! c& U. V; c6 v, V0 ]
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change2 U  b1 O4 _9 }# Y$ e7 O
  100. #                          # to change all events use :all( ^5 B. O+ X* v2 s$ e, S) t) {, a$ E
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    * i' L4 T) j7 r
  102. #                          # it 0 for no icon.
    . L' F: O0 W1 _3 f6 O* u5 b
  103. #7 A9 C( Q' W; g
  104. #------------------------------------------------------------------------------#; E" K5 b: D7 @/ T& o3 ~) v( u+ S
  105. #  EXAMPLES:
    ' \7 y/ R0 k% j$ g( o
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    8 H: z+ D. b' i& f& Z# N
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    ( k+ h* ~) g# @# i8 y" k4 F
  108. #  reflect(:all,true)      # Turn all event reflections ON7 V' I9 G8 m' A# r0 ]* S( }3 T
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    & h" n5 X. Q; G+ o6 L
  110. #
    ) ^: c2 j$ @! G0 P
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering1 T% @* I# J; Y7 o
  112. #        a map. This is a design decision to try to keep lag to a minimum. You4 s7 V, m" W# |. j1 Z8 c$ h
  113. #        should use these effects sparingly and only activate them on events! U! N. z0 Z. h% _
  114. #        that require them.! J7 M  {, Z4 O" w
  115. #------------------------------------------------------------------------------#) C( j* ?. g& E* t; n7 S6 K
  116.   
    , E4 `: M- c) _7 |# `
  117. #------------------------------------------------------------------------------#  W% G4 x/ q# F2 O  o: \* q; ~
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES; B! N7 Z# q. l0 e. H
  119. #------------------------------------------------------------------------------#/ l  ~: m+ N/ @
  120. #
      ^/ t5 Z% X' N& Y& u. M5 u
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    ' b! [, u# [. p  @
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 9 B. w  k! s* Q7 x* {5 f2 R
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    1 i2 V8 v: h8 o) d
  124. #
    2 S4 E3 q/ C/ m" N8 l
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    , Q. |* d$ |, O
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    6 N  H4 M7 w3 L/ u5 P7 J2 }5 f
  127. #  v_icon(x,x,x,icon_id)
    6 X1 w2 ?2 l8 P" c, r
  128. #1 q5 i2 M; w% N* ^& R5 k
  129. #------------------------------------------------------------------------------#/ b4 o% s" f; j) ?2 n; P, B
  130.   7 C$ k1 u7 h' U. M& j
  131. #------------------------------------------------------------------------------#$ u" B4 [( K4 u  B
  132. #  SCRIPT CALLS for shadow options  L/ p- d" d- R; b! T( w! f$ \9 O
  133. #------------------------------------------------------------------------------#9 E) Q' v& d2 u/ `: |: c/ ^, x" W
  134. #
    ( y/ c3 M% V- r% N. R( m1 E- q. \
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    + l/ D( k0 s4 V! z3 f
  136. #                              # light source number you wish to change (for! ^* t5 m2 ~1 C; S
  137. #                              # more than one). These are reset on map change.& Y3 @9 F: Q5 E( Q  U
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.* h- i2 A( j+ ]" I
  139. #                              # This will need to be in parallel process if you
    ; B4 Q" o) C. J, }  b
  140. #                              # want it to be a moving light.
    % R$ r* a( j) J- d9 z4 ?
  141. #  }/ u3 [; [2 v# _% E, C/ v/ p
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    ( @! q; t/ C$ I6 k; j" f
  143. #$ V2 l: O4 W  J6 I: Z, q! J7 m8 y
  144. #    # intensity = opacity when standing next to the light source (255 is black)8 U7 G# `( Z& g* |8 y- W8 k6 v
  145. #    # fade = amount shadow becomes more transparent the further away you are." N' r% R7 w" |7 {( i8 c
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.6 A) c, r. a2 n8 z" Q
  147. #& t; y% i4 J. p0 z- ^$ r
  148. #------------------------------------------------------------------------------#- }% @& M4 `, P$ L6 _0 ~& {% V) f
  149. #  EXAMPLE:1 B( s% n; ^8 W8 B
  150. #  shadow_options(80,10,false)    # This is the default setting.( Y% z9 `+ L% p3 n  |$ H8 }5 \9 h
  151. #------------------------------------------------------------------------------#0 h: d( V8 S2 X# R1 ^, _# i
  152.   
    : k- d* C8 C% B, R
  153. #------------------------------------------------------------------------------#; I- F8 u$ p: m2 j& }8 e
  154. #  SCRIPT CALLS for reflect options
    ) l2 q! C# J+ f9 K' z' R
  155. #------------------------------------------------------------------------------#
    * E! f. e. w9 A1 z4 e0 f- \
  156. ## u! Q9 I# T2 A! k$ P
  157. #  reflect_options(wave_pwr)
    4 I  X. \1 y* E! ]) ?  O( w: J; e
  158. #
    2 \& @, f& p) M" w+ i  g2 J- W
  159. #    # wave_pwr = how strong the wave movement is. 0 is off$ @: F# B. E) k8 d4 B8 k
  160. #
    ! }2 E- e! w+ J
  161. #------------------------------------------------------------------------------#9 u( ^7 P, z# P4 `2 G* v$ {
  162. #  EXAMPLE:, a; j  c6 L6 x0 r; _  ?0 n$ x
  163. #  reflect_options(1) # Turn wave power to 1
    4 B; f( w2 ?5 g0 e4 R/ D1 Y
  164. #------------------------------------------------------------------------------#
    8 o% _' r  d, L2 b: ~3 c0 W
  165.   : j# c: k! C8 M4 p3 E( y
  166.   
    - c1 e% X( ]4 J  B% p
  167. #------------------------------------------------------------------------------#/ D. e7 X* `0 m" x! I6 Y' q
  168. #  NOTETAG for ACTORS
    8 h" Y0 b( B/ f/ A4 g! m0 O* D
  169. #------------------------------------------------------------------------------#2 I' W9 |, I8 X" w4 N3 k
  170. #
    ' `6 X" K! F' Z' ]' }/ G# u% g4 k
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)- ^3 u/ P# S$ ~' G! d$ _' ]
  172. #) ^1 I5 j9 y6 Y5 ?" U
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections& r4 c* x2 t3 h$ f
  174. #                                  # and use the character in position 'pos'
    . Y' B: t" H( A! \- ^
  175. #
    ) `6 N9 a, {$ B& N! q$ K
  176. #------------------------------------------------------------------------------#
      _6 f: I" e# A! v5 X  W$ r
  177. #  EXAMPLES:
    $ L, q5 i4 ?+ R; g
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset4 ]0 J- [, w; l
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset$ a1 Q2 `4 J* q6 Q% e) _& S+ C
  180. #------------------------------------------------------------------------------#
    " U$ `' }9 X, G7 a" v+ t/ S
  181.   % _4 v1 Z7 J' H$ }
  182.   7 Y$ m* y, e0 V  T$ c, |# {# X9 j) o
  183. ($imported ||= {})["Galv_Character_Effects"] = true8 {- i9 r* h6 t) u6 E
  184. module Galv_CEffects
    7 ^9 L3 e$ u3 W. Q$ ^# B; @
  185.   
    2 ^0 a1 n  c6 w. c
  186. #------------------------------------------------------------------------------#  ) K: b9 Q1 H* X
  187. #  SETUP OPTIONS  b( i* ^3 q" L$ o7 k/ V
  188. #------------------------------------------------------------------------------#
    . d7 m6 p" G+ r# a
  189.   
    " N: h, G2 r% f3 Z) z4 L
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the) ?7 ^) V" Y8 ?* _3 t
  191.                         # region on the wall you want to make reflective (and( H) o0 ?+ ^$ J3 h, P; O
  192.                         # then use tiles/mapping that make the parallax visible)
    4 t  V! x) G  W: d
  193.   7 K" ?/ Y2 u2 ^, Y4 E
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    . |& a, \6 W9 x' r2 d4 h1 I1 Q
  195.     / u6 e$ O( w* f; B+ S2 L
  196.   REFLECT_Z = -10       # Z level of reflections
    $ X6 q. B* ?3 ]+ g
  197.   SHADOW_Z = 0          # Z level of shadows( i) ~3 ?7 ~8 _+ T% Q* Q  t9 s) f
  198.   
    - a) ?) [$ U0 ?0 h. l- S+ H
  199. #------------------------------------------------------------------------------#  1 Q- k  |4 m5 d7 k7 I  t. V# ?7 A5 z
  200. #  END SETUP OPTIONS
    ( a# T" r7 Y% M
  201. #------------------------------------------------------------------------------#
    / W) ^6 N; g7 F( l2 P6 \. [3 Z. F
  202. end
    9 j6 F; \' g8 [8 B) X
  203.   5 A7 B- d) q) [" B
  204.   7 l( i+ ^! Q, {0 n9 |4 w

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-5-9 07:31

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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