--动物朋友 北狐 ~雪~ function c33700941.initial_effect(c) --synchro summon c:EnableReviveLimit() aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) --cannot release local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetRange(LOCATION_MZONE) e1:SetValue(1) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) c:RegisterEffect(e2) --gain effect local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetTarget(c33700941.getg) e3:SetOperation(c33700941.geop) c:RegisterEffect(e3) end function c33700941.getg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end end function c33700941.geop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) if g:GetCount()<1 then return end Duel.ConfirmCards(1-tp,g) if g:GetClassCount(Card.GetCode)==g:GetCount() and c:IsRelateToEffect(e) and c:IsFaceup() then c33700941.arcanareg(c) end Duel.ShuffleDeck(tp) end function c33700941.arcanareg(c) --negate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_CHAINING) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e1:SetCondition(c33700941.negcon) e1:SetTarget(c33700941.negtg) e1:SetOperation(c33700941.negop) e1:SetReset(RESET_EVENT+RESETS_STANDARD) c:RegisterEffect(e1) --disable spsummon local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_SPSUMMON) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e2:SetCondition(c33700941.dscon) e2:SetTarget(c33700941.dstg) e2:SetOperation(c33700941.dsop) c:RegisterEffect(e2) end function c33700941.negcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) return g:GetClassCount(Card.GetCode)==g:GetCount() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function c33700941.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.nbcon(tp,re) end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) end end function c33700941.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) end end function c33700941.dscon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) return g:GetClassCount(Card.GetCode)==g:GetCount() and Duel.GetCurrentChain()==0 end function c33700941.dstg(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_REMOVE,eg,eg:GetCount(),0,0) end function c33700941.dsop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) end