11-- ネクロショット
22-- Necro Shot
3- -- fixed by Larry126
43local s ,id = GetID ()
54function s .initial_effect (c )
6- -- equip
7- aux .AddEquipProcedure (c ,nil ,s .filter )
8- -- banish
5+ -- Equip only to a DARK Warrior monster
6+ aux .AddEquipProcedure (c ,nil ,s .eqfilter )
7+ -- Banish 1 monster from either GY
98 local e1 = Effect .CreateEffect (c )
109 e1 :SetDescription (aux .Stringid (10691144 ,2 ))
1110 e1 :SetCategory (CATEGORY_REMOVE )
12- e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
1311 e1 :SetType (EFFECT_TYPE_IGNITION )
12+ e1 :SetProperty (EFFECT_FLAG_CARD_TARGET )
1413 e1 :SetRange (LOCATION_SZONE )
1514 e1 :SetTarget (s .rmtg )
1615 e1 :SetOperation (s .rmop )
1716 c :RegisterEffect (e1 )
18- -- selfdes
17+ -- Destroy this card after using the above effect 3 times
1918 local e2 = Effect .CreateEffect (c )
2019 e2 :SetType (EFFECT_TYPE_SINGLE )
2120 e2 :SetProperty (EFFECT_FLAG_SINGLE_RANGE )
22- e2 :SetRange (LOCATION_SZONE )
2321 e2 :SetCode (EFFECT_SELF_DESTROY )
22+ e2 :SetRange (LOCATION_SZONE )
2423 e2 :SetCondition (s .descon )
2524 e2 :SetLabelObject (e1 )
2625 c :RegisterEffect (e2 )
27- -- to grave
26+ -- When this card is sent to the GY: Send 1 monster from your Deck to the GY
2827 local e3 = Effect .CreateEffect (c )
2928 e3 :SetDescription (aux .Stringid (27632240 ,0 ))
3029 e3 :SetCategory (CATEGORY_TOGRAVE )
@@ -34,19 +33,19 @@ function s.initial_effect(c)
3433 e3 :SetOperation (s .tgop )
3534 c :RegisterEffect (e3 )
3635end
37- function s .filter (c )
36+ function s .eqfilter (c )
3837 return c :IsAttribute (ATTRIBUTE_DARK ) and c :IsRace (RACE_WARRIOR )
3938end
4039function s .rmfilter (c )
41- return c :IsMonster () and c :IsAbleToRemove () and aux .SpElimFilter (c )
40+ return c :IsMonster () and c :IsAbleToRemove () and aux .SpElimFilter (c , true )
4241end
4342function s .rmtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk ,chkc )
44- if chkc then return chkc :IsLocation (LOCATION_MZONE |LOCATION_GRAVE ) and chkc : IsControler ( 1 - tp ) and s .rmfilter (chkc ) end
45- if chk == 0 then return Duel .IsExistingTarget (s .rmfilter ,tp ,0 , LOCATION_MZONE |LOCATION_GRAVE ,1 ,nil ) end
43+ if chkc then return chkc :IsLocation (LOCATION_MZONE |LOCATION_GRAVE ) and s .rmfilter (chkc ) end
44+ if chk == 0 then return Duel .IsExistingTarget (s .rmfilter ,tp ,LOCATION_MZONE |LOCATION_GRAVE , LOCATION_GRAVE ,1 ,nil ) end
4645 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_REMOVE )
47- local g = Duel .SelectTarget (tp ,s .rmfilter ,tp ,0 , LOCATION_MZONE |LOCATION_GRAVE ,1 ,1 ,nil )
46+ local g = Duel .SelectTarget (tp ,s .rmfilter ,tp ,LOCATION_MZONE |LOCATION_GRAVE , LOCATION_GRAVE ,1 ,1 ,nil )
4847 Duel .SetOperationInfo (0 ,CATEGORY_REMOVE ,g ,1 ,0 ,0 )
49- e :GetHandler ():RegisterFlagEffect (id ,RESET_EVENT + RESETS_STANDARD ,0 ,1 )
48+ e :GetHandler ():RegisterFlagEffect (id ,RESET_EVENT | RESETS_STANDARD ,0 ,1 )
5049end
5150function s .rmop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
5251 local tc = Duel .GetFirstTarget ()
@@ -55,19 +54,17 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
5554 end
5655end
5756function s .descon (e )
58- return e :GetHandler ():GetFlagEffect (id )>= 3 and not e :GetHandler ():IsRelateToEffect (e :GetLabelObject ())
59- end
60- function s .tgfilter (c )
61- return c :IsMonster () and c :IsAbleToGrave ()
57+ local c = e :GetHandler ()
58+ return c :HasFlagEffect (id ,3 ) and not c :IsRelateToEffect (e :GetLabelObject ())
6259end
6360function s .tgtg (e ,tp ,eg ,ep ,ev ,re ,r ,rp ,chk )
6461 if chk == 0 then return true end
6562 Duel .SetOperationInfo (0 ,CATEGORY_TOGRAVE ,nil ,1 ,tp ,LOCATION_DECK )
6663end
6764function s .tgop (e ,tp ,eg ,ep ,ev ,re ,r ,rp )
6865 Duel .Hint (HINT_SELECTMSG ,tp ,HINTMSG_TOGRAVE )
69- local g = Duel .SelectMatchingCard (tp ,s . tgfilter ,tp ,LOCATION_DECK ,0 ,1 ,1 ,nil )
66+ local g = Duel .SelectMatchingCard (tp ,aux . AND ( Card . IsMonster , Card . IsAbleToGrave ) ,tp ,LOCATION_DECK ,0 ,1 ,1 ,nil )
7067 if # g > 0 then
7168 Duel .SendtoGrave (g ,REASON_EFFECT )
7269 end
73- end
70+ end
0 commit comments