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

Project1

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

水面动态倒影,求解

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

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

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

x
代码复制
  1.  

. M2 I1 y  {- p- C, F. v8 e这个代码怎么用啊,有大神知道吗。我从国外找的。
6 N2 I: ?: W2 Ghttp://galvs-scripts.com/2013/02/21/character-effects/: p9 ]$ f# F5 |! `) `2 Z
是关于动态倒影的
梦石
0
星屑
50
在线时间
21 小时
注册时间
2014-6-25
帖子
7
2
 楼主| 发表于 2014-6-25 11:32:43 | 只看该作者
  1. #------------------------------------------------------------------------------#5 v2 Z* h, c5 v( e
  2. #  Galv's Character Effects
    6 ^, B) q+ \: B
  3. #------------------------------------------------------------------------------#
    ' i4 z; A! l$ `4 Z# P9 S% S
  4. #  For: RPGMAKER VX ACE: E  v7 X; s$ z' }* V; d; V6 m
  5. #  Version 2.1
    ) V1 {8 X9 h, U7 |9 ^" `* {$ d
  6. #------------------------------------------------------------------------------#
    * h- P8 C! }  P9 c! R8 |+ k" W
  7. #  2014-01-16 - Version 2.1 - Fixed double balloon/animation bug with shadows
      K. u/ i4 f" D
  8. #  2013-12-07 - Version 2.0 - Added comments to more easily add event effects
    6 I% M+ _, F6 W9 h; _1 M5 k
  9. #                           - Fixed shadow facing bug
    8 D1 |* }; p, ]5 k$ m2 H: F
  10. #  2013-02-24 - Version 1.9 - added z level option for reflection and shadows
    ; i4 s3 l7 x6 A
  11. #  2013-02-23 - Version 1.8 - added multiple light sources for shadows& l! K( c4 m! C3 x* d( v! R
  12. #  2013-02-22 - Version 1.7 - bug fixes2 V/ \% s/ u& V  {0 i: h& ]
  13. #  2013-02-22 - Version 1.6 - added icon effect
    % t) y: M/ [1 I* \9 r' B) [7 R" S
  14. #  2013-02-22 - Version 1.5 - fixed mirror bug on large maps6 M- ]* A! `4 {, H* n9 C) m7 H: t' i( d
  15. #  2013-02-22 - Version 1.4 - added effects to vehicles7 o: |  k" q" c+ u" I7 ~
  16. #  2013-02-21 - Version 1.3 - fixed jump reflection and other minor tweaks
    : f" c+ B) v/ l
  17. #  2013-02-21 - Version 1.2 - bug with less than 4 actors (oops)( m$ v2 Z" Y1 B/ m
  18. #  2013-02-21 - Version 1.1 - updated flicker effect' Q: {2 [0 J+ l/ k! e
  19. #  2013-02-21 - Version 1.0 - release
    ; P/ N% g# X+ ?4 X/ \
  20. #------------------------------------------------------------------------------#
    - j8 m! A6 R3 T! M2 Q6 I. D
  21. #  This script was made to provide some additional effects for characters such
    1 \" o* X- W7 y# _
  22. #  as events, followers and the player on the map.' Z. S4 |7 d. J3 J
  23. #  Currently it includes:
    ' W( t& O' Z: H3 q" N7 s
  24. #7 F# M- Z  w3 q% [" J$ u! n% X
  25. #  Shadows
    & P; ^# Q8 r0 Y6 e: \4 ^
  26. #  Shadows that appear under player and events in a directions depending on
    . P8 a6 Z1 h' ?
  27. #  a light source that you choose.: `+ n. [8 x: z0 I
  28. #
      A& `3 W$ {# N- }' K, ]% v5 B
  29. #  Parallax Reflect5 `1 A* N- Z& h) F- {# N
  30. #  Reflections that appear on the parallax layer for events and actors to be' g  L8 z4 E1 z, e& Y
  31. #  used for things like reflections in the water or glass floor etc. To get
    1 N9 X3 J" H/ A9 C$ h
  32. #  effects like the demo, you need to edit the charset graphic to make the water
    - f( y! {7 l/ U3 K* c
  33. #  partially transparent.
    ; P0 u: ^$ i' j* Q
  34. #2 l3 U3 b7 V% v1 ]; i
  35. #  Parallax Mirrors% {( _- Y. F. A1 P) I0 h; E5 a
  36. #  Much like reflect but are instead actors and event are reflected in a mirror
    ! B( T1 O; K6 X7 o7 S& O
  37. #  on a wall designated by a region. Both mirror and reflect effects can be
    ; x( x7 J* m3 i7 n- d# `. U
  38. #  changed so actors and events can use different charsets for their reflections  U/ B8 y: B0 u$ |! I- {! N
  39. #
    / ]! H3 j7 S2 u6 f; v
  40. #------------------------------------------------------------------------------#" Q  k6 j* X7 y/ {- r
  41.   0 o; a1 M9 ?3 k8 ]9 W

  42. ; P* H! D- k$ r
  43. #------------------------------------------------------------------------------#
    4 [5 A; q2 L- B  E
  44. #  NEW - First event command as a COMMENT4 `5 o' X  ^. G3 M6 X9 U* ^8 O; b1 _
  45. #------------------------------------------------------------------------------#" \- W  X6 d$ M
  46. #  You can add a comment as the first event command on an event page to set if
    4 P3 p1 F8 B4 ~; r# Z4 s
  47. #  that event has an icon, shadow or reflection active. The tags to use are
    6 t& ?1 F6 q0 c8 ?( Y, O6 @
  48. #  below, all must be on the same line in the comment.! |% a3 `3 {  W. i- G( D
  49. #
    1 S, Q+ B. v5 Z. o
  50. # <icon:id,x,y>      # set the event to display an icon (x,y position offset)
    - q* `- E" ~) v3 ]& c2 m6 y
  51. # <shadow>           # set the event to display a shadow' R& `" ]3 ^8 X2 h& R1 q! g
  52. # <reflect>          # set the event to display reflections
    , E" ]$ k* x( W& @+ P% e( N
  53. #0 @5 A4 E2 S/ K: r- b3 E! \  G" i, [6 T
  54. #------------------------------------------------------------------------------#
    5 u% }5 n# Z6 y" X* Y
  55. #  EXAMPLE:( A) f: i/ u) [" t. M7 C: @; {6 U
  56. # <icon:1,0,0><shadow><reflect>    # to show reflect, shadow and icon 1 on event
    ! ]) I3 I# _9 Z/ V  @( [8 d
  57. #------------------------------------------------------------------------------#
    - y0 I& k# G- O  F# Z

  58.   q# _1 U7 F& D& W6 L

  59. # Y' M: K8 X1 g
  60. #------------------------------------------------------------------------------#, s. T( Z- R! q) L% L1 b
  61. #  SCRIPT CALLS:' L7 ^3 J+ C! W0 b  |1 n$ P
  62. #------------------------------------------------------------------------------#
    " O& Z! o$ z6 s+ c0 P/ F
  63. #
    ! b2 o4 H/ k/ B2 X( T
  64. #  char_effects(x,x,x,status)
    ; K9 d% P& Y9 C
  65. #. D% m1 ?5 E4 G9 x" w- ^
  66. #------------------------------------------------------------------------------#
    % w# l4 G- l8 ?1 k! E
  67. #  # each effect can be true or false to enable/disable them during the game.
    0 ]. d* |; G3 p9 Z. x: B
  68. #  # you can change multiples of effects at once, x being the effect number
    ! s! q4 k$ r' m9 Z
  69. #  # 0 = reflect    1 = shadows    2 = mirror    3 = icons8 D" }4 e0 k- l3 s3 k
  70. #------------------------------------------------------------------------------#& _1 `" c! {7 J' }4 |
  71. #  EXAMPLES:
    4 u# n( H3 X$ a6 Z, h8 }! [8 l
  72. #  char_effects(0,true)              # turn reflections on
    2 x0 Z  U6 B+ }! H" O& g
  73. #  char_effects(0,2,true)            # turn reflections and mirror on7 L0 B, o' [( ~
  74. #  char_effects(1,3,false)           # turn shadows and icons off0 x6 C5 p6 H. N' @8 T
  75. #------------------------------------------------------------------------------#
    ' r& @1 _9 F% b
  76. #
    # u% ^/ i* u( u$ D" n
  77. #  reflect_sprite(actor_id,filename,pos)    # Change actor's reflect charset) H! x/ h% i" E/ k' K2 O) _9 T; t
  78. #
    8 ]! G* D. l3 l: L, Z
  79. #  reflect_esprite(event_id,filename,pos)   # Change event's reflect charset& ^  d4 G, R, R+ U
  80. #
    ; k" w1 E/ s! \
  81. #  reflect_vsprite(vehicle_id,filename,pos) # Change vehicle's reflect charset
    4 W' I; e8 f5 d. J$ Q* u
  82. #( c3 v- k, |1 S7 N
  83. #------------------------------------------------------------------------------#
      }' N" X% A8 W9 `8 P
  84. #  EXAMPLES:6 u" t1 {+ ?: Z! n
  85. #  reflect_sprite(1,"Actor2",2)      # change actor 1's charset to use sprite1 E& B6 k, v3 T/ H. t1 Y: \
  86. #                                    # in position 2 of "Actor2" charset.1 j- o& k; N) T" f5 c0 W
  87. #  reflect_esprite(3,"Actor4",5)     # event 3 will use sprite in position 5 of
    0 k) {( P! j+ z
  88. #                                    # "Actor4" charset.
    6 x3 Q. e8 p& c" X9 t' D
  89. #  reflect_vsprite(1,"Vehicle",5)    # Ship will use sprite in position 5 of
    . M. L4 O) m6 ]& ]
  90. #                                    # "Vehicle" charset.# R0 q% a+ n# P5 \& s
  91. #------------------------------------------------------------------------------#2 i7 ?, h; w9 o, t5 \& |% _6 x- n" N
  92.   
    & y5 m2 U6 h+ L$ Q
  93. #------------------------------------------------------------------------------#
    $ H/ @2 v% V0 H' c3 g
  94. #  SCRIPT CALLS to turn effects ON or OFF for chosen EVENTS" |9 g$ ]" s- R0 A7 c! B
  95. #------------------------------------------------------------------------------#% D$ U8 y# C# e
  96. #
    * {6 z  r8 l: A1 v& D9 {0 r; T
  97. #  reflect(x,x,x,status)   # status can be true or false to turn on or off! \* H% t8 ?6 g! ~. e* r. a$ ]7 Q
  98. #                          # use this to specify for mirror and reflect.4 t: P8 v3 e# B& @; C1 J
  99. #  shadow(x,x,x,status)    # where x is the event ids you want to change
    * P3 \% d4 g6 O3 Y  _0 T, S+ Y% N" P
  100. #                          # to change all events use :all
    : o  H/ o' N0 m) `0 R
  101. #  icon(x,x,x,icon_id)     # set which icon id to appear above character. Make
    3 k" \: q4 F* j& X
  102. #                          # it 0 for no icon.. ]8 [5 J% |+ D! R/ m
  103. #
    7 V5 U, R* s8 |  F
  104. #------------------------------------------------------------------------------#
    ; w, d. }4 y1 z
  105. #  EXAMPLES:
    - ~6 m, L9 E6 \# k6 q
  106. #  reflect(14,17,3,1,true) # Turn events 14, 17, 3 and 1 reflections ON* m" Y* n  z. u$ m3 g* `( `
  107. #  shadow(1,false)         # Turn event 1 shadow OFF& j: e6 d$ L% f8 g1 U+ O7 E6 V
  108. #  reflect(:all,true)      # Turn all event reflections ON! o! x% G- s8 K+ M
  109. #  icon(1,2,3,4,38)        # Events 1,2,3 and 4 will have icon 38 appear# [% T. N- j+ |+ ~( y( H$ |, c
  110. #
    # g; `" I/ w" s
  111. #  NOTE: All events will default to NO shadows and NO reflections when entering
    6 Y( s8 J& K" e4 C
  112. #        a map. This is a design decision to try to keep lag to a minimum. You: z) y' N! a1 {. e5 b* K
  113. #        should use these effects sparingly and only activate them on events
    ! a; K# y1 Q7 \, I% K
  114. #        that require them.
    1 c3 o9 ^3 @3 y- A- W/ {6 I; w. o
  115. #------------------------------------------------------------------------------#; ^- H1 G9 d- a4 A
  116.   $ M1 N9 d( s$ y8 T+ F
  117. #------------------------------------------------------------------------------#
    / Q* o7 \- W) H; }4 _
  118. #  SCRIPT CALLS to turn effects ON or OFF for ACTORS and VEHICLES( j7 Z+ I4 g9 Y! z7 Y( |8 E
  119. #------------------------------------------------------------------------------#
    ! o/ G) ~4 |9 o& r( c  z+ f6 N' s
  120. #
    % {/ S3 g- v. i' N; J, @2 l. T
  121. #  actor_reflect(actor_id,status)  # reflections and shadows are ON by default " E8 A5 f) ?# e% V% O2 v! `
  122. #  actor_shadow(actor_id,status)   # for actors and vehicles. Turning them off
    * u" B, k( @6 D/ O* x% x
  123. #  actor_icon(actor_id,icon_id)    # or on will permanently change them.0 j4 ?2 Z! _1 A  }
  124. #
    - c0 c9 a) f( y+ m; A* R
  125. #  v_reflect(x,x,x,status)    # use these v_ calls for changing vehicle effects9 O2 o& t7 p  B+ E$ ~
  126. #  v_shadow(x,x,x,status)     # on and off for vehicles.
    * D1 x9 D- d; ~
  127. #  v_icon(x,x,x,icon_id)
    2 l8 P" y8 d5 n6 ~' Y% j
  128. #( b- t8 ], n7 G" `" h: A
  129. #------------------------------------------------------------------------------#5 x4 r3 ~1 D+ H- J8 B
  130.   
    % Z& m- L, p4 X
  131. #------------------------------------------------------------------------------#% V* Q. z6 V+ f2 s9 {
  132. #  SCRIPT CALLS for shadow options
    2 K( G4 ^0 a5 ?/ k. |1 S* J
  133. #------------------------------------------------------------------------------#
    2 \: o9 a) d) X2 ]3 U7 \& ~
  134. #. E  _6 K! o+ ]3 \% Z( X& n
  135. #  shadow_source(x,y,id)       # set the x,y location for the light. id is the
    7 W: @+ y3 s# K& f) t. W0 H/ W3 Y
  136. #                              # light source number you wish to change (for: z) I" K4 n. [) T" q
  137. #                              # more than one). These are reset on map change.
    0 b: K8 p; @3 f+ d7 f( G6 ?
  138. #  shadow_source(event_id,id)  # use an event's x,y location for the light.( r: P, r$ p; ]- M# I
  139. #                              # This will need to be in parallel process if you
    ' E) x# ]" G+ i; W- c2 Q: _
  140. #                              # want it to be a moving light.
    9 [( W/ J& j9 Z1 h4 r& x
  141. #
    # s& H8 p3 A, d" n( J0 c5 d
  142. #  shadow_options(intensity,fade,flicker)    # descriptions below
    1 l# u* s  z% U+ a
  143. #, U+ i. z6 O; F& n( H' f% r+ s
  144. #    # intensity = opacity when standing next to the light source (255 is black)
    5 J! ]+ [) q$ [$ b9 y
  145. #    # fade = amount shadow becomes more transparent the further away you are.( F1 W& P0 f4 g
  146. #    # flicker = true or false. Shadows will flicker as if being cast by fire.1 n- I! Y$ u. r
  147. #4 k. K/ \% X- z  E4 w  p
  148. #------------------------------------------------------------------------------#" n8 H5 S( b2 T6 J- n
  149. #  EXAMPLE:* @  y8 P+ Y2 V! e4 C, K' V# m
  150. #  shadow_options(80,10,false)    # This is the default setting.
    " Z+ y# N. R  K) t% s
  151. #------------------------------------------------------------------------------#& J7 ?* x4 \) q6 l# f$ O
  152.     w6 B9 |" [' b2 w, L& Z
  153. #------------------------------------------------------------------------------#
    7 l3 R# m& @, R  P; e
  154. #  SCRIPT CALLS for reflect options
    , p6 P! F$ |3 h. \* b" j1 _7 C
  155. #------------------------------------------------------------------------------#
    " s' d3 o7 L1 a3 K* ?* \
  156. #1 m7 X  x- M7 o& v
  157. #  reflect_options(wave_pwr) 1 h9 @7 L* C7 }( X8 k' I
  158. #6 q2 D4 R% I  Y* i7 g. ~9 B# a# V
  159. #    # wave_pwr = how strong the wave movement is. 0 is off2 k: _6 B  `7 b, L" F
  160. #; o  y$ g% _4 Q1 L
  161. #------------------------------------------------------------------------------#
    * M6 y4 i1 [# ~4 d% A; @
  162. #  EXAMPLE:
    ( Z: v) r* n( b  m3 R
  163. #  reflect_options(1) # Turn wave power to 1
    0 o, ?( D/ O: ^2 z
  164. #------------------------------------------------------------------------------#
    5 z4 ~2 u: D, K8 j+ d9 ]
  165.   
    / p8 n) @& ?" F& b2 {: f+ X
  166.   
    2 h1 g6 `1 H& ^4 l
  167. #------------------------------------------------------------------------------#
    ( q( U1 v5 }0 m  C: s0 Q8 V
  168. #  NOTETAG for ACTORS( i: v9 I2 ~3 Z0 {/ ^* F
  169. #------------------------------------------------------------------------------#
    % ?4 `) X6 L! F9 [, ]+ M, q
  170. #: k9 `0 B) O' W0 ?' F3 _% _
  171. #  <no_reflect>    # Actor will not have a reflection (for vampires of course!)
    8 G3 ?; a4 I, d) C# M3 w
  172. #
    # E7 \7 @8 X  |1 K) E/ u9 E
  173. #  <reflect_sprite: FileName,pos>  # Actor will use this charset for reflections5 E0 E% {) T7 \' v6 C8 b  z/ O
  174. #                                  # and use the character in position 'pos'
    : V/ v- Y! `$ ~  c% f: x
  175. #4 O$ F' S) `( _( \
  176. #------------------------------------------------------------------------------#9 R8 T% E5 y7 G# P7 i4 n4 J$ H2 I
  177. #  EXAMPLES:6 y7 l+ _4 G8 n3 k" q
  178. #  <reflect_sprite: Actor2,0>    # The first character from Actor2 charset3 Z' |* S; N; G4 N2 l
  179. #  <reflect_sprite: Actor3,7>    # The last character from Actor2 charset
    , K# V0 g. O+ N' K
  180. #------------------------------------------------------------------------------#* J7 b0 D7 S# |# K# q% I
  181.   - t  k5 V% Z8 d- q0 L  `& {. l
  182.   
    2 E4 i4 T% s: N2 V) ?
  183. ($imported ||= {})["Galv_Character_Effects"] = true( r1 U$ W. Z% c9 K
  184. module Galv_CEffects
    & p; y- r; Y' g1 J3 |/ c; Z( i" z9 \
  185.   
    4 i; O+ S- V5 Z/ r
  186. #------------------------------------------------------------------------------#  6 M, S$ j1 F* @
  187. #  SETUP OPTIONS
    0 D1 U: D+ N+ \
  188. #------------------------------------------------------------------------------#
    - m( x6 g1 q0 R2 d
  189.   
    , k0 X* H6 Y, _' `
  190.   MIRROR_REGION = 1     # Region ID used to determine mirror walls. Paint the  s$ t& L( z. P4 z# x
  191.                         # region on the wall you want to make reflective (and
    6 I4 @- V2 k, B
  192.                         # then use tiles/mapping that make the parallax visible)
    ' Y1 S, l5 C  T  U: c
  193.   
    & g2 l' z, S" F# s. K% ~* ?
  194.   ICON_OFFSET = -60     # Y offset for icons that are displayed above characters; L" @3 j/ N8 k/ c
  195.    
    ; e) ]3 K) M/ R# u. v0 D
  196.   REFLECT_Z = -10       # Z level of reflections8 q/ ~# `% R. A
  197.   SHADOW_Z = 0          # Z level of shadows
    9 U- L( K+ m1 x0 |; Z
  198.   
    ' t7 w: l5 M/ H7 E7 g- N, y
  199. #------------------------------------------------------------------------------#  
    $ @5 l; V4 K3 s; V8 N# j9 g" I
  200. #  END SETUP OPTIONS& i9 S& T: ^6 q: W2 m
  201. #------------------------------------------------------------------------------#8 K: }. t% J8 W8 Z) h. ^
  202. end
    1 K' c. i1 h( |1 ^0 H1 q
  203.   
    " v3 B1 |; z' T
  204.   $ A% X; k; x+ X+ R4 ~) \
  205. " Y% z- Y) R! z/ d1 n+ i
  206. 2 c7 i. \3 E8 E/ f& _
  207. class Game_Map, U& q6 x* F- n
  208.   def do_icons(refresh = true)
    1 @* I! |6 M: k0 j; _3 r
  209.     @events.values.each { |e|# V' L1 K; y& \0 ~, L/ y, [" A
  210.       next if !e.list5 p4 H4 U+ `5 \% A( R! D+ H
  211.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<icon:(.*),(.*),(.*)>/
    0 ^; [4 J. d; r7 @; T- U. V5 C7 ~- c
  212.         e.icon = $1.to_i* S% s. `, K5 X2 o1 X
  213.         e.icon_offset = [$2.to_i,$3.to_i]
    " s1 \6 ?3 J2 M0 q0 O6 q
  214.       else! `- C3 o4 H) `+ ~- i* R9 ~
  215.         e.icon = 0
    / O1 e" N2 S. Q0 P$ f& Z1 p  X& |" F
  216.         e.icon_offset = [0,0]
    4 A" F, T2 }% o8 I8 x
  217.       end
    # S8 U. [, W& X* |1 U6 {% G/ u
  218.     }" ^* u+ a0 H9 l: \, G8 `
  219.     SceneManager.scene.spriteset.refresh_effects if refresh! I) ]0 K3 U* a( h9 {
  220.   end; N2 e; R4 Z8 ]" x$ \3 B* s6 W
  221.    # N! L( k( e1 d1 K) a6 B  Z
  222.    
    & G  \( @2 e3 \: u  p9 r
  223.   def do_shadows(refresh = true)" O$ f4 i: I8 K+ k* ^
  224.     @events.values.each { |e|: V  l% N; ]2 r" w
  225.       next if !e.list8 X! ]7 P* J  h& a$ h" s
  226.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<shadow>/. c( O" @+ d  W$ @, q
  227.         e.shadow = true
    + J: v8 w) C8 L: o. G- d  \
  228.       else1 o5 j8 ?. N# w. x, h; y" {9 s
  229.         e.shadow = false
    9 Q2 {# J2 T; {/ |  C+ h: m
  230.       end5 d+ V- d/ l3 w( u# T' {
  231.     }3 o0 e( o0 n% P8 e; s
  232.     SceneManager.scene.spriteset.refresh_effects if refresh' n, D% R) v8 }" u
  233.   end
      F# J+ [8 a4 o8 Z  Q% J
  234.    4 V7 Y0 R9 E$ b) I) T0 h) F
  235.   def do_reflects(refresh = true)
    4 o/ l( Y1 F" [" S- a
  236.     @events.values.each { |e|! a: b1 o/ c# f# R/ t
  237.       next if !e.list6 K  J1 O! v* `
  238.       if e.list[0].code == 108 && e.list[0].parameters[0] =~ /<reflect>/8 G, b) N( u( I3 H( i/ z
  239.         e.reflect = true
      s, C2 u9 l5 J1 B, S
  240.       else
    ' N5 N2 E2 ]$ @( a
  241.         e.reflect = false
    $ J5 k' e  J0 C; @3 c* a
  242.       end
    6 I) O, l( s! b  E. f
  243.     }$ ^" O/ |- d: j3 b0 w
  244.     SceneManager.scene.spriteset.refresh_effects if refresh7 ]0 W# u$ ?. B$ y
  245.   end
    " Z3 K- Q( U& P3 a% f
  246.    
    - \  V( ^1 W5 Q! u9 x# W3 m6 V4 v
  247.   def do_all_chareffects) F- d% y5 [7 X. U: e
  248.     do_icons(false)
    % O1 F5 h, a, C0 ~! G" @
  249.     do_shadows(false)6 F2 C. {1 K" A2 @
  250.     do_reflects(false)
    $ v4 G% x6 l; k6 }- M( T. M
  251.   end
    - I, g- S6 r& m% Q+ o% z
  252.    " F" o3 f% A( w+ u. p
  253. end # Game_Map- U1 W- S3 v8 B, Q4 u  _

  254. - k9 B# p4 H  Z8 p. R

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

使用道具 举报

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

使用道具 举报

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

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

GMT+8, 2026-6-5 11:43

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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