1+ -- ミサイル・ナイト
12-- Missile Knight
23local s ,id = GetID ()
34function s .initial_effect (c )
4- -- destroy
5- local e2 = Effect .CreateEffect (c )
6- e2 :SetDescription (aux .Stringid (id ,0 ))
7- e2 :SetCategory (CATEGORY_DESTROY )
8- e2 :SetType (EFFECT_TYPE_IGNITION )
9- e2 :SetRange (LOCATION_GRAVE )
10- e2 :SetProperty (EFFECT_FLAG_CARD_TARGET )
11- e2 :SetCondition (s .descon )
12- e2 :SetCost (Cost .SelfBanish )
13- e2 :SetTarget (s .destg )
14- e2 :SetOperation (s .desop )
15- c :RegisterEffect (e2 )
5+ -- Destroy 1 monster on the field if you destroyed a monster this turn
6+ local e1 = Effect .CreateEffect (c )
7+ e1 :SetDescription (aux .Stringid (id ,0 ))
8+ e1 :SetCategory (CATEGORY_DESTROY )
9+ e1 :SetType (EFFECT_TYPE_QUICK_O )
10+ e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
11+ e1 :SetCode (EVENT_FREE_CHAIN )
12+ e1 :SetRange (LOCATION_GRAVE )
13+ e1 :SetCondition (function (e ,tp ) return s [tp ]> 0 end )
14+ e1 :SetCost (Cost .SelfBanish )
15+ e1 :SetTarget (s .destg )
16+ e1 :SetOperation (s .desop )
17+ c :RegisterEffect (e1 )
18+ -- Check for monsters destroyed during a given turn
1619 aux .GlobalCheck (s ,function ()
1720 s [0 ]= 0
1821 s [1 ]= 0
@@ -27,27 +30,24 @@ function s.initial_effect(c)
2730 end )
2831 end )
2932end
30- function s .spfilter (c ,tp )
33+ function s .chkfilter (c ,tp )
3134 return c :IsPreviousLocation (LOCATION_MZONE ) and (c :IsReason (REASON_BATTLE ) or c :IsReason (REASON_EFFECT ) and c :GetReasonPlayer ()== tp )
3235end
3336function s .checkop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
34- if eg :IsExists (s .spfilter ,1 ,nil ,tp ) then
37+ if eg :IsExists (s .chkfilter ,1 ,nil ,tp ) then
3538 s [tp ]= s [tp ]+ 1
3639 end
3740end
38- function s .descon (e ,tp )
39- return s [tp ]> 0
40- end
4141function s .destg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
4242 if chkc then return chkc :IsLocation (LOCATION_MZONE ) end
43- if chk == 0 then return true end
43+ if chk == 0 then return Duel . IsExistingTarget ( aux . TRUE , tp , LOCATION_MZONE , LOCATION_MZONE , 1 , 1 , nil ) end
4444 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_DESTROY )
4545 local g = Duel .SelectTarget (tp ,aux .TRUE ,tp ,LOCATION_MZONE ,LOCATION_MZONE ,1 ,1 ,nil )
46- Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,# g , 0 ,0 )
46+ Duel .SetOperationInfo (0 ,CATEGORY_DESTROY ,g ,1 , tp ,0 )
4747end
4848function s .desop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
4949 local tc = Duel .GetFirstTarget ()
5050 if tc and tc :IsRelateToEffect (e ) then
5151 Duel .Destroy (tc ,REASON_EFFECT )
5252 end
53- end
53+ end
0 commit comments