-- Drill Nemesis - Twin Blade Warrior -- Archetype by TaxingCorn117, card and script by Swaggy local cid,id=GetID() function cid.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) e1:SetTargetRange(POS_FACEUP_ATTACK,1) e1:SetCondition(cid.spcon) e1:SetOperation(cid.spop) c:RegisterEffect(e1) --attack twice local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_BOTH_SIDE+EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) e2:SetCondition(cid.dacon) e2:SetTarget(cid.datg) e2:SetOperation(cid.daop) c:RegisterEffect(e2) --to hand local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_TO_GRAVE) e3:SetCountLimit(1,id+1000) e3:SetCondition(cid.thcon) e3:SetTarget(cid.thtg) e3:SetOperation(cid.thop) c:RegisterEffect(e3) end function cid.checkfilter(c) return c:IsSetCard(0x205) and c:IsFaceup() end function cid.sprfilter(c,tp) return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0 end function cid.enkifilter(c) return c:IsCode(32957215) and c:IsFaceup() end function cid.spcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.IsExistingMatchingCard(cid.checkfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(cid.sprfilter,tp,0,LOCATION_MZONE,1,nil,tp) and not Duel.IsExistingMatchingCard(cid.enkifilter,tp,0,LOCATION_ONFIELD,1,nil) end function cid.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) local g=Duel.SelectMatchingCard(tp,cid.sprfilter,tp,0,LOCATION_MZONE,1,1,nil,tp) Duel.Release(g,REASON_COST) end function cid.dacon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end function cid.exfilter(c) return c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) end function cid.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cid.exfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(cid.exfilter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,cid.exfilter,tp,LOCATION_MZONE,0,1,1,nil) end function cid.daop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end end function cid.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function cid.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToHand() end Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) end function cid.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end end