name: Witch's
card_text: If your opponent negates the Normal or Special Summon of a monster(s), or the activation of a card or effect: Destroy all cards your opponent controls and in their hand.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_SUMMON_NEGATED)
  	e1:SetProperty(EFFECT_FLAG_DELAY)
  	e1:SetCondition(s.condition1)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EVENT_SPSUMMON_NEGATED)
  	c:RegisterEffect(e2)
  	local e3 = e1:Clone()
  	e3:SetCode(EVENT_CUSTOM + id)
  	c:RegisterEffect(e3)
  	if not s.global_check then
  		s.global_check = true
  		local ge1 = Effect.CreateEffect(c)
  		ge1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  		ge1:SetCode(EVENT_CHAIN_NEGATED)
  		ge1:SetOperation(s.checkop)
  		Duel.RegisterEffect(ge1, 0)
  	end
  end
  function s.checkop(e, tp, eg, ep, ev, re, r, rp)
  	local dp = Duel.GetChainInfo(ev, CHAININFO_DISABLE_PLAYER)
  	Duel.RaiseEvent(e:GetHandler(), EVENT_CUSTOM + id, e, 0, dp, 0, 0)
  end
  function s.condition1(e, tp, eg, ep, ev, re, r, rp)
  	return rp == 1 - tp
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(aux.TRUE, tp, 0, LOCATION_HAND + LOCATION_ONFIELD, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_HAND + LOCATION_ONFIELD, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_HAND + LOCATION_ONFIELD, nil)
  	Duel.Destroy(g, REASON_EFFECT)
  end
  
  
source_text: Witch's
  If your opponent negates the Normal or Special Summon of a monster(s), or the activation of a card or effect: Destroy all cards your opponent controls and in their hand.
target_text: -- Witch's
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_SUMMON_NEGATED)
  	e1:SetProperty(EFFECT_FLAG_DELAY)
  	e1:SetCondition(s.condition1)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EVENT_SPSUMMON_NEGATED)
  	c:RegisterEffect(e2)
  	local e3 = e1:Clone()
  	e3:SetCode(EVENT_CUSTOM + id)
  	c:RegisterEffect(e3)
  	if not s.global_check then
  		s.global_check = true
  		local ge1 = Effect.CreateEffect(c)
  		ge1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  		ge1:SetCode(EVENT_CHAIN_NEGATED)
  		ge1:SetOperation(s.checkop)
  		Duel.RegisterEffect(ge1, 0)
  	end
  end
  function s.checkop(e, tp, eg, ep, ev, re, r, rp)
  	local dp = Duel.GetChainInfo(ev, CHAININFO_DISABLE_PLAYER)
  	Duel.RaiseEvent(e:GetHandler(), EVENT_CUSTOM + id, e, 0, dp, 0, 0)
  end
  function s.condition1(e, tp, eg, ep, ev, re, r, rp)
  	return rp == 1 - tp
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(aux.TRUE, tp, 0, LOCATION_HAND + LOCATION_ONFIELD, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_HAND + LOCATION_ONFIELD, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_HAND + LOCATION_ONFIELD, nil)
  	Duel.Destroy(g, REASON_EFFECT)
  end
  
  