11-- 閃刀機-ウィドウアンカー
2- -- Brandish Mecha Widow Anchor
2+ -- Sky Striker Mecha - Widow Anchor
33-- Scripted by ahtelel
44local s ,id = GetID ()
55function s .initial_effect (c )
6- -- Activate
6+ -- Negate the effects of a face-up monster on the field
77 local e1 = Effect .CreateEffect (c )
8+ e1 :SetDescription (aux .Stringid (id ,0 ))
89 e1 :SetCategory (CATEGORY_DISABLE )
910 e1 :SetType (EFFECT_TYPE_ACTIVATE )
1011 e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
@@ -14,11 +15,8 @@ function s.initial_effect(c)
1415 e1 :SetOperation (s .activate )
1516 c :RegisterEffect (e1 )
1617end
17- function s .cfilter (c )
18- return c :GetSequence ()< 5
19- end
2018function s .condition (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
21- return not Duel .IsExistingMatchingCard (s . cfilter ,tp ,LOCATION_MZONE ,0 ,1 ,nil )
19+ return not Duel .IsExistingMatchingCard (Card . IsInMainMZone ,tp ,LOCATION_MZONE ,0 ,1 ,nil )
2220end
2321function s .filter (c )
2422 return c :IsFaceup () and c :IsType (TYPE_EFFECT ) and not c :IsDisabled ()
@@ -29,36 +27,19 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
2927 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TARGET )
3028 Duel .SelectTarget (tp ,s .filter ,tp ,LOCATION_MZONE ,LOCATION_MZONE ,1 ,1 ,nil )
3129 if Duel .GetMatchingGroupCount (Card .IsSpell ,tp ,LOCATION_GRAVE ,0 ,nil )>= 3 then
32- e :SetCategory (CATEGORY_DISABLE + CATEGORY_CONTROL )
30+ e :SetCategory (CATEGORY_DISABLE | CATEGORY_CONTROL )
3331 end
3432end
3533function s .activate (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
3634 local c = e :GetHandler ()
3735 local tc = Duel .GetFirstTarget ()
3836 if tc :IsFaceup () and tc :IsRelateToEffect (e ) and not tc :IsDisabled () then
39- Duel .NegateRelatedChain (tc ,RESET_TURN_SET )
40- local e1 = Effect .CreateEffect (c )
41- e1 :SetType (EFFECT_TYPE_SINGLE )
42- e1 :SetCode (EFFECT_DISABLE )
43- e1 :SetReset (RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END )
44- tc :RegisterEffect (e1 )
45- local e2 = Effect .CreateEffect (c )
46- e2 :SetType (EFFECT_TYPE_SINGLE )
47- e2 :SetCode (EFFECT_DISABLE_EFFECT )
48- e2 :SetValue (RESET_TURN_SET )
49- e2 :SetReset (RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END )
50- tc :RegisterEffect (e2 )
51- if tc :IsType (TYPE_TRAPMONSTER ) then
52- local e3 = Effect .CreateEffect (c )
53- e3 :SetType (EFFECT_TYPE_SINGLE )
54- e3 :SetCode (EFFECT_DISABLE_TRAPMONSTER )
55- e3 :SetReset (RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END )
56- tc :RegisterEffect (e3 )
57- end
58- if Duel .GetMatchingGroupCount (Card .IsSpell ,tp ,LOCATION_GRAVE ,0 ,nil )>= 3 and
59- tc :IsControlerCanBeChanged () and tc :IsControler (1 - tp ) and Duel .SelectYesNo (tp ,aux .Stringid (id ,0 )) then
37+ tc :NegateEffects (c ,RESET_PHASE |PHASE_END ,true )
38+ Duel .AdjustInstantly (tc )
39+ if Duel .GetMatchingGroupCount (Card .IsSpell ,tp ,LOCATION_GRAVE ,0 ,nil )>= 3 and tc :IsControlerCanBeChanged ()
40+ and tc :IsControler (1 - tp ) and Duel .SelectYesNo (tp ,aux .Stringid (id ,1 )) then
6041 Duel .BreakEffect ()
6142 Duel .GetControl (tc ,tp ,PHASE_END ,1 )
6243 end
6344 end
64- end
45+ end
0 commit comments