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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
4 z2 X; D) T) @
这个代码怎么用啊,有大神知道吗。我从国外找的。
6 D- w9 z. F, v0 Ahttp://galvs-scripts.com/2013/02/21/character-effects/. L# o( |+ u+ ?- S
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    / c5 ]  d9 W* t) o* V
  2. #  Galv's Character Effects
    # H4 M! z3 c% `# z5 T" N
  3. #------------------------------------------------------------------------------#: L+ B% g, `* k3 a' S2 [7 F
  4. #  For: RPGMAKER VX ACE$ [6 T/ @1 `- r6 X& B
  5. #  Version 2.11 b) P7 |+ \0 g6 N( s
  6. #------------------------------------------------------------------------------#
    8 G' J& I3 m! s5 G+ x( R' g7 y
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    ( x9 o4 U: u: B9 p: ]/ K0 u/ q
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
      P! j3 B- U) j% J; j1 Q' ~; u
  9. #                           - Fixed shadow facing bug
    - R2 T* g- h! t4 K/ [" G3 p0 Z
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows) P- w' m+ @3 q  \/ J
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows  P( _$ X/ ?5 }! C# h2 W; Q; w
  12. #  2013-02-22 - Version 1.7 - bug fixes8 i, e# R" y- Y+ K+ U6 Y. w. ^
  13. #  2013-02-22 - Version 1.6 - added icon effect
    , S1 b0 K. Q5 [) X# w% R
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    ) B+ h9 d  T' ~# c  o5 I! `2 \
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    % E7 u, _& t& n, j) l' J3 `
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    & }3 _: x3 H! z! {9 m
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    . {; B7 E8 d: w6 `2 T0 I
  18. #  2013-02-21 - Version 1.1 - updated flicker effect: m0 w6 [% V7 d% o) Q% C' H" ^. S
  19. #  2013-02-21 - Version 1.0 - release5 l/ A  q4 ^4 n2 b) ^
  20. #------------------------------------------------------------------------------#
    0 m! G6 c7 \6 E) [
  21. #  This script was made to provide some additional effects for characters such
    4 _5 r7 z" y- C" \5 `
  22. #  as events, followers and the player on the map.' b' p1 A. a. c9 x/ s! b
  23. #  Currently it includes:+ e8 \5 m2 v/ \1 w) `3 V' D
  24. #
    ( j0 t) F5 }7 _2 k  J8 j& }
  25. #  Shadows- q4 g1 [" c- U+ K6 V& k( `( O
  26. #  Shadows that appear under player and events in a directions depending on: B1 m$ v, a, M- e" x$ ^
  27. #  a light source that you choose.+ N$ {" X' Z( }6 A- K+ r7 T# p
  28. #
    6 U' b. t9 B1 q) J
  29. #  Parallax Reflect- o3 b) K" K" g0 u- ^& K1 O
  30. #  Reflections that appear on the parallax layer for events and actors to be
    1 t9 k2 h# n( a
  31. #  used for things like reflections in the water or glass floor etc. To get3 i1 s) c  u/ E4 x% v! H( L. o
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    % I8 W% z3 f- p- r. r5 k
  33. #  partially transparent.
    9 N" ?/ D3 C: C, y& u& S
  34. #6 o# W8 k& X5 k. U2 s& H
  35. #  Parallax Mirrors
    7 O* H1 y, X) L5 v/ i$ x
  36. #  Much like reflect but are instead actors and event are reflected in a mirror5 v$ W: w- O3 [5 M1 ?
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    2 V% L3 d, }* k
  38. #  changed so actors and events can use different charsets for their reflections
    " W/ t( N& F3 \  j4 N' \# |
  39. #! o) Q8 {8 Y7 w+ Y9 V
  40. #------------------------------------------------------------------------------#
    ; v. L& t" `& ?8 U3 r6 R
  41.   
    % E/ |/ h  _6 c$ Z6 z+ w. Y5 p; h0 N  R

  42. * n- f4 U" m+ Q/ P% ]( \+ G* L
  43. #------------------------------------------------------------------------------#, \) a$ X% M+ v! M7 ^6 T! H
  44. #  NEW - First event command as a COMMENT0 x- U: }+ F% S) w8 m8 q
  45. #------------------------------------------------------------------------------#
    7 q; F* V+ `; [$ m+ S$ Q- k  a; V
  46. #  You can add a comment as the first event command on an event page to set if
    6 ^- S9 c5 y4 ^- t5 ?
  47. #  that event has an icon, shadow or reflection active. The tags to use are! V& m5 N- W8 E
  48. #  below, all must be on the same line in the comment.
    % v9 M" f: }# s  r4 x
  49. #+ \8 J0 u$ e2 s0 d. B  p2 E6 b
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    * [1 T/ Z6 R+ S. Q+ z+ `
  51. # <shadow>           # set the event to display a shadow: X3 B1 e  v) s9 |
  52. # <reflect>          # set the event to display reflections5 ]7 l- _8 m4 w6 |2 j
  53. #) l9 e+ J8 S( S
  54. #------------------------------------------------------------------------------#9 j$ P* S' v' m5 N2 _3 q
  55. #  EXAMPLE:
    : B+ a% K: v" g7 h0 f- [1 I
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event) b0 b5 L. i( R5 D2 F3 l
  57. #------------------------------------------------------------------------------#
    4 U$ R5 g& y7 K! l5 h4 l

  58. & J* k6 n! P6 V. s+ ~0 G" x

  59. . o/ r7 a9 ~3 r
  60. #------------------------------------------------------------------------------#
    " _, K" e9 h$ T
  61. #  SCRIPT CALLS:- p7 T) r1 a4 \& }# W+ E9 n
  62. #------------------------------------------------------------------------------#
    4 E* f0 X( o# R) [' D! h) w
  63. #
    $ \) p* C1 Q- B; M& s
  64. #  char_effects(x,x,x,status)' W7 A2 G0 g: O. C6 l
  65. #
    2 V" t6 x9 t8 j' m  `. Q7 l, a
  66. #------------------------------------------------------------------------------#. ?8 Y8 `, @2 i- N8 ?
  67. #  # each effect can be true or false to enable/disable them during the game.
    & Z1 U  p0 H9 ?/ X& P- g
  68. #  # you can change multiples of effects at once, x being the effect number0 R. X/ f3 H. l# \
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    ' A2 I/ M" r! H8 {
  70. #------------------------------------------------------------------------------#, d1 L0 b: j' D# X( T8 v! {
  71. #  EXAMPLES:
    " q- G/ H  `* k* |1 S
  72. #  char_effects(0,true)              # turn reflections on8 S* @6 ~; e4 |& X1 C2 w  A2 q
  73. #  char_effects(0,2,true)            # turn reflections and mirror on0 X, F6 y/ J8 ?7 O  S
  74. #  char_effects(1,3,false)           # turn shadows and icons off) M0 O- M! }* @; H
  75. #------------------------------------------------------------------------------#6 T8 r; x, @! l! Z: J2 i
  76. #
    5 X& [9 _6 @; H# G7 _( ]5 D! A
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    . c5 y/ o# L7 g4 x1 ]4 S
  78. #5 W, L6 r* Q8 X4 U2 b. i  M1 D( h
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset, O( g0 A% o# `% q
  80. #
    % Y" @, x0 B6 p% n* P
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset) b1 L% Q+ ]$ P4 {
  82. #; m, H$ {' i6 L& m1 e" P& \1 g, ~
  83. #------------------------------------------------------------------------------#6 I# Z# {. ]8 e3 o1 n. a3 x
  84. #  EXAMPLES:! I8 y/ H; J5 o. B8 d
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite2 d: M/ S  Z! |7 J
  86. #                                    # in position 2 of "Actor2" charset.
    * \. {# `, }6 Z, |9 n
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of$ o/ y5 ^8 n  j8 C* v+ H0 V4 A
  88. #                                    # "Actor4" charset.- K( l# r( B. E9 [9 Y" V8 x
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of, d# e; R) P5 I
  90. #                                    # "Vehicle" charset.
    3 x2 H8 L: i) {6 @4 T1 U* `, n1 ]
  91. #------------------------------------------------------------------------------#
    2 i! u$ \' s. I4 h* Z& S: o( w
  92.   
    , h6 e$ i! }) h& f2 ?7 c7 y
  93. #------------------------------------------------------------------------------#* ~' ^) E% n/ a+ G6 o9 w  `0 k  U  a
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS: S, z) F8 ?: X- U* z3 A3 y  Z
  95. #------------------------------------------------------------------------------#; V1 c9 v4 I9 F6 m4 f$ H$ v
  96. #
    1 B6 N1 I" p( }: f7 U6 g: a
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    $ M$ t; p/ `: D) O. \* h
  98. #                          # use this to specify for mirror and reflect.: e2 @/ |% s2 p  m# z
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change; T' g$ A9 |- u/ ]2 Y" l
  100. #                          # to change all events use :all3 N# N8 [3 }$ ]
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make8 a  |9 e6 H2 k4 g. g
  102. #                          # it 0 for no icon.' ^) @$ s) @& I% C
  103. #
    ( R3 L5 H" l. M" c8 P  x7 B' \1 n
  104. #------------------------------------------------------------------------------#
    ; ^7 M% O* o% w7 I( J
  105. #  EXAMPLES:
    ! `/ I% O. L" j6 E
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    ' h9 L- j7 E- I- S9 C
  107. #  shadow(1,false)         # Turn event 1 shadow OFF' F, A2 _/ f% M, ?8 f  T* _
  108. #  reflect(:all,true)      # Turn all event reflections ON5 [; Z$ V3 s# Q6 }3 x  a
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear# g+ |5 m, v, N& R2 [: c& h
  110. #1 B( j1 [: K9 m6 X0 _& [& t
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    6 f, e1 y; z. [1 n$ Q' @+ ]
  112. #        a map. This is a design decision to try to keep lag to a minimum. You* `1 X$ t8 o7 g+ _& `
  113. #        should use these effects sparingly and only activate them on events
    ) H5 Y- _4 I. i* V
  114. #        that require them.8 m" [8 P, U' z" Z2 Q" [
  115. #------------------------------------------------------------------------------#
    & L# L+ u1 F/ f' M! a, G6 v
  116.   
    8 p6 `2 |& g8 Z3 V
  117. #------------------------------------------------------------------------------#
    6 V0 Z9 A! ^" m/ K* I# N
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES
    7 E+ V7 }" q1 j' f
  119. #------------------------------------------------------------------------------#" K6 y6 n+ ~2 p2 T
  120. #9 L0 {( b6 P5 E, v4 E# U  b
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default * v: V9 e; Q6 q7 x  u
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    0 I+ t$ y* u* Y
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    ' d7 k4 _, U& a, n9 @/ k  q
  124. #
    $ |; \6 L3 a6 P1 T; ]8 d' H
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    - {: |  w5 S' O6 i" j/ y5 G0 o* P6 k1 C
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.3 h& Q  P* c0 s& \/ |: i0 D
  127. #  v_icon(x,x,x,icon_id): q. f/ g$ }* l
  128. #4 D! O1 v6 N  v7 f
  129. #------------------------------------------------------------------------------#4 r9 |( Z: t  D( N8 ]
  130.   
    3 s# P+ u8 `1 F* }( z
  131. #------------------------------------------------------------------------------#+ C; Z( n: M% [; }, R4 @. w% e) V( O
  132. #  SCRIPT CALLS for shadow options
      p: `2 B' [6 e) o2 x1 i
  133. #------------------------------------------------------------------------------#3 I! e0 F. e  S* |
  134. #
    4 }9 c0 G  u9 s  n& d, K" X
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    ! x& k8 ~; _% A7 ]8 l' j: J% h. J
  136. #                              # light source number you wish to change (for
    + q4 a, q* G0 F. R6 X) p
  137. #                              # more than one). These are reset on map change.. K% |7 G& o" j2 D
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.; N  }/ v9 c1 H  {
  139. #                              # This will need to be in parallel process if you/ u( U% ~: y' r/ T7 ^
  140. #                              # want it to be a moving light.
    * h, i- S. {9 U
  141. #2 z; B* U, s4 B% \
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    + P# c$ N% Q8 N( }9 C1 O) k
  143. #
    ) {, U% W! T* k0 ]. y: ^" ]6 T# j, w0 M
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    , d$ v; P5 h1 k3 z) g- i
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    8 W6 Q0 Y& P$ ?) r. E. i
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    ( T9 G' C+ y/ a/ D3 v
  147. #
    & K! b% l4 J0 s  |/ @* _9 u
  148. #------------------------------------------------------------------------------#
    8 s* Q2 @! y7 T" U! A
  149. #  EXAMPLE:  }$ j# }% I, r0 k5 o
  150. #  shadow_options(80,10,false)    # This is the default setting.
    . t/ A; b% b' O8 F% w7 Q
  151. #------------------------------------------------------------------------------#
    4 F2 f+ ]+ D# \" q; T
  152.   
    5 P7 U' C# |% T
  153. #------------------------------------------------------------------------------#* u: v! }2 }2 k, t) L
  154. #  SCRIPT CALLS for reflect options. t. i9 M, b4 F  `; ~
  155. #------------------------------------------------------------------------------#
    & a- i% |5 U0 g# w2 |
  156. #
    % K$ K& T2 D0 [1 c4 u5 ]
  157. #  reflect_options(wave_pwr) / J" k' Z* V) |) k8 m- G
  158. #2 Z2 J$ a+ }9 m1 ^6 w6 p
  159. #    # wave_pwr = how strong the wave movement is. 0 is off0 h1 Q0 |3 ^# ^6 _  a0 Y
  160. #! a" u, y" {) h. [5 u! q; D, i
  161. #------------------------------------------------------------------------------#8 o% g2 S3 ]* a% b# D5 W- K6 b
  162. #  EXAMPLE:2 |2 H+ a* ~) b
  163. #  reflect_options(1) # Turn wave power to 1
      {2 c. t  F6 m" g/ J, j; l
  164. #------------------------------------------------------------------------------#. X8 V& a. S: O( H3 U5 Y
  165.   
    , d( {0 b- R4 N+ O: ?
  166.   
    . m6 S1 D* Z% H2 t" g7 q* d# p
  167. #------------------------------------------------------------------------------#. ^9 l( k3 D& w6 B% e) [2 D0 j8 j
  168. #  NOTETAG for ACTORS" L) h* ?7 c+ \4 E! A* d
  169. #------------------------------------------------------------------------------#
    5 _3 G$ t7 \+ M7 ]; c2 [) b3 O: \
  170. #
    " V" t  J  G; y* u& A! t' `. t
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    6 X8 Z4 g$ o: ^0 v/ k5 h$ c
  172. #
    + k6 z- o) c; k7 w7 U6 Z
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    ) M& b2 _6 G: y% L8 M! V7 f- N+ X
  174. #                                  # and use the character in position 'pos'4 k( L3 P6 @: n$ t
  175. #0 d0 A9 G( u/ {2 v
  176. #------------------------------------------------------------------------------#
      m. l' q$ H! F" D8 S6 o
  177. #  EXAMPLES:
    * j7 i# U2 j5 D  j
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    - \8 P. B! B. w( `$ C/ Y: @
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    ! t, ^/ \- _, q/ i
  180. #------------------------------------------------------------------------------#
    2 [% |- _9 Y% c6 O4 s! g7 c
  181.   : v' P6 q7 V# ]* z  j7 m0 J5 w' u
  182.   2 ?. B: ~3 u# I; Y
  183. ($imported ||= {})["Galv_Character_Effects"] = true+ j+ N3 b" i3 l) [% V; ?
  184. module Galv_CEffects; {4 W% N# p$ w
  185.   
    7 o3 w2 ?' O) Z' [0 h/ ~1 w
  186. #------------------------------------------------------------------------------#  
    . w3 F% ]1 G, j
  187. #  SETUP OPTIONS
    5 j5 ~( S* O1 H& I% x( N, m' M
  188. #------------------------------------------------------------------------------#- I- M6 E; M( s, @: A
  189.   
    / u- Q' S9 n1 u) D! A9 y3 D, X
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    $ |1 k8 n. I* \
  191.                         # region on the wall you want to make reflective (and
    / y% }4 x* O9 {+ _6 n- Q
  192.                         # then use tiles/mapping that make the parallax visible)
    1 K8 @& O$ y4 o. p' q9 ^, h
  193.   
    ( w+ _' Q( X9 @- w& i' [) I; l, d
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters5 R9 x; c7 ^# B# x2 x$ _* U
  195.     ' b+ L$ s1 ?& N3 m4 q7 S
  196.   REFLECT_Z = -10       # Z level of reflections
    3 B/ `& J% r3 X: b
  197.   SHADOW_Z = 0          # Z level of shadows3 b! e0 q+ k. f% H
  198.   
    4 @9 q9 |: g7 g6 J" a% h' u5 ?
  199. #------------------------------------------------------------------------------#  ; O8 a2 N- y( y4 ~8 {  e; M
  200. #  END SETUP OPTIONS
      C& _- U$ l7 U; \& _
  201. #------------------------------------------------------------------------------#
    - y  c0 c! j* g6 Y* c6 R& D
  202. end: p7 A* M6 A: O0 Y  o: t
  203.   
    ) U' G! f+ \2 ~9 G' }+ }
  204.   
    5 F0 r) K% T$ Y* O. S

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2024-11-22 19:21

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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