Odd-Eyes
If this card is in your hand: You can Tribute 1 DARK monster; send 1 "Odd-Eyes Dragon" from your hand, Deck, or face-up field to the GY, and if you do, Special Summon this card. If this card in your possession is destroyed by an opponent's card and sent to your GY: You can Special Summon 1 "Odd-Eyes" monster from your Deck or GY, except "Odd-Eyes Wizard Dragon", then you can add 1 "Spiral Flame Strike" from your Deck to your hand.
local CARD_ID_0 = 53025096 --Odd-Eyes Dragon
local CARD_ID_1 = 82768499 --Spiral Flame Strike
local SETCARD_ID_0 = 0x99 --Odd-Eyes

local CARD_ID_0 = 53025096 --Odd-Eyes Dragon
local CARD_ID_1 = 82768499 --Spiral Flame Strike
local SETCARD_ID_0 = 0x99 --Odd-Eyes
local s, id, o = GetID()
function s.initial_effect(c)
	--special summon
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOGRAVE)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_HAND)
	e1:SetCost(s.spcost)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	--to hand
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 1))
	e2:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_SEARCH + CATEGORY_TOHAND)
	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
	e2:SetCode(EVENT_TO_GRAVE)
	e2:SetProperty(EFFECT_FLAG_DELAY)
	e2:SetCost(s.thcon)
	e2:SetTarget(s.thtg)
	e2:SetOperation(s.thop)
	c:RegisterEffect(e2)
end
function s.cfilter(c, tp)
	return c:IsAttribute(ATTRIBUTE_DARK) and Duel.IsExistingMatchingCard(s.filter1, tp, LOCATION_HAND + LOCATION_DECK + LOCATION_MZONE, 0, 1, c, tp, c)
end
function s.filter1(c, tp, mc)
	local g = Group.FromCards(c)
	if mc then
		g:AddCard(mc)
	end
	return (c:IsLocation(LOCATION_HAND + LOCATION_DECK) or c:IsFaceup()) and c:IsCode(CARD_ID_0) and c:IsAbleToGrave() and Duel.GetMZoneCount(tp, g) > 0
end
function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.CheckReleaseGroup(tp, s.cfilter, 1, nil, tp)
	end
	local g = Duel.SelectReleaseGroup(tp, s.cfilter, 1, 1, nil, tp)
	Duel.Release(g, REASON_COST)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
	end
	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, nil, 1, tp, LOCATION_MZONE + LOCATION_HAND + LOCATION_DECK)
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
	local g = Duel.SelectMatchingCard(tp, s.filter1, tp, LOCATION_HAND + LOCATION_DECK + LOCATION_MZONE, 0, 1, 1, nil, tp)
	if g:GetCount() > 0 and Duel.SendtoGrave(g, REASON_EFFECT) ~= 0 and g:GetFirst():IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) then
		Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
	end
end
function s.thcon(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	return c:IsPreviousControler(tp) and c:IsReason(REASON_DESTROY) and rp == 1 - tp
end
function s.spfilter(c, e, tp)
	return c:IsSetCard(SETCARD_ID_0) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
end
function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_DECK + LOCATION_GRAVE, 0, 1, nil, e, tp)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_DECK + LOCATION_GRAVE)
	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
end
function s.thfilter(c)
	return c:IsCode(CARD_ID_1) and c:IsAbleToHand()
end
function s.thop(e, tp, eg, ep, ev, re, r, rp)
	if Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
		local g = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.spfilter), tp, LOCATION_DECK + LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
		if
			g:GetCount() > 0
			and Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP) ~= 0
			and Duel.IsExistingMatchingCard(s.thfilter, tp, LOCATION_DECK, 0, 1, nil)
			and Duel.SelectYesNo(tp, aux.Stringid(id, 2))
		then
			Duel.BreakEffect()
			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
			local tg = Duel.SelectMatchingCard(tp, s.thfilter, tp, LOCATION_DECK, 0, 1, 1, nil)
			Duel.SendtoHand(tg, nil, REASON_EFFECT)
			Duel.ConfirmCards(1 - tp, tg)
		end
	end
end


Odd-Eyes
If this card is in your hand: You can Tribute 1 DARK monster; send 1 "Odd-Eyes Dragon" from your hand, Deck, or face-up field to the GY, and if you do, Special Summon this card. If this card in your possession is destroyed by an opponent's card and sent to your GY: You can Special Summon 1 "Odd-Eyes" monster from your Deck or GY, except "Odd-Eyes Wizard Dragon", then you can add 1 "Spiral Flame Strike" from your Deck to your hand.
-- Odd-Eyes
local CARD_ID_0 = 53025096 --Odd-Eyes Dragon
local CARD_ID_1 = 82768499 --Spiral Flame Strike
local SETCARD_ID_0 = 0x99 --Odd-Eyes
local s, id, o = GetID()
function s.initial_effect(c)
	--special summon
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOGRAVE)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_HAND)
	e1:SetCost(s.spcost)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	--to hand
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 1))
	e2:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_SEARCH + CATEGORY_TOHAND)
	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
	e2:SetCode(EVENT_TO_GRAVE)
	e2:SetProperty(EFFECT_FLAG_DELAY)
	e2:SetCost(s.thcon)
	e2:SetTarget(s.thtg)
	e2:SetOperation(s.thop)
	c:RegisterEffect(e2)
end
function s.cfilter(c, tp)
	return c:IsAttribute(ATTRIBUTE_DARK) and Duel.IsExistingMatchingCard(s.filter1, tp, LOCATION_HAND + LOCATION_DECK + LOCATION_MZONE, 0, 1, c, tp, c)
end
function s.filter1(c, tp, mc)
	local g = Group.FromCards(c)
	if mc then
		g:AddCard(mc)
	end
	return (c:IsLocation(LOCATION_HAND + LOCATION_DECK) or c:IsFaceup()) and c:IsCode(CARD_ID_0) and c:IsAbleToGrave() and Duel.GetMZoneCount(tp, g) > 0
end
function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.CheckReleaseGroup(tp, s.cfilter, 1, nil, tp)
	end
	local g = Duel.SelectReleaseGroup(tp, s.cfilter, 1, 1, nil, tp)
	Duel.Release(g, REASON_COST)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
	end
	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, nil, 1, tp, LOCATION_MZONE + LOCATION_HAND + LOCATION_DECK)
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
	local g = Duel.SelectMatchingCard(tp, s.filter1, tp, LOCATION_HAND + LOCATION_DECK + LOCATION_MZONE, 0, 1, 1, nil, tp)
	if g:GetCount() > 0 and Duel.SendtoGrave(g, REASON_EFFECT) ~= 0 and g:GetFirst():IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) then
		Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
	end
end
function s.thcon(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	return c:IsPreviousControler(tp) and c:IsReason(REASON_DESTROY) and rp == 1 - tp
end
function s.spfilter(c, e, tp)
	return c:IsSetCard(SETCARD_ID_0) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
end
function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_DECK + LOCATION_GRAVE, 0, 1, nil, e, tp)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_DECK + LOCATION_GRAVE)
	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
end
function s.thfilter(c)
	return c:IsCode(CARD_ID_1) and c:IsAbleToHand()
end
function s.thop(e, tp, eg, ep, ev, re, r, rp)
	if Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
		local g = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.spfilter), tp, LOCATION_DECK + LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
		if
			g:GetCount() > 0
			and Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP) ~= 0
			and Duel.IsExistingMatchingCard(s.thfilter, tp, LOCATION_DECK, 0, 1, nil)
			and Duel.SelectYesNo(tp, aux.Stringid(id, 2))
		then
			Duel.BreakEffect()
			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
			local tg = Duel.SelectMatchingCard(tp, s.thfilter, tp, LOCATION_DECK, 0, 1, 1, nil)
			Duel.SendtoHand(tg, nil, REASON_EFFECT)
			Duel.ConfirmCards(1 - tp, tg)
		end
	end
end

