ダーク・ドリアード
【Pスケール:青5/赤5】
1:自分フィールドの地・水・炎・風属性モンスターの攻撃力・守備力は、自分フィールドのモンスターの属性の種類×200アップする。
【モンスター効果】
1:このカードが召喚・特殊召喚した場合に発動できる。
デッキから地・水・炎・風属性モンスターを1体ずつ選び、好きな順番でデッキの上に戻す。
local s, id, o = GetID()
function s.initial_effect(c)
	--pendulum summon
	aux.EnablePendulumAttribute(c)
	--atk
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD)
	e2:SetCode(EFFECT_UPDATE_ATTACK)
	e2:SetRange(LOCATION_PZONE)
	e2:SetTargetRange(LOCATION_MZONE, 0)
	e2:SetTarget(s.atktg)
	e2:SetValue(s.value)
	c:RegisterEffect(e2)
	local e3 = e2:Clone()
	e3:SetCode(EFFECT_UPDATE_DEFENSE)
	c:RegisterEffect(e3)
	--deck sort
	local e4 = Effect.CreateEffect(c)
	e4:SetDescription(aux.Stringid(id, 0))
	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
	e4:SetProperty(EFFECT_FLAG_DELAY)
	e4:SetCode(EVENT_SUMMON_SUCCESS)
	e4:SetTarget(s.sttg)
	e4:SetOperation(s.stop)
	c:RegisterEffect(e4)
	local e5 = e4:Clone()
	e5:SetCode(EVENT_SPSUMMON_SUCCESS)
	c:RegisterEffect(e5)
end
function s.atktg(e, c)
	return c:IsAttribute(ATTRIBUTE_EARTH + ATTRIBUTE_WATER + ATTRIBUTE_FIRE + ATTRIBUTE_WIND)
end
function s.value(e, c)
	local tp = e:GetHandlerPlayer()
	local g = Duel.GetMatchingGroup(Card.IsFaceup, tp, LOCATION_MZONE, 0, nil)
	return aux.GetAttributeCount(g) * 200
end
function s.sttg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_EARTH)
			and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_WATER)
			and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_FIRE)
			and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_WIND)
	end
end
function s.stop(e, tp, eg, ep, ev, re, r, rp)
	if
		Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_EARTH)
		and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_WATER)
		and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_FIRE)
		and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_WIND)
	then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
		local g1 = Duel.SelectMatchingCard(tp, Card.IsAttribute, tp, LOCATION_DECK, 0, 1, 1, nil, ATTRIBUTE_EARTH)
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
		local g2 = Duel.SelectMatchingCard(tp, Card.IsAttribute, tp, LOCATION_DECK, 0, 1, 1, nil, ATTRIBUTE_WATER)
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
		local g3 = Duel.SelectMatchingCard(tp, Card.IsAttribute, tp, LOCATION_DECK, 0, 1, 1, nil, ATTRIBUTE_FIRE)
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
		local g4 = Duel.SelectMatchingCard(tp, Card.IsAttribute, tp, LOCATION_DECK, 0, 1, 1, nil, ATTRIBUTE_WIND)
		g1:Merge(g2)
		g1:Merge(g3)
		g1:Merge(g4)
		Duel.ConfirmCards(1 - tp, g1)
		Duel.ShuffleDeck(tp)
		local tc = g1:GetFirst()
		while tc do
			Duel.MoveSequence(tc, SEQ_DECKTOP)
			tc = g1:GetNext()
		end
		Duel.SortDecktop(tp, tp, 4)
	end
end


ダーク・ドリアード
【Pスケール:青5/赤5】
1:自分フィールドの地・水・炎・風属性モンスターの攻撃力・守備力は、自分フィールドのモンスターの属性の種類×200アップする。
【モンスター効果】
1:このカードが召喚・特殊召喚した場合に発動できる。
デッキから地・水・炎・風属性モンスターを1体ずつ選び、好きな順番でデッキの上に戻す。
-- ダーク・ドリアード
local s, id, o = GetID()
function s.initial_effect(c)
	--pendulum summon
	aux.EnablePendulumAttribute(c)
	--atk
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD)
	e2:SetCode(EFFECT_UPDATE_ATTACK)
	e2:SetRange(LOCATION_PZONE)
	e2:SetTargetRange(LOCATION_MZONE, 0)
	e2:SetTarget(s.atktg)
	e2:SetValue(s.value)
	c:RegisterEffect(e2)
	local e3 = e2:Clone()
	e3:SetCode(EFFECT_UPDATE_DEFENSE)
	c:RegisterEffect(e3)
	--deck sort
	local e4 = Effect.CreateEffect(c)
	e4:SetDescription(aux.Stringid(id, 0))
	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
	e4:SetProperty(EFFECT_FLAG_DELAY)
	e4:SetCode(EVENT_SUMMON_SUCCESS)
	e4:SetTarget(s.sttg)
	e4:SetOperation(s.stop)
	c:RegisterEffect(e4)
	local e5 = e4:Clone()
	e5:SetCode(EVENT_SPSUMMON_SUCCESS)
	c:RegisterEffect(e5)
end
function s.atktg(e, c)
	return c:IsAttribute(ATTRIBUTE_EARTH + ATTRIBUTE_WATER + ATTRIBUTE_FIRE + ATTRIBUTE_WIND)
end
function s.value(e, c)
	local tp = e:GetHandlerPlayer()
	local g = Duel.GetMatchingGroup(Card.IsFaceup, tp, LOCATION_MZONE, 0, nil)
	return aux.GetAttributeCount(g) * 200
end
function s.sttg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_EARTH)
			and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_WATER)
			and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_FIRE)
			and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_WIND)
	end
end
function s.stop(e, tp, eg, ep, ev, re, r, rp)
	if
		Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_EARTH)
		and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_WATER)
		and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_FIRE)
		and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_DECK, 0, 1, nil, ATTRIBUTE_WIND)
	then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
		local g1 = Duel.SelectMatchingCard(tp, Card.IsAttribute, tp, LOCATION_DECK, 0, 1, 1, nil, ATTRIBUTE_EARTH)
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
		local g2 = Duel.SelectMatchingCard(tp, Card.IsAttribute, tp, LOCATION_DECK, 0, 1, 1, nil, ATTRIBUTE_WATER)
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
		local g3 = Duel.SelectMatchingCard(tp, Card.IsAttribute, tp, LOCATION_DECK, 0, 1, 1, nil, ATTRIBUTE_FIRE)
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
		local g4 = Duel.SelectMatchingCard(tp, Card.IsAttribute, tp, LOCATION_DECK, 0, 1, 1, nil, ATTRIBUTE_WIND)
		g1:Merge(g2)
		g1:Merge(g3)
		g1:Merge(g4)
		Duel.ConfirmCards(1 - tp, g1)
		Duel.ShuffleDeck(tp)
		local tc = g1:GetFirst()
		while tc do
			Duel.MoveSequence(tc, SEQ_DECKTOP)
			tc = g1:GetNext()
		end
		Duel.SortDecktop(tp, tp, 4)
	end
end

