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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
2 D+ Y- d; I1 ]% R9 ?8 v' v+ Z
这个代码怎么用啊,有大神知道吗。我从国外找的。
* G% [6 H! O; }; N6 C- Chttp://galvs-scripts.com/2013/02/21/character-effects// f4 k$ _; Y) U1 z! B
是关于动态倒影的
梦石
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. #------------------------------------------------------------------------------#6 G, ^1 o/ c5 ?4 P! M2 k
  2. #  Galv's Character Effects
    % ^3 k% V/ o9 q( }
  3. #------------------------------------------------------------------------------#; T# T9 a5 r; k/ Z/ x' Z# }0 Q
  4. #  For: RPGMAKER VX ACE9 i9 I; D, [  K; ?: K5 n$ g: B
  5. #  Version 2.1
    - V( m, c$ ]8 L
  6. #------------------------------------------------------------------------------#1 g7 N* j3 x) G
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows4 \/ W- v# a. M/ |8 f$ e
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects* |0 A6 v/ s, O
  9. #                           - Fixed shadow facing bug3 v9 S' T* Q* H( e  I9 J
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    3 _) q5 R( G; u  [7 R5 w' Q: B, O
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows1 Q" c9 T# B7 h7 C: a6 c0 \9 B
  12. #  2013-02-22 - Version 1.7 - bug fixes; w* _$ `( N% p6 l
  13. #  2013-02-22 - Version 1.6 - added icon effect" |( a; F$ v+ {7 J* u7 K! f
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    : ^, W$ k! c# D( h2 q
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles
    % k6 a5 ~. ~( z( g
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    6 a% S: x! q2 i3 {  x
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)
    3 h- Z- ^/ |, P  u+ p. j
  18. #  2013-02-21 - Version 1.1 - updated flicker effect
    2 L4 @) N$ T3 h; ~. K  l* K
  19. #  2013-02-21 - Version 1.0 - release6 n- `7 T! k& F+ h0 I6 x% k- ?
  20. #------------------------------------------------------------------------------#0 S7 H# v$ l+ n% z$ s* w
  21. #  This script was made to provide some additional effects for characters such7 I7 T& |6 d: e# ?$ F0 |
  22. #  as events, followers and the player on the map.
    $ e; P+ g+ w, |" m, D) k
  23. #  Currently it includes:
    9 o  \6 [7 t: G9 c
  24. #
    ( ?& X- `) j- Y) F6 U0 F  D
  25. #  Shadows( }! I: U6 A. U6 F% v
  26. #  Shadows that appear under player and events in a directions depending on) _5 j* V; R7 _# z2 H7 t4 R% W
  27. #  a light source that you choose.
    & k5 ]9 l& o; G( M, _, `
  28. #* h* ]7 @, I, j
  29. #  Parallax Reflect
    3 G% n  |8 q% H& g! s
  30. #  Reflections that appear on the parallax layer for events and actors to be. W( F/ U9 i! M* A4 X) n. a& [
  31. #  used for things like reflections in the water or glass floor etc. To get
    5 G3 ]) i! N) I/ v+ ]% E+ Y" B( p
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    9 b4 C4 D! h5 z: R4 m$ E$ U
  33. #  partially transparent.
    9 K( K* {/ i; d
  34. #( I- F8 N- Y0 W" F
  35. #  Parallax Mirrors9 u: [* ^: }5 B; y5 S: I* f
  36. #  Much like reflect but are instead actors and event are reflected in a mirror, K& P7 e9 i( x& y- y
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    3 K7 l  E2 a, S; Z* a1 ?
  38. #  changed so actors and events can use different charsets for their reflections
    ! S# Z% @' a  {3 u) [1 r
  39. #
    + t, y) H* X( \: G0 @) a
  40. #------------------------------------------------------------------------------#
    ! n+ P; M- Q9 W/ t; j
  41.   ; j3 y' \% J/ B3 S; a2 Q
  42. & V. B! h* z/ h3 }' w
  43. #------------------------------------------------------------------------------#& P2 p1 o& g, b& i
  44. #  NEW - First event command as a COMMENT1 ?3 |9 a; X: R+ L
  45. #------------------------------------------------------------------------------#" k8 Y0 x/ z$ Z
  46. #  You can add a comment as the first event command on an event page to set if
    6 e  f2 N, q4 W
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    ! m# f% ]+ e9 u$ T2 O. G
  48. #  below, all must be on the same line in the comment.
    3 [9 O' U6 q+ f
  49. #
    & r" w  x7 ~! c8 v. y
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    9 e, H5 L% C6 @( K( f# ~
  51. # <shadow>           # set the event to display a shadow
    * x! p5 n: j% A, x! n. J" r
  52. # <reflect>          # set the event to display reflections
    5 X* q7 g% R9 z2 K5 Q; h
  53. #
    ) |7 U; U, C, ~. H* R: P
  54. #------------------------------------------------------------------------------#  O9 ~- p1 m% K" R7 c6 ~
  55. #  EXAMPLE:
    , Y, I2 P, B$ c7 T; k2 z* x( j
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event5 d# g5 A" n( e9 Z9 a; ?
  57. #------------------------------------------------------------------------------#
    ! A* r9 N2 A1 t( y
  58. ( ]8 j, x; N2 j4 X" y  Y4 A

  59. 2 |4 a8 H9 m8 ]1 h/ g: ]- V3 T% ]
  60. #------------------------------------------------------------------------------#
      y, N- f* e4 q3 a, @0 J8 r% m; K
  61. #  SCRIPT CALLS:& M) ]: h# T: i8 E) e, U% v
  62. #------------------------------------------------------------------------------## z+ P3 ]! b: p) n, e+ ^
  63. #
    $ ^+ e' Y/ d8 S8 o4 p; a8 N* [; ?
  64. #  char_effects(x,x,x,status)* F8 c# G6 k/ G, }
  65. #* j5 w$ @. g3 e" [" n
  66. #------------------------------------------------------------------------------#
    0 j) p# X. d# a2 F- H9 J4 }
  67. #  # each effect can be true or false to enable/disable them during the game.2 Q& j0 W( H$ N4 N/ f
  68. #  # you can change multiples of effects at once, x being the effect number
    $ b  g* J$ y- h% f1 Z5 }  L  x
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons/ F, I* }$ X. L$ U+ o7 u) S
  70. #------------------------------------------------------------------------------#2 l9 S8 V1 X8 z& [% T& C% w4 K/ l
  71. #  EXAMPLES:' a, I  n( V4 l( w. z
  72. #  char_effects(0,true)              # turn reflections on
    " n# x4 k/ _) U3 f
  73. #  char_effects(0,2,true)            # turn reflections and mirror on
    ( i% r0 A! x4 k' b7 s
  74. #  char_effects(1,3,false)           # turn shadows and icons off) `) \  d6 t( J. t4 y4 L. j+ v
  75. #------------------------------------------------------------------------------#  U- K( i! d( H: }# k7 B
  76. #
      E) Z4 d6 t) _" Q  {* q6 l. m/ U4 a- Y
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset9 n9 w7 q+ s- ?9 _2 t. J
  78. #
    7 A) v9 ?  W' @
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset
    6 \& e! U' D0 {
  80. #
    - g, m( [- r, f& I
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    9 @# u  t/ U% r3 I. V
  82. #
    4 Q! O# B( H. I/ y) T6 L
  83. #------------------------------------------------------------------------------#, B# G* T6 h0 K  F
  84. #  EXAMPLES:) A. a' w0 ?# Z0 y# e+ Q: t
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite
    7 g6 A. J6 H" P+ m/ K
  86. #                                    # in position 2 of "Actor2" charset.
    + C5 A8 o- d' a, K3 D* L
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    ' F' k" {5 N" o& R6 v1 [4 c
  88. #                                    # "Actor4" charset.- I! @$ I/ o- y* z0 o4 z
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    1 a7 H; x# n6 V% V
  90. #                                    # "Vehicle" charset.
    2 j# x% u) [* [6 l8 _5 G
  91. #------------------------------------------------------------------------------#
    7 _1 f0 D6 g" N! |( B/ F& X
  92.   
    2 I' \! X6 i2 [9 \, _. L# `# b
  93. #------------------------------------------------------------------------------#
    0 I, m8 A% \, `8 N8 E. W2 h
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS
      z9 R3 u4 b) b
  95. #------------------------------------------------------------------------------#2 J. B5 G" e/ p( u, J8 _
  96. #5 V% y' `+ h2 T1 a# ]
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off7 R6 n# W" R9 f) U! l% a$ O
  98. #                          # use this to specify for mirror and reflect.
    3 Q. e8 Q$ w  u
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
      @6 ~2 O7 D4 H
  100. #                          # to change all events use :all5 t% G( m  a: Y3 R
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    " J% K+ T( ^5 P# F, R: P
  102. #                          # it 0 for no icon.
    6 {/ ]! u: ~) b/ v7 U# G4 J
  103. #5 `7 Y5 i3 ?" M! R# Z
  104. #------------------------------------------------------------------------------#
    7 Q4 q) Z' L. a" ^; o
  105. #  EXAMPLES:
    ( Q& ]3 w. C8 \; }9 G$ l+ w% \9 C3 N
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON
    6 D% @" y* g, x, a
  107. #  shadow(1,false)         # Turn event 1 shadow OFF& C- i% o4 e' t) h, \( p" f
  108. #  reflect(:all,true)      # Turn all event reflections ON+ f" x1 @  ]) @, E; e# J+ O4 K; J- P5 ?
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
      Y( A% W! |% h1 K
  110. #
    1 ]" N$ t1 m' v2 V& L. v
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering4 k5 x  s7 `; y4 K7 w
  112. #        a map. This is a design decision to try to keep lag to a minimum. You
    / H* ^. w4 Z- b% u! o: H" Q* r9 f* a
  113. #        should use these effects sparingly and only activate them on events
    9 i, _1 f3 _. ^6 m1 d" ]$ x0 g
  114. #        that require them./ a( w4 }1 X8 y# t2 Y% U% D
  115. #------------------------------------------------------------------------------#
    ! r, i* q, p7 }: ?6 R
  116.   
    , S/ \" ?; p- _4 N1 a% S, F3 u
  117. #------------------------------------------------------------------------------#% g  q- d/ m5 j* U+ [6 s/ V
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES: |9 U/ ?6 P2 P, n- ^3 K
  119. #------------------------------------------------------------------------------#9 z# w! K+ h: N8 C( |
  120. #' ?3 `& X! P, e) H: R/ I3 e
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default
    , D0 E  Y3 l, B7 i2 P
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    3 h9 c: m% s; S+ N
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    / F: t$ x0 a3 b. T+ E
  124. #
    4 d* `# F% o4 m2 H9 m2 Q1 L
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects
    5 Z# O# t0 m; x0 A
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.9 C! q& @4 D& Y9 m
  127. #  v_icon(x,x,x,icon_id)7 k/ V  x- L2 R6 J) P  n% J
  128. #2 A; v  Y% M# s
  129. #------------------------------------------------------------------------------#
    4 l6 r- m0 m+ L" H; H6 ~- F8 B4 j
  130.   " s, S7 U  \) z* U8 b3 r) V; U
  131. #------------------------------------------------------------------------------## G2 @0 q' H# k: ^% G6 S* ~
  132. #  SCRIPT CALLS for shadow options
    ! c9 E3 T9 o9 C* T: v4 w( ]4 X
  133. #------------------------------------------------------------------------------#2 }9 D( J+ }- B' ?
  134. #
    7 L- y/ P! x4 ?, F
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    ) n( M/ L0 U1 U4 I+ C8 n, m
  136. #                              # light source number you wish to change (for
    3 d1 V- Q0 D8 l2 ?2 I- z
  137. #                              # more than one). These are reset on map change.4 x7 k7 j; u, s* c
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light." [; u5 y/ z: e. k: b
  139. #                              # This will need to be in parallel process if you
    $ c* m/ s% t" F! t, V
  140. #                              # want it to be a moving light.' J6 Z4 W1 t$ B+ P5 [5 i& ?8 a
  141. #9 T' V- {+ B$ |9 [
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below: m! z- `9 J+ A
  143. #* J* \  m: d) y0 B/ w6 h2 x& Y8 `8 F) j
  144. #    # intensity = opacity when standing next to the light source (255 is black)& N, u9 b/ d: Z. b3 m& z6 v
  145. #    # fade = amount shadow becomes more transparent the further away you are.
    $ u# W' ]0 d, h: k: `4 F# T5 P
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.
    ( K% r# W1 L+ X9 g( T& w3 m& b
  147. #! N3 }% f: E$ H6 d! L
  148. #------------------------------------------------------------------------------#
    8 O/ |7 x" H" E6 y6 X- M; ?+ H$ x
  149. #  EXAMPLE:- e: E* y; X1 V: r7 w
  150. #  shadow_options(80,10,false)    # This is the default setting.
    8 G5 d( M* w5 i5 R& p
  151. #------------------------------------------------------------------------------#! }0 n  a5 ?& o$ V7 [" l3 n
  152.   
      U  L/ r# c1 H0 A2 H
  153. #------------------------------------------------------------------------------#
    0 ^& ^1 O' Y( F3 P* j* P
  154. #  SCRIPT CALLS for reflect options
    6 g+ e+ J& H& y0 i- c" w
  155. #------------------------------------------------------------------------------#1 V- A/ ^* T8 I3 Q! ]' G) x
  156. #
    $ C8 \" |8 {' r" ?* x
  157. #  reflect_options(wave_pwr)
    5 p5 A+ A, T, v
  158. #) }9 i" c' n# h/ L/ y3 W
  159. #    # wave_pwr = how strong the wave movement is. 0 is off) _5 ~& I6 R" Y' o3 t! p/ y
  160. #
    8 I, `) ]& i. V0 l, O
  161. #------------------------------------------------------------------------------#; p9 t# c7 p. K( [
  162. #  EXAMPLE:( B! s3 C% x* }0 ~5 O
  163. #  reflect_options(1) # Turn wave power to 1! k3 D4 S0 P" J; e3 j
  164. #------------------------------------------------------------------------------#
    * F# y4 n8 C& h  i
  165.   
    ( l+ @. g* `! T* X" v$ `
  166.   * ~# D# e7 c5 V( d6 o' K( U/ p9 h
  167. #------------------------------------------------------------------------------## P' l# w: [3 K5 Y4 w
  168. #  NOTETAG for ACTORS7 S$ x* t8 W+ [5 V
  169. #------------------------------------------------------------------------------#
      C9 N0 U3 A& }8 L  U2 G# X1 |8 Q$ d+ e
  170. #
    . m  G* ^. t, ~
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    # T6 N+ O4 q: W6 l
  172. #3 F1 @6 g  R( n$ o
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections* [, j. w$ g6 q9 ^- m* ^
  174. #                                  # and use the character in position 'pos'3 X$ u4 }$ D! D0 o, R& H
  175. #% @' a9 t& @2 b' a( f5 @. k2 Q! F
  176. #------------------------------------------------------------------------------#3 e; C/ M& Q6 p* v* Q" c; w
  177. #  EXAMPLES:0 T' J. `  ?; X, e8 A
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset3 Y2 a' i7 d- \. y, F
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    " a/ Q7 U5 O  c; N: m0 B* i
  180. #------------------------------------------------------------------------------#
    . u0 m! i  w. u
  181.   
    3 v% ^- d- `) ~" r" _
  182.   ; n4 E% a5 v9 R0 L+ `* X
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    5 U, C  N) \3 L
  184. module Galv_CEffects
    ( |" k- [8 z6 P" n- [
  185.   7 K7 O# u& p8 n
  186. #------------------------------------------------------------------------------#  ! g5 j1 m8 X) y
  187. #  SETUP OPTIONS
    6 |6 r* ]  }6 B6 U# v' T
  188. #------------------------------------------------------------------------------#5 ^! G8 J9 H# e6 I' d/ D- E9 W
  189.   / D* {+ ]+ W, w4 o; x' c! ?' U
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    6 n' ~9 O1 X' _* P: i
  191.                         # region on the wall you want to make reflective (and$ m0 W9 j" A8 Z' f$ y: s' c
  192.                         # then use tiles/mapping that make the parallax visible)
    0 v3 e# y  K$ [, o( n: A& ]
  193.   
    3 Y  O$ d( J! r: E' D4 `- N
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters3 E3 B, S2 j" ]$ ]3 d4 z: u/ x- ]: |
  195.    
    # P( U2 G" z3 e- ^. C
  196.   REFLECT_Z = -10       # Z level of reflections
    3 L" b9 W* I8 F6 d
  197.   SHADOW_Z = 0          # Z level of shadows5 i$ A' [# h  ]: F& d
  198.   
    - A9 G  A6 q8 A3 N
  199. #------------------------------------------------------------------------------#  2 G1 P8 ?7 B3 h6 j: D! ^
  200. #  END SETUP OPTIONS
    3 m& C3 g# ]+ V+ N- w! }' s$ X/ a
  201. #------------------------------------------------------------------------------#9 x0 X+ L" n/ p7 z% B
  202. end
    / A& G  O  i" \0 q- u1 q/ A
  203.   
    4 H, }8 a$ h  H
  204.   ) m$ d& J7 Y) v, I
  205. . J+ S7 Y% h$ ^6 N" l# S% ]0 z
  206. 1 b' Z/ O2 n3 |$ z$ p; e
  207. class Game_Map
    9 Z: o, q/ o; I
  208.   def do_icons(refresh = true)" T0 b+ @' ^  I1 k8 w2 T1 R
  209.     @events.values.each { |e|+ [2 `  G7 U8 h
  210.       next if !e.list$ k2 I3 o! Y" I# k
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    4 F4 O, [& T0 W. ?
  212.         e.icon = $1.to_i: c( d( E. w" ~0 r( R( j% i2 Y3 r
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    $ x$ A- w0 R3 T5 ?+ E
  214.       else( c8 L4 p) u& z* K6 ^
  215.         e.icon = 0/ C3 U( l! r- v  l% v
  216.         e.icon_offset = [0,0]" ?/ p2 Z* v: D9 a2 ^8 c
  217.       end
    0 `1 |& O$ _& r# K; v
  218.     }
    7 |6 }) A) D! _  w# c. f
  219.     SceneManager.scene.spriteset.refresh_effects if refresh
    . n2 X# m4 w, Z- \, K
  220.   end
    ; x2 Q2 N* ^& y$ h" D
  221.    
    + _! T* V$ G' L
  222.    : j1 ^$ m$ @5 R+ A
  223.   def do_shadows(refresh = true)
    , e: G1 i' {& Y0 P( x0 i1 F. i' x0 `
  224.     @events.values.each { |e|- X& s. B8 T* s/ X7 a7 Z3 w8 L
  225.       next if !e.list/ W" k4 c! c* j6 L
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/
    3 y, _4 U6 c6 w$ S& J
  227.         e.shadow = true$ ]9 N' ]& t% M' V- F9 l4 t. `
  228.       else; ~7 v$ m8 [4 R9 o( M1 ^
  229.         e.shadow = false
    # _# m: `  n6 T! A7 |8 e
  230.       end) M' K1 e/ N+ F7 s' a. C
  231.     }
    8 o0 `$ y  l$ ?6 c! v+ d
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    ' O3 U# j: y' ?  Q4 ?
  233.   end
    / q) O% g) B' t  G) ^" i7 G$ ^
  234.    ( _$ I9 {5 w% b6 D1 Z' p
  235.   def do_reflects(refresh = true)% a: C3 l) [3 |5 ]! u) V' t* e
  236.     @events.values.each { |e|
    + ^0 l$ l! h( a; n& J+ p4 u
  237.       next if !e.list
    / d  K# m' k1 m! n6 d
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/1 P' r0 [% h4 R* o% S9 S
  239.         e.reflect = true8 p$ i/ W6 b7 S; I/ f( r+ ~' U- j
  240.       else; A. J7 S) R/ O/ Y1 [+ r
  241.         e.reflect = false5 t2 ^* d/ }4 I/ }
  242.       end
    ; N  C: m9 Z  _5 C: A% \
  243.     }, i( i- {) {* \
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    0 K! H; ]4 K; Q% k; [8 n3 p7 W/ f
  245.   end
    * u- m% C' |6 [) k& l
  246.    % }/ \1 K8 G' c6 S
  247.   def do_all_chareffects
    ! H; Z5 G: O; [' D4 I  u! w. ?
  248.     do_icons(false)
    ' D! E& S; e0 [
  249.     do_shadows(false)% [( l8 Y: o$ ]7 l9 [
  250.     do_reflects(false)1 G; J4 t/ I' u; O
  251.   end
    9 |* n# H6 D3 U4 }% s; G2 y
  252.    
    1 Z& V* j; Q1 r+ [
  253. end # Game_Map
    * Z6 s; t5 s) K) i

  254. 5 h  ?/ }9 l3 @) ^5 z6 F: j

  255. 2 Z$ V4 b$ q% A4 L8 s

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

使用道具 举报

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

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

GMT+8, 2026-6-5 06:21

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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