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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

( J8 {6 q+ H& V1 _这个代码怎么用啊,有大神知道吗。我从国外找的。
( w# u  \  Q6 J2 P8 p3 S3 {http://galvs-scripts.com/2013/02/21/character-effects/
4 `8 u! p8 Z* v6 F* J是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#4 G& y; D1 H6 s( L9 n* h" D9 S9 K" T6 r
  2. #  Galv's Character Effects
    2 x: b" i' b" P0 Z. P
  3. #------------------------------------------------------------------------------#5 c) A1 R. ]" j
  4. #  For: RPGMAKER VX ACE2 P! c: p- y# j( `1 V% T* k% i
  5. #  Version 2.16 f/ n! ]/ ]: k$ Q7 ?) d6 S
  6. #------------------------------------------------------------------------------#& l  M% \9 }: u. }1 v
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows1 ?8 T2 @4 S# s$ @# H8 q; c
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ( j4 W* u- _9 Q6 c* s8 s( _6 J! N
  9. #                           - Fixed shadow facing bug+ w  e$ D. s+ z# `* [; p8 E
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows. C4 [/ s& d7 [  }
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows) b' T0 d+ l5 d! N7 y7 _
  12. #  2013-02-22 - Version 1.7 - bug fixes. \, Z" Z% ]) Z
  13. #  2013-02-22 - Version 1.6 - added icon effect
    " Q  |' n6 {' E" V9 o
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    ( e% g7 ~8 x" |& \/ m
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles& B, y* p5 C6 f1 Y+ Y8 z/ w
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    ) |) G4 h3 Z6 m% R
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    # _7 }2 n* u- r9 d, h
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    0 |6 p5 x/ ~9 f" P
  19. #  2013-02-21 - Version 1.0 - release
    " C$ U; V" r( \# \, N+ e" l
  20. #------------------------------------------------------------------------------#  f/ m; L8 r' c$ R; S
  21. #  This script was made to provide some additional effects for characters such
    - F  a9 L5 a- m/ `
  22. #  as events, followers and the player on the map.
    - V8 q9 H% R" x0 }' w% N
  23. #  Currently it includes:
    * T+ N  i! u& [
  24. #& t  ?4 l+ _$ X4 O8 l( j7 x+ C
  25. #  Shadows% z" p9 E; B8 F0 T5 O: X
  26. #  Shadows that appear under player and events in a directions depending on4 v" z  F6 J3 u. w0 _& b
  27. #  a light source that you choose.' J# T4 O4 V" F3 H2 D/ {% f5 z
  28. #
    4 F/ r2 Y+ y( g7 F- e
  29. #  Parallax Reflect- y0 {! j; b- P  v4 t: ]
  30. #  Reflections that appear on the parallax layer for events and actors to be
    # S* p* O/ |5 a# Z
  31. #  used for things like reflections in the water or glass floor etc. To get( Z9 v; S6 a# b7 C% t
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    ( m9 J6 b9 i- x
  33. #  partially transparent.# a( J; `$ e: @6 e1 D& o
  34. #
    2 J. [2 c5 v" Q1 J5 a
  35. #  Parallax Mirrors
    % C/ Q2 O9 N) t- k  }
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    , k% Z0 Y) r% `' e/ j
  37. #  on a wall designated by a region. Both mirror and reflect effects can be3 f3 J5 S& v2 R5 T5 X8 Y
  38. #  changed so actors and events can use different charsets for their reflections, e% H- v: W& n1 |2 N: n
  39. #
    0 j; n9 H5 C7 h/ M' ^7 Q4 l
  40. #------------------------------------------------------------------------------#! `8 E2 a* e# w$ O: q
  41.   " m; i% x' r2 ?

  42. , g/ p& F- y# z! N
  43. #------------------------------------------------------------------------------#
    + s3 j# S2 {3 Q6 i) J
  44. #  NEW - First event command as a COMMENT
    ) z) s* p- f5 X( ^& V' z
  45. #------------------------------------------------------------------------------#- Y5 b3 n5 e. q" V% w" O
  46. #  You can add a comment as the first event command on an event page to set if
    1 [7 B4 H# ~$ q/ U, C
  47. #  that event has an icon, shadow or reflection active. The tags to use are3 I. `0 X5 b& L
  48. #  below, all must be on the same line in the comment.
    2 K/ v4 V/ ~5 m/ G5 t% @" N; z
  49. #
    9 d& L0 n& {6 Q! a( J# U0 V, W3 C9 m" j
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)* }$ W! }+ e, N
  51. # <shadow>           # set the event to display a shadow1 g- {  W$ c, X2 Z$ {
  52. # <reflect>          # set the event to display reflections
    , |8 s, R5 ?1 v& ~$ ?3 w
  53. #
    $ m: T: z2 p: ?3 V  ~$ P( b6 c
  54. #------------------------------------------------------------------------------#8 ~! n' D0 d; ]9 u  R& ~  O' e
  55. #  EXAMPLE:3 r3 P0 A5 z! J9 V
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event! v# c( ]! x: e8 r2 `' W) ~! L
  57. #------------------------------------------------------------------------------#3 n4 b7 W( d3 V2 C6 J7 ~0 q2 d8 f/ ^

  58. 0 S$ n; Z8 c+ E2 |; P# y
  59. ) ]. \) w1 p4 L
  60. #------------------------------------------------------------------------------#
    ( \1 [! R1 z& b6 r7 W$ i
  61. #  SCRIPT CALLS:; ^# j5 A6 A4 R, i, z2 E8 G
  62. #------------------------------------------------------------------------------#
    3 a1 T/ ]( N+ y4 ]1 K/ u4 h
  63. #
    1 [- @! M! ^& M; ~6 H! j5 ]1 X
  64. #  char_effects(x,x,x,status)
    ) _% F& d+ t) k( p
  65. #/ N6 h( S9 m; t
  66. #------------------------------------------------------------------------------#; I- l8 ^2 ^. y
  67. #  # each effect can be true or false to enable/disable them during the game.+ e$ u. c1 Q, v, S( k& N5 T
  68. #  # you can change multiples of effects at once, x being the effect number
    $ z; H" N' [$ g0 ~+ W! z
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    & o% u0 U, c# f5 B
  70. #------------------------------------------------------------------------------#6 _4 t( V# b# {
  71. #  EXAMPLES:, J' ~9 O! a# _6 U
  72. #  char_effects(0,true)              # turn reflections on
    1 _5 y# K, H& V& J6 l
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    1 \. H) R4 r& t* F* {! t' a
  74. #  char_effects(1,3,false)           # turn shadows and icons off
      ~' [, y9 E0 s
  75. #------------------------------------------------------------------------------#
    ) A6 b3 N" _; X5 k, Q
  76. #
    $ r4 v( O3 @4 R2 w* V
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset9 O# F" b  C& ~4 A0 w: C* a- w
  78. #
    " Y( m, O% E) X- F) _
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    - O+ C: I, e7 L. O  }
  80. #" B- m; W+ f  z
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    : K2 T2 m- m' }5 Y
  82. #. Y, C) ~' @3 _. L2 U
  83. #------------------------------------------------------------------------------#  B. g8 Y9 X5 @6 P
  84. #  EXAMPLES:0 d( ?/ P9 V& r( ?/ V0 \6 t
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite" {8 E! P/ l8 @9 }
  86. #                                    # in position 2 of "Actor2" charset.( i; U( `8 z$ K6 b3 k3 ~% [
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of" ^3 Y( b+ x) u5 x* O  l
  88. #                                    # "Actor4" charset.! S# Y; ?8 }8 {2 |. c0 K. n* S
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of7 |  A* U8 `* G% z  }3 o8 l/ r
  90. #                                    # "Vehicle" charset.
    , O) d) Y  Z$ h: s/ [
  91. #------------------------------------------------------------------------------#! y0 l) |; s0 H2 Z- M
  92.   # Q3 k4 A+ O1 C- X
  93. #------------------------------------------------------------------------------#& ~6 h6 d: ?" E. h  d* @
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS8 m! m- b: B; I- [! P
  95. #------------------------------------------------------------------------------#
    4 H  o% v9 ?: W  ~' W
  96. #6 q+ Z+ G! C$ q! g% Y' e
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    & o( M* a: G- U6 C+ B! [
  98. #                          # use this to specify for mirror and reflect.
    3 L" p, c5 P' t. p1 }9 }5 Y; I, t
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change& v* j* l1 q. V( L
  100. #                          # to change all events use :all
    9 g* Z0 o0 P9 K5 |3 p0 z  q% @
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make; a! F1 G) Y$ w! ]; e; i
  102. #                          # it 0 for no icon.$ ?  Q- u7 U3 ]& Y) ?8 o6 R( i
  103. #1 ]: L+ i3 r1 v$ ]4 Q+ F' A3 h
  104. #------------------------------------------------------------------------------#: @1 M2 k/ Q: d0 |5 s4 M
  105. #  EXAMPLES:
    ; \; A  z  B: J4 m1 j* c
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON2 N; Z; r  C9 f' f, E/ z; ?* e
  107. #  shadow(1,false)         # Turn event 1 shadow OFF* z+ j5 K! ?9 s9 d
  108. #  reflect(:all,true)      # Turn all event reflections ON" J4 V+ g( r# f" b% ~, U. M* N
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear# j; b! O# {+ b1 {) z
  110. #
    0 O) b2 l% ]  L, [( y: x
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering4 S/ @4 X2 ~! p
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    2 F! P+ K' i6 G0 n/ P
  113. #        should use these effects sparingly and only activate them on events
    ) C- a) x. X1 q; M
  114. #        that require them.
    3 g, s" s! ?- {$ Z' ]  ?
  115. #------------------------------------------------------------------------------#' |$ F, R, E, r; v* [6 P( c$ n
  116.   2 Y4 f1 a' N! f8 z" X$ Q" M
  117. #------------------------------------------------------------------------------#5 j" k' a! l; Z; u6 @: J
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    , W8 W% T/ l& w7 b+ j: U7 N
  119. #------------------------------------------------------------------------------#
    . u+ ^# j5 ^* H* [$ @) h
  120. #
    6 A. x9 v( u: l9 H7 R5 T
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    ' D. ~; y$ E: o- m
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off # p3 u  r! r9 V/ I! D2 v) s
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.. w4 |% P4 L5 G3 w' P
  124. #
    + @) h6 S  J/ Q( a
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    0 L$ W+ h! ]# X0 |. a( C
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    7 Y1 `/ r5 I7 m* j
  127. #  v_icon(x,x,x,icon_id): `* @. j; [' O0 ]7 A
  128. #
    : b  C, k& ~: s
  129. #------------------------------------------------------------------------------#" ~" e! m3 L) ?. T) U
  130.   ) i5 n1 Q$ F% Z, O$ Y& Y. [. ?
  131. #------------------------------------------------------------------------------#- P; c! T$ K9 X' C' \0 M! Y+ x0 R5 o
  132. #  SCRIPT CALLS for shadow options, q+ X: o1 g3 [& H2 y+ {0 X' ]
  133. #------------------------------------------------------------------------------#
    & J! ]2 W- ~+ q$ Q6 T( ]* \
  134. #
    0 f4 b. [0 A3 K: c- K5 r+ ]
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    ) j  g/ M3 _& u1 [4 E. j0 T1 e
  136. #                              # light source number you wish to change (for
    + x& L9 G% N+ Y- k
  137. #                              # more than one). These are reset on map change.- |# y5 F0 Z& d+ U; ]
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    # }3 ?" ]  V8 F2 j2 f& c( F, S
  139. #                              # This will need to be in parallel process if you) I  D7 z- {! l& m
  140. #                              # want it to be a moving light./ u# ?  x2 L2 |/ s  _: Q3 [, X7 \& z
  141. #
      j% `, \  ]7 R3 r$ R0 w- w% q
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    , ^; b- L% m" r/ d, w# D6 q' m- n
  143. #
    " v* t6 g" \4 c9 p% F0 ]
  144. #    # intensity = opacity when standing next to the light source (255 is black)/ i6 c8 T" X+ v# R! k/ ^" r
  145. #    # fade = amount shadow becomes more transparent the further away you are.9 V' P! o  h# Q
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.0 B0 v% m- ]/ A2 ^
  147. #
    3 W  D! ?2 m3 N  y
  148. #------------------------------------------------------------------------------#
    # P  s; G8 l- u8 b$ V+ }$ g5 g
  149. #  EXAMPLE:
    4 L# y% o$ b( }- P5 Y# [7 \* K
  150. #  shadow_options(80,10,false)    # This is the default setting.
    4 v* C) P/ k6 J# q
  151. #------------------------------------------------------------------------------#& P- o! y1 t7 m; h
  152.   
    5 Q6 R) E) Q/ M/ M7 t% \- E
  153. #------------------------------------------------------------------------------#
    8 e1 ?% t0 @' z% W9 y, f) P
  154. #  SCRIPT CALLS for reflect options
    5 C7 O  }+ B' a' ]
  155. #------------------------------------------------------------------------------#' f6 r3 c) [0 S
  156. #6 d% h) N4 S- l) U8 `
  157. #  reflect_options(wave_pwr) + d$ D9 T: J2 T2 Y
  158. #/ R& L5 [8 F; c' J, q
  159. #    # wave_pwr = how strong the wave movement is. 0 is off0 x! T/ W6 p8 g+ R, m- E( K4 W
  160. #3 _) N" {0 I2 Y: Z' P7 |/ W
  161. #------------------------------------------------------------------------------#
    1 G0 y; i+ Y8 ]0 `& t  _7 t
  162. #  EXAMPLE:
    . P& f* D. L' N; W+ s% E: U3 N7 y
  163. #  reflect_options(1) # Turn wave power to 1
    ) v# x$ u& g8 K4 X: a5 j
  164. #------------------------------------------------------------------------------#- o8 T, M/ B' y6 U- y6 ?+ @
  165.   
    & M! A2 o" N- b' Q8 [* K
  166.   
    ; z. K" {8 l* h7 D, r
  167. #------------------------------------------------------------------------------#* p4 K" a8 u5 K& X+ k4 z0 F" b6 |. e
  168. #  NOTETAG for ACTORS
    . a) B, g! @4 H, A, _
  169. #------------------------------------------------------------------------------#: v) B" Y1 D/ C2 y& ?1 q
  170. #: d8 X% L1 y& n7 v+ m/ o5 t
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)" X$ @1 R) \" q! z& m
  172. #
    0 R) K- @4 p& j
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    : k% l* [/ l5 `0 O: Z
  174. #                                  # and use the character in position 'pos'9 W; P( ~( z2 S! Q: q( B: [8 [
  175. #( L! ^- z+ l3 |; P) N! _
  176. #------------------------------------------------------------------------------#! P& {* H- K5 e
  177. #  EXAMPLES:! u7 |1 w# u5 H: i+ M
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    ) s3 [& y4 K0 z0 H2 N8 W; m& E& z
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    , Y8 o) b& z# e4 z# G
  180. #------------------------------------------------------------------------------#0 c2 y: I' X+ ^, ~2 R
  181.   
    ) Y' a2 T* p6 w+ r
  182.   " g' w# X' _# V9 z1 p: Y! j# {: l
  183. ($imported ||= {})["Galv_Character_Effects"] = true" l8 c. q1 M3 p9 W. {9 R$ F
  184. module Galv_CEffects
    : B! P% k3 V: [
  185.   6 ~  `( d" d- [9 a3 E/ e% [
  186. #------------------------------------------------------------------------------#  
    # u: L" h" Q/ z; z* j+ y2 D
  187. #  SETUP OPTIONS+ c3 c. k) x3 ]; Z; _$ W
  188. #------------------------------------------------------------------------------#: M# I( p# R: C3 R; ]
  189.   3 w, Z+ m$ ~. @0 X; _
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    % I" L# n# W9 y0 Y: Y
  191.                         # region on the wall you want to make reflective (and
    - p  |# m* {, x& r* Z
  192.                         # then use tiles/mapping that make the parallax visible)
    8 \5 G) S+ V% d3 Q& {7 b
  193.   
      ?; c. e1 H( m$ w, L
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    & l' N% ]+ S) `4 k
  195.     6 S: M) E# ~7 ~) w( l; u
  196.   REFLECT_Z = -10       # Z level of reflections+ m+ t: x; U0 N$ t. f
  197.   SHADOW_Z = 0          # Z level of shadows2 D4 ~/ r; Y/ o/ t* |; G% x
  198.   " m2 |6 Q4 L" p5 O! b& U6 V: c8 D
  199. #------------------------------------------------------------------------------#  & u% ^* l7 Z5 K4 t
  200. #  END SETUP OPTIONS+ D9 i: C% w. A8 x$ X! a
  201. #------------------------------------------------------------------------------#  y  ~1 `$ f. ?
  202. end/ ?# Z8 ]- J- s$ W% N
  203.   0 _* G9 i/ a1 E2 |3 X
  204.   
    2 E* Y! K# `4 z9 l
  205. , P7 {$ x, z0 j8 X  `# X

  206. 7 P! p( J/ |& j5 n' I+ y
  207. class Game_Map, Y; U2 p; }$ X3 @8 B: A* t
  208.   def do_icons(refresh = true)
    3 V1 i( O7 _+ _. Y
  209.     @events.values.each { |e|$ C' T% _4 M. U2 p) @7 z
  210.       next if !e.list; _) i' t4 ]5 R) g
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    7 h  ~$ M9 s* g
  212.         e.icon = $1.to_i9 r; \1 x4 H4 l, S" y0 v, I
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    4 G  G; s# e: q, R7 ]  K2 {9 i4 W$ M
  214.       else
    5 x" h; k' e4 A" _. X  ^
  215.         e.icon = 0
    1 Y, B+ o+ ]' {1 x6 H
  216.         e.icon_offset = [0,0]
    : M$ b# U, X) L/ H. ^
  217.       end9 T% j, C1 C7 ~( }
  218.     }
    - z0 E; N, E5 j
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    0 B9 ~' g( c0 o! P- n; s, u
  220.   end5 ?  D$ J: i3 q, y" g1 W
  221.    
    8 z3 u' W3 {( M, v, c7 B/ s
  222.    
    3 e7 H" j6 n  m0 o/ n4 R
  223.   def do_shadows(refresh = true)
    + g  ^5 p& I$ p3 @5 I" D
  224.     @events.values.each { |e|. E9 I' k, ?! D) G5 W
  225.       next if !e.list- s, ]2 |& h+ e" H% J$ ~3 o: N/ n
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/6 w7 Q: j9 h) _/ d
  227.         e.shadow = true
    5 ^: Z) Z3 z! |% ?! V' _! h' k
  228.       else
    $ a; z- `7 y, c- N  _6 X8 M
  229.         e.shadow = false
    % E6 S3 m/ x% l
  230.       end
    5 N0 U- S0 b. P9 d
  231.     }
    ) L3 Y! y% K# d% s' Z
  232.     SceneManager.scene.spriteset.refresh_effects if refresh' ?7 d+ _7 Z' x
  233.   end
    9 E8 q- T' v" ]8 r& a9 d
  234.    1 M/ q7 U& i! G6 q6 D3 n- Y. ]: F
  235.   def do_reflects(refresh = true)3 d, U$ u; m& S4 n% V/ X) h2 e+ z
  236.     @events.values.each { |e|+ k) n2 N7 \6 T" o
  237.       next if !e.list
    ' o$ @2 S$ M! ^: y0 T
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    : ~" A4 l7 g: j
  239.         e.reflect = true" p9 e1 m# M( s5 {3 s% ~
  240.       else' F4 [& E$ j& X! H, H
  241.         e.reflect = false8 D# {0 g' B( C5 `' A: R
  242.       end
    - h0 X1 H& G8 S9 f: X* z4 k
  243.     }5 b' I1 d3 L$ ]
  244.     SceneManager.scene.spriteset.refresh_effects if refresh# Z6 C7 j/ O' p
  245.   end
    9 {4 c! S& `+ T8 m; V
  246.    ) L1 t" M. R4 X2 x' C, W: {
  247.   def do_all_chareffects0 d( f7 v& {& H& V6 ^
  248.     do_icons(false)
    ' F) e. L/ S7 B* b" g' B4 n
  249.     do_shadows(false)
    9 F' A0 }" w1 h& [! ~
  250.     do_reflects(false)4 s; e7 e" W4 L
  251.   end1 E$ b0 `& E& [" I% H
  252.    6 u0 y/ z9 u4 d  _
  253. end # Game_Map! E/ V6 H1 N9 `/ \5 f' {
  254. - }6 y2 P/ |- p7 Q; p: z. J

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-5-30 15:07

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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