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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
4 j- w' q/ v- e, H( M7 F
这个代码怎么用啊,有大神知道吗。我从国外找的。& M5 n* Y/ W! B
http://galvs-scripts.com/2013/02/21/character-effects/' n" ^$ v" I( s0 @$ a- C2 q& w7 n
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#6 t  n* B( `1 `' b
  2. #  Galv's Character Effects
    2 w1 ?& i/ I+ @! R- Q2 x$ S
  3. #------------------------------------------------------------------------------#
    ' v0 e) `! z  n4 Z" _7 B
  4. #  For: RPGMAKER VX ACE4 A1 d( F1 u. s4 k0 k% e: ^# r
  5. #  Version 2.1) q6 S/ E6 K& ?
  6. #------------------------------------------------------------------------------#. u8 z% {' c$ u! R0 j
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows1 P/ a5 x, M/ x, s
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    / B0 D6 G5 g5 b/ w3 j- w% a
  9. #                           - Fixed shadow facing bug
    # f/ I# F- @6 P6 E2 o" ]% Y
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows7 `: A) o; P0 D, W
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows7 R: S7 u3 f& ]( H6 A9 C# O8 w
  12. #  2013-02-22 - Version 1.7 - bug fixes$ A7 X8 D. y1 e2 ~
  13. #  2013-02-22 - Version 1.6 - added icon effect
    6 c) g) e7 e6 _# D# H" c
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps( |' Z- ^1 @( a
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles' ^( z. k1 @) _  {/ n
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    4 R+ B5 ~  j7 S) P" F! Y  O
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    9 K4 w% C1 x; k2 k* O% n
  18. #  2013-02-21 - Version 1.1 - updated flicker effect  G5 s( c/ T, K" e+ e( d5 K- t
  19. #  2013-02-21 - Version 1.0 - release
    ' B, M+ L3 t0 C# x$ ?
  20. #------------------------------------------------------------------------------#
    ( P! f, `3 E, |
  21. #  This script was made to provide some additional effects for characters such# F" ^/ I" Z  b8 c7 |
  22. #  as events, followers and the player on the map.
    2 g8 \) [5 U- L8 `" ?0 e4 K5 v  u7 U
  23. #  Currently it includes:- S! f/ u) g: `) n" D6 D
  24. #* H/ Y2 i& K  L* p/ I7 ]; i
  25. #  Shadows$ h) c) P4 w. |# C) c6 _8 q% V
  26. #  Shadows that appear under player and events in a directions depending on
    % e2 v# u3 ~$ a5 J3 I) P7 A
  27. #  a light source that you choose.
    & Y5 E! ~, b/ I1 i% K5 X4 Z+ c" K
  28. #9 _* b. S' y7 {' C1 f4 m0 a
  29. #  Parallax Reflect1 q) C3 L+ `8 s
  30. #  Reflections that appear on the parallax layer for events and actors to be6 D/ ]7 E% T: Z  O+ |1 I
  31. #  used for things like reflections in the water or glass floor etc. To get  [" N$ r& \: k
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    # I# w1 G  ?, P, K* j9 V
  33. #  partially transparent.6 b! y7 r# N* c" P. q% z
  34. #3 r, n0 k  \; z' V
  35. #  Parallax Mirrors
    : k8 }" A6 c$ ?( \7 \* _2 X0 p
  36. #  Much like reflect but are instead actors and event are reflected in a mirror* N2 P. }6 a$ v" u  A; k: I
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    3 j0 F; z7 v+ m9 }
  38. #  changed so actors and events can use different charsets for their reflections8 G4 X/ J) z) N5 h. Z* C' h
  39. #& Z+ J. A3 i1 [$ Y! O
  40. #------------------------------------------------------------------------------#9 }0 |: f1 F+ B* R( F% y1 h4 w
  41.   ' M& o+ O6 q3 j, t& X
  42. 8 _/ G  Y+ i3 q( t' F5 d
  43. #------------------------------------------------------------------------------#
    : M, u, G, ?+ q8 ~* q& q' V
  44. #  NEW - First event command as a COMMENT, x3 {& Z1 j- a' k7 \
  45. #------------------------------------------------------------------------------#3 ~5 i$ }0 N0 n$ U  i# s" a
  46. #  You can add a comment as the first event command on an event page to set if* v. h0 i& B2 N, R0 c- O& G% D
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    ( E" R7 a. [, E, f7 F, N1 _7 p
  48. #  below, all must be on the same line in the comment.8 L* Z/ }- U6 j1 W3 t6 Y0 ~
  49. #4 G6 A" k9 K7 Z
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)" E* ]. X' l3 ?+ U7 n/ H- h
  51. # <shadow>           # set the event to display a shadow
    . d2 P5 i; a* H
  52. # <reflect>          # set the event to display reflections
    # C. d) |% }* h4 e% M6 N
  53. #
    " q$ m' i' K; a/ f
  54. #------------------------------------------------------------------------------#
    9 L0 K8 k- r2 D; {$ |  B
  55. #  EXAMPLE:, ~7 E/ m8 ^8 X/ w
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    7 [0 i( n4 @4 j5 x( }3 r
  57. #------------------------------------------------------------------------------#2 L) s6 S9 v5 L+ A$ ~. D

  58. ; `: L6 S$ K3 A2 S' G8 _4 ~; T
  59. 2 |9 Z* b$ F6 w. V
  60. #------------------------------------------------------------------------------#
    ! f* ^" X( @$ m6 K$ {, h. j! Z# t- D
  61. #  SCRIPT CALLS:
    1 D  A1 O- c0 P/ V3 t8 L: }9 p
  62. #------------------------------------------------------------------------------#
    9 x3 o0 L' U9 i5 n: L
  63. #
    8 D1 F: Q3 m( i7 z4 Q1 [/ u
  64. #  char_effects(x,x,x,status)
    ) G( Y  w5 S" ~' Q7 [) R% w7 a- i
  65. #2 Q! `3 T, J2 W# {8 O
  66. #------------------------------------------------------------------------------#* ]& [1 z1 a8 l
  67. #  # each effect can be true or false to enable/disable them during the game.2 {# e4 A* O, H3 s; m" t7 ]3 j- k8 _
  68. #  # you can change multiples of effects at once, x being the effect number
    7 |# ^0 L( l* S5 U+ Q
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    7 y) j9 U$ [+ s- W/ [
  70. #------------------------------------------------------------------------------#! p; [+ Y* \, E0 q! z
  71. #  EXAMPLES:
    * ^3 {: \/ j5 w. z
  72. #  char_effects(0,true)              # turn reflections on2 J5 v$ L5 b" k' n7 [  N
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    ( D+ G% A' k! V7 ^# K+ @  g
  74. #  char_effects(1,3,false)           # turn shadows and icons off9 W& v: i8 i0 K  K
  75. #------------------------------------------------------------------------------#0 ?- e  q, H, o+ r+ ]& c
  76. #- Q) T& p7 P! u+ H0 I
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset$ x; }& d/ n: H; R6 Z$ l7 p
  78. #; l* M& ^: |# e4 y# \
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    8 _% v8 Y; p3 l" r
  80. #" x9 i5 U! `: Y# A) m' a2 N. p4 F
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset7 J4 y% I3 t( X8 ^) `  X+ o
  82. #
    ( p7 {/ v: H# L6 z
  83. #------------------------------------------------------------------------------#) i! w" {/ l" U& `/ }
  84. #  EXAMPLES:6 h8 A6 B0 }. w( g% ^0 ]( M
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite8 s/ \% Q& Z8 w. R0 Q
  86. #                                    # in position 2 of "Actor2" charset.
    - h! H2 v6 N" o7 m
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    5 H: f- x% f4 U
  88. #                                    # "Actor4" charset.
    + G, o; s' V3 X3 c. ~& Z; P  N
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    # _0 ^9 {( n/ A: P
  90. #                                    # "Vehicle" charset.
    1 J6 S* w9 r* e$ w" t
  91. #------------------------------------------------------------------------------#
    ; k5 D- W- G3 y2 f
  92.   + w+ P, a  Q0 _- K" \) n: O3 T
  93. #------------------------------------------------------------------------------#
    + V' g4 F+ O+ X. s5 f
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS3 S- H5 u2 h* U; n: R, ~
  95. #------------------------------------------------------------------------------#2 Y8 }' o$ j( X' j0 z8 W" J+ Q
  96. #
    7 k0 _  s8 J3 z4 T7 K
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off3 g/ t; X- r5 q+ S) S% I& @+ [
  98. #                          # use this to specify for mirror and reflect.7 R- r- }: Q1 e8 H- Y
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change" |* z" T" {. s. }" _# M: g
  100. #                          # to change all events use :all1 |5 k' G" L/ y9 L2 p! o. |
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    ; {- V- Q, q1 Z8 B# l
  102. #                          # it 0 for no icon.
    * R0 X0 w+ p1 s0 d. a& i1 R
  103. #
    5 Q) x) ]# d  O" g
  104. #------------------------------------------------------------------------------#5 C: |% B4 q, h% B
  105. #  EXAMPLES:
    , r: \/ s4 t$ A* W" E
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON) ~+ Y0 B3 R0 k4 D9 r0 P
  107. #  shadow(1,false)         # Turn event 1 shadow OFF3 }" }% G; D, D
  108. #  reflect(:all,true)      # Turn all event reflections ON
    , t9 n. w( k0 k/ k
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    + y0 U, `. `3 J
  110. #
    + E# }& k) _* W' r$ Z9 s
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    4 O: p3 C4 I) ?! Q, S
  112. #        a map. This is a design decision to try to keep lag to a minimum. You. T9 b' f7 B0 B2 X! m1 l& x# t- D5 b% N
  113. #        should use these effects sparingly and only activate them on events
    ; X' Q$ V& I4 P+ P
  114. #        that require them.
    * u' j& ^; d% Z% v1 f+ o
  115. #------------------------------------------------------------------------------#
    # O% S$ S- w# p* `9 o6 x
  116.   
    : b) Q+ F5 u" d
  117. #------------------------------------------------------------------------------#5 _: e# e0 o4 o0 C: N/ f
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    ! f( d3 E  ?" u9 Z2 r' ?+ s% P* c% w
  119. #------------------------------------------------------------------------------#
    ; q* h/ A' B% {9 e; b
  120. #5 L+ ?  I) [  F, m  Y4 }
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default # U! G; J8 U% r1 h$ O
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off $ O( Z, A+ M5 p" X7 ?. t
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    6 {7 O8 J9 b6 Q$ u/ e0 x. u
  124. #! z7 j/ n& p( r( J
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    ( Y% ~5 e: O4 L3 U
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    " _$ `$ X. ]5 U* c+ ~3 b
  127. #  v_icon(x,x,x,icon_id); J: o* G" K& h" m' ]: \: ?
  128. #
    6 Y" {( `* ?5 c  R
  129. #------------------------------------------------------------------------------#
    % A$ S# b+ ]# r  _9 J
  130.   & J% t9 h7 m6 `5 q) g" B6 z& O
  131. #------------------------------------------------------------------------------#
    0 H. w  ~, j3 }  o( }+ `# R& h$ R- u
  132. #  SCRIPT CALLS for shadow options
    + x" h; ?( `5 y& Q8 h% {3 r
  133. #------------------------------------------------------------------------------#) Q3 e' I4 s9 S, g& o& M0 |
  134. #
    " I( r2 o* t0 S$ k& D
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    # m1 i9 }3 P, }0 h
  136. #                              # light source number you wish to change (for4 M% T1 T, E6 m2 a0 [: H: u% T( ?
  137. #                              # more than one). These are reset on map change.
    - S! |" F/ ]" `. ?
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    / m/ _- A" A2 @  w. U+ `6 g, l
  139. #                              # This will need to be in parallel process if you% C4 h0 a8 h; G6 A  Z: }
  140. #                              # want it to be a moving light.( F8 o! O7 d. d! [% m1 X
  141. #* u6 t1 L8 i, B" ?* s  X
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    0 k' c$ A9 N& T9 I+ D* v) {
  143. #; [1 J4 S0 A3 ^% }( h
  144. #    # intensity = opacity when standing next to the light source (255 is black); g! Y4 H8 K3 l% b3 e1 W
  145. #    # fade = amount shadow becomes more transparent the further away you are.9 X  V* t3 }- X+ D1 M9 c6 n
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    5 m/ }3 y: L) x" v. _; Z
  147. #
    1 w/ o1 Z. h4 y2 e1 d5 b$ M; ?. u
  148. #------------------------------------------------------------------------------#
    8 I7 b! _4 N8 w0 L& N8 n
  149. #  EXAMPLE:0 X: x# u- v+ f! j/ J
  150. #  shadow_options(80,10,false)    # This is the default setting.
    + S& J' B. Z: ~/ e# N  p6 w
  151. #------------------------------------------------------------------------------#6 K* c, N" C- {
  152.   
    / ]' r; k% f3 H- S7 L0 |
  153. #------------------------------------------------------------------------------#
    & h" Q6 m( `! M2 ?# Q
  154. #  SCRIPT CALLS for reflect options" d, Z- r: O. Z! Q' E' [) c
  155. #------------------------------------------------------------------------------#
    ! Y% @: S0 H% ^# P
  156. #
    ' G# K0 }+ t' q
  157. #  reflect_options(wave_pwr)
    & \3 |5 S; }0 s8 R5 d0 [
  158. #9 J8 }' g0 s: u/ L1 g& p5 Y4 }2 L
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    4 _/ s, S, |! A% n% W
  160. #: T$ H8 R1 R& L) @& I; ]9 q; F
  161. #------------------------------------------------------------------------------#3 R; t! W+ F% {& H
  162. #  EXAMPLE:
    ! k' e, o; r0 j) |+ D/ R/ z7 p6 [
  163. #  reflect_options(1) # Turn wave power to 13 o: T' ]# F. P+ ]* Z
  164. #------------------------------------------------------------------------------#- u7 l+ L% R/ X1 R# I
  165.   
    3 F" b" _( z" c0 Y2 D  _- I
  166.   8 C( ?) N  ~6 P
  167. #------------------------------------------------------------------------------#
    $ J0 W5 K# |- N7 ?
  168. #  NOTETAG for ACTORS4 v$ o& Q) F' g
  169. #------------------------------------------------------------------------------#
    * r9 U/ X3 l4 q, U
  170. #. b: C: R, G7 S
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)0 f" J+ e& Z8 H' q7 l% O
  172. #4 G9 n$ {, Y8 X( I- G* g' {  r
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections, h$ r; C6 m* B( c  \0 A( g( G
  174. #                                  # and use the character in position 'pos'# f* U6 X: {. k5 P) `
  175. #
    , ], g9 s$ o7 P# Y7 x" K. A) d1 X' Q
  176. #------------------------------------------------------------------------------#7 G0 T$ y% O+ H
  177. #  EXAMPLES:; x0 x  M$ I% i* {. |" ]* ]
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset; s' ^3 y/ B, E  d- `
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset- y' V* u' [; b4 C7 f
  180. #------------------------------------------------------------------------------#
    & r8 t  m7 D$ X$ H; f1 m
  181.   6 t& ~2 k) M- a( A) }% E: o
  182.   
    ) {6 }0 O! V5 I7 `
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    . I6 @2 x: r2 Z+ v- ~
  184. module Galv_CEffects
    ! P$ s8 g# y' P9 f8 c7 |
  185.   
    % E9 n3 r, i: k
  186. #------------------------------------------------------------------------------#  " _0 M8 k9 e* N) x
  187. #  SETUP OPTIONS  s+ |% V- e# F! \/ ]# T2 z7 R3 H$ c
  188. #------------------------------------------------------------------------------#1 g1 n7 j/ j  |" N: M* T
  189.   
    " |8 p1 {; v  Y2 |
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    ) S0 a6 r; M" U* f9 x3 N, H
  191.                         # region on the wall you want to make reflective (and
    9 M2 Q  r( s. H- {- i! a1 ~
  192.                         # then use tiles/mapping that make the parallax visible)& m( y  z  T& ^) T" g# R
  193.   
    9 ^6 s0 E7 G# k0 t
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    , v( I& a  S0 y' ~# Z. p3 t/ O" }5 }
  195.     + H" m- T5 O/ `- Z- J% |8 `; M! n
  196.   REFLECT_Z = -10       # Z level of reflections2 o& m& P4 V9 Y; P: D, \
  197.   SHADOW_Z = 0          # Z level of shadows
    9 t% F4 Z. D" l4 W
  198.   
    , j5 i5 y7 N- |2 g
  199. #------------------------------------------------------------------------------#  / S$ R5 a" k, [7 O3 A1 q5 I' V
  200. #  END SETUP OPTIONS
    & s6 J; m2 G8 M: W9 Y( `) \9 [
  201. #------------------------------------------------------------------------------#
    + Y8 z3 Y1 U9 A1 W2 b2 W
  202. end. p8 {& g) ]0 W6 A1 k! b
  203.   + r& _& ]8 f" }0 {. M
  204.   + _) X3 D. k8 J, }2 N
  205. 7 u; |& X" ]8 U7 S  y
  206. % m* G! P- a  ~% i: X; ~
  207. class Game_Map
    3 q; G1 o; z) F% b) x5 l
  208.   def do_icons(refresh = true)
    ( n# g5 ?/ L. }8 D
  209.     @events.values.each { |e|
    6 W& ^0 B( V! X) R8 S* \1 Y
  210.       next if !e.list
    & c1 F( [6 N- x) t4 b* m% ^5 b
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/- f3 _* [3 e' j
  212.         e.icon = $1.to_i
    " y7 _2 L( i2 e/ F; A/ ~5 b; m
  213.         e.icon_offset = [$2.to_i,$3.to_i]/ E) l5 j- Q% @5 b* X7 k
  214.       else
      e1 I4 r8 C3 W' v. U4 ]
  215.         e.icon = 0
    / C5 K: m  k) C- J. N% k0 U
  216.         e.icon_offset = [0,0]
    8 a, g( i6 ]$ v" ~0 _" V
  217.       end
    6 O9 o2 ]% c7 J9 B/ C
  218.     }+ x' m* ]$ l( `, f3 |" M" I$ a' E
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    0 m& L' K+ n3 O) i7 O6 F
  220.   end
    1 W' O! ^( }: m: U0 y0 @
  221.    2 `% }; w) X. Y$ w8 k
  222.    
    $ g; @$ {2 b1 S6 q6 c
  223.   def do_shadows(refresh = true)
    $ l8 `2 n1 V0 A
  224.     @events.values.each { |e|  V9 g/ _1 Z% g/ w( {' K* z5 D
  225.       next if !e.list3 u  i9 G8 @0 O) i$ G
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/" h" A, ^0 L) O0 x$ b' r
  227.         e.shadow = true
    # y2 m0 G5 d" d$ Q
  228.       else
    3 x! ?1 {: L0 k& z- y" o; U' \
  229.         e.shadow = false
    , H6 e' p" ^* _1 y
  230.       end7 x+ M1 l8 H2 \& V3 Y$ v- \6 V
  231.     }
    ' N. O0 h6 y2 a. |! ^' F/ I' L
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    ' p: _! e* [1 |* M; z: r& g0 I1 g; E+ \
  233.   end$ ~3 e: U  p+ Y0 L; u
  234.    ! f0 S# M$ q8 D
  235.   def do_reflects(refresh = true)
    5 L3 o/ X3 }( _6 h% d
  236.     @events.values.each { |e|
    2 G; \4 w2 E; S: l% j
  237.       next if !e.list
    $ E0 h9 M! b- ^0 X  \. x. h# w
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    % I, ~$ i2 i% Q0 H8 E, G
  239.         e.reflect = true$ [2 f0 M$ G& q! W6 J7 R5 \1 n
  240.       else
      m, F8 a3 e3 B' g2 [& O- X
  241.         e.reflect = false# a. m+ i" z8 R
  242.       end2 u( L8 a  v" `. C+ ^; s3 L9 M7 f
  243.     }+ i$ m; E5 h( a' m
  244.     SceneManager.scene.spriteset.refresh_effects if refresh' P& P; ?, _" f1 X; S, Q+ q& A
  245.   end
    1 D0 D5 V& ]. B* T. D. r
  246.    
    $ F! A: K- ^* K8 w! d% }
  247.   def do_all_chareffects) P! E3 E0 E  X8 b1 ~. C. x
  248.     do_icons(false), {4 A8 F9 k5 _/ ^+ c: m, o8 V, D
  249.     do_shadows(false)
    0 q4 ]9 ^! g6 d$ E# Q
  250.     do_reflects(false)
    . ]# G" o) u  l8 J5 Y
  251.   end  d3 j- p$ \6 Z- x* d
  252.    3 }/ ^+ i5 Z/ z: d. s1 k
  253. end # Game_Map5 I+ c( R9 X# D- _! B6 h5 a) F

  254. , r5 ]" k9 e; S$ e6 A9 I* {  h7 x

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-2-19 07:04

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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