--HDD Plutia --coded by Concordia local cid,id=GetID() function c68709344.initial_effect(c) --fusion material c:EnableReviveLimit() aux.AddFusionProcCodeFun(c,68709343,aux.FilterBoolFunction(Card.IsFusionSetCard,0xf08),1,true,true) aux.AddContactFusionProcedure(c,cid.cfilter,LOCATION_ONFIELD,0,aux.tdcfop(c)) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(cid.splimit) c:RegisterEffect(e1) --negate local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(85991529,0)) e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e3:SetCountLimit(1) e3:SetCode(EVENT_CHAINING) e3:SetCondition(cid.discon) e3:SetCost(cid.discost) e3:SetTarget(cid.distg) e3:SetOperation(cid.disop) c:RegisterEffect(e3) end function cid.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA end function cid.cfilter(c) return (c:IsFusionCode(68709343) or c:IsFusionSetCard(0xf08) and c:IsType(TYPE_MONSTER)) and c:IsAbleToDeckOrExtraAsCost() end function cid.nfilter(c) return c:IsSetCard(0xf08,0xf09) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() end function cid.discon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and ep==1-tp end function cid.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cid.nfilter,tp,LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,cid.nfilter,tp,LOCATION_GRAVE,0,2,2,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function cid.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) end end function cid.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end end