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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
& N# x: C( H: y
这个代码怎么用啊,有大神知道吗。我从国外找的。
8 v5 y7 q# E  z# d2 Uhttp://galvs-scripts.com/2013/02/21/character-effects/1 s' |: w% ?0 K9 d5 E! o
是关于动态倒影的
梦石
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. #------------------------------------------------------------------------------#
    ! S' V( X' s0 P% T: n: H
  2. #  Galv's Character Effects
    , t) {2 K! Q7 [: j6 e/ J
  3. #------------------------------------------------------------------------------#2 m1 y9 U' t7 Q! \8 o9 h
  4. #  For: RPGMAKER VX ACE
    + C& Q; M3 p' ~$ S# u7 p
  5. #  Version 2.1# X- n1 z' F# p" x4 ^1 Y4 T1 z$ l' I
  6. #------------------------------------------------------------------------------#$ C# U9 D1 s0 H0 N3 R: Y# y) k
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows# ?5 z4 F5 W! Y' k$ t8 o# Y
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    - o5 N: s* V2 G; Z7 \3 V
  9. #                           - Fixed shadow facing bug
    ' b7 _! E- c8 [9 E
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    " i- {0 f( ~8 A$ b
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows5 }/ j. v) x: c2 C3 k. y5 b: i
  12. #  2013-02-22 - Version 1.7 - bug fixes8 A& l" m5 W7 A# _" a
  13. #  2013-02-22 - Version 1.6 - added icon effect& t2 I% ^4 Y- ~- X  V$ w) `* N  J
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps. a+ R& f% n2 z. L' m' l
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles& q3 |& w( `7 V; w
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    % h) q6 N; i  H3 \
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    # u5 d# C* a5 u8 T
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    & K8 k3 Z7 y% V& M# a9 Z. ]+ A
  19. #  2013-02-21 - Version 1.0 - release
    2 j# b2 d+ v$ @0 q0 @
  20. #------------------------------------------------------------------------------#2 X. p/ A: e$ R  I; K
  21. #  This script was made to provide some additional effects for characters such
    2 b6 y. h* n# ^
  22. #  as events, followers and the player on the map.) a, V8 z/ y3 U- L2 b8 O- ?
  23. #  Currently it includes:
    1 f: D4 m- n4 S. @( C
  24. #
    6 Z; d8 X0 A8 ^2 i
  25. #  Shadows
    7 t/ Z. b% y, Q5 d
  26. #  Shadows that appear under player and events in a directions depending on
    - b: o. a5 |' n( ^6 u
  27. #  a light source that you choose.+ n. a2 {8 E. K  p+ d  ]3 G
  28. #
    ! a. \+ ], V5 B) z; R6 p
  29. #  Parallax Reflect
    ! c+ C7 R: A1 {$ w1 H3 l
  30. #  Reflections that appear on the parallax layer for events and actors to be
    4 `# @& O' Y- z1 |; m) k, S- q; z
  31. #  used for things like reflections in the water or glass floor etc. To get" l! A, m; I0 c* N1 s- ^: n8 ]
  32. #  effects like the demo, you need to edit the charset graphic to make the water. [1 b3 U2 o( |% U0 q! i
  33. #  partially transparent.
    1 r2 ~+ f: t4 }7 H
  34. #
    ' M1 u6 V2 i4 B' @, W
  35. #  Parallax Mirrors
    + X7 J) h4 }2 G3 v, X+ T
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    / O4 _3 l: z  e0 E% a% L
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    * l: R* A. N9 z, K" Y
  38. #  changed so actors and events can use different charsets for their reflections8 z( l+ ~: B, Z3 H* V$ F
  39. #
    + x3 a' ]; U+ M. R3 U- {6 u
  40. #------------------------------------------------------------------------------#
    ' B1 E' W. \5 K8 j0 k; G
  41.   
    + [" ?) w# t# c4 k

  42. . H- `4 W& R9 N. i& P1 E# m9 m) V8 ~/ k
  43. #------------------------------------------------------------------------------#$ T+ t# r" [1 x3 l. T; h5 n- V' |
  44. #  NEW - First event command as a COMMENT
    / k  `& Y7 E( P. }0 v
  45. #------------------------------------------------------------------------------#- t: p$ g8 ]$ k( X9 e% f8 e$ j
  46. #  You can add a comment as the first event command on an event page to set if
    ) Y# D" G+ y2 k; I
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    " o8 `' l, }5 X9 K' I) X
  48. #  below, all must be on the same line in the comment.( F0 C3 X- R! ^7 b- ~$ X
  49. #
    % F4 i& N/ J, J/ v, E5 c' Q& R
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    4 a/ F9 J: ^9 i( g/ W3 ^  Z
  51. # <shadow>           # set the event to display a shadow
    5 W/ t% |" [& A& E/ C0 P2 p3 P
  52. # <reflect>          # set the event to display reflections
    : v$ ?0 L- a+ A
  53. #
    4 l3 T, u: P3 Y9 S
  54. #------------------------------------------------------------------------------#. \) I% M2 I9 V  t7 \. O2 d' Z2 M
  55. #  EXAMPLE:8 o1 x$ z8 [, J, t
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    ; [! o, B! G; s! a$ R7 c4 P
  57. #------------------------------------------------------------------------------#
    ! H* n: w6 D0 X" g! v
  58. 6 g6 {1 @6 o" ]: O& |: M/ W& |
  59. $ L$ i/ [9 @9 }* {  m, q$ V: {1 [6 L8 X
  60. #------------------------------------------------------------------------------#4 a6 M+ ]2 s) L" d* b- y# q
  61. #  SCRIPT CALLS:
    / z2 L) T# O8 i
  62. #------------------------------------------------------------------------------#
    / z' U$ r% z5 b( H) u, G: i
  63. #
    $ f1 A* j" }2 }+ B% V0 t1 v0 I% |8 {
  64. #  char_effects(x,x,x,status)6 f" d0 x7 ^, Z3 U/ O
  65. #
    / r0 |) _3 {- s
  66. #------------------------------------------------------------------------------#
    6 `7 F1 q* q" w2 @0 j# v
  67. #  # each effect can be true or false to enable/disable them during the game.
    9 y$ B/ |) A% n% s9 K/ _
  68. #  # you can change multiples of effects at once, x being the effect number% t. Z: ?8 T+ H  f: n; a
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons& V5 J- p9 M  @' S" Y
  70. #------------------------------------------------------------------------------#
    - z) t# r" s% U. t" ^4 \
  71. #  EXAMPLES:
    # M0 O, }* H( n8 y" @) C8 I
  72. #  char_effects(0,true)              # turn reflections on5 g/ X0 o. g5 s- @0 @4 a8 f# L
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    2 A2 I- _5 y! c
  74. #  char_effects(1,3,false)           # turn shadows and icons off
      h& q9 M8 B1 l. ?1 m
  75. #------------------------------------------------------------------------------#( g8 V1 N5 v1 a: \% q
  76. #, k# P+ Z: ]  o; e4 Z4 H
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset1 T( Z' t6 @% Q
  78. #
    , j# q1 Q* w" O# N# p% s; U
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    ! e6 Q; W+ D1 l
  80. #! ^$ b! \- Y# R, G0 `9 |; ~
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    ! t3 X9 N' `+ T5 m& I  O4 i
  82. #
    9 o& B% ?) R* Q4 G, `
  83. #------------------------------------------------------------------------------#1 t, a" x- M. F! s: X
  84. #  EXAMPLES:
    * F0 A2 u8 x- l# I3 |
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite- M9 v& I# x9 U" K6 v: O& p: W
  86. #                                    # in position 2 of "Actor2" charset." W% X+ l1 K/ u4 o$ Q* w
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of/ A8 |2 N: i- J8 K5 L2 @3 c5 r
  88. #                                    # "Actor4" charset.
    7 b5 b8 {# F8 P
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    ' ]+ m3 `5 r8 N1 v* f1 x
  90. #                                    # "Vehicle" charset.
    3 U0 j6 h# e" ^2 _1 M
  91. #------------------------------------------------------------------------------#
    ! n7 Z. C6 I9 J, t* ^& C
  92.   0 {# h+ _. l4 S: a6 C
  93. #------------------------------------------------------------------------------#
    8 r9 w) U/ k' M. d- [
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS& _& [" ^. r* V5 e' Y
  95. #------------------------------------------------------------------------------#( G; Z# j2 T8 C
  96. #0 y" w  t* F0 _! g7 b% C# l
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off0 I# T1 W" j# V8 A4 P
  98. #                          # use this to specify for mirror and reflect.
    # P& k$ I$ D- @3 U1 J% m& f
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    , A* x1 _! H% g, ^  ~/ f. b
  100. #                          # to change all events use :all
    9 H, ~1 p+ F  g" M0 p. O
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make3 o5 |9 [! A" P8 U& q
  102. #                          # it 0 for no icon.9 }# X+ H8 D% s0 o8 {# V6 b  ^7 t: e: f
  103. #
    & g5 {; h4 _& M
  104. #------------------------------------------------------------------------------#4 M' R4 |5 p: J
  105. #  EXAMPLES:
    , J$ A/ G% H: ?$ @
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    5 l  S0 [- r9 b: O
  107. #  shadow(1,false)         # Turn event 1 shadow OFF6 l2 W( W' \; O
  108. #  reflect(:all,true)      # Turn all event reflections ON
    & x1 x. p: t( a# b5 n
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear9 z3 u# m1 y6 G9 h" h! ^: S9 a1 o
  110. #8 a* Q# n% R- X3 K& G; h
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    ! v) _, ~! t$ \4 I; A) K% r
  112. #        a map. This is a design decision to try to keep lag to a minimum. You& ~$ L- s$ N; l
  113. #        should use these effects sparingly and only activate them on events; @) x4 i/ u& ~  @' m0 a1 u* e
  114. #        that require them.; N$ `8 s% l- v* B4 i
  115. #------------------------------------------------------------------------------#6 g7 v! R' E- k9 `/ u% O
  116.   5 u; b' ^& M5 R$ _, b" O
  117. #------------------------------------------------------------------------------#
    # X2 ^6 A4 w2 }, x
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES5 `! B' [) o" Z, F& r7 f7 `; L8 S
  119. #------------------------------------------------------------------------------#
    ! r- B; E; N# X, o6 A
  120. #
      R4 K- y4 ?" Q
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default - `: V# G( a2 k6 B
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 1 Z3 x0 j( Y# U( C5 l
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them./ R# `) a# t. {% }- j  v8 l
  124. #/ I! Y5 {4 f! b0 ]3 [  C  R
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    . `6 b- z: E9 G% o; f  ?
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.% k/ s1 i2 V* Z6 l
  127. #  v_icon(x,x,x,icon_id)
    , m+ ~0 t/ ]- e
  128. #
    9 ^0 w5 F# Q2 s+ P0 Q6 j
  129. #------------------------------------------------------------------------------#
    ' g/ V/ W, E8 d- z# i
  130.   & ~  R' K9 [, ^/ p+ I. l7 Z% v
  131. #------------------------------------------------------------------------------#- H, E3 B* R" f! ?+ r9 B
  132. #  SCRIPT CALLS for shadow options
    4 Q) U2 A4 C% M) @
  133. #------------------------------------------------------------------------------#. @$ y" W% K$ t4 A  _
  134. #
    8 U. w$ X' I9 c3 ?+ d3 t* T
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    . P- n/ ]$ V3 `  \7 f6 ~
  136. #                              # light source number you wish to change (for$ M. _5 N- h$ i- o( Z* P
  137. #                              # more than one). These are reset on map change.
    , O2 Q. a! c$ x2 x  F0 U
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.5 P- L! [: n" n9 k1 Q1 n
  139. #                              # This will need to be in parallel process if you# p& D1 A8 Y0 @. V4 G' |
  140. #                              # want it to be a moving light.# T3 P5 }( I! n% V
  141. #
    ! h, \: V, [  S& s
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below: V4 V, k0 U) f  X
  143. #
    + z# K- W0 R" s: N4 K
  144. #    # intensity = opacity when standing next to the light source (255 is black)3 l2 O( B/ T# d: n% T2 y* M$ v0 |! V
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    # p7 N! a: u3 P- }/ _: f
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.: ~8 M( t0 y+ F* F. Q* }% x. N9 X1 a
  147. #) @' n3 w/ l: f' I9 t- |% P
  148. #------------------------------------------------------------------------------#3 J) E. Z5 W# @+ i5 r
  149. #  EXAMPLE:( L; X' F% j& M# {+ B( Y' m
  150. #  shadow_options(80,10,false)    # This is the default setting.
    " c5 q; g3 K( w$ U6 H
  151. #------------------------------------------------------------------------------#
    7 t6 N; }0 s' }; C1 e9 O
  152.   
    4 G# k/ ]. C( C3 ~) M4 s. g
  153. #------------------------------------------------------------------------------#
    # ~" |! c4 @3 I5 X! }
  154. #  SCRIPT CALLS for reflect options( ~% K- }4 R/ S  Q+ b; _
  155. #------------------------------------------------------------------------------#2 c/ G6 g4 r, v) r/ j( L
  156. #
    1 X$ w/ O+ Z0 B% U* h/ ]" ~! _
  157. #  reflect_options(wave_pwr)
      D7 S/ Z" _2 f  Q& M4 f
  158. #% S4 h# P3 p5 V' }; }
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    % j3 M1 `: ]* d- b) N6 S
  160. #
    8 c3 K; c% B* \1 {* o+ b
  161. #------------------------------------------------------------------------------#/ E- t( c: W( y# e6 c
  162. #  EXAMPLE:3 T/ e  @# ?7 k7 {8 {% |4 g( c
  163. #  reflect_options(1) # Turn wave power to 1- e& X3 f7 g: X7 {3 c4 U4 G
  164. #------------------------------------------------------------------------------#
    ; P& A6 {6 Y, ^4 }2 H4 V+ J  _( _
  165.   
    7 ^$ `# c- g* C$ j6 ^$ S) r
  166.   
    : z6 [# e! o$ s/ t/ j' a9 u
  167. #------------------------------------------------------------------------------#: i% M  ^$ N! O& T5 ]0 x
  168. #  NOTETAG for ACTORS, Q, i' u4 ?! K2 K: [
  169. #------------------------------------------------------------------------------## d. u( L0 h& c: y9 \+ P
  170. ## q  d0 e3 i3 p2 q
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)$ n# e5 s; X/ _/ S' c% `# }. X
  172. #
    4 A$ @! R, H( H+ l5 e2 u: w6 p6 k4 @& c
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    . c7 `+ ?2 g+ u% r0 b* ]
  174. #                                  # and use the character in position 'pos'2 c8 j; O  t' b8 t# Q  U
  175. #
    - p  b/ f  B( U& x" b
  176. #------------------------------------------------------------------------------#
    . A: K9 v( a. s0 u( _/ `1 K3 R% I! @
  177. #  EXAMPLES:4 A1 f) y- `( K9 h$ l$ j
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset  ?* ]5 y2 M( m/ V% ?& M# J0 ^
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset) J8 s) V6 u8 e3 w( W
  180. #------------------------------------------------------------------------------#/ f5 ?5 [, d" o) J" P. H; \
  181.   
    + N7 A+ R( u0 S& ?  f
  182.   ) b7 b1 H: J( X
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    " D7 e; Z6 u/ K2 ]: t" q9 d8 G
  184. module Galv_CEffects+ ]# L* v- M% `6 V  r1 e- z: O
  185.   8 v# j2 C, q$ j, o" v
  186. #------------------------------------------------------------------------------#  
    1 y' [* f! \! y/ u' d0 X
  187. #  SETUP OPTIONS, M6 `9 g$ u/ E* i* H
  188. #------------------------------------------------------------------------------#9 e2 A# W# ^! T' _
  189.   
    5 z7 A0 r$ v; a+ z) n0 M
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the: c: _* J8 y* Y: \7 M
  191.                         # region on the wall you want to make reflective (and3 ]' D- W- t1 Y6 R, o
  192.                         # then use tiles/mapping that make the parallax visible)
    3 |+ e1 h( c9 f1 k& x  h3 {6 P) }$ ^
  193.   
    : [1 V$ N1 _/ z
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    " S- A2 ^2 D  ^
  195.     2 O& r  Y  r; [1 `' T* q$ K- t- h
  196.   REFLECT_Z = -10       # Z level of reflections
    0 _5 O; d8 ^; F0 I' z4 L* z6 y
  197.   SHADOW_Z = 0          # Z level of shadows
    ! s/ j8 E$ I9 K/ {/ I
  198.   7 c1 p  I, ^: o' n; j% o0 ]* ~* w
  199. #------------------------------------------------------------------------------#  # l: v5 z1 r; |$ @3 e
  200. #  END SETUP OPTIONS9 i% H, H4 p: L1 d) S6 {0 Z
  201. #------------------------------------------------------------------------------#9 ^; p$ D' K' P+ Q2 i) J. ?( x$ C
  202. end' A$ o9 Q1 h2 S4 @
  203.   2 X6 ]1 T$ F5 n- L7 C/ Q/ K' Q
  204.   
    ) Q4 n- C* O, h. S) i

  205. : m3 p1 W0 o0 d( [% V
  206. 0 x  `2 ^2 ^. p2 I- ~
  207. class Game_Map
    ( C0 e8 H  n* F: e% p3 p2 V, S
  208.   def do_icons(refresh = true)
    9 s0 |& _/ D) B- t9 X
  209.     @events.values.each { |e|
    % P+ {& s6 e' L4 c6 s
  210.       next if !e.list3 h1 h: `4 {+ V; y/ F
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    $ O3 F4 G4 ^3 K5 a% y5 `
  212.         e.icon = $1.to_i$ h( @+ ^* ?. k* i! R5 ?! J) _
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    % K$ e! \1 P9 K2 u# g( s! p
  214.       else/ Q9 u% {+ x$ U) Y2 |' V: t
  215.         e.icon = 08 v0 T8 C8 O: H: ~2 G
  216.         e.icon_offset = [0,0]
    , Q5 i0 u9 }$ k! \
  217.       end; d0 K/ u# A; }" E6 Z8 u3 o& z
  218.     }
    - Q# y2 X' y7 C+ u: I% n
  219.     SceneManager.scene.spriteset.refresh_effects if refresh$ W8 x$ ^4 c9 ~+ x1 `) p
  220.   end
    7 Y% a1 R1 t+ Y$ e. N6 X
  221.    4 B2 l) u6 E( m6 R1 @% T6 _
  222.    ) f! }7 F) m' O* m, f
  223.   def do_shadows(refresh = true)
    8 }: d# q/ ^) `- j, S" z" t
  224.     @events.values.each { |e|* Q' f0 l) K8 L8 o+ a
  225.       next if !e.list0 m! h  k2 z* r( |# G3 Y- \; K
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    0 B1 }* L$ T& A7 \: h
  227.         e.shadow = true
    4 t9 ~  {" Z* x( D6 F: {
  228.       else- T* l# [9 w; O3 t
  229.         e.shadow = false
    6 g  A3 M9 u1 x* u
  230.       end* ]! s  S4 t* F5 h- b
  231.     }
    1 j% D, E  |$ P7 v: E
  232.     SceneManager.scene.spriteset.refresh_effects if refresh) l9 n( p; z" r1 I0 }% `( I" [+ t1 c
  233.   end
    9 O+ g% c# i8 A+ U
  234.    ) ~/ o2 h! L" v$ T# y* @3 ?
  235.   def do_reflects(refresh = true)
    9 W( U! X) Y3 g, B2 R
  236.     @events.values.each { |e|+ S# T4 r, x0 Y
  237.       next if !e.list/ [$ \7 x+ U$ l
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    3 H' x7 u2 [# ^! }; i! W1 _8 _
  239.         e.reflect = true
    4 }0 D5 w3 q* I# n% @$ p6 R& ~
  240.       else. ^# }  W0 A8 V
  241.         e.reflect = false
    ' d- S/ l) M0 H) P
  242.       end2 c& [3 i+ a% U; ?- X3 m" c* E! q
  243.     }
    & k+ w; I% a! w
  244.     SceneManager.scene.spriteset.refresh_effects if refresh+ u4 f2 o( c  o9 ]! x
  245.   end4 i& u, V6 w" r3 G
  246.    % P. B. A* O6 u6 u! c* ~
  247.   def do_all_chareffects
    6 {( z8 ~! [) J( _
  248.     do_icons(false). l4 f% \: \! E( X
  249.     do_shadows(false)
    " A5 L- z7 |6 z, r6 M5 N
  250.     do_reflects(false)
    , n" T- f( n) ^1 u' e
  251.   end- N7 m; N; \4 Q- k! X2 l$ g- c8 C
  252.    
    & |& E5 x6 F5 M& x' K
  253. end # Game_Map
    . V7 ~5 k) f# x$ V" V* r) H' K

  254. 6 W5 [, F2 G' G, ]

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

使用道具 举报

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

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

GMT+8, 2026-7-22 23:31

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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