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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
. Q+ Y9 u2 S9 u" I
这个代码怎么用啊,有大神知道吗。我从国外找的。
4 X* B! R2 O1 d7 C+ @, Vhttp://galvs-scripts.com/2013/02/21/character-effects/
* x0 o. `: X7 d: A1 @: j是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#; g3 B0 A3 l& _4 \- U2 M2 I$ ~
  2. #  Galv's Character Effects" N" V1 l. m# ]; c: H2 B
  3. #------------------------------------------------------------------------------#: k! r5 T- }+ M+ z
  4. #  For: RPGMAKER VX ACE' q/ u, `8 _5 T" Q5 y
  5. #  Version 2.19 _& e8 g3 T6 V, ^
  6. #------------------------------------------------------------------------------#
    ) m& u" K5 w$ ^: D; R
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows+ ~  i7 c: Y& f4 G9 e0 x- o
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
      j. H9 t8 ^" ^$ x/ a" \! ?
  9. #                           - Fixed shadow facing bug* [6 y  o3 H# E$ Y* k. P% d
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    # `7 F& T5 l: ]% Q
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows7 {3 G  g, w; U2 v/ z9 c
  12. #  2013-02-22 - Version 1.7 - bug fixes
    7 O9 s1 M6 n  n. s6 e& U
  13. #  2013-02-22 - Version 1.6 - added icon effect/ c. I1 M) ~  D  t
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps- X5 Q5 g# n2 g$ C4 S* H
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    ! j- D9 I4 {+ a8 R+ ~8 H7 A0 F
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    0 k* V- o/ x- N& ^
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)6 w+ y2 ^+ U; h7 i& ~
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    % |& d% ?; K) c; M
  19. #  2013-02-21 - Version 1.0 - release( Q8 ^! T- E+ x2 i% J9 g1 `
  20. #------------------------------------------------------------------------------#. ^$ C* u* \8 l: D' s) Q7 b1 }5 F
  21. #  This script was made to provide some additional effects for characters such
    ' \) ?& f. m' t+ C6 D( }5 s  P
  22. #  as events, followers and the player on the map.0 G) X* v1 a3 g+ Y* Z& f; X/ ]
  23. #  Currently it includes:: d. o5 t' f9 p% v/ }4 j
  24. #
    ( F9 ^% X: R5 h% _( n/ E5 S: c+ V
  25. #  Shadows
    9 s3 T( `/ j+ F2 z: z+ F
  26. #  Shadows that appear under player and events in a directions depending on
    7 j$ q% a, G( T. d4 m
  27. #  a light source that you choose.
    3 l5 V* x; v, l$ Y* C
  28. #
    , e/ G" A. }# V
  29. #  Parallax Reflect; l# @& ^- w9 `
  30. #  Reflections that appear on the parallax layer for events and actors to be/ U' y, p, W1 T: \
  31. #  used for things like reflections in the water or glass floor etc. To get
    9 j- X5 ?- N% p" n; u3 D( G
  32. #  effects like the demo, you need to edit the charset graphic to make the water$ [' c9 v' |: W  _6 I! ^5 |
  33. #  partially transparent.
    ( r0 A3 D2 Y6 ]
  34. #* s6 H4 ^; r( n! B. s4 ~; S2 D( U
  35. #  Parallax Mirrors
    , F  t' m! u+ a7 j! G  |
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    & i2 e9 l1 R9 v% b: b* y' x0 L
  37. #  on a wall designated by a region. Both mirror and reflect effects can be; t3 h' U. v, ]
  38. #  changed so actors and events can use different charsets for their reflections
    9 x: F8 `0 s* C0 V. L
  39. #/ \  Z- `" a: j
  40. #------------------------------------------------------------------------------#( d8 G3 V6 r5 @. y! x6 a
  41.   
    2 ~" R' N5 U; i3 v7 I2 h) e  {9 p# u

  42. 3 @  U- L4 F1 a- t
  43. #------------------------------------------------------------------------------#
    " @- ^* m4 P6 T* n6 M% c
  44. #  NEW - First event command as a COMMENT' M& }; q+ T, o8 `% H* b
  45. #------------------------------------------------------------------------------#* L8 {6 ]" Y# B' E6 d
  46. #  You can add a comment as the first event command on an event page to set if
    + k7 H; U9 j4 {. w3 {' }( S
  47. #  that event has an icon, shadow or reflection active. The tags to use are0 ]$ a2 i8 P8 n8 d4 @9 m3 `% B. ~' h3 `* g
  48. #  below, all must be on the same line in the comment.4 |9 x1 B& T, g1 Q4 H2 L# P" Q
  49. #
    $ Q& u$ E- j$ {# D- r' X
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset); j' p$ ]+ M; j7 x
  51. # <shadow>           # set the event to display a shadow6 }+ c! f. G' M& t1 x
  52. # <reflect>          # set the event to display reflections3 {4 l+ Z& N( _; B
  53. #, e" @3 Z4 w4 A3 O1 u9 X
  54. #------------------------------------------------------------------------------#
    ' V% J6 p8 A/ F2 `4 D6 m* s
  55. #  EXAMPLE:
    " I) Y& w8 O9 I" X& j! p; M2 B8 @
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    ; _2 y5 O$ ?) T1 x% F
  57. #------------------------------------------------------------------------------#
    4 I/ X$ l( {0 Y, b. I
  58. % s8 E" ?& N: P8 R# D5 Z

  59. * e: |  Y2 K. H* {8 x& c! l; }
  60. #------------------------------------------------------------------------------#
    * y- K1 g; l5 ?/ L8 O
  61. #  SCRIPT CALLS:; v8 u7 m4 @' K: L) u, b8 p: c1 }) W
  62. #------------------------------------------------------------------------------#- g, d, Z+ p) K* }+ d8 U
  63. #
      t+ Y6 D& i# k9 m! E1 B& I
  64. #  char_effects(x,x,x,status)2 K/ ?7 u2 f  w4 Q, `
  65. #
    4 U, [' T& g7 h5 e1 N6 h7 ^! M
  66. #------------------------------------------------------------------------------#
    2 m& v6 q2 p% F& P( {
  67. #  # each effect can be true or false to enable/disable them during the game.5 s  v5 V* @- M) p$ i) c
  68. #  # you can change multiples of effects at once, x being the effect number7 P) e3 \! I* v( \
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons, g3 K# o, ~5 U0 J, @# g, `% q
  70. #------------------------------------------------------------------------------#6 q! s5 ^4 J7 t9 M0 T. k) A
  71. #  EXAMPLES:
    2 N1 I2 z8 b2 u  y) n
  72. #  char_effects(0,true)              # turn reflections on
    ' R6 M9 D9 A4 a1 ^0 t! C. V' N* [
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    8 K6 r0 i6 {* j$ U2 g4 a
  74. #  char_effects(1,3,false)           # turn shadows and icons off8 i. w4 k# G9 M8 I7 [3 S6 ^, D
  75. #------------------------------------------------------------------------------#
      T4 f& h1 `% A9 ~( A
  76. #+ T+ T( ?$ M; P! S, r/ f* y( y  ]
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    3 k8 Q1 d0 r3 M/ W' |
  78. #
    , a# i4 W5 _- k3 Z  ]
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    & l( d: }* m6 ~1 `+ Z; L0 ]/ N+ i5 _
  80. #' v  C4 W- w1 ~; u1 @' @
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset. e3 x9 _. ]6 n' \3 y2 z
  82. #
    # f. N  f8 D( b- |) W
  83. #------------------------------------------------------------------------------#
    - B. `+ a$ G! h6 }' x
  84. #  EXAMPLES:
    ( R1 g" N: z/ j' G+ l- w
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    ! L6 r$ f" x6 m) @
  86. #                                    # in position 2 of "Actor2" charset.
    $ G! N" {- \& W. @5 y% I, E% @/ ^
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of! t" C5 Y0 E, N1 W% T! _
  88. #                                    # "Actor4" charset.
    : E  H: ^  L$ O( g6 p, k
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of& O1 R, F# T& [1 A, U3 [
  90. #                                    # "Vehicle" charset.
    5 M. X# }8 ?" U. U/ g; n" N+ M
  91. #------------------------------------------------------------------------------#
    # t" r! @- z8 q. I) Y$ V/ Y
  92.   ! U2 h4 x/ @) g
  93. #------------------------------------------------------------------------------#% E3 o0 p! t& `9 d$ q
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
    + ?) D7 y' G% M! |: s% j
  95. #------------------------------------------------------------------------------#
    1 @' s. x6 e8 f2 M% |6 `) {
  96. #
    - [9 f$ V& G! R( X9 c# ?! ^
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off
    4 @1 c+ c7 n, x. l; \
  98. #                          # use this to specify for mirror and reflect.7 Q0 J& X- \/ ^
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    - F! J0 b9 c: \
  100. #                          # to change all events use :all
    5 |: L) Y, {8 M9 U% K6 F& P& ]6 E  {
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    1 n" Z" t! b8 q
  102. #                          # it 0 for no icon.5 m; Y% s& A2 n0 A. u9 Z' G6 _5 I
  103. #) ~5 D. }8 J1 v
  104. #------------------------------------------------------------------------------#$ _" I; J3 u3 j" D3 f, c
  105. #  EXAMPLES:3 d) |7 I' r, u/ ~/ N0 v8 X
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    5 H: Q  `$ C6 @6 h. I
  107. #  shadow(1,false)         # Turn event 1 shadow OFF( u; }+ @& d9 e  c
  108. #  reflect(:all,true)      # Turn all event reflections ON
    5 E- H. `4 D: j2 N( x- Z
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    . P. y" y2 I& ?$ l& H0 X: l( Z2 V
  110. #( V) T( G6 @- l' `1 P+ Y$ u, J
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering+ m  o  Q9 x, r, I' W8 ~
  112. #        a map. This is a design decision to try to keep lag to a minimum. You; I+ E; j  B" \5 W' x6 p: k' }
  113. #        should use these effects sparingly and only activate them on events
    ) F7 {; h: E) Q! A4 M3 A( J+ B- L
  114. #        that require them.9 j% w, {' O- d7 [% p
  115. #------------------------------------------------------------------------------#
    6 }( e/ h( s+ A. J* X/ H
  116.   
    1 G  _( x  y- @( Z
  117. #------------------------------------------------------------------------------#" n% [7 N5 h( R- e9 t) m" X
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES; ^) J( d5 I0 \- v& Z3 H: w
  119. #------------------------------------------------------------------------------#
    . X* x% M5 G5 u) k7 T7 k
  120. #
    * I% ]/ n0 v, D/ a( n
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    : U/ T+ H4 T0 e
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    $ N: z0 E$ `% V+ I! c  h" c) c( P: g4 S
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    ( \" B' b& L' C* t% Z0 R
  124. #! _; J' p7 }3 r* D
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects5 V5 I; x3 ^! X0 y2 C8 ~
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
      N* B5 X6 U2 h; r# Z. `
  127. #  v_icon(x,x,x,icon_id)
    9 t: f: v1 y3 _6 J6 [
  128. #4 |% v# r* N" P7 j5 }7 `
  129. #------------------------------------------------------------------------------#6 R1 Q7 t8 e# ?% q8 O1 {* `3 A
  130.   
    ' I! U5 V3 v! M( [# J
  131. #------------------------------------------------------------------------------#
    9 S, J% b) r# D# h% c
  132. #  SCRIPT CALLS for shadow options- Q4 Q. G  V) J; y8 ?' L5 Q! V
  133. #------------------------------------------------------------------------------#
    2 p- E! Z: O9 t" i3 ]
  134. #
    ! c$ `7 F( S, T$ K7 P6 V( w- i7 y
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    9 K. ~) m2 F5 R7 d6 U3 m
  136. #                              # light source number you wish to change (for4 }7 g, g$ `" J# E9 t
  137. #                              # more than one). These are reset on map change.
    ! g- `1 N9 Q/ ]# ~
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    # a* I& W( R+ q7 m8 F
  139. #                              # This will need to be in parallel process if you2 ]7 O3 b# y# ~' z8 H+ c# S$ O
  140. #                              # want it to be a moving light.( E( F/ G% J" T- v* \4 [& W$ f
  141. #
    % D  J. U* [2 c
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    : p6 Y- n$ L0 y( n, z
  143. #4 o( K7 Z' R5 p: m- Y
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    - {- ?( r' Z7 x6 B% m3 F3 `
  145. #    # fade = amount shadow becomes more transparent the further away you are.9 {: F& b& S8 [" W; n& Z
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    : n: d# L; z. ~; `* c: @. U
  147. #+ n6 _+ I- M  Q8 U
  148. #------------------------------------------------------------------------------#
    % n; q/ G- X4 p4 X0 i' I- Q
  149. #  EXAMPLE:+ ~0 M; O( ]0 y; t6 B( v
  150. #  shadow_options(80,10,false)    # This is the default setting.
    $ _7 L! i) L3 E* D. T$ T( n+ f
  151. #------------------------------------------------------------------------------#
    4 `2 ~$ Q- k3 M# Q1 _* l6 i
  152.   2 q# s0 M3 ]3 r8 }
  153. #------------------------------------------------------------------------------#3 l' b' |9 ]/ j4 h, D% L# N1 |" [$ o
  154. #  SCRIPT CALLS for reflect options8 [0 b* T) m; P5 K4 b
  155. #------------------------------------------------------------------------------#3 G0 _6 G8 z+ @4 L" \, s- }& k
  156. #; a, D" e) {7 O2 k% M" [
  157. #  reflect_options(wave_pwr) : T' `$ [) G  w- w
  158. #5 L% X3 s, G0 r9 J$ C9 a
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    - o; m  b- n8 M9 B8 Z
  160. ## W. R' S* [" x: P+ G
  161. #------------------------------------------------------------------------------#8 D# E0 {/ i0 i+ I9 i. w. `
  162. #  EXAMPLE:
    + ]" p6 A) y& F# T3 G4 b
  163. #  reflect_options(1) # Turn wave power to 1
    8 P, ]7 z% Z# k/ M  }: ~
  164. #------------------------------------------------------------------------------#
    0 [  O8 S" c( P* n
  165.   9 _8 O; B* ]. h: H' n9 V8 [/ y
  166.   : [/ Y. |( s7 X  a. ~5 K
  167. #------------------------------------------------------------------------------#
    2 x( R4 I( S; ~
  168. #  NOTETAG for ACTORS
    5 h( ]+ m! z$ E2 c1 H0 A9 s
  169. #------------------------------------------------------------------------------#
      N9 ~5 X' z' V3 ^. t1 w
  170. #
    7 \4 Q% l" v  |9 ^, W6 d" |
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    6 J+ N( n3 z5 x0 }6 {
  172. #1 C; e  [0 C# T4 d  `
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    2 o8 W/ r, B+ v5 w6 \" S) b
  174. #                                  # and use the character in position 'pos'
    & e) e! m4 J% a/ k9 c
  175. #
    ( N, A, b3 k) ~, }
  176. #------------------------------------------------------------------------------#
    0 G4 B: R7 \' g# i
  177. #  EXAMPLES:4 J' N2 I0 H* r' I) e
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset
    9 Z- r5 h% ^+ a5 N/ k
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset2 E9 @1 D! c3 J0 g/ m
  180. #------------------------------------------------------------------------------#" c! O5 Z$ a! h& p
  181.   6 o! h  Y3 T8 ?4 t% I
  182.   
    5 L; D1 r0 H) j4 I
  183. ($imported ||= {})["Galv_Character_Effects"] = true" k4 P) I2 p6 \, |: m3 x' C$ d2 u
  184. module Galv_CEffects
    * i& Z9 K9 u) z, [3 O) b) c3 s) ]
  185.   " s6 j% R3 J2 N$ E
  186. #------------------------------------------------------------------------------#  : y) e9 k; R. b2 L( @. N
  187. #  SETUP OPTIONS: J  Q# |- Z: U, S& d+ K
  188. #------------------------------------------------------------------------------#- i6 F5 Q* s9 C$ x$ Z+ s
  189.   
    5 T# V7 Z; w# `
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the; C1 @! h' e  ?; Q  s3 G3 r
  191.                         # region on the wall you want to make reflective (and
    . Y8 v" O' R/ f) l0 z# ?$ F
  192.                         # then use tiles/mapping that make the parallax visible). k2 m4 H# Q8 q2 H. D8 ]
  193.   * y1 [& }" |+ e) C" G
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters' T) ~# A% M6 o, D- n' z! w6 Z5 V
  195.     % L, ^* J6 w; H, S7 j4 g
  196.   REFLECT_Z = -10       # Z level of reflections& b) G$ \/ h) i% J% E; ?: d
  197.   SHADOW_Z = 0          # Z level of shadows5 f* F% q/ c/ D- D
  198.   
    / U3 {6 T' A& }
  199. #------------------------------------------------------------------------------#  3 w) ~% L0 s  W6 P: `9 `
  200. #  END SETUP OPTIONS9 |6 n7 d, Y9 D
  201. #------------------------------------------------------------------------------#
      Y2 {6 s* V% K6 U( B
  202. end0 C; N$ C# |# Y7 o
  203.   
    ' ?2 t1 D- ]0 r
  204.   
    + ?7 m' e" s# `& \- Y  [

  205. ; f* D6 o1 i* F$ i- w. \

  206. 1 k- B- E1 s3 E- C% m
  207. class Game_Map
    & L) I4 u! B/ S
  208.   def do_icons(refresh = true)- c! A9 `; _$ X) h3 j" g
  209.     @events.values.each { |e|
    2 z: _5 s7 i* Y
  210.       next if !e.list: z3 b: T1 V+ p8 X, C; o+ N$ e
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    3 u, p& k8 ^8 O7 L3 ?
  212.         e.icon = $1.to_i
    # d6 M7 w& c$ \- ~' Q$ l
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    0 |9 u' W: _6 _/ P6 s( V
  214.       else0 @0 O5 E* I# D" J
  215.         e.icon = 0
    3 M. ]0 p0 w+ B- w" {5 G" j
  216.         e.icon_offset = [0,0]
    / P! V7 @  t5 F5 l# q% B/ e
  217.       end; Q. \+ H+ @( y! U% l7 \
  218.     }
    2 w+ [5 t  j) g2 }/ e1 a  \
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    7 K! d. s( d, o/ J3 x3 H" ^
  220.   end; o: h/ ^6 o9 h. T- [% ?: n
  221.    
    * U, E( _, G& c% V' l( i8 g8 l/ H  N
  222.    
    % r+ Q  \3 v9 E7 u: m" L
  223.   def do_shadows(refresh = true)1 |' h5 _% D& Z* e; F
  224.     @events.values.each { |e|
    9 Q4 K- E9 d0 J8 J3 _- c3 J/ |) v: A
  225.       next if !e.list% ^0 b3 Z% v. b- W; d! U+ A
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    9 H& C: x- |& e# e* u  W! L
  227.         e.shadow = true6 b+ ^  Q9 s6 A7 Q! y+ d5 t/ \
  228.       else* y2 a. T; N( Z
  229.         e.shadow = false
    ) B: U9 x' u1 H0 Q; D" A5 y
  230.       end
    ! {; a4 A+ [6 c! ^7 U! l
  231.     }- G# c% l" l% q1 K, c
  232.     SceneManager.scene.spriteset.refresh_effects if refresh+ i# H1 r+ [$ L( x( n1 q3 X
  233.   end
    1 s  N* V) r2 t" }$ g! a$ E! T
  234.    * B/ {+ p" e  K+ V5 f
  235.   def do_reflects(refresh = true)  \; q4 z  a" r
  236.     @events.values.each { |e|# z! j9 |8 k+ C  O9 a% a1 b
  237.       next if !e.list4 ~/ E5 Y% G6 b9 V2 E$ Q( d& l1 R% w3 D& b
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/3 v& f" J$ {3 s) u+ p2 g
  239.         e.reflect = true$ Y6 i# |  R! e0 G- n. g
  240.       else$ q' z% O# D* \! N
  241.         e.reflect = false  m3 W. Z1 Q- e0 Z  f2 n
  242.       end
    1 v& ]8 i' Q8 z& @. K
  243.     }8 w/ r; H) k% ^# {
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    " g& c" m. X' \* R* K0 H
  245.   end
    4 i" p+ K, Y1 Z" q$ ^
  246.    , b/ j5 x4 w- j) G
  247.   def do_all_chareffects; r8 M. [+ V/ }/ L; q
  248.     do_icons(false)
    1 R7 ^; s2 o. `  g  S! T" g$ v/ }
  249.     do_shadows(false)
    3 Q2 }; m0 D# h
  250.     do_reflects(false)) p# L& Q0 P$ d' q/ o) J1 ?
  251.   end
    ! n9 a. m5 B, D' L
  252.    7 a- W& I, ^5 D  {" P& h( D
  253. end # Game_Map
    ( P  [+ j4 I. a; [% f# M0 Y

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-11-23 22:08

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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