--Verglascent Whitefrost local cid,id=GetID() function cid.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id) e1:SetCondition(cid.atkcon) e1:SetOperation(cid.activate) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetTarget(cid.reptg) e2:SetValue(cid.repval) e2:SetOperation(cid.repop) c:RegisterEffect(e2) end function cid.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local tc=g:GetFirst() while tc do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-300) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1) tc=g:GetNext() end end function cid.filter(c) return c:IsFaceup() and c:IsSetCard(0x1996) end function cid.filter2(c) return c:IsFaceup() end function cid.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(cid.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cid.filter2,tp,0,LOCATION_MZONE,1,nil) end function cid.repfilter(c,tp) return c:IsFaceup() and c:IsSetCard(0x1996) and c:IsControler(tp) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)) and not c:IsReason(REASON_REPLACE) end function cid.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(cid.repfilter,1,nil,tp) end return Duel.SelectEffectYesNo(tp,e:GetHandler()) end function cid.repval(e,c) return cid.repfilter(c,e:GetHandlerPlayer()) end function cid.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) end