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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

! K9 {/ E& S' d, \5 \这个代码怎么用啊,有大神知道吗。我从国外找的。
+ {3 b* W$ y0 fhttp://galvs-scripts.com/2013/02/21/character-effects/
. R+ u' t3 W" x! U4 C7 l5 l是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    ( U$ h9 q' z6 K8 ^& W( p
  2. #  Galv's Character Effects
    % z0 Y$ q4 N7 \- \2 G% e3 c
  3. #------------------------------------------------------------------------------#- S0 ^; S' K+ a! D! l. v
  4. #  For: RPGMAKER VX ACE- d- f( ]* J7 z4 R
  5. #  Version 2.1& @. c. U! X2 S+ n/ u4 F. P2 m
  6. #------------------------------------------------------------------------------## m: a( Z4 C2 N  x* t, X
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows5 U# X$ n% q: G6 X! D! t
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects; ]. m, L+ F/ z" c- l
  9. #                           - Fixed shadow facing bug6 Z1 @$ G! e4 Q: p
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows' q* a( |1 y' T$ B7 _% w6 W
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    ( p& Z# \1 w  p5 t, U2 L
  12. #  2013-02-22 - Version 1.7 - bug fixes2 r! o9 v4 d( e, e  I0 W1 v/ v
  13. #  2013-02-22 - Version 1.6 - added icon effect% w/ |5 l, [& i
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps3 e8 v  P5 k+ I5 E: Y5 v
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    $ D! n5 W3 A: Y/ x0 j
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks/ g( [* \8 f7 `/ n  w7 |
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)8 e# r# [5 y% m. E6 F4 [7 |) ^
  18. #  2013-02-21 - Version 1.1 - updated flicker effect9 z5 X. _0 e- u$ d6 G
  19. #  2013-02-21 - Version 1.0 - release2 p' `7 r3 C& I/ u
  20. #------------------------------------------------------------------------------#
    2 R, S/ k; g! Y
  21. #  This script was made to provide some additional effects for characters such* U4 \$ [6 @* f, ]  l9 O
  22. #  as events, followers and the player on the map.
    1 Q+ B4 v- s! @" N5 T
  23. #  Currently it includes:9 u2 t4 p+ N  b$ u7 y
  24. #+ F9 F) h: `+ ^! s
  25. #  Shadows
    & W5 ?4 k3 h; o/ r
  26. #  Shadows that appear under player and events in a directions depending on
    ( o5 P5 d7 {3 m* m0 k3 C
  27. #  a light source that you choose.( q! D$ p$ H; k7 ~" _
  28. #
    2 k$ |4 n+ a6 ?' }" S# Y9 X
  29. #  Parallax Reflect
    ' B4 A! S, ~% g, v
  30. #  Reflections that appear on the parallax layer for events and actors to be
    5 g$ j$ Y$ b8 N) b8 g5 ]9 j& s) C
  31. #  used for things like reflections in the water or glass floor etc. To get
    2 r% O8 d7 H' E3 l( s
  32. #  effects like the demo, you need to edit the charset graphic to make the water+ {% j7 I0 q  K0 w9 G
  33. #  partially transparent.6 ?8 Y* j, g6 g  G, _
  34. #2 h$ j3 S: X. i9 f
  35. #  Parallax Mirrors
    ' Y) ]3 P$ v3 l+ @1 ]2 m5 U5 X
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    0 C9 A4 U, T$ U+ ], G. [, l9 P5 I1 W
  37. #  on a wall designated by a region. Both mirror and reflect effects can be) I9 T) E7 m$ c. R1 K- D( H% }8 S1 L8 C
  38. #  changed so actors and events can use different charsets for their reflections
    2 a# }7 Q( a6 [* P6 Z) g5 B
  39. #5 {7 E' P9 h3 C. Q. c) c& t' W
  40. #------------------------------------------------------------------------------#
    3 a5 P( ?6 i! O
  41.   7 d# n  V. g. G3 z: g
  42. $ d7 \5 S& s% k, m7 X' i
  43. #------------------------------------------------------------------------------#
    % d7 N7 K0 R$ E7 q" b- L: [- K
  44. #  NEW - First event command as a COMMENT
      D& |! a; A- V( ]: D0 A' M
  45. #------------------------------------------------------------------------------#
    ; |2 y% i6 u5 \' y8 ?9 j. M# U
  46. #  You can add a comment as the first event command on an event page to set if' u2 H9 H; h! Q- Y. Y, n' l8 k, S
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    ! B3 R7 O9 ~8 w3 N
  48. #  below, all must be on the same line in the comment.# H) t0 K; K8 O; O0 k8 s6 [4 m5 @
  49. #
    0 |8 i/ T) T* o/ y7 [" H: a. z
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)9 X; P6 H1 W4 K' \( R) ~; |# s* T
  51. # <shadow>           # set the event to display a shadow
    , H6 s+ a0 C& M
  52. # <reflect>          # set the event to display reflections
      }1 J+ r0 z6 b8 e
  53. #7 r" x! }. f& K9 k+ d
  54. #------------------------------------------------------------------------------#
    5 x9 P% D" t) q
  55. #  EXAMPLE:8 k4 j! ~& C+ [& F+ Z6 m: e$ s# l
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    7 c# z; e6 Q1 L- f6 ]
  57. #------------------------------------------------------------------------------#1 U* V/ Z1 y5 ~. |& W: a! Q# _' F
  58. 4 I+ d' M/ J2 v' K; ]# H/ q

  59. ' t, k  p$ T4 f! t& g; v+ o4 t- o
  60. #------------------------------------------------------------------------------#* W6 i" J( I5 Y9 s0 }
  61. #  SCRIPT CALLS:) K( X+ G2 m7 i7 a9 k8 j
  62. #------------------------------------------------------------------------------#" i- g8 ~3 W  d; J" A% V& v# i8 i% q
  63. #
    * f  c4 b( x6 t/ o  b
  64. #  char_effects(x,x,x,status)
    ! s1 b0 y, s/ i; q+ I( ?
  65. #9 h) @6 U& |8 E% y4 t1 Y
  66. #------------------------------------------------------------------------------#
    & ?6 p0 s" }0 `& H' n% r( F
  67. #  # each effect can be true or false to enable/disable them during the game.% {; c) }- g0 R% r: @" |/ t
  68. #  # you can change multiples of effects at once, x being the effect number- X5 _0 u+ V, M6 z, |/ F. h, R$ J+ q
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    # K6 V0 o& Z  @& A) z5 d1 k
  70. #------------------------------------------------------------------------------#
    & a7 M& u, U, Z/ T4 ^
  71. #  EXAMPLES:
    7 O' W6 _. H8 D( S
  72. #  char_effects(0,true)              # turn reflections on
    6 ?( k* b* S+ \5 J4 M' f1 d9 \. d7 b
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    & E3 A% y( ]0 I2 M9 ^. l
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    3 H+ S  R. X0 D: h. H
  75. #------------------------------------------------------------------------------#2 B1 c# q, x* B* R5 Z) g2 Y
  76. #
    $ f: U: ?# i3 g5 k7 T+ i
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset( I3 E6 b) y# T6 L6 h. l
  78. #: R& ^# {7 y7 E5 ~- ?) P; W" ]
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    + K8 R, d8 B  v/ e+ X* z
  80. #8 Z0 F0 l) D1 Q$ P/ N4 C7 H
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    $ a1 f" x+ ?* L
  82. #
    ' d, c2 }) S, H3 H" B
  83. #------------------------------------------------------------------------------#! L6 _4 V8 O8 i8 F* W+ w# n
  84. #  EXAMPLES:0 N9 V  g% U( Z4 T" T0 k
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite$ }+ q& u  ^  _; X" r
  86. #                                    # in position 2 of "Actor2" charset." H9 H/ b! w5 Z0 s4 a- q' N
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of7 Z" T& w) A7 f. Z
  88. #                                    # "Actor4" charset.* e3 b( f3 \3 ^
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    $ v9 v3 L) U# R# m
  90. #                                    # "Vehicle" charset.
    ; n$ K5 f/ }8 [* _# X5 c* j
  91. #------------------------------------------------------------------------------#
    & O6 }9 P. C- c; y1 P
  92.   # r8 @; H0 r% R. [8 O' x
  93. #------------------------------------------------------------------------------#" k% d5 y. O6 ?0 i
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
      x, K) N# \+ J
  95. #------------------------------------------------------------------------------#- Z( ?' a3 D5 Q6 d. M" C
  96. #' Y( U7 c; g5 f5 A. G; P" ~5 c
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    # P. E8 o3 b' Y/ E& k& ~
  98. #                          # use this to specify for mirror and reflect.
    / P" i9 l- Q+ v/ h- p8 O; t
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    2 ?- c' w. n, r! n# Y
  100. #                          # to change all events use :all8 r, o- ]2 q0 v& U; [
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make5 D* h# i0 I/ Y+ U) @; H- d4 b" `) I
  102. #                          # it 0 for no icon.
    / x- M& @" Q% {
  103. #
    $ k+ J3 \6 N1 y
  104. #------------------------------------------------------------------------------#
    * y  H& @6 t  ~+ A% M6 f2 s- @3 N
  105. #  EXAMPLES:# D* S( a8 W: G) T
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON- D6 u$ j6 p) i$ K
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    + C' i0 A/ c8 {& @# t1 y* _
  108. #  reflect(:all,true)      # Turn all event reflections ON  q  K4 r3 @, Q0 `! H
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
      L) C9 a4 A( ?
  110. #8 r0 R4 ]* D1 @( e! z) x$ L
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering6 _" ]$ z' ~+ w+ o) B
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    9 H& Q# ?% L: D4 @/ g
  113. #        should use these effects sparingly and only activate them on events& q9 x2 m+ m. f1 x& h
  114. #        that require them.
    , Y& L' o1 z1 n+ r+ a4 q5 d$ s
  115. #------------------------------------------------------------------------------#
    : n1 I+ ~/ m/ ?* l6 E% f4 F+ ]3 n
  116.   
    . \2 R6 n, R3 c( Y0 R
  117. #------------------------------------------------------------------------------#/ H! F3 S+ z4 B% H4 F6 u
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    9 T" O" z1 k& @" D/ i5 c; o0 T* L8 }
  119. #------------------------------------------------------------------------------#
    6 W: d. g, T/ \# t% s' u6 z
  120. #/ s1 M- w1 A7 R/ P
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default & k5 ?  w1 L7 s0 y
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    " p+ e3 P5 m! g* b
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    : U& Z3 {! P2 D3 z& i# C
  124. #
    . r2 R# Y2 \$ y$ L3 ~5 a! [
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects9 U( Y2 d* |3 f' C6 w8 L+ [  ?
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.7 k! `# K0 E1 l1 E, |/ V: P+ h
  127. #  v_icon(x,x,x,icon_id)
    $ X; {  i; o4 s$ c4 |$ Z3 B
  128. #5 _- f0 ?% C8 q5 m3 z" @
  129. #------------------------------------------------------------------------------#. C$ I# `6 {# {7 n; q( y' o; T
  130.   
    * \1 N/ V8 j  m6 |) M/ S6 t: [
  131. #------------------------------------------------------------------------------#9 u6 j# f1 |6 E: B
  132. #  SCRIPT CALLS for shadow options
    5 j" g  x  H( y5 p9 h
  133. #------------------------------------------------------------------------------#
    9 x: ^8 Z& ]! `6 |6 c
  134. #8 [# l! r" w/ e4 u/ j
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    ) n) f- z' A* O; S
  136. #                              # light source number you wish to change (for
    5 ^- `7 }" m5 M( a5 [3 ~0 U+ s
  137. #                              # more than one). These are reset on map change.& \3 I8 ^: B6 t" |6 P
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.; ~5 T0 J/ e0 S3 p- J9 G
  139. #                              # This will need to be in parallel process if you
    3 y6 j# G2 M# j# ?6 y1 E2 M' [
  140. #                              # want it to be a moving light.
    ) A& w- V6 f7 d
  141. #
    # N, {; {! g* C; a: Y
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    3 L7 A+ ?6 I. H
  143. #3 K7 q- A! T) A
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    6 Q% n" ?1 J! [+ H# s0 V
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    & I3 \4 w6 f! Y% ^. f
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.6 w& f. f. s# k# Z: D( M7 s1 w
  147. #
    & e2 y" G1 t- X
  148. #------------------------------------------------------------------------------#
    # a) }9 y, x3 e; v2 \" }
  149. #  EXAMPLE:
    7 `) Z9 e9 D* v* F5 d
  150. #  shadow_options(80,10,false)    # This is the default setting.. v# k; y, T" _& Z2 E
  151. #------------------------------------------------------------------------------#' }1 C: Y( z& E/ U
  152.   
    + |: i- W8 K4 ~' c
  153. #------------------------------------------------------------------------------#9 J: L; T  X# b
  154. #  SCRIPT CALLS for reflect options- `! S* H( z4 i5 V( w" I
  155. #------------------------------------------------------------------------------#
    8 V2 x# @: e8 k
  156. #
    , |$ ]7 ]- j( t' Z
  157. #  reflect_options(wave_pwr) 9 `/ i1 C: ?' b. B( |  u, }, F4 J
  158. #
    / |' b% A. m/ W/ @. ]/ N, n; m
  159. #    # wave_pwr = how strong the wave movement is. 0 is off; z; X: e6 m! }( h
  160. #
    ) I* k( f4 b4 |' x
  161. #------------------------------------------------------------------------------#* n; C9 p# n( J1 t
  162. #  EXAMPLE:
    0 r4 ~0 [# Y# s9 S! Y
  163. #  reflect_options(1) # Turn wave power to 1
    , r5 [6 W6 U6 K' y% Y$ u
  164. #------------------------------------------------------------------------------#- j$ U: V8 J! `
  165.   2 k( [& ~, n0 Z( b* \
  166.   
    $ {" {+ i- f3 ?( h' _2 ]
  167. #------------------------------------------------------------------------------#
    0 G  D' V. `% ?  z' n. L
  168. #  NOTETAG for ACTORS
    # L3 Z7 k8 V2 y6 v* ^, N
  169. #------------------------------------------------------------------------------#
    ; c3 w3 o; Q; Z
  170. #
    " l7 i; b: R$ t$ y
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)' m3 r  e) ]% Q- m, s5 g
  172. #7 O% I* _9 F( Y; U
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections' E1 U& K! R1 [3 z
  174. #                                  # and use the character in position 'pos'
    ' T0 i: P# ^3 F+ ]2 X& ~
  175. #
    - \" ?' Y; ~7 P! l( O& E' ]
  176. #------------------------------------------------------------------------------#; q2 m6 a/ a& i4 P0 k
  177. #  EXAMPLES:
    ) x. v9 S4 t$ S9 y/ b5 @2 {
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset+ Q4 z2 c  v9 l9 |8 R% S9 L/ r
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset6 X* B/ h6 [( i& {
  180. #------------------------------------------------------------------------------#& \' Z! p$ _- s6 \$ `
  181.   ! F/ i( D  g6 @2 Z
  182.   2 D; H7 p1 M! w* x+ y; z, x4 l
  183. ($imported ||= {})["Galv_Character_Effects"] = true) h; t$ ^8 ^  \2 Q
  184. module Galv_CEffects
    9 f0 F/ J8 T0 Q! U
  185.   1 g$ c4 @% x: D4 D0 X
  186. #------------------------------------------------------------------------------#  
    6 @8 ?% f. o; g- g
  187. #  SETUP OPTIONS
    + E5 c' \) H. \
  188. #------------------------------------------------------------------------------#
    1 r$ B* r6 X/ b
  189.   ' W3 ?5 u: J6 g& ~" K5 q
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the: r; L1 e/ F' Z; m
  191.                         # region on the wall you want to make reflective (and
    + G/ O  S. |+ a5 {
  192.                         # then use tiles/mapping that make the parallax visible)0 M" G' [& N+ Q1 e; f" N7 i
  193.   ! J* {( _: e4 A
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    + @* R+ q9 l1 d  j8 y1 s% _
  195.    
    $ U# {+ M# C* f9 Z
  196.   REFLECT_Z = -10       # Z level of reflections
    6 G! a8 i5 W% e$ V. U6 M7 M
  197.   SHADOW_Z = 0          # Z level of shadows
    : M! `3 F% ^% o2 l# ~, b
  198.   
    ! v* F2 O. ^( a0 {; B- X4 E9 a0 S# f
  199. #------------------------------------------------------------------------------#  7 F$ N4 r& |4 M) t8 a0 i+ ~$ ~- g
  200. #  END SETUP OPTIONS
    8 t- z$ ]4 B. n" L- t; R! r
  201. #------------------------------------------------------------------------------#
    + W+ Z1 x( B" ~8 [
  202. end9 K7 n) {: f( r: R2 P7 L# s& f0 X
  203.   
    0 b; e' J7 y# n  P2 I! ]
  204.   
    3 g$ x' e. a8 |  B+ c; N
  205. - O2 e$ X" ^# y5 B
  206. 2 h# R; {" T3 U+ I1 ]  k4 G) b* n
  207. class Game_Map+ S8 u9 `, P- U) ?' }" l
  208.   def do_icons(refresh = true)+ w  B8 p7 ]$ `$ u+ `7 K
  209.     @events.values.each { |e|
    * }/ h; o6 G8 e. {6 k: z6 }$ _
  210.       next if !e.list/ w9 h! J: V! O9 B( g3 i
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    5 p+ \4 d: A3 J
  212.         e.icon = $1.to_i
    ' H8 ^( P0 L& h3 z
  213.         e.icon_offset = [$2.to_i,$3.to_i]9 W5 j, i& t4 I
  214.       else
    4 ?4 T( S* R$ u' B+ v8 `
  215.         e.icon = 0
    " U& m' T1 Y( n, p7 ~0 X
  216.         e.icon_offset = [0,0]
    , |  [. {5 f3 P  y) S% B
  217.       end
    1 c$ ]3 m9 I3 P8 y; w9 B& s7 s  K
  218.     }: H; W! t& n2 u" C* X% m. w8 w$ O
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    % b+ r# ^* v/ E  N/ X$ v* s1 G7 r
  220.   end$ W$ m& J8 Z7 b! J( O
  221.    
    0 P, [, H# d2 X2 z( ~& S7 S
  222.    
    ! B% `/ b# k2 x/ ~  B+ U. y5 w
  223.   def do_shadows(refresh = true)' w; k# ]' J' g! p' _
  224.     @events.values.each { |e|! Y9 x( s% L3 Y3 s
  225.       next if !e.list
    5 _* M3 F. M" g- Z$ T
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    8 R* M$ `: [3 [6 i$ ~
  227.         e.shadow = true
    + `3 I% Z" B6 |' @* d9 g8 F2 q
  228.       else" k4 F( i. ~5 X4 \( H' h
  229.         e.shadow = false
    : `6 O! ^% C1 s3 A/ |, k% D
  230.       end4 U: o9 }3 H4 \# S, h
  231.     }
    7 H! U& v/ O4 H! D3 g5 {3 y/ U+ v
  232.     SceneManager.scene.spriteset.refresh_effects if refresh/ Y9 u. c2 |/ Z: W, ?
  233.   end7 T) |2 X/ x& p* b1 P) Y" r
  234.    
    ; k$ A8 V: b: A3 ]0 _
  235.   def do_reflects(refresh = true)
    # k7 ]& n+ J. Q" Q! N) W
  236.     @events.values.each { |e|
    0 ?) f' p; A" ]! I) Y
  237.       next if !e.list* ^1 s* @# N# K
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    * C4 d7 [/ o" b3 x" a7 l, J  i+ ]
  239.         e.reflect = true/ ]7 m0 N: F* M0 ]/ g8 W6 u
  240.       else6 I5 c, x6 o0 i; P# h' {  d
  241.         e.reflect = false
    0 ]) F& I$ ]9 H( V- o7 K* h2 [
  242.       end
    ; x( k0 b  `: R* z2 B
  243.     }5 _' V2 w4 N, r0 z+ w' C
  244.     SceneManager.scene.spriteset.refresh_effects if refresh4 @7 o, L/ U# @: x5 n
  245.   end# H- o2 u# L# e' w- Y
  246.    0 q7 `8 m0 ?" L
  247.   def do_all_chareffects1 V, T* D  Z1 g, N
  248.     do_icons(false)
    7 R8 }% ^) \, j# d# [+ c/ ?( @
  249.     do_shadows(false)0 z: S+ M) q- Z% @( B
  250.     do_reflects(false)
    9 M) a: C$ R' {: f* G* q
  251.   end
    # E9 z9 |5 f; j, `
  252.    , [+ W, R" |+ ?4 g& V% H  P/ S
  253. end # Game_Map
    7 |+ U9 q0 }# S) V& f0 r) }
  254. & m1 g* v6 A; l

  255. ; \, {( V, g7 t" [) a# G9 _% T1 J

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2024-11-25 15:08

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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