--Card Remake function c160000245.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DECKDES) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(c160000245.condition) e1:SetTarget(c160000245.target) e1:SetOperation(c160000245.activate) c:RegisterEffect(e1) end function c160000245.condition(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) return (re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE) or ((rc:GetType()==TYPE_SPELL or rc:GetType()==TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function c160000245.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,5) end function c160000245.activate(e,tp,eg,ep,ev,re,r,rp) local g=Group.CreateGroup() Duel.SetLP(tp,Duel.GetLP(tp)-3000) Duel.ChangeTargetCard(ev,g) Duel.ChangeChainOperation(ev,c160000245.repop) end function c160000245.repop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.DiscardDeck(1-tp,5,REASON_EFFECT) end