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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

8 ]  X4 D- k6 `/ T! O这个代码怎么用啊,有大神知道吗。我从国外找的。
7 i0 k7 ^0 J4 L$ l1 q2 R% ehttp://galvs-scripts.com/2013/02/21/character-effects/
/ ]9 u$ r2 n/ l; G4 O是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
3
 楼主| 发表于 2014-6-25 11:35:49 | 只看该作者
记得口袋妖怪的池塘是有倒影的
回复 支持 反对

使用道具 举报

梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#% |2 N" }8 x& O- p; f# A7 D
  2. #  Galv's Character Effects
    $ r: l* P( y7 e9 l/ C; ]1 x
  3. #------------------------------------------------------------------------------#
    & c: R0 ~0 H6 U+ D6 _
  4. #  For: RPGMAKER VX ACE
    2 _" i) J8 o, J1 f
  5. #  Version 2.1
    8 f- W2 Z: ~) t2 V; N! k6 ?
  6. #------------------------------------------------------------------------------#; q1 c+ e! x6 n% U+ C% b# m2 ?/ i
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    2 J( N" U1 A$ K* e( |6 [3 E
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    4 e, K" I5 D) Z% s! l" v
  9. #                           - Fixed shadow facing bug4 {+ U& l8 ~* M4 n5 v0 z& Q0 Z
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
      ?" n) h( S: _4 p# q
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows/ p# J" e5 h- k9 A/ m2 J0 J
  12. #  2013-02-22 - Version 1.7 - bug fixes; \& U0 t" F/ I9 M* X
  13. #  2013-02-22 - Version 1.6 - added icon effect2 C) Z) X) F8 k0 }/ F
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps/ L1 Y1 i, e0 k- W  m
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles( X2 F2 w6 p7 C+ Q2 q$ n( c) W6 R
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks4 S9 Y1 V/ v  J( u' u* }
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    ! i+ J, i# B5 J6 a
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    & o  V% |2 H2 ]" U- Y; ^! ^
  19. #  2013-02-21 - Version 1.0 - release
    1 ?7 [! V7 F. }
  20. #------------------------------------------------------------------------------#6 `. F: i% }; M5 P0 x
  21. #  This script was made to provide some additional effects for characters such
    3 T1 I& c; a1 g# H
  22. #  as events, followers and the player on the map.9 s0 P- p- K# q$ n% R" H
  23. #  Currently it includes:
    8 u* U; q; Z: {, \2 B
  24. #7 I" J- A- e4 T7 M0 B( W0 Z, h
  25. #  Shadows1 |( O2 d! k. u9 ^% I, w
  26. #  Shadows that appear under player and events in a directions depending on
    . C  G. a# O- }( f6 ~
  27. #  a light source that you choose.
    5 L5 y! ~, P5 U" G% c! @- X6 `
  28. #
    + Y1 E; l& m- Z4 y* U
  29. #  Parallax Reflect
      q& o# s' g4 V% X, ~( \5 y
  30. #  Reflections that appear on the parallax layer for events and actors to be
    " P: l. P2 [, E  f" O- r# G
  31. #  used for things like reflections in the water or glass floor etc. To get8 l% J4 D+ L6 C# D) f, }  [
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    - s' N7 w2 o/ m9 m0 p* p% V4 f  \
  33. #  partially transparent.
    5 D+ A& d7 N9 J5 n. A9 p* K# g' F
  34. #
    ' O0 d- d9 p) U; r0 n
  35. #  Parallax Mirrors9 Z4 I/ y7 Z* r( q
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    0 v3 p: b# ^: v' \3 J# W
  37. #  on a wall designated by a region. Both mirror and reflect effects can be7 ?9 f) s2 P1 H. N
  38. #  changed so actors and events can use different charsets for their reflections, B  c7 k& Q+ A# ~8 h5 x
  39. #
    # p+ `8 S+ J% S. y2 ?
  40. #------------------------------------------------------------------------------#9 m9 g, D+ y/ w& V0 ?3 @
  41.   
    ; R' Q5 T1 ]3 g( A: w+ }6 i
  42. - @, x- r: N& c, w# Y9 U" N
  43. #------------------------------------------------------------------------------#. l6 b" [/ P+ w9 N' n: |
  44. #  NEW - First event command as a COMMENT9 x" F( ^2 b! c( d- ]* a- ~! j5 `8 R
  45. #------------------------------------------------------------------------------#
    / p: T0 f6 `1 _2 h3 g* n: O) Y7 Z# c
  46. #  You can add a comment as the first event command on an event page to set if
    : g  h% z& S) a; r& H
  47. #  that event has an icon, shadow or reflection active. The tags to use are9 m9 y" ~' ~% I, {9 Q2 F; G$ H
  48. #  below, all must be on the same line in the comment.
    ( X3 K2 Z/ k) A0 }5 T7 \
  49. #7 `( G: i& G" c& o/ J
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    * @. |0 j6 Q5 w$ o
  51. # <shadow>           # set the event to display a shadow$ g4 y3 [) H5 X0 U- w; Z0 R9 y
  52. # <reflect>          # set the event to display reflections4 v: `9 `0 U# @) Z: H5 o1 ?' u
  53. #
    . h' z  Q  m$ M4 g- w* c$ T
  54. #------------------------------------------------------------------------------#
    ( z; {  {" u6 I' u$ P
  55. #  EXAMPLE:
    # C9 r: M9 @+ A) \* [5 ?& o) {
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event* t; m( I! N: `/ h. o7 |- x" z
  57. #------------------------------------------------------------------------------#
    ( S" g  ]$ x7 X/ g6 p
  58. 7 D- H1 ^+ M$ v6 F
  59. 5 N8 @8 i0 t  _7 W8 a
  60. #------------------------------------------------------------------------------#
    ' }# m$ C0 e5 f) v1 i& ~
  61. #  SCRIPT CALLS:
    & U! x( P+ k" _' a' b
  62. #------------------------------------------------------------------------------#
    9 v7 _& z4 p; G! @" D
  63. #% D+ @- D: k# D, V/ a# Q" E
  64. #  char_effects(x,x,x,status)
    - @8 @2 }: g5 t
  65. #9 \, q* q" a/ A1 {( |" X
  66. #------------------------------------------------------------------------------#) F$ k: k6 L- c$ G
  67. #  # each effect can be true or false to enable/disable them during the game.
    3 ]% y! Y# ]5 d
  68. #  # you can change multiples of effects at once, x being the effect number7 J' Q, E1 @9 D( B
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    3 E& z0 u" h& j% V# o
  70. #------------------------------------------------------------------------------#
    ) i$ H$ c7 q7 T: C+ T2 Y
  71. #  EXAMPLES:
    7 y0 ?$ O6 c2 m- }% P: e; G
  72. #  char_effects(0,true)              # turn reflections on
    $ ?  z$ V0 t8 \% w4 J" u$ o* q/ |
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    $ v  f( S) y8 V, P+ L3 ]% V, \
  74. #  char_effects(1,3,false)           # turn shadows and icons off7 W: f8 H1 ~( F* P9 E% ?1 x
  75. #------------------------------------------------------------------------------#( ~: U1 ~6 j6 v9 F8 i7 D
  76. #
    5 o; w9 d' u  L' Z" j; W7 v5 R
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset& W; |  J+ @# d# x$ |5 q7 j
  78. #/ b6 d* r8 V* v: g) @, n* _
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    * K/ Y' e. d  Q8 m$ b0 H' ^
  80. #1 M' D* K  m& @6 A. h+ E
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset, l1 S7 t8 _; U$ Y  k! {- n
  82. #
    ( X! y& F( Q$ q; Y0 @
  83. #------------------------------------------------------------------------------## t' f" M8 F( X0 p/ M7 d# m
  84. #  EXAMPLES:
    9 x5 Q  u% G; p3 a( p' j+ F$ i
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    $ K+ c7 n8 K& n) Z
  86. #                                    # in position 2 of "Actor2" charset.
    0 A0 w5 e% d: D- l* e
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of  b" f- G6 [, z7 {
  88. #                                    # "Actor4" charset.$ z! I5 K. q2 G* i7 q; U
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    4 A/ t' Q. a, w+ l' m# Q! }
  90. #                                    # "Vehicle" charset.: f) H( m0 D7 ~( C( g& v/ U
  91. #------------------------------------------------------------------------------#
    6 K4 r2 B6 m4 c+ U0 o- F" J
  92.   ( J. ^+ T  m* M, ^, K
  93. #------------------------------------------------------------------------------#3 V/ [' q3 H2 C: G6 v( ?+ K" w  i: {
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS* ~: U; z. X; x8 }  i$ x+ O$ T  U
  95. #------------------------------------------------------------------------------#. x% T$ F% Z0 K7 W5 \
  96. #; e8 F; H5 Y  @+ U) ~# O0 j1 X
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    - c+ T/ X1 P/ B0 |! D: s* K
  98. #                          # use this to specify for mirror and reflect.
    5 m5 G# u! p! U& s7 }( S5 H& T
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change4 J. z& ?4 u! M5 W, b
  100. #                          # to change all events use :all
    7 l: `' E5 H! D: M( W
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    0 }( c, b) G5 E1 N: Z4 w1 t/ L
  102. #                          # it 0 for no icon.
    4 \; {; z. k/ z- `" Q; v4 v
  103. #  S. M' {& T! c; _+ i
  104. #------------------------------------------------------------------------------#
    . r4 j6 b! b" v
  105. #  EXAMPLES:
    4 x3 ^3 L9 R/ }7 N
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    2 w! I, s" \  d4 B& O/ C* n; v
  107. #  shadow(1,false)         # Turn event 1 shadow OFF8 r% d3 O6 x0 r: \
  108. #  reflect(:all,true)      # Turn all event reflections ON- m# p. q* }# f5 a, z; B
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    0 W4 g' N5 ]: z6 m
  110. #
    " h2 _- \* \2 {; K& N3 _
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering  X; y8 N5 j2 q; e
  112. #        a map. This is a design decision to try to keep lag to a minimum. You) d' ~3 R9 |/ P7 `5 J+ k% A4 D+ t
  113. #        should use these effects sparingly and only activate them on events
    " s, U9 O4 F5 n$ G
  114. #        that require them.- x- B4 k% {- f9 {% n5 X
  115. #------------------------------------------------------------------------------#+ f0 b6 c6 E/ }" w/ N8 F' r
  116.   
    ( l+ h6 u* ?; ?; W+ b$ Y  a
  117. #------------------------------------------------------------------------------#
    ! L1 I( a" R0 u
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    1 Y- O: e% b5 W# I6 X' h# h
  119. #------------------------------------------------------------------------------#% \7 C' \! x) x3 `0 i
  120. #( d9 S, ^6 y2 k$ R" }, F* [% X
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default * b$ N6 \8 o* L' }
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 8 F0 J% a2 R4 Y4 I
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    4 e1 z1 a' o7 j& r3 o; w) c
  124. #
    6 O4 i# Q2 f5 H: q1 q7 a, @# X
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    6 ?# f. }" p; p' f6 q, Y. |
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.$ X$ }; n* o! J; Q% J" b
  127. #  v_icon(x,x,x,icon_id)
    % F/ W4 B# i8 ]3 Z* z( V5 [
  128. #
    ' X& V( t$ F  r( a
  129. #------------------------------------------------------------------------------#
    1 N% Z* `1 `: Z' \/ d' e" u6 \
  130.   
    " n- z3 R* c' G
  131. #------------------------------------------------------------------------------#
    9 X+ c- F' \7 k# ?. l' }( h  s* F% J& c, Z
  132. #  SCRIPT CALLS for shadow options+ j! B7 ]; N. m% y  W
  133. #------------------------------------------------------------------------------#6 P  C' e/ @  b& B2 g1 H3 x
  134. #
    / f! w9 v8 E- ?8 t5 u
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the   f% s6 o7 ^' @+ [$ A$ _% I' S8 P3 M$ i
  136. #                              # light source number you wish to change (for4 H9 n' \2 p7 ?1 c! ^/ s* J7 x+ P
  137. #                              # more than one). These are reset on map change.$ c- a* Q! W0 b# X  w) @
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light." {& e7 ?" P$ Q- v8 U: ?! h
  139. #                              # This will need to be in parallel process if you
    ; ?* j8 g& T, L/ A# i
  140. #                              # want it to be a moving light.# K* x7 Q2 b) Z- X3 N/ P: s
  141. #
    . ]: N2 q% f. q8 R
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    , R4 ]+ y- t. E5 ]8 `2 J6 u
  143. #
    $ T+ @* `5 n, ?0 B; l8 T3 c* l/ b
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    / K' f- D% h% N2 [: j1 \) u
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    3 T2 B1 S% ]" R2 u3 h4 N
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    ( M) N/ L. L5 s9 S5 a7 g  _
  147. #
    " U2 ]) b( c+ e1 E
  148. #------------------------------------------------------------------------------#
    ! e# r' W2 v) K3 H
  149. #  EXAMPLE:9 M% n# c/ \1 ?3 P/ e
  150. #  shadow_options(80,10,false)    # This is the default setting.
    ' m0 C- N2 g4 @
  151. #------------------------------------------------------------------------------#* H) I. E0 q1 X$ M  o& A
  152.   
      I& {3 L6 _# V* M2 e0 W% b* @- W" z' G+ U& Q
  153. #------------------------------------------------------------------------------#
    ( c/ K! H( c; S1 ]
  154. #  SCRIPT CALLS for reflect options, r7 y6 B; \6 I& b6 s! t
  155. #------------------------------------------------------------------------------#. G' t' f5 N' S: a/ n9 q% }  _
  156. #5 B: {6 J$ r3 P! a/ |$ M
  157. #  reflect_options(wave_pwr) 5 Q) h& `1 p5 i; T- y: S+ N
  158. #8 \+ E8 ~# l2 I  y) H* i
  159. #    # wave_pwr = how strong the wave movement is. 0 is off; [1 p. l$ p3 h3 }- Y% g  e
  160. #
    & s1 E- _% u+ r! |; a' H+ _# Y- l
  161. #------------------------------------------------------------------------------#
    % l- v: B' d% H# R" x
  162. #  EXAMPLE:
    ' I, p) `  H+ H  ~: f" S) F$ i
  163. #  reflect_options(1) # Turn wave power to 1- w6 r" a* u# B# |9 s$ g: `" j% M9 C
  164. #------------------------------------------------------------------------------#
    4 }) F! X7 G$ V
  165.   0 Q' m4 D, i+ e6 ^: e2 ^7 a
  166.   - j$ ^2 q5 M8 X# f8 F2 p' Z
  167. #------------------------------------------------------------------------------#
    + Z. H# m6 t5 @! t2 Q3 V& j( r; t4 _
  168. #  NOTETAG for ACTORS
    " V% c% a1 O7 y" l7 G  A
  169. #------------------------------------------------------------------------------#/ p" Q" ?' Z: w" ^8 f  \
  170. #  [5 T+ a/ ]+ J' X& E5 j3 m& E
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    * Q1 _! l+ X5 d; Q7 G% B! G
  172. #
    ! I( k5 G& p# R9 H4 r
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    5 r; ~2 Q/ J6 _: q3 ]6 H$ |# [
  174. #                                  # and use the character in position 'pos'7 z( a! `: ]5 p7 L
  175. #& H% N$ u% e7 d
  176. #------------------------------------------------------------------------------#
    , \. s1 v0 B. z4 C
  177. #  EXAMPLES:6 \9 U) k3 D" k. k5 i
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset$ K  _% x+ s- T
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset6 s! _$ R' a- T0 {4 O
  180. #------------------------------------------------------------------------------#
    " X6 f( B6 W# P% |
  181.   0 T' p9 J! y) u8 x/ q
  182.   3 z, u9 G' {4 R, h! y
  183. ($imported ||= {})["Galv_Character_Effects"] = true. A' C) @+ u% d. X: m
  184. module Galv_CEffects! t  X8 P% R9 _4 T; e1 R
  185.   9 s$ C3 }4 i" l, ?6 q" d
  186. #------------------------------------------------------------------------------#  
    , r6 P* {/ Q& B
  187. #  SETUP OPTIONS
    3 o7 b: d6 m# L/ m" ~
  188. #------------------------------------------------------------------------------## o/ F5 I: T7 D8 \. V
  189.   & h* `5 ~% X0 d
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    : u6 B0 f% i, z
  191.                         # region on the wall you want to make reflective (and
    5 e) x8 _; }5 f- l6 Y9 v
  192.                         # then use tiles/mapping that make the parallax visible)
    " ^: Z* v5 N$ Y
  193.   ; U/ |4 B6 C2 i0 Z% j2 H
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    ) d2 O* L$ w; Q& W; Q# p6 O/ \
  195.     ' Q* u0 E- [5 v& V  i2 ]
  196.   REFLECT_Z = -10       # Z level of reflections
    * M# ]* `; U6 t( Q
  197.   SHADOW_Z = 0          # Z level of shadows
    8 h4 c4 v; i3 Z  x3 t$ m
  198.   3 B. y+ @3 J5 u8 o; Q
  199. #------------------------------------------------------------------------------#  
    : a5 ]$ n! @0 X% i( U
  200. #  END SETUP OPTIONS1 c4 F4 {" `1 |: d
  201. #------------------------------------------------------------------------------#  ?+ P, \1 [# V' s! }; ?
  202. end
    ' F( \0 ]" ]; e# V$ F/ Z8 h5 E
  203.   
    4 a" M7 ~0 ]: }9 c
  204.   ! [6 x3 _' C' {. X+ y$ U$ Q' h
  205.   Y4 n; E+ [; v  q, C
  206. 4 e1 p8 G) a+ ?! G4 u$ C! I
  207. class Game_Map1 t# n2 Z: q9 K# w
  208.   def do_icons(refresh = true)
    * w2 L2 K0 ~; h6 a# {& _
  209.     @events.values.each { |e|
      m. R3 G+ D& Z3 c1 J
  210.       next if !e.list
    - o0 [2 h! M& A% g) a
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    , M, ^9 g3 I: ~9 e8 B3 ]2 |% y+ v
  212.         e.icon = $1.to_i' S6 D' ~5 }! P& @- y; ]( ~
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    5 W- V7 e6 ?8 l* b
  214.       else& u/ J6 ]; t( a' T6 n/ C& t
  215.         e.icon = 01 N$ L( |" ~2 H6 L- G1 C5 z
  216.         e.icon_offset = [0,0]) f6 b4 w. L5 }0 x
  217.       end
    , E: Y  ?' f8 d. n
  218.     }& l3 ^3 ?! m8 @* e0 W' J) \
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    * {. @8 G/ H; ~) g( f6 I3 i
  220.   end
    9 z8 t" d* e! K8 J; b5 r+ V* \
  221.    
      M2 S( K4 x5 R2 H1 \' B/ O( }+ v
  222.    & \6 e1 C; ^; \/ ?# d* C4 I
  223.   def do_shadows(refresh = true)
    . }8 k  w- s$ E" g* g
  224.     @events.values.each { |e|
    ( r: o# x% c1 e
  225.       next if !e.list. G0 \) ?2 ^9 g1 H2 y
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    # w/ e* v$ @) n0 i, G) P4 w; V
  227.         e.shadow = true" B, T# w8 ?! Q- I
  228.       else3 q+ |1 L% Z# u7 z+ |
  229.         e.shadow = false. x% ~& T3 u9 L6 n
  230.       end
    8 S& e( y9 p* U: j  m
  231.     }: o3 p, q, M1 W
  232.     SceneManager.scene.spriteset.refresh_effects if refresh' q4 K' U7 u0 Y
  233.   end
    ! P2 f3 k; h- U, \( {3 q) y
  234.    ' u7 e* z; @6 q% r0 B
  235.   def do_reflects(refresh = true)
    * Q8 i, f4 |/ h1 ?7 B
  236.     @events.values.each { |e|
    ' W5 f- l& v& H
  237.       next if !e.list0 g: f. N. q5 G+ ~- j4 \
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
      e( F9 }/ X2 q9 E
  239.         e.reflect = true2 v4 W$ X' Y+ v8 Z- Q( Y
  240.       else
    2 s  n2 L6 s: P, K: @( w  C
  241.         e.reflect = false
    0 T& H# A6 ^2 d  V3 |
  242.       end
    5 `% O. ?" }/ [: O7 R' v$ T) b
  243.     }
    $ g) u+ S, _7 _: u5 F$ m& ]  x1 J
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    9 a+ j7 w7 I) l' @
  245.   end
    7 U% B. {; P; ?  T7 H# O. W
  246.    
    ( x0 |0 h* ?) `5 |
  247.   def do_all_chareffects* d+ X  J1 y9 ?
  248.     do_icons(false)
    : A% {3 S" }, \4 |( H
  249.     do_shadows(false)
    3 _8 @" `6 K/ W3 I, ?! V4 j
  250.     do_reflects(false)
    & L2 q- C7 H: v
  251.   end
    & w- X- W/ {# O; A4 \5 F
  252.    ; q2 n& n2 _5 S" \
  253. end # Game_Map
    % C6 b0 Q6 t" N% f/ |; {
  254. : s5 j: O: F; s' v3 b- c$ W/ U
  255. 0 g) M, p3 ?" |( P, H4 F! g

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

使用道具 举报

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

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

GMT+8, 2025-9-11 17:01

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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