--Night Assault Aggressor --Script by APurpleApple local s,id=GetID() function s.initial_effect(c) --direct attack local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e1) --recall local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_BATTLED) e2:SetCondition(s.rccon) e2:SetOperation(s.rcop) c:RegisterEffect(e2) --spproc local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetTarget(s.destar) e3:SetCondition(s.sppcon) e3:SetOperation(s.destop) e3:SetCountLimit(1,56132153) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+ EFFECT_FLAG_DELAY) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCode(EVENT_LEAVE_FIELD) e4:SetCondition(s.leavcon) e4:SetTarget(s.leavtar) e4:SetOperation(s.leavop) e4:SetCountLimit(1,56132152) c:RegisterEffect(e4) end function s.rccon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetAttacker()==c end function s.spfilter(c,e) return c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e) and c:GetLevel()<4 and c:GetCode()~=id end function s.rcop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.SendtoHand(c,tp,REASON_EFFECT) end function s.sppcon(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsSetCard(0x8af) end function s.desfilter(c) return c:IsType(TYPE_MONSTER) end function s.destar(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chkc then return chkc:IsOnField() end local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.destop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() Duel.Destroy(tc,REASON_EFFECT) end function s.leavcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.leavtar(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_HAND, 0, 1, nil,e) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function s.leavop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e) Duel.SpecialSummon(tc,SUMMON_TYPE_SPECIAL,tp,tp,false,false,POS_FACEUP) end