--Shifting function c11000147.initial_effect(c) --Activate(summon) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_SPSUMMON) e1:SetCondition(c11000147.condition1) e1:SetCost(c11000147.cost) e1:SetTarget(c11000147.target1) e1:SetOperation(c11000147.activate1) c:RegisterEffect(e1) --Activate(effect) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetCode(EVENT_CHAINING) e2:SetCondition(c11000147.condition2) e2:SetCost(c11000147.cost) e2:SetTarget(c11000147.target2) e2:SetOperation(c11000147.activate2) c:RegisterEffect(e2) end function c11000147.filter(c) return c:IsFaceup() and c:IsCode(11000130) end function c11000147.cfilter(c) return c:IsSetCard(0x1F6) and c:IsFaceup() and not c:IsStatus(STATUS_BATTLE_DESTROYED) end function c11000147.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroup(tp,c11000147.cfilter,1,nil) end local g=Duel.SelectReleaseGroup(tp,c11000147.cfilter,1,1,nil) Duel.Release(g,REASON_COST) end function c11000147.condition1(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain()==0 and Duel.IsExistingMatchingCard(c11000147.filter,tp,LOCATION_MZONE,0,1,nil) end function c11000147.target1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) end function c11000147.activate1(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) end function c11000147.condition2(e,tp,eg,ep,ev,re,r,rp) return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(c11000147.filter,tp,LOCATION_MZONE,0,1,nil) end function c11000147.target2(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 c11000147.activate2(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) if re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end end