name: XX-clusion
card_text: When your opponent activates a monster effect in their hand: Negate that activation, then if they have any cards in their hand, you discard 1 card from their hand (of their choice).
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_NEGATE + CATEGORY_HANDES)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_CHAINING)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local loc = Duel.GetChainInfo(ev, CHAININFO_TRIGGERING_LOCATION)
  	return ep == 1 - tp and loc == LOCATION_HAND and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
  end
  function s.target(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 Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND) > 0 then
  		Duel.SetOperationInfo(0, CATEGORY_HANDES, nil, 0, 1 - tp, 1)
  	end
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.NegateActivation(ev) and Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND) > 0 then
  		Duel.BreakEffect()
  		Duel.DiscardHand(1 - tp, nil, 1, 1, REASON_EFFECT + REASON_DISCARD)
  	end
  end
  
  
source_text: XX-clusion
  When your opponent activates a monster effect in their hand: Negate that activation, then if they have any cards in their hand, you discard 1 card from their hand (of their choice).
target_text: -- XX-clusion
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_NEGATE + CATEGORY_HANDES)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_CHAINING)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	local loc = Duel.GetChainInfo(ev, CHAININFO_TRIGGERING_LOCATION)
  	return ep == 1 - tp and loc == LOCATION_HAND and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
  end
  function s.target(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 Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND) > 0 then
  		Duel.SetOperationInfo(0, CATEGORY_HANDES, nil, 0, 1 - tp, 1)
  	end
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.NegateActivation(ev) and Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND) > 0 then
  		Duel.BreakEffect()
  		Duel.DiscardHand(1 - tp, nil, 1, 1, REASON_EFFECT + REASON_DISCARD)
  	end
  end
  
  