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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

. T( O/ p5 e7 U: \* `0 p这个代码怎么用啊,有大神知道吗。我从国外找的。7 n: f" H1 d/ g* ]6 T8 x- b/ H
http://galvs-scripts.com/2013/02/21/character-effects/* g, c" M! j9 ]' ?+ C$ T
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
3
 楼主| 发表于 2014-6-25 11:35:49 | 只看该作者
记得口袋妖怪的池塘是有倒影的
回复 支持 反对

使用道具 举报

梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#
    5 H& {! \. Q) M" u6 s8 s7 r
  2. #  Galv's Character Effects
    ( j% g* d0 T- \, D* Z; r6 m
  3. #------------------------------------------------------------------------------#1 `0 |& b. {  {' D
  4. #  For: RPGMAKER VX ACE
    $ U& y( F2 n& V$ J' o4 J
  5. #  Version 2.1
    ' G# f+ W: q2 W0 @6 Q& m
  6. #------------------------------------------------------------------------------#4 x; Z4 u5 h* v
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    & _8 D' a/ s" q* {  i
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    0 Y: E5 ]0 `* X
  9. #                           - Fixed shadow facing bug
    * Q9 A" c# [+ W& b% a
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    7 W+ M4 y6 X5 F6 e) z9 v# P3 c0 q
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    3 j  o" R  n- L* }
  12. #  2013-02-22 - Version 1.7 - bug fixes
    : K8 f7 z2 g( ^9 r& H
  13. #  2013-02-22 - Version 1.6 - added icon effect
    - F: [4 }. b4 ?5 f9 b
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    4 p/ R! g4 U& @0 e; f. g0 H/ E4 F7 O
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles. K2 s5 c6 i0 i" g/ \5 D
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks9 U0 c! F" @# `. V1 ^* N9 a
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    # m9 g& S+ }1 l  O
  18. #  2013-02-21 - Version 1.1 - updated flicker effect$ C8 a2 ?: w1 s# [2 \# y
  19. #  2013-02-21 - Version 1.0 - release9 r% `3 J- h1 I8 n, a1 p" I9 A
  20. #------------------------------------------------------------------------------#
    ' t7 n* R2 k: w0 x# i5 k* z
  21. #  This script was made to provide some additional effects for characters such
    ! a2 o1 l. q2 t  H8 {3 n: |( v
  22. #  as events, followers and the player on the map.2 }$ ~, w8 x! s' \. N- _) u5 _
  23. #  Currently it includes:6 E7 p" n& I; R1 r+ I3 b0 \
  24. #2 X2 O( z8 c3 ~' |
  25. #  Shadows
    0 x  C) F! q! I9 x  B
  26. #  Shadows that appear under player and events in a directions depending on
    ( n) |7 x. X4 F/ x
  27. #  a light source that you choose.
    . t# v5 K! @% h! \
  28. #5 r% {' V/ n% T1 K
  29. #  Parallax Reflect) d# C% K7 e3 j" Q9 Q6 i
  30. #  Reflections that appear on the parallax layer for events and actors to be
    $ P1 t* g+ ^" a" Q! H
  31. #  used for things like reflections in the water or glass floor etc. To get
    , O5 L5 d& @) R. }+ Q; N1 d  i
  32. #  effects like the demo, you need to edit the charset graphic to make the water5 l; x" A& s: h2 }& N$ t+ _; T
  33. #  partially transparent.
    ! D1 g6 p( m% V  _7 _$ |
  34. #
    4 J2 y5 p$ m' J  f. ~& A
  35. #  Parallax Mirrors
    8 A# S# z+ A2 F: ^* G9 p
  36. #  Much like reflect but are instead actors and event are reflected in a mirror, K3 x8 j( l3 {: m
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    ; ]$ m( ?5 O8 u+ l5 W5 j/ \- F
  38. #  changed so actors and events can use different charsets for their reflections
    . w$ w9 k- k- E! U
  39. #
    9 f1 \7 n7 a! J& a1 ]
  40. #------------------------------------------------------------------------------#
    ( c4 j; D  @/ y/ O; V
  41.   
    4 X& I% x; V4 L' i8 z, |9 Z
  42. & c; e% |3 @3 E, _
  43. #------------------------------------------------------------------------------#
    , K5 o# H2 L6 X; f& c- r
  44. #  NEW - First event command as a COMMENT
    1 m: d% d* S& N) x
  45. #------------------------------------------------------------------------------#( O3 F+ G$ ?8 z  D( o
  46. #  You can add a comment as the first event command on an event page to set if
    - J: d8 I( @9 Q. j
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    6 ?+ T' j7 q% L: w7 q8 h2 T
  48. #  below, all must be on the same line in the comment.
    - I! L( n9 J  [$ x
  49. #
    2 V2 H# m# |, E; o, L" o
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)2 p% a* Z8 Q5 `3 E( `% K
  51. # <shadow>           # set the event to display a shadow8 N) F) |& i7 l* ~
  52. # <reflect>          # set the event to display reflections
    $ e# {8 x; N2 h1 }, I
  53. #
    3 m8 }8 R! J) W5 _: p
  54. #------------------------------------------------------------------------------#2 e4 `7 @; V* y& U$ i
  55. #  EXAMPLE:
    5 B+ o9 s  D9 _% h0 P
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event5 G+ P5 b; e2 h
  57. #------------------------------------------------------------------------------#
    5 X- X7 k6 O, d+ [3 I$ U: k
  58. ! m  {. f; c+ |% ], R) }4 y
  59. ! k; p" C) R; `( Y
  60. #------------------------------------------------------------------------------#
    - Y7 s0 z5 a  ~) S% e
  61. #  SCRIPT CALLS:; `! c8 a9 ]& m3 [% w, }. e8 h/ \
  62. #------------------------------------------------------------------------------#4 c/ e. M( Z3 O! d
  63. #7 D2 E9 c  L/ b& N6 F0 @8 f
  64. #  char_effects(x,x,x,status). O1 }5 @8 X: Z& q) w9 Y" z
  65. #1 b6 }4 E5 r+ Y9 ^5 A' J. {
  66. #------------------------------------------------------------------------------#
    * T- l3 O- b+ v9 w3 E* ?9 E2 _, q
  67. #  # each effect can be true or false to enable/disable them during the game.
    ; `/ t" l3 Q+ r  V0 a& @
  68. #  # you can change multiples of effects at once, x being the effect number
    + P. |% L! i% H" I+ ^8 V8 I# Q$ `0 x
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    5 C; M/ m& L5 s" h6 A% z
  70. #------------------------------------------------------------------------------#
    & T4 T  L3 D1 U: M0 G. e+ t. x; A
  71. #  EXAMPLES:
    3 {( m: N$ z# R: ?
  72. #  char_effects(0,true)              # turn reflections on
    $ P( D) K  F+ p$ O
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    ) r' d: G1 f4 r5 W
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    ( G5 g" H+ ~( C4 C8 k
  75. #------------------------------------------------------------------------------#" h6 [, x: D' A$ a+ U3 u- x
  76. #
    8 a5 S' F  }+ }1 F! o- R: d4 ~
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    ! s- q' F1 y; Z
  78. #* _3 N4 L. d* h' J4 w
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset9 j( D- e! d' y# Q1 R: ~& F& P
  80. #& D. d3 @% M" q3 A: F6 D2 W! `
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset3 A7 h4 r& f- o  q
  82. #
    / \! M' M. c% l& k
  83. #------------------------------------------------------------------------------#
    & R4 f3 s0 g0 j4 s
  84. #  EXAMPLES:7 Y7 w& N. t2 O7 v( O5 ?
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite0 ~6 V8 A& S) f$ l6 Y' r! Z1 B
  86. #                                    # in position 2 of "Actor2" charset.+ }" J2 l5 l9 W
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of# z: e% M! P/ [  }- G. h
  88. #                                    # "Actor4" charset.
    $ V! V6 G7 m; z* J+ v5 ~
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of0 x* I) h$ D, O+ `2 H; x
  90. #                                    # "Vehicle" charset.
    ) T: R; z! O9 P9 p0 L3 W  a. A
  91. #------------------------------------------------------------------------------#0 Z1 F& D9 Y- ?& x3 [# [' P
  92.   
    1 a& k0 S0 T" l& E
  93. #------------------------------------------------------------------------------#% f) E, |2 f( l% `0 {% m7 G
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    9 `) E: [$ i+ y: q1 C+ R
  95. #------------------------------------------------------------------------------#
    ' c0 f2 V& K) S5 v+ t0 b
  96. #
    - A* z4 I+ D5 r* |0 V
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    " g) Q" h. g4 l
  98. #                          # use this to specify for mirror and reflect.
    + b0 d2 Y5 J6 Y: Y8 f% K
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    3 c, ^- q/ K* d( y, W
  100. #                          # to change all events use :all
    $ S1 F3 C4 s! H7 Z+ O
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    8 ]  S3 V) @' `& @0 U- s& i
  102. #                          # it 0 for no icon.
    7 P* B" V: `6 e% f2 x
  103. #
    # _0 N- z6 \7 [; @
  104. #------------------------------------------------------------------------------#
    * I$ M; o" R, M/ l4 m$ i
  105. #  EXAMPLES:
    ' K# u. \) M) Q! R: ^
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON, V0 R% A* O' N
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    ( f8 ?5 ]) x' x: }" H+ }
  108. #  reflect(:all,true)      # Turn all event reflections ON* F1 y1 U$ s+ o' L! Q; a9 I& ], n
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    . E5 x. C* u: ^
  110. #
    % _( a  x0 F/ `. C; F- D) ]
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    + S5 ]  L* O% P$ U( S! Z
  112. #        a map. This is a design decision to try to keep lag to a minimum. You6 ?! o7 a( D! @! W2 ^
  113. #        should use these effects sparingly and only activate them on events
    : y- M3 s& ~) s  m: m) _
  114. #        that require them.
    # L! D' b6 E  f$ |$ q: [: \
  115. #------------------------------------------------------------------------------#9 C0 K9 N: j2 W4 {4 y
  116.   9 a9 j+ x% r; t8 P/ N5 A
  117. #------------------------------------------------------------------------------#: U, K1 P! y3 r# K2 d1 G
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES  ?0 v2 `. @) F( x3 t5 ~
  119. #------------------------------------------------------------------------------#1 F# k. G% K& R- T6 n$ ~
  120. #$ G1 c( v7 `. v0 ^
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    6 ~& ~* S1 x& P0 S6 d4 H) j8 c
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 7 U* j$ u- Y5 L
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.1 p7 ?7 T5 Z# ]: `$ N3 V2 i. _
  124. #
    & m8 x+ e4 _. q0 t" I7 }8 K
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects' ]; J- L) K4 f1 |
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    % _* ?1 u3 i6 ^: k7 W$ {
  127. #  v_icon(x,x,x,icon_id)6 O/ Q  |* G5 @" c+ \0 q3 C& T
  128. #
    / |. b- h' X8 C# c) p
  129. #------------------------------------------------------------------------------#. H1 z. O4 i/ |
  130.   
    ) E& T) E2 U4 Y% h: j
  131. #------------------------------------------------------------------------------#( @7 S: g% ^4 o% G" Y. H
  132. #  SCRIPT CALLS for shadow options: g, ]; _3 i$ m& N$ ^
  133. #------------------------------------------------------------------------------#
    * U, a( T3 e( ]- N3 Z  f
  134. #8 M0 ]: T2 q& M' o
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the + z5 f6 F9 y* C% u/ Y* x
  136. #                              # light source number you wish to change (for6 N! ]2 A$ o! h/ x
  137. #                              # more than one). These are reset on map change.: A' I1 |& D9 l+ N) A
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    # P6 {+ e" Y, o+ F  [
  139. #                              # This will need to be in parallel process if you$ i7 _; s: F, G* ~( l1 h
  140. #                              # want it to be a moving light.8 y6 P7 G0 p* X- _$ Y
  141. #
    " J3 S/ q6 G/ p6 ?# h/ y5 F
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    ) Y; l: ~. R8 ~  ~. D  M7 T
  143. #
    # a& e2 ?& A/ {) G" \
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    ) }3 P; _3 @6 A# _' F
  145. #    # fade = amount shadow becomes more transparent the further away you are.
      u( k  x! g, L$ N
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    8 h: C: j/ A& o) z( d3 ]' f5 ?5 M
  147. #: l2 Z: F( v: Y7 ]3 n* y- G
  148. #------------------------------------------------------------------------------#0 Z, l' p4 T. B) w
  149. #  EXAMPLE:
    ' k( ^) V: y. S
  150. #  shadow_options(80,10,false)    # This is the default setting.1 P) ^6 F, c2 X& L' s% d- A% H/ o7 `1 ^/ l
  151. #------------------------------------------------------------------------------#1 E- P4 r7 V; g( ?
  152.   ; b6 h8 k" h2 q' q: r$ ~
  153. #------------------------------------------------------------------------------#3 |1 h3 P+ }- ~$ ^# ]
  154. #  SCRIPT CALLS for reflect options
    + \+ y3 Y/ H2 A' T
  155. #------------------------------------------------------------------------------#- r; F: w' F: E
  156. #
    ! p0 q, H, E5 ^+ u
  157. #  reflect_options(wave_pwr)
    2 ~+ ^7 H7 V1 s/ T6 c
  158. #, L9 o! L+ I3 y  t' l$ H; k; v3 H
  159. #    # wave_pwr = how strong the wave movement is. 0 is off% H" B- g9 l: G. u2 g% [, E( o
  160. #- p" r* `# E# B) n1 K2 {
  161. #------------------------------------------------------------------------------#
    , P+ b/ R- g$ C) Z. ~* ^
  162. #  EXAMPLE:
    " i( A( G3 ?( n2 F
  163. #  reflect_options(1) # Turn wave power to 1' e4 e3 M2 n2 A
  164. #------------------------------------------------------------------------------#
    & y8 r3 h1 q3 x6 _
  165.   
    , ?. J# K) m! q6 O' ?
  166.   0 w* e$ h& r) ^1 M* A
  167. #------------------------------------------------------------------------------#  y( ?; a7 k" _
  168. #  NOTETAG for ACTORS1 C" |" x8 l) \* x& e
  169. #------------------------------------------------------------------------------#! @1 m. f- c% z3 D; N
  170. #1 g, o8 C3 {" w9 ?
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    : ]" Y, j9 }1 ]+ ~+ r7 ?  n
  172. #/ \  f7 b8 [! g# [/ v
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    6 X  x2 U: q2 C$ z1 o
  174. #                                  # and use the character in position 'pos'4 ?* y! {# v; X; E6 \+ p0 @
  175. #% e9 u' w8 R  K9 M3 K8 O
  176. #------------------------------------------------------------------------------#. O5 k- n7 R  J) L* F. [* I7 B
  177. #  EXAMPLES:* C& u, s( k3 o8 |" N! A* _  H4 Q
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset4 r. Z& [* X5 V! O& ]& S
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    ) u7 H1 J& G+ Q# C, E5 ]2 p4 x
  180. #------------------------------------------------------------------------------#, ]0 D& Z+ A! Y& k
  181.   2 J* G. P  n5 r( ~. o; v5 `
  182.   ; u1 d" {/ G9 W1 z" ]
  183. ($imported ||= {})["Galv_Character_Effects"] = true% Q, e& ^) [1 `# q" j% U% s
  184. module Galv_CEffects( F! {' Q* T0 G
  185.   & f3 d. C3 C8 B7 E
  186. #------------------------------------------------------------------------------#  
    7 i2 \0 m: F* ]* E
  187. #  SETUP OPTIONS- t) I( W  a- l* u7 I9 A' e3 t
  188. #------------------------------------------------------------------------------#
    4 A$ y  W) v6 b+ d* N3 t
  189.   $ f' j1 k" W7 r1 U) d7 }
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    8 v, \: @+ j* M4 a7 m" v- C7 o
  191.                         # region on the wall you want to make reflective (and
    : M4 n) n) g/ T3 ]/ s; M! P# |+ _( y' n# x
  192.                         # then use tiles/mapping that make the parallax visible). p. K" |# v' d4 u6 _! `
  193.   # l# l3 X9 r9 ~- R
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters7 l/ G# ~' h  k& F/ \4 y3 j
  195.     8 r5 a% J& s* ]% w3 ~' ~4 }. o
  196.   REFLECT_Z = -10       # Z level of reflections
    8 C% d) V2 }" X1 Q% h  a3 C
  197.   SHADOW_Z = 0          # Z level of shadows
    4 n. O) y/ S; Q6 ~2 y6 ]% n
  198.   $ h3 X3 X. O9 Z7 r
  199. #------------------------------------------------------------------------------#  
    * c$ m' N0 |+ l
  200. #  END SETUP OPTIONS
    ; i0 h, g# ^% v) U. a# l7 ]' Y
  201. #------------------------------------------------------------------------------#
    5 y- F5 ]- a4 \' F8 k
  202. end
    4 j) |1 W! r8 p- C) F# F) N
  203.   
    + ^, k$ b5 {" Q* S, K3 g# a0 \
  204.   
    1 o9 L$ F3 O- N2 N8 K3 r
  205. 5 d/ g( g: c6 |
  206. - W0 b& F# v4 ^1 K7 c4 j- Q
  207. class Game_Map) M6 m/ n) p* p1 `
  208.   def do_icons(refresh = true), P. l3 k: W3 e" ~: d
  209.     @events.values.each { |e|0 P' p% n  p- }0 L+ ]
  210.       next if !e.list
    & L$ y  h+ W2 H7 F8 q) t
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/: p7 H4 `) T; F3 m
  212.         e.icon = $1.to_i
    2 j! O- }* P) C
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    7 w1 m2 N9 `  ^! j, a
  214.       else
    1 v' D5 n, G# Y- q7 @. q
  215.         e.icon = 0
    ! D- Z; k( }: W
  216.         e.icon_offset = [0,0]
    ( K6 ~. j0 B# d! }
  217.       end' s6 K$ m% _0 r) w
  218.     }3 K5 c2 \& }7 w, r% I- X
  219.     SceneManager.scene.spriteset.refresh_effects if refresh( h% m( W+ M7 C5 d, Z
  220.   end' ]1 S# \* }. Y9 I/ a( h
  221.      n/ W; X5 k* f1 O9 f( g/ o
  222.    
    . r3 X. ~: n* A* g8 F6 G
  223.   def do_shadows(refresh = true)
    + c0 K  F1 y0 @9 b& T
  224.     @events.values.each { |e|
    - f1 Q/ n7 _* Q, w
  225.       next if !e.list' @+ k; t. |) n& G9 }
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/1 S) D# {4 D8 m) y) l5 j, P7 t" j4 F
  227.         e.shadow = true
    , F0 Z8 t( t) [/ ^/ I+ v. C1 p
  228.       else
    $ |! M: X8 n5 G3 ^3 C
  229.         e.shadow = false" y& J* o' y, Z
  230.       end9 _* h: E/ l* a6 K( @3 L5 H
  231.     }
    $ G- x0 Z2 H; M5 c) m
  232.     SceneManager.scene.spriteset.refresh_effects if refresh+ N5 x, f2 t, b8 V' u$ m
  233.   end
    & _  l2 R6 d$ \  t
  234.    - T4 `0 [4 W' ~# I, M
  235.   def do_reflects(refresh = true)( v! p# S5 S) J! [2 D3 r' X) t
  236.     @events.values.each { |e|
    4 U$ x( B' H8 H
  237.       next if !e.list3 _! J# v, ]" z4 B0 s
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/. f  w1 Z6 {/ z+ S7 b' S1 b: O
  239.         e.reflect = true
    7 ~' l' k: n2 C; P* `% M& ^! d6 q4 ?
  240.       else! e6 R2 W: L$ L9 w- R+ L8 W( q
  241.         e.reflect = false
    2 E1 w+ a/ i; B2 J
  242.       end9 r8 H: L! _& Q- e
  243.     }6 u2 ?$ P6 r8 ~0 j  e# i& I
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    8 ?- F6 t6 y- @0 z# x; E! a
  245.   end& f5 N( I2 s1 G
  246.    
    ( d: ~4 d: n& D: N% L& M; k
  247.   def do_all_chareffects
      _! W+ v8 b+ W4 \2 }2 S- {/ @
  248.     do_icons(false). A0 z. p0 t# S
  249.     do_shadows(false)
    ) h5 ]* P" r0 X0 a; k. q/ {
  250.     do_reflects(false)- ^9 F/ I# A7 r
  251.   end
    - Y3 e3 G. W. ^; s1 A0 u$ V4 m9 B
  252.    
    , i, `, P* J" }! q: \! L, D
  253. end # Game_Map
      |- r) V9 p) W6 z% P: k8 W

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

使用道具 举报

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

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

GMT+8, 2026-6-4 18:49

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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