--Legends and Myths, Rememberance local s,id=GetID() function s.initial_effect(c) --negate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetCountLimit(1,id) e1:SetCost(s.negcost) e1:SetCondition(s.negcon) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) if not ep==tp then return false end return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.cfilter(c,tp) return c:IsAbleToRemoveAsCost() and c:IsFaceup() and (c:IsSetCard(0xFA0) or c:IsSetCard(0x190)) and Duel.IsExistingTarget(s.filter,tp,0,LOCATION_ONFIELD,1,c) and not c:IsCode(id) end function s.filter(c) return c:IsFaceup() and (c:IsType(TYPE_SPELL+TYPE_TRAP) or (c:IsType(TYPE_EFFECT) and c:IsAbleToRemove())) end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,2,e:GetHandler(),tp) end local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,2,2,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_ONFIELD,1,nil) end Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_ONFIELD,1,1,nil) end function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) elseif tc and tc:IsRelateToEffect(e) and tc:IsType(TYPE_SPELL+TYPE_TRAP) and tc:IsFaceup() then Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) e2:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) e3:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e3) if tc:IsType(TYPE_TRAPMONSTER) then local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_DISABLE_TRAPMONSTER) e4:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e4) end end end