Guardian
Cannot be Summoned unless you control a face-up "Twin Swords of Flashing Light - Tryce". When this card is destroyed and sent to the Graveyard: Special Summon the monster from the Graveyard that was used for its Tribute Summon.
local CARD_ID_0 = 59822133 --Blue-Eyes Spirit Dragon
local CARD_ID_1 = 21900719 --Twin Swords of Flashing Light - Tryce

local CARD_ID_0 = 59822133 --Blue-Eyes Spirit Dragon
local CARD_ID_1 = 21900719 --Twin Swords of Flashing Light - Tryce
local s, id, o = GetID()
function s.initial_effect(c)
	--sum limit
	local e1 = Effect.CreateEffect(c)
	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetCode(EFFECT_CANNOT_SUMMON)
	e1:SetCondition(s.sumcon)
	c:RegisterEffect(e1)
	local e2 = e1:Clone()
	e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
	c:RegisterEffect(e2)
	local e3 = Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_SINGLE)
	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
	e3:SetCode(EFFECT_SPSUMMON_CONDITION)
	e3:SetValue(s.sumlimit)
	c:RegisterEffect(e3)
	--spsummon
	local e4 = Effect.CreateEffect(c)
	e4:SetDescription(aux.Stringid(id, 0))
	e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
	e4:SetCode(EVENT_TO_GRAVE)
	e4:SetCondition(s.spcon)
	e4:SetTarget(s.sptg)
	e4:SetOperation(s.spop)
	c:RegisterEffect(e4)
end
function s.cfilter(c)
	return c:IsFaceup() and c:IsCode(CARD_ID_1)
end
function s.sumcon(e)
	return not Duel.IsExistingMatchingCard(s.cfilter, e:GetHandlerPlayer(), LOCATION_ONFIELD, 0, 1, nil)
end
function s.sumlimit(e, se, sp, st, pos, tp)
	return Duel.IsExistingMatchingCard(s.cfilter, sp, LOCATION_ONFIELD, 0, 1, nil)
end
function s.spcon(e, tp, eg, ep, ev, re, r, rp)
	return e:GetHandler():IsReason(REASON_DESTROY)
end
function s.spfilter(c, e, tp, rc)
	return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_SUMMON) and c:GetReasonCard() == rc and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	local g = e:GetHandler():GetMaterial():Filter(s.spfilter, nil, e, tp, e:GetHandler())
	Duel.SetTargetCard(g)
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, g:GetCount(), 0, 0)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect, nil, e)
	local ct = g:GetCount()
	if ct > 1 and Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) then
		return
	end
	if Duel.GetLocationCount(tp, LOCATION_MZONE) >= ct then
		Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
	end
end


Guardian
Cannot be Summoned unless you control a face-up "Twin Swords of Flashing Light - Tryce". When this card is destroyed and sent to the Graveyard: Special Summon the monster from the Graveyard that was used for its Tribute Summon.
-- Guardian
local CARD_ID_0 = 59822133 --Blue-Eyes Spirit Dragon
local CARD_ID_1 = 21900719 --Twin Swords of Flashing Light - Tryce
local s, id, o = GetID()
function s.initial_effect(c)
	--sum limit
	local e1 = Effect.CreateEffect(c)
	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetCode(EFFECT_CANNOT_SUMMON)
	e1:SetCondition(s.sumcon)
	c:RegisterEffect(e1)
	local e2 = e1:Clone()
	e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
	c:RegisterEffect(e2)
	local e3 = Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_SINGLE)
	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
	e3:SetCode(EFFECT_SPSUMMON_CONDITION)
	e3:SetValue(s.sumlimit)
	c:RegisterEffect(e3)
	--spsummon
	local e4 = Effect.CreateEffect(c)
	e4:SetDescription(aux.Stringid(id, 0))
	e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
	e4:SetCode(EVENT_TO_GRAVE)
	e4:SetCondition(s.spcon)
	e4:SetTarget(s.sptg)
	e4:SetOperation(s.spop)
	c:RegisterEffect(e4)
end
function s.cfilter(c)
	return c:IsFaceup() and c:IsCode(CARD_ID_1)
end
function s.sumcon(e)
	return not Duel.IsExistingMatchingCard(s.cfilter, e:GetHandlerPlayer(), LOCATION_ONFIELD, 0, 1, nil)
end
function s.sumlimit(e, se, sp, st, pos, tp)
	return Duel.IsExistingMatchingCard(s.cfilter, sp, LOCATION_ONFIELD, 0, 1, nil)
end
function s.spcon(e, tp, eg, ep, ev, re, r, rp)
	return e:GetHandler():IsReason(REASON_DESTROY)
end
function s.spfilter(c, e, tp, rc)
	return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_SUMMON) and c:GetReasonCard() == rc and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	local g = e:GetHandler():GetMaterial():Filter(s.spfilter, nil, e, tp, e:GetHandler())
	Duel.SetTargetCard(g)
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, g:GetCount(), 0, 0)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect, nil, e)
	local ct = g:GetCount()
	if ct > 1 and Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) then
		return
	end
	if Duel.GetLocationCount(tp, LOCATION_MZONE) >= ct then
		Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
	end
end

