D/D/D
2 "D/D/D" monsters
Once per turn, when an attack is declared involving this card: You can target 1 other "D/D" or "Dark Contract" card you control; return it to the hand, and if you do, equip 1 face-up monster your opponent controls to this card, except the battling monster. This card gains ATK equal to the combined original ATK of the monsters equipped to it by this effect.
local SETCARD_ID_0 = 0xaf --D/D
local SETCARD_ID_1 = 0x10af --D/D/D

local SETCARD_ID_0 = 0xaf --D/D
local SETCARD_ID_1 = 0x10af --D/D/D
local s, id, o = GetID()
function s.initial_effect(c)
	--fusion material
	c:EnableReviveLimit()
	aux.AddFusionProcFunRep(c, aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_1), 2, true)
	--tohand
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_EQUIP)
	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e1:SetCode(EVENT_ATTACK_ANNOUNCE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCountLimit(1)
	e1:SetCondition(s.condition)
	e1:SetTarget(s.target)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
end
function s.condition(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	return (Duel.GetAttacker() == c or Duel.GetAttackTarget() == c)
end
function s.thfilter(c)
	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_1, 0xae) and c:IsAbleToHand()
end
function s.eqfilter(c)
	return c:IsFaceup() and c:IsAbleToChangeControler()
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	local c = e:GetHandler()
	if chkc then
		return chkc:IsOnField() and chkc:IsControler(tp) and s.thfilter(chkc) and chkc ~= c
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.thfilter, tp, LOCATION_ONFIELD, 0, 1, c) and Duel.IsExistingMatchingCard(s.eqfilter, tp, 0, LOCATION_MZONE, 1, c:GetBattleTarget())
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RTOHAND)
	local g1 = Duel.SelectTarget(tp, s.thfilter, tp, LOCATION_ONFIELD, 0, 1, 1, c)
	Duel.SetOperationInfo(0, CATEGORY_TOHAND, g1, 1, 0, 0)
	Duel.SetOperationInfo(0, CATEGORY_EQUIP, nil, 1, 1 - tp, LOCATION_MZONE)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local tc = Duel.GetFirstTarget()
	if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc, nil, REASON_EFFECT) ~= 0 and tc:IsLocation(LOCATION_HAND) then
		local bc = c:GetBattleTarget()
		if c:IsFaceup() and c:IsRelateToEffect(e) then
			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
			local g = Duel.SelectMatchingCard(tp, s.eqfilter, tp, 0, LOCATION_MZONE, 1, 1, bc)
			local ec = g:GetFirst()
			if not ec then
				return
			end
			local atk = ec:GetTextAttack()
			if atk < 0 then
				atk = 0
			end
			if not Duel.Equip(tp, ec, c, false) then
				return
			end
			local e1 = Effect.CreateEffect(c)
			e1:SetType(EFFECT_TYPE_SINGLE)
			e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
			e1:SetCode(EFFECT_EQUIP_LIMIT)
			e1:SetReset(RESET_EVENT + RESETS_STANDARD)
			e1:SetValue(s.eqlimit)
			ec:RegisterEffect(e1)
			if atk > 0 then
				local e2 = Effect.CreateEffect(c)
				e2:SetType(EFFECT_TYPE_EQUIP)
				e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE + EFFECT_FLAG_OWNER_RELATE)
				e2:SetCode(EFFECT_UPDATE_ATTACK)
				e2:SetReset(RESET_EVENT + RESETS_STANDARD)
				e2:SetValue(atk)
				ec:RegisterEffect(e2)
			end
		end
	end
end
function s.eqlimit(e, c)
	return e:GetOwner() == c
end


D/D/D
2 "D/D/D" monsters
Once per turn, when an attack is declared involving this card: You can target 1 other "D/D" or "Dark Contract" card you control; return it to the hand, and if you do, equip 1 face-up monster your opponent controls to this card, except the battling monster. This card gains ATK equal to the combined original ATK of the monsters equipped to it by this effect.
-- D/D/D
local SETCARD_ID_0 = 0xaf --D/D
local SETCARD_ID_1 = 0x10af --D/D/D
local s, id, o = GetID()
function s.initial_effect(c)
	--fusion material
	c:EnableReviveLimit()
	aux.AddFusionProcFunRep(c, aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_1), 2, true)
	--tohand
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_EQUIP)
	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e1:SetCode(EVENT_ATTACK_ANNOUNCE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCountLimit(1)
	e1:SetCondition(s.condition)
	e1:SetTarget(s.target)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
end
function s.condition(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	return (Duel.GetAttacker() == c or Duel.GetAttackTarget() == c)
end
function s.thfilter(c)
	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_1, 0xae) and c:IsAbleToHand()
end
function s.eqfilter(c)
	return c:IsFaceup() and c:IsAbleToChangeControler()
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	local c = e:GetHandler()
	if chkc then
		return chkc:IsOnField() and chkc:IsControler(tp) and s.thfilter(chkc) and chkc ~= c
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.thfilter, tp, LOCATION_ONFIELD, 0, 1, c) and Duel.IsExistingMatchingCard(s.eqfilter, tp, 0, LOCATION_MZONE, 1, c:GetBattleTarget())
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RTOHAND)
	local g1 = Duel.SelectTarget(tp, s.thfilter, tp, LOCATION_ONFIELD, 0, 1, 1, c)
	Duel.SetOperationInfo(0, CATEGORY_TOHAND, g1, 1, 0, 0)
	Duel.SetOperationInfo(0, CATEGORY_EQUIP, nil, 1, 1 - tp, LOCATION_MZONE)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local tc = Duel.GetFirstTarget()
	if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc, nil, REASON_EFFECT) ~= 0 and tc:IsLocation(LOCATION_HAND) then
		local bc = c:GetBattleTarget()
		if c:IsFaceup() and c:IsRelateToEffect(e) then
			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
			local g = Duel.SelectMatchingCard(tp, s.eqfilter, tp, 0, LOCATION_MZONE, 1, 1, bc)
			local ec = g:GetFirst()
			if not ec then
				return
			end
			local atk = ec:GetTextAttack()
			if atk < 0 then
				atk = 0
			end
			if not Duel.Equip(tp, ec, c, false) then
				return
			end
			local e1 = Effect.CreateEffect(c)
			e1:SetType(EFFECT_TYPE_SINGLE)
			e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
			e1:SetCode(EFFECT_EQUIP_LIMIT)
			e1:SetReset(RESET_EVENT + RESETS_STANDARD)
			e1:SetValue(s.eqlimit)
			ec:RegisterEffect(e1)
			if atk > 0 then
				local e2 = Effect.CreateEffect(c)
				e2:SetType(EFFECT_TYPE_EQUIP)
				e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE + EFFECT_FLAG_OWNER_RELATE)
				e2:SetCode(EFFECT_UPDATE_ATTACK)
				e2:SetReset(RESET_EVENT + RESETS_STANDARD)
				e2:SetValue(atk)
				ec:RegisterEffect(e2)
			end
		end
	end
end
function s.eqlimit(e, c)
	return e:GetOwner() == c
end

