D.D.
Declare 1 card name. Look at your opponent's hand, and if they have the declared card in their hand, remove from play that 1 card. If they do not have the declared card in their hand, remove from play 1 random card in your hand.
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetCategory(CATEGORY_REMOVE)
	e1:SetTarget(s.target)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND) > 0 and Duel.IsExistingMatchingCard(nil, tp, LOCATION_HAND, 0, 1, e:GetHandler())
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CODE)
	getmetatable(e:GetHandler()).announce_filter = { TYPE_FUSION + TYPE_SYNCHRO + TYPE_XYZ + TYPE_LINK, OPCODE_ISTYPE, OPCODE_NOT }
	local ac = Duel.AnnounceCard(tp, table.unpack(getmetatable(e:GetHandler()).announce_filter))
	Duel.SetTargetParam(ac)
	Duel.SetOperationInfo(0, CATEGORY_ANNOUNCE, nil, 0, tp, 0)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local ac = Duel.GetChainInfo(0, CHAININFO_TARGET_PARAM)
	local g = Duel.GetMatchingGroup(Card.IsCode, tp, 0, LOCATION_HAND, nil, ac)
	local hg = Duel.GetFieldGroup(tp, 0, LOCATION_HAND)
	Duel.ConfirmCards(tp, hg)
	if g:GetCount() > 0 then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
		local sg = g:Select(tp, 1, 1, nil)
		Duel.Remove(sg, POS_FACEUP, REASON_EFFECT)
		Duel.ShuffleHand(1 - tp)
	else
		local sg = Duel.GetFieldGroup(tp, LOCATION_HAND, 0)
		local dg = sg:RandomSelect(tp, 1)
		Duel.Remove(dg, POS_FACEUP, REASON_EFFECT)
		Duel.ShuffleHand(1 - tp)
	end
end


D.D.
Declare 1 card name. Look at your opponent's hand, and if they have the declared card in their hand, remove from play that 1 card. If they do not have the declared card in their hand, remove from play 1 random card in your hand.
-- D.D.
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetCategory(CATEGORY_REMOVE)
	e1:SetTarget(s.target)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND) > 0 and Duel.IsExistingMatchingCard(nil, tp, LOCATION_HAND, 0, 1, e:GetHandler())
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CODE)
	getmetatable(e:GetHandler()).announce_filter = { TYPE_FUSION + TYPE_SYNCHRO + TYPE_XYZ + TYPE_LINK, OPCODE_ISTYPE, OPCODE_NOT }
	local ac = Duel.AnnounceCard(tp, table.unpack(getmetatable(e:GetHandler()).announce_filter))
	Duel.SetTargetParam(ac)
	Duel.SetOperationInfo(0, CATEGORY_ANNOUNCE, nil, 0, tp, 0)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local ac = Duel.GetChainInfo(0, CHAININFO_TARGET_PARAM)
	local g = Duel.GetMatchingGroup(Card.IsCode, tp, 0, LOCATION_HAND, nil, ac)
	local hg = Duel.GetFieldGroup(tp, 0, LOCATION_HAND)
	Duel.ConfirmCards(tp, hg)
	if g:GetCount() > 0 then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
		local sg = g:Select(tp, 1, 1, nil)
		Duel.Remove(sg, POS_FACEUP, REASON_EFFECT)
		Duel.ShuffleHand(1 - tp)
	else
		local sg = Duel.GetFieldGroup(tp, LOCATION_HAND, 0)
		local dg = sg:RandomSelect(tp, 1)
		Duel.Remove(dg, POS_FACEUP, REASON_EFFECT)
		Duel.ShuffleHand(1 - tp)
	end
end

