--goh archfiend swordmistress function c249001181.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),8,4) c:EnableReviveLimit() --cannot be target local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(aux.tgoval) c:RegisterEffect(e1) --remove local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_REMOVE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_BATTLED) e2:SetCondition(c249001181.rmcon) e2:SetTarget(c249001181.rmtg) e2:SetOperation(c249001181.rmop) c:RegisterEffect(e2) --extra att local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_EXTRA_ATTACK) e3:SetCondition(c249001181.matcon) e3:SetValue(1) c:RegisterEffect(e3) --Destroy local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(24550676,0)) e4:SetCategory(CATEGORY_DESTROY) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_DAMAGE_STEP_END) e4:SetCountLimit(1) e4:SetCondition(c249001181.condition) e4:SetCost(c249001181.cost) e4:SetTarget(c249001181.target) e4:SetOperation(c249001181.operation) c:RegisterEffect(e4) end function c249001181.rmcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x22E) then return false end local bc=c:GetBattleTarget() e:SetLabelObject(bc) return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsStatus(STATUS_OPPO_BATTLE) end function c249001181.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetLabelObject(),1,0,0) end function c249001181.rmop(e,tp,eg,ep,ev,re,r,rp) local bc=e:GetLabelObject() if bc:IsRelateToBattle() and bc:IsAbleToRemove() then Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) end end function c249001181.matcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x22E) end function c249001181.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget() end function c249001181.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end function c249001181.filter(c) return c:IsSummonType(SUMMON_TYPE_SPECIAL) and not c:IsStatus(STATUS_BATTLE_DESTROYED) end function c249001181.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c249001181.filter,tp,0,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(c249001181.filter,tp,0,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function c249001181.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c249001181.filter,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) end