local s,id,o=GetID()
function s.initial_effect(c)
	c:EnableReviveLimit()
    c:SetSPSummonOnce(id)
-- 	aux.AddLinkProcedure(c,s.matfilter,1,1)
-- 	--spsummon
-- 	local e1=Effect.CreateEffect(c)
-- 	e1:SetDescription(aux.Stringid(id,0))
-- 	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
-- 	e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
-- 	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
-- 	e1:SetProperty(EFFECT_FLAG_DELAY)
-- 	e1:SetCost(s.cost)
-- 	e1:SetTarget(s.sptg)
-- 	e1:SetOperation(s.spop)
-- 	c:RegisterEffect(e1)
--     --summon
-- 	local e2=Effect.CreateEffect(c)
-- 	e2:SetDescription(aux.Stringid(id,1))
-- 	e2:SetCategory(CATEGORY_SUMMON)
-- 	e2:SetType(EFFECT_TYPE_IGNITION)
-- 	e2:SetRange(LOCATION_GRAVE)
--     e2:SetCountLimit(1,id)
-- 	e2:SetCost(aux.bfgcost)
-- 	e2:SetTarget(s.target)
-- 	e2:SetOperation(s.operation)
-- 	c:RegisterEffect(e2)
-- end
-- function s.matfilter(c)
-- 	return c:IsLinkSetCard(0xb5)
-- end
-- function s.spcon(e,tp,eg,ep,ev,re,r,rp)
-- 	return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
-- end
-- function s.rmfilter1(c,e,tp)
-- 	return c:IsSetCard(0x10b5) and c:IsAbleToRemoveAsCost()
-- end
-- function s.rmfilter2(c,e,tp)
-- 	return c:IsSetCard(0x20b5) and c:IsAbleToRemoveAsCost()
-- end
-- function s.spfilter(c,e,tp)
-- 	return (c:IsSetCard(0x40b5) or c:IsSetCard(0x10)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
-- end
-- function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
--     local c=e:GetHandler()
-- 	if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter1,tp,LOCATION_DECK,0,1,nil,e,tp)
-- 		and Duel.IsExistingMatchingCard(s.rmfilter2,tp,LOCATION_DECK,0,1,nil,e,tp)
--     end
--     local g1=Duel.GetMatchingGroup(s.rmfilter1,tp,LOCATION_DECK,0,nil)
--     local g2=Duel.GetMatchingGroup(s.rmfilter2,tp,LOCATION_DECK,0,nil)
-- 	if g1:GetCount()>=1 and g2:GetCount()>=1 then
-- 		Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
-- 		local sg1=g1:Select(tp,1,1,nil)
-- 		Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
--         local sg2=g2:Select(tp,1,1,nil)
--         sg1:Merge(sg2)
--         sg1:AddCard(e:GetHandler())
-- 	    Duel.Remove(sg1,POS_FACEUP,REASON_COST)
--     end
-- end
-- function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
-- 	if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
-- 	Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
-- end
-- function s.spop(e,tp,eg,ep,ev,re,r,rp)
--     Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
--     local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
--     Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
-- 	local e1=Effect.CreateEffect(e:GetHandler())
-- 	e1:SetType(EFFECT_TYPE_FIELD)
-- 	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
-- 	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
-- 	e1:SetReset(RESET_PHASE+PHASE_END)
-- 	e1:SetTargetRange(1,0)
-- 	e1:SetTarget(s.splimit)
-- 	Duel.RegisterEffect(e1,tp)
-- end
-- function s.splimit(e,c)
-- 	return c:IsLocation(LOCATION_EXTRA) and c:IsAttribute(ATTRIBUTE_DARK)
-- end
-- function s.filter(c)
-- 	return (c:IsSetCard(0xb5) or c:IsSetCard(0x10)) and c:IsSummonable(true,nil)
-- end
-- function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
-- 	if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end
-- 	Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
-- end
-- function s.operation(e,tp,eg,ep,ev,re,r,rp)
-- 	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
-- 	local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil)
-- 	local tc=g:GetFirst()
-- 	if tc then
-- 		Duel.Summon(tp,tc,true,nil)
-- 	end
end