--Kog'Maw function c11000105.initial_effect(c) --salvage local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND) e1:SetCountLimit(1,11000105) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(c11000105.target) e1:SetOperation(c11000105.operation) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) --remove local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_REMOVE) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_BATTLED) e3:SetCondition(c11000105.cnd) e3:SetTarget(c11000105.tg) e3:SetOperation(c11000105.op) c:RegisterEffect(e3) end function c11000105.filter(c) return c:IsSetCard(0x1F4) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() end function c11000105.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(c11000105.filter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,c11000105.filter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function c11000105.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end end function c11000105.cnd(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) end function c11000105.tg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local a=Duel.GetAttacker() local t=Duel.GetAttackTarget() if chk==0 then return (t==c and a:IsAbleToRemove()) or (a==c and t~=nil and t:IsAbleToRemove()) end local g=Group.CreateGroup() if a:IsRelateToBattle() then g:AddCard(a) end if t~=nil and t:IsRelateToBattle() then g:AddCard(t) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) end function c11000105.op(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() local g=Group.FromCards(a,d) local rg=g:Filter(Card.IsRelateToBattle,nil) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end