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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  
- m( R% a3 y  ?- @& c; o
这个代码怎么用啊,有大神知道吗。我从国外找的。$ K7 @+ |, a( {! J( \) z# {
http://galvs-scripts.com/2013/02/21/character-effects/( V$ y, P0 v6 G4 O4 C3 c: r
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#4 M, E3 j9 n9 h) @0 b
  2. #  Galv's Character Effects
    ! w9 ^% P; F$ R/ O& s4 P/ ~7 h
  3. #------------------------------------------------------------------------------#
    . `1 u* |( R$ t4 `/ b% T$ j6 @5 A3 c
  4. #  For: RPGMAKER VX ACE, I) @8 W' p* n: F- v5 J
  5. #  Version 2.1
    + e4 [7 }. ^! B& [9 [  [! z2 w+ p
  6. #------------------------------------------------------------------------------#
    # T6 I: y( N% T4 ?0 h
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
    ' i# C* ?3 W# ]
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects% ?1 g; R2 B  i! e, w$ e% X0 n
  9. #                           - Fixed shadow facing bug, {0 U) L* H* E. q. u
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    + r7 h- p5 N; A+ K' T
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows
    7 p8 r) k- ?9 |2 N) y1 [; R
  12. #  2013-02-22 - Version 1.7 - bug fixes
    ! y+ w2 C( C" |" q9 _& {! l  [0 E2 o
  13. #  2013-02-22 - Version 1.6 - added icon effect2 C0 [4 w, B* M! V- r8 ?0 T
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps
    ; s5 ^4 E; e6 Q' ?( C; E8 Y+ O
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles. `9 M3 F5 z5 |+ K
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks1 N5 J0 S6 y/ m, @: j& M. l, w' n
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)9 k+ I/ Q. J' q; }# @% H
  18. #  2013-02-21 - Version 1.1 - updated flicker effect1 _$ y! ?0 r1 j
  19. #  2013-02-21 - Version 1.0 - release; Y4 Y; y5 J" |* q2 V2 Z$ {! g
  20. #------------------------------------------------------------------------------#
    3 L/ _/ K9 H, E
  21. #  This script was made to provide some additional effects for characters such/ ^- U/ T) G3 {& a; t5 h# h
  22. #  as events, followers and the player on the map.
    & d5 Z6 |, h, x2 z
  23. #  Currently it includes:
    ' C* }: _. p: x* {- x8 m
  24. #
    + Q0 W+ p& r4 k# }/ _1 a
  25. #  Shadows& m+ n. ?1 Q9 w2 B+ }8 e
  26. #  Shadows that appear under player and events in a directions depending on' L7 v! h5 C" i2 m7 |
  27. #  a light source that you choose.8 o1 h+ W# k1 T
  28. #
    . x; K( |& y/ K3 j
  29. #  Parallax Reflect9 q9 `% q: ?) p5 U3 S% \
  30. #  Reflections that appear on the parallax layer for events and actors to be
    : b$ E% s: u1 e5 [2 _, T3 w
  31. #  used for things like reflections in the water or glass floor etc. To get2 r8 |0 J2 Z% i# S
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    ; _" {) c0 ~3 w" ^: M$ J' Q
  33. #  partially transparent.; F8 v1 D. u& K& D. @# ~1 c2 `
  34. #8 L  O" p/ [6 K6 f! {. t
  35. #  Parallax Mirrors
    ! W8 R/ k& t: @+ t
  36. #  Much like reflect but are instead actors and event are reflected in a mirror+ T/ g  W5 X" V! x  [4 W
  37. #  on a wall designated by a region. Both mirror and reflect effects can be) O, Z1 E$ x, z# X( V- R5 V
  38. #  changed so actors and events can use different charsets for their reflections
    7 R4 s; V# c- B3 ^5 k( P
  39. #
    " S% N" K" h5 Y2 k
  40. #------------------------------------------------------------------------------#+ S3 c  D9 h  ~4 b
  41.   
    - ?$ w5 N6 e: ^$ _+ F+ ~5 J
  42. 1 j; Z3 O* K! [
  43. #------------------------------------------------------------------------------#
    6 @7 B% d# ^8 ^$ G$ M+ g) h! h% r
  44. #  NEW - First event command as a COMMENT
    ( \. G2 h! [4 D* b/ U
  45. #------------------------------------------------------------------------------#
    ( _2 a0 z7 @5 |* U, w# {
  46. #  You can add a comment as the first event command on an event page to set if# I# d% z1 u- Q$ V* M3 G
  47. #  that event has an icon, shadow or reflection active. The tags to use are" E9 u0 U8 O# w8 e- j
  48. #  below, all must be on the same line in the comment.
    / y+ m- ~! ^  U2 p
  49. #8 V" ~7 n" E! ?/ S. N* P3 A
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)0 `: r* j! A) `! i$ B( S/ o
  51. # <shadow>           # set the event to display a shadow
      B/ D, ]. B7 z2 G5 i$ M! C/ e9 C
  52. # <reflect>          # set the event to display reflections( o1 M, X' C8 T
  53. #/ X0 v' K: e; z' Y# |! w( J" L
  54. #------------------------------------------------------------------------------#, D  ]1 H! C+ p6 H) G
  55. #  EXAMPLE:7 H) U9 A) `# ]9 ~
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    3 n- _5 W& z, Y7 w9 z# b. r
  57. #------------------------------------------------------------------------------#1 ]0 }: \; D" f7 V
  58.   X4 A+ k9 N' @1 O/ K  Q
  59. # N$ N# ~$ p9 ?4 g9 C9 h  k9 W# D
  60. #------------------------------------------------------------------------------#+ F. A0 C6 ~. ~' L6 q4 q2 p
  61. #  SCRIPT CALLS:6 H6 R5 P# h& F) U
  62. #------------------------------------------------------------------------------#
    " o+ B& @# w4 S
  63. #- B( p7 c! ?) |( S
  64. #  char_effects(x,x,x,status)
    ! g  u' n: e% K; f5 G& q2 F8 e7 O
  65. #
    0 E6 n' m2 |9 U) o
  66. #------------------------------------------------------------------------------#
    & c7 \4 t' _' `! W" {7 z
  67. #  # each effect can be true or false to enable/disable them during the game.+ k* C; i- z$ P" x2 Y; M1 R6 K
  68. #  # you can change multiples of effects at once, x being the effect number& S+ p- T) E6 j( `- _
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons
    % }$ g2 h; ~. W. \" A7 L+ _" @6 o* Q
  70. #------------------------------------------------------------------------------#, _2 g- G: F# s4 r: b9 J
  71. #  EXAMPLES:
    ; n4 f8 d3 q) C5 a
  72. #  char_effects(0,true)              # turn reflections on$ ^% a; U' w5 Z& Y% I
  73. #  char_effects(0,2,true)            # turn reflections and mirror on: W3 G* j# b# `, O1 W# Q
  74. #  char_effects(1,3,false)           # turn shadows and icons off
    , S# Z" h' E: o6 \. X( b3 F: X
  75. #------------------------------------------------------------------------------#
    ' w8 u' X/ w9 O
  76. #5 i* P) M' m% I2 o$ _
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset
    # V: }# ?6 u" }' j1 @2 h& g; C  ~
  78. #
    + m3 r5 y% o% h( M/ Q5 u
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset: {" S0 i& G! q% h, Y" O. Q
  80. #, Y# C  M& Z, N. z9 z4 u& T
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    - r  x8 C$ K( q+ x8 g0 B; n
  82. #
    : j7 N, F: ^, {% f$ v# X" d
  83. #------------------------------------------------------------------------------#: V4 F9 S* c  s' N
  84. #  EXAMPLES:+ l6 }* h' V7 c+ G- ], x$ i. B
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite' G7 U. `1 C2 P4 ?  p2 h. E
  86. #                                    # in position 2 of "Actor2" charset.
    & T8 Q9 ~  K9 l9 z# i- j. p8 P
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    * n5 e4 ^# @  N. w7 d: Q3 E* M
  88. #                                    # "Actor4" charset.
    4 [+ C0 P7 n3 j' f- t
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    ; a6 Y' V6 j) \) W  u
  90. #                                    # "Vehicle" charset./ h& |! A# h4 N/ ]9 A
  91. #------------------------------------------------------------------------------#/ T- ]( J# z4 }
  92.   
    ( [3 V( G" f$ B" U6 w4 L& L" d
  93. #------------------------------------------------------------------------------#) P9 k" J' |0 i+ n# P8 b+ u
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS- z1 H  r* R1 y' N$ e( s
  95. #------------------------------------------------------------------------------#5 V( w# s$ i8 C
  96. #6 }' H# x: h* h8 b$ ]
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off* ?, W) K$ i: h( \- H/ ]
  98. #                          # use this to specify for mirror and reflect.
    ' K9 @- I! t* e1 l3 e
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change" [1 I/ s3 D- q* Y  ?
  100. #                          # to change all events use :all1 A( T4 Z8 y8 j5 p* L2 H, }% k
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make: v7 J; d* B& [; I! [) m
  102. #                          # it 0 for no icon.
    # O# }- V0 m& t5 \; O$ D0 `
  103. #
    ) F7 M, [3 N; T  k! t( ?
  104. #------------------------------------------------------------------------------#: {" c6 J% Q/ t, ?$ ^
  105. #  EXAMPLES:7 {; l2 h1 S6 y3 v5 K. O4 m
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON: y/ R# n$ R; [3 X1 B: {* y
  107. #  shadow(1,false)         # Turn event 1 shadow OFF
    + n: d& t( ?7 ~( P1 Q( ]5 X  `/ f7 I* ^
  108. #  reflect(:all,true)      # Turn all event reflections ON
    2 A5 W: n$ @* R( F9 [( U
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear
    . ~2 H1 Y7 q' C- Y$ n% z4 Y
  110. #
    5 Z+ p0 k; }# r% J& c, g
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    # o8 E% v& N$ Q. k; ^# M/ q( t# F
  112. #        a map. This is a design decision to try to keep lag to a minimum. You" e  }" U6 }7 V
  113. #        should use these effects sparingly and only activate them on events2 Q2 [/ L# h) O7 K" n
  114. #        that require them.6 I1 `) @* O& y$ I6 Y- T) f
  115. #------------------------------------------------------------------------------#
    3 j; j  g) \- @4 R* Z) J3 ~
  116.   " ]# b' u6 f' ~) B7 N
  117. #------------------------------------------------------------------------------#$ k" l3 n7 ^" z, ]1 M9 c
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES: R" O: W' P+ U- N: L6 ~* }' d
  119. #------------------------------------------------------------------------------#
    & a* z- [/ ^# h" J! {3 x
  120. #
    5 \( F" j6 ]% W: z/ D, [& ?
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default ) x1 |1 {* c4 J
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off 2 @# ~4 H& I0 o5 C0 M4 ~3 N. ~0 o
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.
    8 C8 ?+ r% u5 r
  124. #, K$ n5 d" Y+ Z# G% z# q7 e0 V
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects, b2 {7 ]+ J; D4 ~) G6 T
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.  Y$ f; }+ F) o
  127. #  v_icon(x,x,x,icon_id)
    6 j, b$ n9 E' |; n) ?
  128. #
    1 B7 \# j  C& n/ K: a; O
  129. #------------------------------------------------------------------------------#
    ' U) z* K+ N  Q% O  I
  130.   
    & F, v$ T$ x$ u3 m8 o# x
  131. #------------------------------------------------------------------------------#6 K! U! E9 R3 `" U. y6 A8 p
  132. #  SCRIPT CALLS for shadow options
    + x6 G6 X. z* z, j1 _- u5 d
  133. #------------------------------------------------------------------------------#
    ' D4 n$ i" s$ G5 W
  134. #( b0 C0 C$ m- }& a+ R
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the $ N* p, \  F8 y' W- z: E
  136. #                              # light source number you wish to change (for* C. v# j+ K/ u/ a4 P
  137. #                              # more than one). These are reset on map change.( x, \5 n$ \. \: l( v- B' ~6 w  J
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.
    7 x$ e( V9 c8 @$ F
  139. #                              # This will need to be in parallel process if you+ S, q: Y: S1 p# G5 `
  140. #                              # want it to be a moving light.6 z! P3 v) M$ L1 H% |$ ~
  141. #
    , s1 w. i' ?, L# I+ S
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    * u1 W# H: W, G, D7 C, C- L
  143. #3 S4 _# j. Z) N1 o: A& o, l/ l1 }# h
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    4 x1 \4 z% w. ]. J% T2 I
  145. #    # fade = amount shadow becomes more transparent the further away you are.& \* a4 W( i* z8 g/ z7 _
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.) j9 \$ w& m' ?: k4 x' }
  147. #
    $ f# D, Q. r. V+ I4 @; g' R
  148. #------------------------------------------------------------------------------#
    : w5 z) O) z- }# K1 {' j
  149. #  EXAMPLE:; O2 u5 w0 C! z& h" w
  150. #  shadow_options(80,10,false)    # This is the default setting.! \- K! S' q0 h( e; t
  151. #------------------------------------------------------------------------------#
    4 [) l, m! K; `0 O
  152.   
    1 ~2 T6 S4 Z/ L! \8 r9 \/ ?0 e+ l
  153. #------------------------------------------------------------------------------#
    6 k+ y- {/ b. M) G4 i1 f3 W
  154. #  SCRIPT CALLS for reflect options5 ^) a, ?4 j0 V' l5 c  ?* D  I
  155. #------------------------------------------------------------------------------#" t( L. N# ~8 Z! E/ G0 l
  156. #
    ( \2 L9 g: i6 v4 @3 j3 D7 ~5 }- @
  157. #  reflect_options(wave_pwr)
    ( D5 N1 K- A$ r# ^! K, _
  158. #
    % V) H/ q  p& C0 H) o& b8 F! [
  159. #    # wave_pwr = how strong the wave movement is. 0 is off
    ' F+ Z; ?' ], {- o% F
  160. #
    % w% u( w; y& s( I/ ]
  161. #------------------------------------------------------------------------------#2 @- E9 _1 ]6 @
  162. #  EXAMPLE:2 z3 W# {- P# X, }# x
  163. #  reflect_options(1) # Turn wave power to 1
    . ]. @$ l5 E- V% _+ ]) H6 S$ S2 r# C
  164. #------------------------------------------------------------------------------#+ o0 T+ _1 u4 a: s. C
  165.   * P$ x$ ?7 n( L" ~
  166.   
    2 S, U) C/ B- h- |; `
  167. #------------------------------------------------------------------------------#% z. b7 O4 H# A) k0 B
  168. #  NOTETAG for ACTORS- y$ `1 e4 J' N+ s5 V7 o
  169. #------------------------------------------------------------------------------#
    : a. e$ @8 \4 J& Q( F
  170. #- \& |4 O" V" N% {( o, R4 R/ h
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)2 d2 a5 |5 r4 y* g9 l
  172. #& {- n1 p  F* \2 E$ h, ]
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections
    5 [$ t, t3 g5 r8 m
  174. #                                  # and use the character in position 'pos'& C# l4 h, C0 R' Q
  175. #
      W1 X, g+ I/ _2 ?3 E' m! E
  176. #------------------------------------------------------------------------------#" p3 b- V  f0 D
  177. #  EXAMPLES:
    3 i% b/ Q! E6 J$ a
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset, {1 k! L0 j/ @$ j$ j' G
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    4 ?) X" j& m+ @
  180. #------------------------------------------------------------------------------#
    , G& K7 z- N, {  t/ w0 q( K
  181.   1 \3 Z& ~0 y+ W- i6 }2 ~
  182.   ; T1 u" \/ P. ]- s! N4 }
  183. ($imported ||= {})["Galv_Character_Effects"] = true
    ( M* e# o5 m* S0 U
  184. module Galv_CEffects
    5 h( b8 e2 a  @: R. j# E
  185.   
    # n& E% N9 n. j# w
  186. #------------------------------------------------------------------------------#  , U  {$ E+ k9 E# K( l6 ]
  187. #  SETUP OPTIONS& n1 e! \& S1 {* {  |4 T
  188. #------------------------------------------------------------------------------#& {  x$ p* {( B6 @
  189.   
    0 O4 D! F6 q$ u' j& X8 v, G! x5 H
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the
    % h# e6 B5 R) Z# U; U# J- j
  191.                         # region on the wall you want to make reflective (and6 C, ?" n" X' W7 H$ |7 I
  192.                         # then use tiles/mapping that make the parallax visible), n/ y6 g: N+ \! u$ `  n+ g
  193.   . I, A* y$ d) \% g* k
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters
    2 s7 ?6 N0 Q& l& M( n  X
  195.     ( a7 L- ^0 t( \% A. J) @2 s
  196.   REFLECT_Z = -10       # Z level of reflections) J4 S+ T$ r+ C+ W/ E
  197.   SHADOW_Z = 0          # Z level of shadows
    8 Y2 F" T7 N$ W" F
  198.   8 J7 e" I; b* J
  199. #------------------------------------------------------------------------------#  ) v* q( s- B; I. H. H' {' c8 k
  200. #  END SETUP OPTIONS
    $ n& ~9 O/ `: N% l$ y
  201. #------------------------------------------------------------------------------#9 c4 J: C" f! b3 S' b7 l/ }
  202. end2 c# U* `( ^; z. r
  203.   5 R' L' K1 r% W! o/ Q# G8 M# @
  204.   ( |# E4 G1 U8 Z, _
  205. - i# b4 A% F' z! b8 B- k) [+ ]6 |; z
  206. $ A- T+ j0 N( N1 d
  207. class Game_Map
    ! X* M6 P; m0 z* _2 j% O9 _# z
  208.   def do_icons(refresh = true)+ j- l: M5 \2 E' M
  209.     @events.values.each { |e|
    % a5 r! O2 L2 a0 n3 `: n
  210.       next if !e.list
    $ e$ m7 Q! c: k
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    ) C2 m) T! p- W3 d, z4 N! z7 `) a3 l
  212.         e.icon = $1.to_i6 u$ |& `+ p  D# l" p
  213.         e.icon_offset = [$2.to_i,$3.to_i]% J) X% o6 L: \. w
  214.       else
    + N0 T! f/ I; N6 i- F# `# A
  215.         e.icon = 0
    ' R$ r8 [# h& h4 D+ ^3 C  q3 `0 U
  216.         e.icon_offset = [0,0]. s* y% X4 a* n" C
  217.       end  W0 E9 s- K) h  F, ?7 m2 ^, p
  218.     }
    ) A' u! ]2 j: o" r  m. x
  219.     SceneManager.scene.spriteset.refresh_effects if refresh& P7 G/ \( M/ N* @
  220.   end" ]0 W  v& G5 b0 C  |
  221.    1 S' E5 ?1 U7 c' a8 b6 o' P9 a
  222.    6 |  s- Q+ }1 e- f* r7 T/ H' B
  223.   def do_shadows(refresh = true); D* F4 M) a' [0 [; E+ h+ B9 s
  224.     @events.values.each { |e|5 G! K8 r" u& D
  225.       next if !e.list3 ]) l. M( m1 w$ K" s6 J% p# M
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/9 T/ F# a; M- Q& H* k
  227.         e.shadow = true+ }: h; C7 T. p" u/ M5 [
  228.       else: ~6 i% m8 f+ X+ r) b/ \
  229.         e.shadow = false
    ( q/ ^( I8 G! r3 }
  230.       end
    + m2 L, H! s- w2 O4 k% W
  231.     }' ]; A( S5 T  i
  232.     SceneManager.scene.spriteset.refresh_effects if refresh
    ( |; x$ Z2 h1 n$ Z+ `
  233.   end
    * P" [. w6 ]  l- c2 B' b- ^
  234.    
    * ?' T* ~, A9 W0 B- ]/ W  V
  235.   def do_reflects(refresh = true)' }( B1 A( V+ C7 i5 H( c+ e
  236.     @events.values.each { |e|
    : c3 W2 u7 ~% H  Y! x
  237.       next if !e.list* I; l- Q" m$ w$ Y! f% p2 ?
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/
    3 x- B0 {: `2 a- t9 f! G- X  J
  239.         e.reflect = true6 B3 R4 a  t1 h" J# ]* r# i9 H
  240.       else  }0 |( c8 ?2 B# F4 \
  241.         e.reflect = false* r* v  K* \& u4 Q
  242.       end
    % |- M# z  n4 ^7 Z3 W
  243.     }: F" Z4 Y2 r' ^, ^4 k2 {, Q! ?
  244.     SceneManager.scene.spriteset.refresh_effects if refresh
    1 e  x7 L, L, s& \0 Y' a6 I
  245.   end
    $ v4 @" e8 y; o  U7 O  d- `% o
  246.    5 Z: F9 o& w2 l: h! [$ }
  247.   def do_all_chareffects5 d3 v! K2 E9 a' o* U
  248.     do_icons(false)9 j6 L& \( U1 A: j) Q  ?
  249.     do_shadows(false)
    9 g% m  J# [' H
  250.     do_reflects(false)
    7 C4 [- e/ J9 C2 ]; Q3 }* @
  251.   end
    . {: Q0 R3 p( M1 t+ e! ?
  252.    + ?" A) j' G4 i: D' I- b0 k
  253. end # Game_Map7 \7 T' Z1 S+ M4 ^/ v5 h* d

  254. . z- z0 Q: L, q/ y) P

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2025-2-19 06:54

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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