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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
2 D# B# }. f1 g# M% E
这个代码怎么用啊,有大神知道吗。我从国外找的。2 z- N! M" A+ W  c' g
http://galvs-scripts.com/2013/02/21/character-effects/" V4 ]( y- n2 ~  d5 L( l% T& M( P
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    ( }4 I4 `, h1 L; [# W0 M# a
  2. #  Galv's Character Effects
      t, ~/ Z* e2 M
  3. #------------------------------------------------------------------------------#
    / H3 @0 r! L. ]4 E! I$ e, Y
  4. #  For: RPGMAKER VX ACE
    : R: f4 e6 t4 Z
  5. #  Version 2.11 B  |& \6 w1 l1 s
  6. #------------------------------------------------------------------------------#$ ~! z% K) ^( k$ l
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows- j. u# G1 O9 i
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    ( `0 i4 n: ?$ C& R. R( Y
  9. #                           - Fixed shadow facing bug$ Y& K# }* s6 y1 F# |
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows8 a- J+ Q; Y7 g: u
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows3 V5 X+ k7 ]0 e' b, ?) ^9 O
  12. #  2013-02-22 - Version 1.7 - bug fixes
    . O8 M3 l, z' u/ [8 Q" Q1 ?+ B) Z
  13. #  2013-02-22 - Version 1.6 - added icon effect8 X8 h8 A' K# d- E2 {! n
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    , t: b8 x* f8 _5 ?" t
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    7 ~) }! K8 M$ [% O# T9 z
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks$ n, q" y4 Y+ k9 e- A
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)/ j6 J; q  F7 T9 k4 o
  18. #  2013-02-21 - Version 1.1 - updated flicker effect# E; M2 r, Z; K) Y
  19. #  2013-02-21 - Version 1.0 - release
    ) \- L, N4 A+ a7 [3 L% ^
  20. #------------------------------------------------------------------------------#! N8 P$ V; W' F
  21. #  This script was made to provide some additional effects for characters such
      r5 X. l" d# a. n, O" p
  22. #  as events, followers and the player on the map.) P( b, t& A0 ?2 x6 J1 y( q
  23. #  Currently it includes:
    / m1 U, l: J- \& W
  24. #
    3 T9 f3 }2 L1 M. c  H* o5 v
  25. #  Shadows
    " T) z6 u9 m# y$ A1 L  T
  26. #  Shadows that appear under player and events in a directions depending on
    ! Z7 I9 @  B& U1 F
  27. #  a light source that you choose.2 d% ]0 H2 S+ s; D7 h
  28. #
    7 y. p8 Z  i* X" R' X& C
  29. #  Parallax Reflect
    % D/ J& x4 j5 g1 z  |* w  [
  30. #  Reflections that appear on the parallax layer for events and actors to be" f- H. o! f  T% b# ~' k
  31. #  used for things like reflections in the water or glass floor etc. To get( f$ Z1 u9 F1 K8 Q2 B& S3 B' S* P
  32. #  effects like the demo, you need to edit the charset graphic to make the water; N0 @% `  E3 f" l. {; P; ]
  33. #  partially transparent.
    5 a+ l$ T' S$ [% y( o% D
  34. #
    / f/ S- }: Q+ O4 }# }
  35. #  Parallax Mirrors+ `6 r3 g/ O" H& |
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    ) d3 [# c8 Q& ~6 D' I6 A/ Q
  37. #  on a wall designated by a region. Both mirror and reflect effects can be+ l3 C& {( y8 a: K" P% V
  38. #  changed so actors and events can use different charsets for their reflections
    & f8 S9 _' Q5 i9 r7 z; `5 M: ~
  39. #
    5 V$ N* z5 @, T+ T6 R' @
  40. #------------------------------------------------------------------------------#
    " I5 j1 i# h% E2 u8 A
  41.   * m2 _* N5 S) _( l% v7 U; y8 T9 `
  42. 2 B8 w8 x6 F: w- b& r
  43. #------------------------------------------------------------------------------#
    & p$ E% s, D! A+ L
  44. #  NEW - First event command as a COMMENT
    1 e: K" ?# p2 Z- p. [2 {/ J
  45. #------------------------------------------------------------------------------#! n$ w* T8 i, n. {" t
  46. #  You can add a comment as the first event command on an event page to set if$ p2 d: ~, U7 N4 w) V; T8 |2 T
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    7 v5 {4 p: {$ J( s& B8 L
  48. #  below, all must be on the same line in the comment.
    ; N" ?$ x" E: W2 |6 K# [+ V
  49. ## H( |! t- ?# I% M$ U) `
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)7 D2 v8 I  x* ]/ O
  51. # <shadow>           # set the event to display a shadow
    9 t! q% y) [1 Y1 i+ |
  52. # <reflect>          # set the event to display reflections: I7 s: g3 N) v0 c: f7 M0 }; |
  53. #5 j/ B4 h# Y8 n+ n+ X( ^3 U
  54. #------------------------------------------------------------------------------#) a" _6 f  [0 B+ D: q& `& ~0 D: e: U
  55. #  EXAMPLE:! F5 N6 ]! P) H6 h: Y8 a# z) F" j
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event) }/ c8 h6 G! w( G
  57. #------------------------------------------------------------------------------#4 @  h% p! J- w. D* B5 V
  58. ) U  ^; y' Q2 P1 d* @: l2 }2 F' b

  59. 6 x3 E% M6 H* x4 b8 t! A9 Q7 j. [
  60. #------------------------------------------------------------------------------#$ y+ M9 `8 Q* Y. D) |, n7 E
  61. #  SCRIPT CALLS:8 A8 R! \4 Q; E9 P
  62. #------------------------------------------------------------------------------#
    0 Q+ ~- ^* K) k6 m/ E+ F" T
  63. #8 O9 r: _7 z: C4 R
  64. #  char_effects(x,x,x,status)1 R0 N+ J  ]/ t+ g( Y
  65. #4 \1 v. [) a; Q: m' P! [' R
  66. #------------------------------------------------------------------------------#
    ; g( b5 L9 H" F0 q! a. @1 g, J
  67. #  # each effect can be true or false to enable/disable them during the game.
    $ v" S7 L% t3 X7 K3 F
  68. #  # you can change multiples of effects at once, x being the effect number2 J2 j5 o) F  g( |
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons. l  ]+ m, M: N+ _+ B6 f: J
  70. #------------------------------------------------------------------------------#
    ( S& Q( R' b  q* q0 Y
  71. #  EXAMPLES:
    0 T: Q; R7 T# U5 r1 f0 H
  72. #  char_effects(0,true)              # turn reflections on2 n! R8 A9 d, P8 Q- Q
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    ' x& D5 a; W0 F! O! j
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    ! @8 O, q- v# W% R# o3 X
  75. #------------------------------------------------------------------------------#; \/ i$ J. p8 k" p5 G3 h' Q
  76. #
    / \6 c; |1 q4 `2 w2 S
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset) @, h8 |2 w1 P3 ^
  78. #
    ! z, M7 v- t. `. ]. S
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset  t' P. C' \- H- r: I! T
  80. #/ A  b$ c( @1 a
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    , o# c; I5 l0 n; @/ G
  82. #
    , G5 r3 i/ p+ ?- h; T  F2 o
  83. #------------------------------------------------------------------------------#
    ( _3 j6 u3 J; i+ C6 W! H8 g
  84. #  EXAMPLES:
    ' F8 Z) x+ s+ [
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    , u& j  v4 o0 {
  86. #                                    # in position 2 of "Actor2" charset.
    . H  x. @9 E- F. Z* M# Q
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of6 L1 S; y: P+ d8 l4 v: k
  88. #                                    # "Actor4" charset.
    # }* E$ ~) G* S( ~% m
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    & x6 c% d# `8 d/ j7 I
  90. #                                    # "Vehicle" charset.5 y3 C' L  U6 w/ e$ T0 v9 M! b, p
  91. #------------------------------------------------------------------------------#, d; V/ ?# o7 @5 \! G! t( T1 R: o
  92.   , H# X- g' }1 f  N5 _# O: e# n
  93. #------------------------------------------------------------------------------#
    - G* |  z$ _, c3 ~; K) A
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    $ {% ^# F9 v% k* w  o
  95. #------------------------------------------------------------------------------#: W; c# \3 R) t  C! O  y
  96. #$ i3 [$ {: G' E# X8 f% I9 B
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    " |; \: z: I" k$ Z0 c
  98. #                          # use this to specify for mirror and reflect.
    . p  m1 v2 {5 y4 n5 u( K
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change0 f4 ^4 X" c- N' o
  100. #                          # to change all events use :all4 H5 {) r0 Q7 E0 ^+ j4 J
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    " T, y/ }* H5 g9 M. a
  102. #                          # it 0 for no icon.
    + m: c2 u( D- k( |: }7 ~' h3 l
  103. #
    0 ~! L/ s  d7 A' ?
  104. #------------------------------------------------------------------------------#
    9 S7 _5 c" e% y. s
  105. #  EXAMPLES:
    9 J8 L# z' E* d9 }; _* x8 u
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON1 C* [" Y7 U; @* E0 m7 j5 D
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    ) v3 r9 @9 S& [
  108. #  reflect(:all,true)      # Turn all event reflections ON
    * r  u7 n; q; d0 n" \; ?
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    - K/ O# ^' o4 J5 c+ y( l" u( h4 f
  110. #
    ( Z+ b" o$ J0 g; e) A6 z
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    * N. x) b( N0 _3 `0 c6 V. v
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    5 O+ |& ^! d% [5 j0 I
  113. #        should use these effects sparingly and only activate them on events' R9 R- k, P( D$ ~# N
  114. #        that require them.
    6 Y1 V9 w) N! Z! U
  115. #------------------------------------------------------------------------------#
    3 ?6 Z5 \( ]7 A; L% N$ k
  116.   
    / N( v# e; `8 y! V
  117. #------------------------------------------------------------------------------#
    ; M5 q! x5 u& v0 o# r
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES6 [- k: x, L  e1 B
  119. #------------------------------------------------------------------------------#
    0 ~: j" Y* K9 X; ~) L* [2 U
  120. #1 c% W2 x: q4 u# M' V
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    0 _9 C, K- c3 `  H" ~
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off # u. `5 V* k4 r- V; }% ~
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    7 q% V: x0 j" P$ A
  124. #
    ' g  r, A( Y0 D! `; r' b0 l
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects9 \* X) t$ V. A, D0 y" U
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    3 B. P) L$ y( o9 v
  127. #  v_icon(x,x,x,icon_id)
    . }6 u+ E; }9 U3 @+ U3 w
  128. #
    3 Y# c" x3 [" Y1 S: J# s( c
  129. #------------------------------------------------------------------------------#
    ( H* k$ r7 O2 r* [; o  x
  130.   6 J3 r" [' L9 D7 o
  131. #------------------------------------------------------------------------------#9 Q' j7 C0 l9 o. G( C& P2 X6 Z
  132. #  SCRIPT CALLS for shadow options
    6 p$ O4 a) a* i( h# B  ]- E& N
  133. #------------------------------------------------------------------------------#& C9 Q' ~: z: m& B0 P1 n
  134. #3 a$ B+ ^) s( {% K6 M* C
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    1 @, m8 m, `* Q
  136. #                              # light source number you wish to change (for
    + q9 F% K. j  E  \/ l* }+ t
  137. #                              # more than one). These are reset on map change.
    ' e- u' c4 y4 h
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    4 M  G$ p+ K  B+ C: z6 Q( m
  139. #                              # This will need to be in parallel process if you% _' V( _  d. M* H3 `! h1 ?
  140. #                              # want it to be a moving light.) n% p$ y, k; m0 B& I3 Q) H$ P
  141. #
    $ p  A* p2 B- A3 |* c! {) _% G
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    & g' }, Z) {" w' Q
  143. #9 b1 |. p0 h6 \) N8 w
  144. #    # intensity = opacity when standing next to the light source (255 is black)# ^! s& J! c% k; P
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    * d) C  p$ \7 u$ H& d. Q
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    ; }! F+ o* b8 y
  147. #; z  H' }7 L7 M
  148. #------------------------------------------------------------------------------#( e4 E$ B2 O2 e
  149. #  EXAMPLE:0 w4 ^; I  g& X, K  @& p- n6 i) _
  150. #  shadow_options(80,10,false)    # This is the default setting.! F' O( t. b4 P1 B
  151. #------------------------------------------------------------------------------#
    0 _3 |6 z9 v& M3 ~- P1 r! N
  152.   9 I; {$ p2 E  g& V2 h: |) `3 _0 Q4 ?
  153. #------------------------------------------------------------------------------#
    + N& ?# w  _  O, P$ \+ F9 y: }
  154. #  SCRIPT CALLS for reflect options2 C- _: a) G  S7 v5 X
  155. #------------------------------------------------------------------------------#
    2 s  C, ?8 m% C  l& t5 V
  156. #
    : V5 k2 o0 D) X/ C! \* c
  157. #  reflect_options(wave_pwr)
    4 F9 `! V. a: ]. W& P& ?8 d6 Q9 @
  158. #
    - W) ~  E  o  z1 `  \9 n/ T
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    1 R0 D) W+ L2 B
  160. #& I  K8 z, w: n! L; a! D0 \
  161. #------------------------------------------------------------------------------#( r/ Z) t- }# x& G, _! y" q
  162. #  EXAMPLE:
    $ x, [: K: d' c
  163. #  reflect_options(1) # Turn wave power to 14 W. D' S  S0 v1 |9 W' c# L- V8 }
  164. #------------------------------------------------------------------------------#! a7 B& a0 n1 A* R4 C' @* k
  165.   " V8 ?! G- V7 M( W. S* ^7 c8 v, H
  166.   , p9 L$ Z$ U0 D6 d7 o
  167. #------------------------------------------------------------------------------#
    8 s/ p. s9 f5 e9 N
  168. #  NOTETAG for ACTORS
    7 L1 L7 K* V! P3 N
  169. #------------------------------------------------------------------------------#
    0 F" ?/ i3 g8 y( t+ a$ u1 ]1 V* b
  170. #  A: B$ g4 X, ?7 Z1 V
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    , \, H3 q% Z$ f! u. k. _
  172. #
    , C) t. [% ?8 n' Z* j
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections1 c1 M. q- ~; v5 W5 x, Z/ K0 t$ D
  174. #                                  # and use the character in position 'pos'
    ) Y1 g) \1 U. _
  175. #' V7 g7 D6 v+ B
  176. #------------------------------------------------------------------------------#
    * x7 n1 @6 [% \7 J
  177. #  EXAMPLES:8 x; y6 B+ U+ A9 E& F" H1 l
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    ( C8 S8 h, X: e, P  j. T
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    ) o5 Y0 J2 f+ `
  180. #------------------------------------------------------------------------------#
    9 s! I3 C0 J( i; b5 t( T' j
  181.   
    1 ~; z* Z" I7 ~& I) C9 D3 x: L) M
  182.   0 u1 _6 j8 K$ r' Z4 R4 T7 k
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    ( |6 g2 j* w5 r3 [! w$ y; k
  184. module Galv_CEffects+ y5 N( D( a% i- Y( K& h; h
  185.   
    * W8 {5 x' S2 p- A/ a
  186. #------------------------------------------------------------------------------#  ( W% q$ X- J7 m% [# k& Q2 F3 O  O* [
  187. #  SETUP OPTIONS
    $ H0 V0 ^/ u/ i8 l. J
  188. #------------------------------------------------------------------------------#
    ( V$ U% d/ x/ u2 \
  189.   
    * `" Q' j3 O/ A7 k, X; @
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    , M1 P# u" J/ T' b6 ]. p  r6 b4 H
  191.                         # region on the wall you want to make reflective (and) k+ k# V3 I  s5 D% u- p8 Z
  192.                         # then use tiles/mapping that make the parallax visible)
    + l% N4 {2 w( N* t3 Q' @8 x0 n
  193.   
    & J% g1 s& M- ~& k) o2 O. y% [
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    ) D  l4 o& U% r$ C2 i- \+ g2 [
  195.    
      u/ G0 g. z- P& _! ~& V. ]
  196.   REFLECT_Z = -10       # Z level of reflections
    $ M, T, |( S' x4 N8 p2 j) V7 k5 ]
  197.   SHADOW_Z = 0          # Z level of shadows
    8 `. x# G3 E) d
  198.   ; H7 G! @  ?+ M1 j
  199. #------------------------------------------------------------------------------#  
    5 C; e& u2 Y) H' @
  200. #  END SETUP OPTIONS  `+ E. N" M) `0 X6 }6 @# h
  201. #------------------------------------------------------------------------------#
    1 P1 V3 l) n; o7 S3 A
  202. end! F* q5 A$ D- x( D0 i, J2 K
  203.   ' B* ^1 F3 h5 b* y3 S
  204.   
    . F1 ?) [% a; W, W$ ?0 J& \0 i# C
  205. & |1 c- i2 W* ]( Z
  206. 7 Q) \) X% Y' c9 x3 g
  207. class Game_Map/ a1 R; J# `" F3 G' X4 N( k* Z
  208.   def do_icons(refresh = true)
    $ B8 M. q( {1 ]1 f
  209.     @events.values.each { |e|
    ( s; \3 \( D' i
  210.       next if !e.list) e0 q9 \9 k* S
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/+ H; A% o  V/ _! i
  212.         e.icon = $1.to_i  u: ~2 W& B3 S6 E9 A5 G
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    % Q+ C+ T+ @: l3 c
  214.       else, r2 L3 F2 B! S3 N, x
  215.         e.icon = 0
    6 M4 ~  \7 D+ G# U$ S
  216.         e.icon_offset = [0,0]1 y& }* W8 O/ \& i" Q
  217.       end
    - [* _! a' V' W+ C
  218.     }
    7 {8 ]2 y8 ^- z9 A0 i4 s  Z0 v
  219.     SceneManager.scene.spriteset.refresh_effects if refresh0 E  x0 G- z' y! U
  220.   end4 X, }3 G- N/ t% D
  221.    . G/ f5 E$ D9 C" X
  222.    
    ! y( p+ _# q# g& _
  223.   def do_shadows(refresh = true)
    2 R& S* v: a- W% K! y+ ?
  224.     @events.values.each { |e|8 ?: h# I, s! z( a6 X2 k% u- D  ~
  225.       next if !e.list; j  r& f: q3 h* ^7 }! O  b" ]$ J
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/( e* U$ @0 j4 i5 P( |0 ~7 [- I7 u
  227.         e.shadow = true
    . [% Y. u4 s1 N/ ~2 v3 |
  228.       else! J5 ]3 g6 b4 p5 d, G0 @
  229.         e.shadow = false
    8 Q1 E% W) s* e1 X3 j
  230.       end
    5 @/ _9 v0 D/ B' ~: e3 C5 H7 d
  231.     }
    7 j: _6 L- O; l$ P4 F
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    $ \6 w- K: M! v* z( H: e- j
  233.   end* Z/ ]( I7 t: \1 Y$ d
  234.    
    ! W+ E6 y0 U$ s  l
  235.   def do_reflects(refresh = true)
    7 F7 z9 E  F! R6 @9 t
  236.     @events.values.each { |e|# l- \- h/ g3 X: Y* j2 ?
  237.       next if !e.list! T0 t! R+ X3 H% U
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    1 X! R9 q5 R+ @" K3 s  B  C+ ?5 N
  239.         e.reflect = true
    # |8 M# t$ p& D4 p+ H# T+ h
  240.       else
    / e) D: N7 `* t2 Y( i+ p
  241.         e.reflect = false
      d1 U6 U6 H$ N' x) E/ M4 {9 ^
  242.       end5 S* G$ i- i' u" u4 r
  243.     }
    & |2 O. E4 Y. [% f, t( c9 S  @7 ?3 d
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    ; Z' I2 {6 u2 d2 P
  245.   end
    . u5 e/ c! r% V+ X( J; t# U7 U# N. {
  246.    
    0 O1 O: \9 r. z/ V) q/ q
  247.   def do_all_chareffects) S4 K  v3 T( }
  248.     do_icons(false)5 z" U2 I: F) c8 _! J$ Z  W: |. i
  249.     do_shadows(false)  U2 d3 q- G$ O6 k
  250.     do_reflects(false)' {% }  h% x5 h2 E3 R
  251.   end
    ; w# R) G& K% ?5 t2 P  G8 Y# N6 m
  252.    % F' N* L, W5 R& h, ^9 ]. `5 v
  253. end # Game_Map
    5 ^( P+ ?. Q% l  b+ D1 R. I! o

  254. " m4 [; Q' u; E: X! q2 h
  255. / N. j# g! A6 P3 v6 A1 a! @

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-10-28 09:26

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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