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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

8 y7 p. n& V- s5 z6 j# ]" |这个代码怎么用啊,有大神知道吗。我从国外找的。
' X+ e/ y5 x+ G! I) H6 thttp://galvs-scripts.com/2013/02/21/character-effects/
3 R' l" t5 l+ c$ g是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    2 ]' Q6 [( {4 }. U8 k  ^
  2. #  Galv's Character Effects+ G$ C  V" Z# n
  3. #------------------------------------------------------------------------------#
    ) R' }0 F- s" m# e" T9 h6 Q5 p7 \; J& c  m
  4. #  For: RPGMAKER VX ACE  X* w  v" `0 f1 U! A0 |
  5. #  Version 2.1* L! P6 x3 x9 K, m
  6. #------------------------------------------------------------------------------#
    ( G9 X2 j7 r) a: z6 |- o
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    , r5 s, y4 F+ V8 B* h2 M2 |: f: o
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    : I% e8 N, G. V
  9. #                           - Fixed shadow facing bug
    , L# u( b7 O) b4 @
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    # S5 R# h$ r4 X; ]
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows# M3 I" n4 v5 V5 f5 V1 V
  12. #  2013-02-22 - Version 1.7 - bug fixes
    3 z3 ]: j1 X( p  X
  13. #  2013-02-22 - Version 1.6 - added icon effect
    : {! S9 J! z. u
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    & o  F- p5 Z. |$ i3 A; T' v
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    ! g  D6 P% O! q5 G4 \
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks/ ~3 D* c5 p4 W/ N( _7 {
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)0 |# q! H5 p0 E( [
  18. #  2013-02-21 - Version 1.1 - updated flicker effect: s0 U$ u8 X( O: ]1 |6 L* [) K
  19. #  2013-02-21 - Version 1.0 - release9 o% }8 k3 ~. H2 g$ {( B
  20. #------------------------------------------------------------------------------#( }, F% G7 |8 v  y+ p2 y- @. w  W
  21. #  This script was made to provide some additional effects for characters such
    : x( j( n% B- f6 W6 F0 T4 z& L$ ?" C
  22. #  as events, followers and the player on the map.
    - ?* o- L( E; G  r$ i0 a( E
  23. #  Currently it includes:
    6 w- D. V% T3 c
  24. #  J/ W9 z; S, i; R4 O
  25. #  Shadows
    ( k) _0 Q; ]1 G% F8 I, e
  26. #  Shadows that appear under player and events in a directions depending on4 a- a, q7 Y. K0 p8 |: e# h
  27. #  a light source that you choose.6 _( _( C. D: Z: n. _+ k, b
  28. #
    # B$ X) U# k+ @; w2 g+ F1 }
  29. #  Parallax Reflect! G9 S3 w! R2 {& |
  30. #  Reflections that appear on the parallax layer for events and actors to be4 N( U* Z( }" E' ?' E3 R) c
  31. #  used for things like reflections in the water or glass floor etc. To get; {1 E# f3 r5 v
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    : |7 X- @6 ~3 [; x3 ~" m
  33. #  partially transparent.
    1 r/ G# X+ c1 B7 s/ k  N' }
  34. #6 ?7 e  Q0 v( L. {& }2 E/ Y3 b
  35. #  Parallax Mirrors
    ( i" r7 g; W0 p) u, e* B
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    % M1 Y5 W: i8 T6 Q; B8 t. @) e
  37. #  on a wall designated by a region. Both mirror and reflect effects can be' I' j4 ^; m' L3 @/ w; C
  38. #  changed so actors and events can use different charsets for their reflections5 H9 `1 t8 C+ r' @9 h$ X" r2 G
  39. #$ Z. h! U4 V3 }# J# O
  40. #------------------------------------------------------------------------------#
    * a  Y$ G9 E+ Q4 e; \
  41.   / h# `% W3 a9 P, v$ Y2 x

  42. 3 ~( w0 s: E4 D6 k& Q
  43. #------------------------------------------------------------------------------#' Y* {6 d" l% C% P% r# J5 X
  44. #  NEW - First event command as a COMMENT8 v# _9 a1 I0 d0 V( P
  45. #------------------------------------------------------------------------------#
    8 q/ n  a$ q$ w; N
  46. #  You can add a comment as the first event command on an event page to set if. {8 n/ q. }3 W# A7 c9 D" _- m( ~
  47. #  that event has an icon, shadow or reflection active. The tags to use are1 I- P4 O7 v& ]; n! Y- O
  48. #  below, all must be on the same line in the comment.! x# i! C$ @, a8 O9 ^
  49. ## a- p, s8 j( Z2 X) Q+ A/ W
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    $ O. d; J3 N8 _/ N. l
  51. # <shadow>           # set the event to display a shadow5 P! e$ X, \* m4 [; A! D/ f7 G
  52. # <reflect>          # set the event to display reflections
    ; T5 u- y6 p0 }! Q: ~
  53. #
    8 [& C8 u! P& f, n+ H& E" [
  54. #------------------------------------------------------------------------------#
    " A: A& A, r; Y: P6 a) n2 q
  55. #  EXAMPLE:
    0 X- `" \2 `2 C+ T& K
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event9 K5 ]. C2 t( u' v- I. v
  57. #------------------------------------------------------------------------------#% T$ }, ?* I% E; q8 |
  58. . c+ G1 E4 A4 J+ q( H' H
  59. 0 U0 M% E) ~- x% I" m* I
  60. #------------------------------------------------------------------------------#
    + r/ M2 y% [0 n* z5 L9 _: @
  61. #  SCRIPT CALLS:5 ]9 y/ R8 p. U) \8 j5 Z
  62. #------------------------------------------------------------------------------#
    & B' c/ l# O9 ^) k' z7 E1 A
  63. #  ~' t7 Z5 ^, _" Y9 R0 q* W- N
  64. #  char_effects(x,x,x,status)% z6 {+ R+ U3 ]6 ^( }
  65. ## C" p4 r" l/ G* D; W. y0 D( t& f/ H
  66. #------------------------------------------------------------------------------#
    . Z6 T% b5 U& r/ \) |* E% M; n
  67. #  # each effect can be true or false to enable/disable them during the game./ k' K; L! ?8 ]7 R! Q0 I" s
  68. #  # you can change multiples of effects at once, x being the effect number
    5 R5 Q, y1 B5 ]( d. ?. j: |
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons. w, c4 h' O; u1 q+ [2 q, i- K8 W' u
  70. #------------------------------------------------------------------------------#% G" x& k# p5 P! D, a* m4 T5 ]
  71. #  EXAMPLES:
    ( C2 X; f: {9 F: f* _
  72. #  char_effects(0,true)              # turn reflections on4 ]% E. r2 N9 I
  73. #  char_effects(0,2,true)            # turn reflections and mirror on  j  t7 h+ }( G$ ?6 g2 v- h) T
  74. #  char_effects(1,3,false)           # turn shadows and icons off0 f* W( ?+ m6 o
  75. #------------------------------------------------------------------------------#4 D5 [' e0 P  `$ X  _1 P
  76. #
    " q: ]( k3 k% ?7 y' c
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    9 g- c( l5 o  ?0 K, \. y# J
  78. #
    ; ~( U6 r$ Z) R! @6 a1 ~& v
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset1 H* p  K9 x. Y9 w
  80. #! `! t1 ?0 d3 |9 A
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    + |, f' ^# R; x. f7 o+ N. D, s
  82. #8 i! m# v& y; |* s8 D
  83. #------------------------------------------------------------------------------#
    ) R; B" i% t& Q( z. k# I" o5 G) j( x
  84. #  EXAMPLES:
    , p" o" f- x2 s; A9 s  Y0 T
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    ! e) R) E5 x4 m6 Z5 E: x  y
  86. #                                    # in position 2 of "Actor2" charset.
    , t* A# V0 L" G4 T0 m' k6 q9 W
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    ( z- g6 K" J) g
  88. #                                    # "Actor4" charset.' w1 q7 K' _. }8 h1 R7 o" v/ j  d
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of" i5 k$ P/ w! x' }! q
  90. #                                    # "Vehicle" charset.8 U6 C; M1 s/ f
  91. #------------------------------------------------------------------------------#( f5 _3 H3 `' `8 b% x# P
  92.   $ u, C' H) P9 }0 n$ j  q- v; C
  93. #------------------------------------------------------------------------------#: P% B8 A' x7 z( g
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS9 x% T1 ~6 V; B. _1 q5 j2 f
  95. #------------------------------------------------------------------------------#
    % z* ^. C- S, U: {& q
  96. #
    6 r; z$ g1 R( ]! b* L9 P; T
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off+ v9 }3 U! b# j' P
  98. #                          # use this to specify for mirror and reflect.
    1 e2 _* S6 v0 ^
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change% J- a; n" N, G, O
  100. #                          # to change all events use :all
    ; ]' C2 V/ ?7 Y) s+ ?
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    & R; P/ G9 ?/ b
  102. #                          # it 0 for no icon.( ]' ]- a8 o1 @' z
  103. #
    3 B+ H$ g+ E% p# C
  104. #------------------------------------------------------------------------------#
    4 N9 u" f$ I* B
  105. #  EXAMPLES:
    , Q) P$ K) k: n- [( p
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    : v3 P$ f# I0 {, e9 z
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    # w  l8 ~- F+ o% x( A3 T
  108. #  reflect(:all,true)      # Turn all event reflections ON% x3 t( N. n" ~5 i% V- I
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    * s' f4 k4 ^9 @) v" l4 S
  110. #( _) f$ U: v) d
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    . c$ K1 G2 F4 W8 B8 ?6 d
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    7 D+ P+ I2 a' g
  113. #        should use these effects sparingly and only activate them on events
    ' T# w& @5 _6 Z9 C
  114. #        that require them./ a+ h, [. L" R# n9 U
  115. #------------------------------------------------------------------------------## W4 q8 R+ Y; d
  116.   
    : K2 Y6 Q0 U; g1 V" ]$ t3 f/ {
  117. #------------------------------------------------------------------------------#' j9 y& \  y2 Z4 r4 Q
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES( Q. }# j" P" @" I9 n5 D
  119. #------------------------------------------------------------------------------#
    4 Q. Z3 U/ L9 d' P4 a
  120. #. H+ x8 ~8 A8 n# s7 Z' V9 Q6 R
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default 6 C2 o" ~' t9 Q. H
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    6 ^1 i7 U' Y& z3 Q$ n
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.$ P5 \$ U4 h- y
  124. #
    8 r8 ]6 V, s- i7 N2 e" ^
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    7 Y8 x! n+ O3 S( p! v
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    0 }* }1 l9 k, i6 ^% p! V' E
  127. #  v_icon(x,x,x,icon_id)% w& n  b7 R, p. ^+ b, {& A
  128. #) J5 Z1 y1 `0 v" a2 p( g
  129. #------------------------------------------------------------------------------#/ J! r8 R+ U  Z4 C7 J
  130.   
    " A2 I( e- U# @% K0 Q- x
  131. #------------------------------------------------------------------------------#$ f* Y3 ^6 t" [' e: ?4 T6 x; c
  132. #  SCRIPT CALLS for shadow options6 N* X: A8 e: ^+ ?( `$ ~# `
  133. #------------------------------------------------------------------------------#% C8 u" T' n2 D4 M, M$ ?
  134. #
    , ]$ `3 I' Z* j: _  D; N
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    * M  @: p3 R2 M8 M. I
  136. #                              # light source number you wish to change (for6 {9 K: M) `/ V  s
  137. #                              # more than one). These are reset on map change.
    . ]. r4 X) c# P% G- a5 `
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.7 A' y7 O' x/ c/ Y; r# V# Q6 u( L. n" w
  139. #                              # This will need to be in parallel process if you+ W8 Q2 B! l: I0 b5 h2 D* I
  140. #                              # want it to be a moving light., s* v  Q5 D6 Q9 Y3 u! W
  141. #. @* U9 o* j' i8 B' E2 `$ l
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below6 U" ~* Y2 X1 l& T
  143. #1 g6 b# Y: a% X- D5 g) f
  144. #    # intensity = opacity when standing next to the light source (255 is black)7 O7 \# l* D9 S6 @% K
  145. #    # fade = amount shadow becomes more transparent the further away you are.- y  x& \- R0 y, N2 D" H" v$ l9 j
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.( N( w0 S& e: e3 v. y+ E; D# y
  147. #' c2 k/ ?! B) F3 f4 f
  148. #------------------------------------------------------------------------------#
    9 H: S; ?2 T9 G9 k2 {& O; H
  149. #  EXAMPLE:$ \; v" b, x* z( Y1 h
  150. #  shadow_options(80,10,false)    # This is the default setting.
    * W# L3 X" l3 H: Y4 Y
  151. #------------------------------------------------------------------------------#; T6 Q- |2 J* A: {6 }* R0 R" Q
  152.   : [! y7 @3 E: c# v0 [! f
  153. #------------------------------------------------------------------------------#7 S% I+ ]: R) R9 l! m* ~5 j4 d
  154. #  SCRIPT CALLS for reflect options
    : m! D( j" I9 M) H
  155. #------------------------------------------------------------------------------#; i+ L1 r: y7 M7 C
  156. #
    " Z( O: v, K% o/ W4 p* E
  157. #  reflect_options(wave_pwr)
    2 G$ @8 d- ]# F8 I
  158. #% E6 u1 Q7 ]/ l& |4 m6 a4 e
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    5 i; Q: x$ M1 @/ A4 Z5 ]
  160. #
      |: P& i8 u! _
  161. #------------------------------------------------------------------------------#
    ; P/ h' r8 K* a; F. d8 p
  162. #  EXAMPLE:
    " X2 m, X, E$ B% d0 f$ w+ L. [5 Z
  163. #  reflect_options(1) # Turn wave power to 1
    2 i! p1 w# ?: m
  164. #------------------------------------------------------------------------------#
    $ c! C% a: |- w& Y/ I& B% x6 i
  165.   
    3 e" W7 O/ w3 n8 T
  166.   
    / }8 Q- M+ j* L5 Q; ?: E
  167. #------------------------------------------------------------------------------#
    3 I" B) n* e( C. F2 \/ d
  168. #  NOTETAG for ACTORS
    , I$ b3 k! X/ O* a
  169. #------------------------------------------------------------------------------#
    7 a; b  O9 a# e; \' K* A" z7 m
  170. #
    2 O& K' C6 N' i* {7 g/ v" g
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!). t9 N% s% ^" ^2 O; U4 K8 h  @* m6 o
  172. #0 c3 u, {( M$ f  k# j. y
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    " }+ D* y( v. }& ^
  174. #                                  # and use the character in position 'pos'
    ; M( q5 O& w0 _& _
  175. #
    % N! D2 r4 B: }5 j2 N
  176. #------------------------------------------------------------------------------#
    5 O3 Z  M$ R# Q4 R( h
  177. #  EXAMPLES:0 ^- e  u' S5 \( I3 N& ~, {
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    7 N' x' t6 F% G3 q% Y' R0 Y
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset5 y$ j7 p5 B3 B
  180. #------------------------------------------------------------------------------#
    4 I/ [* @' e# k9 N
  181.   ) N: t" P3 m* t$ M2 N
  182.   : \5 y# F9 ?' g( Y  E/ r% K/ L# F
  183. ($imported ||= {})["Galv_Character_Effects"] = true; R. ~$ H# _; i4 B3 J3 J
  184. module Galv_CEffects
    ( E0 ^& U- C: ]; s
  185.   % d- s  O3 L/ y; A9 H
  186. #------------------------------------------------------------------------------#  0 `9 s- m1 {! ], o8 N$ |
  187. #  SETUP OPTIONS0 l5 @# z5 [) }  V
  188. #------------------------------------------------------------------------------#2 S: B; x2 h. O- v* \! R4 J
  189.   
    * O+ j+ C( g, B- @* f+ ~
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    6 x7 P! B5 ?+ L) p- J
  191.                         # region on the wall you want to make reflective (and2 J- y- o& c- E8 w
  192.                         # then use tiles/mapping that make the parallax visible)& _: b+ T5 H6 m
  193.   
    ' n, Q$ m0 ]2 L% n( J; Z( C. [3 a
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    1 I; y7 K. u6 O+ j
  195.     ) b! v' w0 J% o9 a$ d! l; f% U7 ^
  196.   REFLECT_Z = -10       # Z level of reflections; l0 H8 A6 p- N! o% b: [
  197.   SHADOW_Z = 0          # Z level of shadows+ K% M, @+ y+ @
  198.   7 v  @6 ~0 |# \
  199. #------------------------------------------------------------------------------#  
    8 ^6 I( K0 h* c; f7 F8 M
  200. #  END SETUP OPTIONS/ c& n* ]6 Z# B
  201. #------------------------------------------------------------------------------#
      W( o$ `9 L$ z8 c" w) l. W
  202. end
    0 F0 C  p5 E1 Z; K" a" y
  203.   4 G) R6 B- ^, r! R4 V4 G5 q' l7 W
  204.   ; d( n! v) N  ~/ P1 A" e
  205. : z+ I# z: P- P/ @9 v* T1 Y

  206. 9 b) j9 I% O8 y! b7 ?/ X9 k/ u
  207. class Game_Map
    $ Y, j+ w0 Z0 I
  208.   def do_icons(refresh = true)) s; h6 |- r4 n$ s' i* v( G3 D
  209.     @events.values.each { |e|" ]5 E  A8 `2 n! i
  210.       next if !e.list
    8 y: I* e( |7 Q3 F+ [; @' q
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    5 ?2 ^8 u( {/ C4 \" t5 |) o6 y
  212.         e.icon = $1.to_i9 {3 c% M1 B8 H2 L
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    - u, Q" x! e" Q/ i, e2 ~
  214.       else
    2 h+ G; D! ?' _9 R7 w1 [- E
  215.         e.icon = 05 j; Z! ~6 e6 Z1 E" |6 f$ O
  216.         e.icon_offset = [0,0]
    * A$ \: b  c* d0 k$ {  D
  217.       end2 `" M0 w' M8 T$ `( D" S" }
  218.     }
    ' R. j+ U5 Y* W- h6 C6 q
  219.     SceneManager.scene.spriteset.refresh_effects if refresh' h+ k1 i$ H- h: M( h  L( X9 V
  220.   end5 O, U" [& p2 U3 b* }: Y9 w
  221.    # f0 Y# q, n" y; z! l4 I2 z
  222.    " ^# E, i" W* i' ^4 }$ H( {" v
  223.   def do_shadows(refresh = true)
    # o" D( ]# h% m& v* h
  224.     @events.values.each { |e|- I5 Q% L8 m+ j$ z
  225.       next if !e.list
    8 v! b! _$ H- s. \& I
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/+ y/ [. Q/ D  A7 z
  227.         e.shadow = true
    ) R$ Q# e+ P  q# f+ h' j6 }
  228.       else0 z' |# n. F1 L6 }6 |! w& m
  229.         e.shadow = false- Y. n3 |5 O  x9 `. d/ B6 V
  230.       end& q  m( D% u& u1 f
  231.     }
      L8 F8 o. M  y0 }0 d. o& O6 y) M' ^
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    5 W2 T) d7 X/ G# f
  233.   end
    2 \5 ~' B  @9 j, v/ w/ Y* s
  234.    
    5 V8 S6 }/ s" @+ Q
  235.   def do_reflects(refresh = true)& M- Z2 N( e3 J4 n, K3 z
  236.     @events.values.each { |e|1 y5 e6 a  O3 F! N
  237.       next if !e.list- D8 B( z# u( z5 x, v
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/! m/ {4 i0 S3 Z* n
  239.         e.reflect = true
    4 F- @- M( }: t5 r! e( D  g
  240.       else
    # |4 P; e. r7 ^- \, n, W
  241.         e.reflect = false  F  J+ }, Q, |
  242.       end4 [! e+ S; N3 C- ]4 ^) C$ J8 C  q
  243.     }
    & j% @+ n/ t5 I9 U( Q
  244.     SceneManager.scene.spriteset.refresh_effects if refresh+ u8 n- X. e% d% M) n) k
  245.   end; l" V( e% `- b5 u' d$ ?
  246.    / Y0 G- {/ w0 o& c- r9 V  G
  247.   def do_all_chareffects% c# n- Z3 Y( e  }8 U
  248.     do_icons(false)7 s4 J: ]6 k2 ]+ @
  249.     do_shadows(false)* Y1 Y7 T. u1 {& k' ^8 e6 j7 F. g
  250.     do_reflects(false); X, f+ t# i; L7 I' h0 i# ~3 c
  251.   end) @/ F3 h3 ~( z- y) V9 k$ T- T
  252.    ; U- T* A6 ?- Q& y
  253. end # Game_Map, ~1 {; D7 I) L$ S

  254. 7 b- y4 _9 u& w. H9 ~

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-2-17 01:06

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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