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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

- l0 K: e8 e' T, q( Z' g+ U这个代码怎么用啊,有大神知道吗。我从国外找的。8 D/ X# r! I, o/ f
http://galvs-scripts.com/2013/02/21/character-effects/. O5 n0 l8 a" M$ K3 {% P
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
3
 楼主| 发表于 2014-6-25 11:35:49 | 只看该作者
记得口袋妖怪的池塘是有倒影的
回复 支持 反对

使用道具 举报

梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#: y0 [7 Z) D$ I* ^
  2. #  Galv's Character Effects
    * I4 L, x; e/ U8 B
  3. #------------------------------------------------------------------------------#% P; e/ s& N1 b$ v
  4. #  For: RPGMAKER VX ACE
    5 \8 {  m& O/ q3 K8 o7 u9 v
  5. #  Version 2.1; @* I2 ~: U' k3 M
  6. #------------------------------------------------------------------------------#
    . D9 T) p1 x3 a4 |4 q3 N! r
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows: d5 n! `' m) B' S
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    * |0 |9 }9 a8 U- B  `1 Z( [* L# q
  9. #                           - Fixed shadow facing bug
    0 I9 U/ Q' u8 [
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows8 o& G/ U& G+ t
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    ! _6 B0 ^. z/ h! Q
  12. #  2013-02-22 - Version 1.7 - bug fixes
    4 t( u# \* M- f
  13. #  2013-02-22 - Version 1.6 - added icon effect
    2 P( [0 q* m+ o
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps- F4 R) B& B- A4 U( C0 D8 K
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles5 p, ]2 I, S7 Y
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks9 c) F8 M* }+ ^+ Z7 \3 D4 Y
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)/ U7 [9 J8 V8 |2 M; i/ A7 o
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    + \# S& \; V& J- D6 t. w6 a- K
  19. #  2013-02-21 - Version 1.0 - release
    / X+ K/ O7 ?1 O& Q0 B
  20. #------------------------------------------------------------------------------#* E( {3 I' @7 g1 i: H+ w9 d
  21. #  This script was made to provide some additional effects for characters such
    % y9 _1 @, h; o9 f2 G; l
  22. #  as events, followers and the player on the map.& s2 [; Y1 s! \# G8 @1 m" ~5 l- b
  23. #  Currently it includes:
    # A, Z/ |6 S# m
  24. #
    " e& i5 X+ p: H: A
  25. #  Shadows, [3 \& O4 P" V# I
  26. #  Shadows that appear under player and events in a directions depending on
    6 r. O7 ^8 S* e& O/ y9 N4 n* ~
  27. #  a light source that you choose.
    1 w( K; ?5 d! o9 g1 G4 C
  28. #
    ! A' N# A  Q: b& E, J+ ]
  29. #  Parallax Reflect1 n0 ?5 M! g6 j% b# a! a' O
  30. #  Reflections that appear on the parallax layer for events and actors to be$ w6 a. N" l! K" Y
  31. #  used for things like reflections in the water or glass floor etc. To get1 d( _/ X* J  N% C& g  [$ f
  32. #  effects like the demo, you need to edit the charset graphic to make the water, e1 B# q4 a, ]7 z  C3 o& h
  33. #  partially transparent.
    4 [" B& f+ G! a& S! ^* y
  34. #
    ( z7 s4 ]1 f: @6 B9 a
  35. #  Parallax Mirrors- _3 F1 G2 s# V& O
  36. #  Much like reflect but are instead actors and event are reflected in a mirror( I; V5 _. j6 D
  37. #  on a wall designated by a region. Both mirror and reflect effects can be7 F. p9 p! [- h4 {) N' c* }
  38. #  changed so actors and events can use different charsets for their reflections9 V3 d6 ], I. s/ ^2 H5 l8 }
  39. #
    ( i( k' g# I# D, A1 f, r% L1 i
  40. #------------------------------------------------------------------------------#2 N, g' A0 C/ H% y6 E
  41.   
    3 }; L, j! W: g. J9 ]9 g4 ]0 T

  42. 7 h0 b4 s3 P  o% c3 I( ?: P6 t$ s
  43. #------------------------------------------------------------------------------#3 x! U5 F. x. ?+ q' M
  44. #  NEW - First event command as a COMMENT
    4 M" j' D; P1 D' T
  45. #------------------------------------------------------------------------------#
    " V' W# Y6 `) X0 Y% T
  46. #  You can add a comment as the first event command on an event page to set if! n6 \' A/ S0 T2 \& _( q: S- n6 z( Y
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    - I( I9 }) N) v$ L4 R% D
  48. #  below, all must be on the same line in the comment.
    & M( e' }; R2 w; H! ~
  49. #
    0 p3 ]) Y% C; N! O3 a
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    ' M2 O; Q% T! y+ d
  51. # <shadow>           # set the event to display a shadow' [5 u" g% i6 `
  52. # <reflect>          # set the event to display reflections, d7 K# `* b- y4 I$ Z$ C4 ?0 N3 E
  53. #9 g  G' L9 I" L! E9 W* m* G' d
  54. #------------------------------------------------------------------------------## S# b8 A& c9 }) D
  55. #  EXAMPLE:2 J) C3 `5 U4 R2 K( C. s3 ^2 c
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event1 y. E5 g: E. R) }4 ~  r' K; Y5 J, Z6 W5 x
  57. #------------------------------------------------------------------------------#
    8 i6 E' ^3 Z2 k% a# w

  58. , S$ w2 [2 i. q+ I" b

  59. ( y$ j6 ~3 }# m9 C' Y& U
  60. #------------------------------------------------------------------------------#/ x3 a  L) @  R/ V3 D, Z) O
  61. #  SCRIPT CALLS:5 K  ]2 M& u# b% ~4 i, J
  62. #------------------------------------------------------------------------------#" k, U1 M5 u9 d. B0 d6 M2 u
  63. #
    ; k3 N9 z0 w. b% S  b9 K2 ?
  64. #  char_effects(x,x,x,status), l; y) D# n" V$ R0 f- C9 s1 w% L/ w
  65. #
    3 l. d- B, c' M- B. M: Z
  66. #------------------------------------------------------------------------------#! h5 r; g# ]) F. D* c" v+ u- ]4 g
  67. #  # each effect can be true or false to enable/disable them during the game.8 X0 I% H( B3 M1 c
  68. #  # you can change multiples of effects at once, x being the effect number
    & E" \6 n) L$ Q! o2 E. C
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons5 O. E/ S$ N: Q# ^6 o
  70. #------------------------------------------------------------------------------#
    ; b  ?0 T3 `8 j( u. X6 f$ Q1 h0 f
  71. #  EXAMPLES:0 ~8 Q2 v  T  ?. s. s, ^! v
  72. #  char_effects(0,true)              # turn reflections on5 i# `" `8 a8 T6 x) M
  73. #  char_effects(0,2,true)            # turn reflections and mirror on3 g8 H7 B! o' N6 s
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    ! J4 q% O% j$ M
  75. #------------------------------------------------------------------------------#, X/ f* s% x% M4 Z6 @4 I& U5 U$ ]
  76. #* {- Y6 u5 v6 e6 \7 m" n. r
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset5 E6 b, w5 U, e4 V- l( ^- E
  78. #6 G% t8 }5 @+ A# X0 `' S/ G
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    0 l# ]; p, I5 ?0 p2 F, M
  80. #
    ) M7 V% _" h2 _+ w
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset2 p7 J' R  m( h; n% j  x
  82. #
    + b, a% ?( e- E
  83. #------------------------------------------------------------------------------#1 \# T, _+ S/ T9 I- @! `
  84. #  EXAMPLES:
    & A5 C- s8 a1 O7 ^  k
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    ) R  g4 p1 A# o0 L) z3 V5 K# [% I
  86. #                                    # in position 2 of "Actor2" charset.
    7 S1 l# ^% u" M- A. \. r
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    + U" p- `! c$ r0 r, p; P. o; k
  88. #                                    # "Actor4" charset.
    / E4 X  a3 G) \$ `3 ~) ~6 ?0 D' C
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    ' R* i- G, j4 ~# A: Z- i* w5 V3 o
  90. #                                    # "Vehicle" charset.
    5 B3 J( P# A; Z7 p8 x
  91. #------------------------------------------------------------------------------#$ v1 F, j& B9 i1 m4 [
  92.   6 ?( B& k0 H! C7 \# _4 a, J
  93. #------------------------------------------------------------------------------#. e+ Z- ]5 N4 S! o. ^* w  s
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS. j0 ^8 B0 L+ k) Q' e$ d8 ]7 C
  95. #------------------------------------------------------------------------------#6 l, N( H" B& B2 m+ y/ \6 O
  96. #
    - a' ~1 P+ A0 c9 ^# E: u
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    3 i, G! t8 V2 ]8 \* S; C& J
  98. #                          # use this to specify for mirror and reflect.# h5 ]/ H0 ?% N5 |) G7 m& s4 T
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    5 G5 P" j6 b9 Z
  100. #                          # to change all events use :all
    9 v* x4 [) ?1 C. w/ }! K( K
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make$ Z8 ]: k- l& {5 O; ]2 n' F
  102. #                          # it 0 for no icon.* }! V: Q. M/ e
  103. #4 Q! P/ A+ A4 A- i4 k; }% q! Z4 g! g
  104. #------------------------------------------------------------------------------#5 g, o3 f! l  P+ }4 d0 Q
  105. #  EXAMPLES:: V& Z0 J, Z5 i4 `, F
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    ! C* e$ Q2 Z' E% j0 R
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    8 n+ y8 a. F8 v/ |
  108. #  reflect(:all,true)      # Turn all event reflections ON1 ]( i, Z6 m7 Q& n
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear2 p  ^) X. C5 K1 T; @
  110. #
    . Z5 ~6 Q- `7 ~$ z, Q
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    / R8 g8 v4 g+ B6 z) k
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    6 y$ a) w! s* z( u  `4 ^
  113. #        should use these effects sparingly and only activate them on events0 x, R+ m  v# F
  114. #        that require them.
    + `. a* e% `& Y; r
  115. #------------------------------------------------------------------------------#
    # E! ]: R/ P9 k7 Y! t/ x% j
  116.   
    : l% H+ E( S. W1 U% O) u* q
  117. #------------------------------------------------------------------------------#! Z" `* A. t* z) w0 \* e
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    . w7 G: h4 y7 A/ p
  119. #------------------------------------------------------------------------------#* k' x8 F2 z  r0 J0 ?+ j* Z
  120. #
    . {8 q2 ^/ O& P' }$ T( F5 k$ o
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default . ]4 y& f: k3 O7 E9 w( [
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 1 a2 o$ H3 n/ O8 a' @
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.5 C0 t$ c) @' k+ e5 N3 ]$ j
  124. #
    + r5 r! Y7 m8 [, N- h1 r3 z
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects- P+ d& x* V% k; Q  I. }
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.  B! }2 |' W7 z7 u" ~' P" J
  127. #  v_icon(x,x,x,icon_id)
    + N; Y8 e  m7 a
  128. ## c+ `* v9 F7 a% {7 b
  129. #------------------------------------------------------------------------------#; Z% w1 }3 I+ h+ b: ?. P; O- M
  130.   
    1 z/ ^9 Y8 B; U/ x3 ?$ v' j  q/ @
  131. #------------------------------------------------------------------------------#7 d: s* }0 e( d( q1 }: C) S
  132. #  SCRIPT CALLS for shadow options
    $ K: j$ a9 t. b
  133. #------------------------------------------------------------------------------#
    ( _( E7 H0 s% l  a
  134. #
    ! q; ]- H" G: u6 W
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the % J: h5 S3 e1 h1 d- A
  136. #                              # light source number you wish to change (for7 n& U+ w3 H  s1 U6 ]
  137. #                              # more than one). These are reset on map change.7 w' @& `/ `& f: H
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    " f, M! I; s9 P- m0 r' c2 J5 r
  139. #                              # This will need to be in parallel process if you' ?6 h9 G7 E6 ?2 q3 ^
  140. #                              # want it to be a moving light.% a  t8 W) ?0 R0 W
  141. #1 g, \& K  ^4 g* T& t. ^
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below7 @7 u6 c- a3 {  W
  143. #
    * b9 a& C; v  [$ F) f
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    0 j* c! c! ^' L: U0 r4 h
  145. #    # fade = amount shadow becomes more transparent the further away you are.) m! c" Q  p; p# a* F
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.' l+ o6 I2 m' r- C) R4 X0 m
  147. #( J& h/ Y4 B, j
  148. #------------------------------------------------------------------------------#
    3 A" c4 ^# e2 [  I8 _7 K& A5 M
  149. #  EXAMPLE:
    % M4 J# a0 P* ]4 p: c" x
  150. #  shadow_options(80,10,false)    # This is the default setting.; X  M6 {. k; x3 Y& T: j8 U2 k
  151. #------------------------------------------------------------------------------#
      ?' i* T9 R: R
  152.   
    ' O4 h; k! h+ o4 o( W% c+ \
  153. #------------------------------------------------------------------------------#
    ! I8 _5 z7 P9 R8 v6 x
  154. #  SCRIPT CALLS for reflect options
    & @3 W1 z4 U) J& h
  155. #------------------------------------------------------------------------------#* r: h& K5 |/ a2 D
  156. #. c! l- O; J- B8 s4 Z8 O
  157. #  reflect_options(wave_pwr) 0 K3 C! P% V3 s
  158. #$ m' T9 Y6 d! [
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    # N# K4 M) i/ f+ l5 S/ c
  160. #) x/ z# q/ S4 k2 j) l9 Z; I
  161. #------------------------------------------------------------------------------#% K$ ]' A* v% {  N0 z' ?# }6 \0 U
  162. #  EXAMPLE:
    " Q6 r! g9 M+ {5 Q
  163. #  reflect_options(1) # Turn wave power to 1% o7 p( S! S! p5 g. D# O* y8 u" C  [
  164. #------------------------------------------------------------------------------#
    " p/ U9 G, m1 h9 y4 K
  165.   ! v  [5 K! R& d. ^+ ?% N
  166.   " ?; n% r; V5 ~* c
  167. #------------------------------------------------------------------------------#0 m* b8 @! o4 h1 s
  168. #  NOTETAG for ACTORS
    ) h, j. @' k3 H( V  I/ H/ y
  169. #------------------------------------------------------------------------------#
    ! {3 v% s; F/ o$ d$ x, T6 U0 f. y
  170. #
    : y, M. ]2 n3 i+ ^  |$ ?5 D
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    " \/ C# h& ^- d5 ]; Y* A
  172. #
    8 U# e5 r3 |) {2 t/ b" @
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections0 v" U& F8 x3 f% `/ \
  174. #                                  # and use the character in position 'pos'* z+ d9 K0 M4 [8 Y( T! q* o- T
  175. #
    / f$ _4 O9 \9 ?" W) e2 v( M
  176. #------------------------------------------------------------------------------#* b3 N$ M; d6 q' k5 H" ~3 I3 e2 T
  177. #  EXAMPLES:
      x; ^* [& L) x0 q1 T1 H' m
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset1 [8 O1 D$ w- s$ o8 T& n
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    + _( h4 v. p2 x2 w; M
  180. #------------------------------------------------------------------------------#6 P$ C+ C5 ?  b( }4 w5 C- O: e* [
  181.   
    - x8 d0 {4 g; m6 B2 \2 r
  182.   0 r/ K6 V: U! @$ }( R
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    3 D  M5 z9 W- x+ ]
  184. module Galv_CEffects
    ! b4 h" x* `& A
  185.   
    , o. Y6 A8 L6 Z. y
  186. #------------------------------------------------------------------------------#  
    9 }1 N' X+ l) O& ]* h
  187. #  SETUP OPTIONS
    - u2 I* W  a5 C3 Q& Y+ d$ k
  188. #------------------------------------------------------------------------------#
    + m2 b9 R9 J' s2 W, n
  189.   
    ' V+ Y% J/ B: _. s$ l
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the! O& k% ]9 e6 n# _; P+ l3 A- k
  191.                         # region on the wall you want to make reflective (and0 @$ L, U4 [; l( I* W8 ^
  192.                         # then use tiles/mapping that make the parallax visible)! n$ j7 ?8 ^, `8 Q2 Y8 B$ K( v
  193.   
    4 ?- A3 \; g. }
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters% n- |+ |% ?% T2 _# O
  195.     % E. ]; g2 e7 p7 G' |) p
  196.   REFLECT_Z = -10       # Z level of reflections
    3 C6 X* }9 Q5 |6 L
  197.   SHADOW_Z = 0          # Z level of shadows# ]5 v1 \8 O: E) @6 X
  198.   ' ?; h2 K6 n' V
  199. #------------------------------------------------------------------------------#  
    7 t* e, @& v. P* d% ^1 Y% m
  200. #  END SETUP OPTIONS
    % q- k% E6 }: i* L4 e( j
  201. #------------------------------------------------------------------------------#
      Z- w1 N% s( G; `: G) }' j
  202. end; j6 r. J1 R4 j" o6 [3 S$ J
  203.   
    4 b& ^4 ~5 ^  ?' u5 n3 G0 D
  204.   
    7 L1 ]. S7 g1 u+ _  r1 e; C7 ~

  205. 7 ^5 T! h1 {+ {

  206. 3 @. {" @5 R# @/ B# U4 v9 A
  207. class Game_Map
    # U8 z" ?. v  ~
  208.   def do_icons(refresh = true)1 x+ V1 W/ K! Q6 m5 E
  209.     @events.values.each { |e|) D# z; W: J9 D9 z5 Z% P$ g0 M) U
  210.       next if !e.list8 l' q0 X/ _- ^& j( k2 n- S" u
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    ) Y+ x4 h  j5 a* m; ~7 H; W
  212.         e.icon = $1.to_i9 r+ N* g2 {- m
  213.         e.icon_offset = [$2.to_i,$3.to_i], k- S: `4 ^% l8 D+ R. z
  214.       else' r% i  \( w  B( K/ R; A- J/ p
  215.         e.icon = 0% |- f# T+ w$ H7 C' i  w( F" S0 B6 F
  216.         e.icon_offset = [0,0]: X4 O) S; M, w/ w- T
  217.       end8 G$ M8 {" w& ?0 p9 C5 {) {
  218.     }
    * Z( G# X- N& G1 O# S  d: A  d, V
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    , j+ |) s$ o  V! h3 p6 U; X
  220.   end9 @/ a5 n, a2 R+ I
  221.    
    . H7 v6 ]$ B; U, ]( }' N
  222.    
    : ]: \9 L8 j7 d2 E# {# K
  223.   def do_shadows(refresh = true)3 S) n/ Y/ m! l9 t$ d, X
  224.     @events.values.each { |e|
    0 M5 T- R5 C. B
  225.       next if !e.list
    ; r0 a4 M/ T1 L7 g# X% o% H. X+ Y
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/6 g3 s, X7 ?) z2 B" a( _
  227.         e.shadow = true1 @4 E+ d0 x& k/ k9 }' d3 Q
  228.       else
    2 f6 }- G4 z7 r' H. U8 v# e, A
  229.         e.shadow = false
    % g) {8 K5 C% k; l6 {/ F
  230.       end3 P0 q" S7 ^- v: M* a/ Q' k
  231.     }
    ( A$ W' u2 e& ^5 a) q' d) i
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    4 y! J- e& R) Z  `) T
  233.   end/ r) O2 }% B" a6 R& M8 F5 q0 t
  234.    
    & F- N# E- N' G
  235.   def do_reflects(refresh = true)
      {* }  D$ t9 I' z- i) O
  236.     @events.values.each { |e|' y2 h, g3 v5 p8 O# b: s5 y! {
  237.       next if !e.list* Q; B6 t' F/ z- D9 w( u: _* f
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    : s7 \/ y6 d9 u; [  P
  239.         e.reflect = true
    # e2 E( U& r3 h( l
  240.       else
    4 `0 I' y* d, s8 F
  241.         e.reflect = false
    % ?. C2 Z7 i# E% E2 Q, ^
  242.       end
    - N* c, m0 f. s. g
  243.     }" {! Y1 N8 Z4 Y. o1 A. o; A
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    ( F" e/ G2 {2 u! U  L
  245.   end
    9 M6 a3 d+ t% F, j8 `: P+ k# t
  246.    , O5 B- t6 `5 {( ?4 O8 v
  247.   def do_all_chareffects. _1 F( t# R) g) T5 e1 h
  248.     do_icons(false)
    ; N" K9 Q7 d1 q) i5 Y! B
  249.     do_shadows(false)" ?3 c" A+ \7 y# r3 _
  250.     do_reflects(false)
    ! {' N. {* P& Q- G/ N) Z3 y
  251.   end8 |! r- r9 y4 l* w
  252.    & f3 W' O, ^3 n( m6 X$ J& X; `& N
  253. end # Game_Map
    ; W5 D1 ]3 c8 Q* t7 p8 D' [% \

  254. 5 Y$ Z1 ~7 \% r! F

  255. ; r6 e$ K8 Z6 q1 W) q! S

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

使用道具 举报

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

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

GMT+8, 2026-6-5 00:16

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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