Naturia
Activate 1 of these effects;
● Special Summon 1 "Naturia" monster from your hand or GY.
● Immediately after this effect resolves, Synchro Summon 1 Synchro Monster, using monsters you control as material, including a "Naturia" monster.
● Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters you control as material, including a "Naturia" monster.
local SETCARD_ID_0 = 0x2a --Naturia

local SETCARD_ID_0 = 0x2a --Naturia
local s, id, o = GetID()
function s.initial_effect(c)
	--spsummon
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	--synchro summon
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 1))
	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e2:SetType(EFFECT_TYPE_ACTIVATE)
	e2:SetCode(EVENT_FREE_CHAIN)
	e2:SetTarget(s.sctg)
	e2:SetOperation(s.scop)
	c:RegisterEffect(e2)
	--fusion summon
	local e3 = FusionSpell.CreateSummonEffect(c, {
		pre_select_mat_location = LOCATION_MZONE,
		extra_target = s.extra_target,
		additional_fcheck = s.fcheck,
	})
	e3:SetDescription(aux.Stringid(id, 2))
	c:RegisterEffect(e3)
end

function s.spfilter(c, e, tp)
	return c:IsSetCard(SETCARD_ID_0) 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 Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_HAND + LOCATION_GRAVE, 0, 1, nil, e, tp)
	end
	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND + LOCATION_GRAVE)
end

function s.spop(e, tp, eg, ep, ev, re, r, rp)
	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
		return
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
	local g = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.spfilter), tp, LOCATION_HAND + LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
	if g:GetCount() > 0 then
		Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
	end
end

function s.mfilter(c)
	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER)
end

function s.syncheck(g, tp, syncard)
	return g:IsExists(s.mfilter, 1, nil) and syncard:IsSynchroSummonable(nil, g, #g - 1, #g - 1) and aux.SynMixHandCheck(g, tp, syncard)
end

function s.scfilter(c, tp, mg)
	return mg:CheckSubGroup(s.syncheck, 2, #mg, tp, c)
end

function s.sctg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		local mg = Duel.GetSynchroMaterial(tp)
		if mg:IsExists(Card.GetHandSynchro, 1, nil) then
			local mg2 = Duel.GetMatchingGroup(nil, tp, LOCATION_HAND, 0, nil)
			if mg2:GetCount() > 0 then
				mg:Merge(mg2)
			end
		end
		return Duel.IsExistingMatchingCard(s.scfilter, tp, LOCATION_EXTRA, 0, 1, nil, tp, mg)
	end
	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
end

function s.scop(e, tp, eg, ep, ev, re, r, rp)
	local mg = Duel.GetSynchroMaterial(tp)
	if mg:IsExists(Card.GetHandSynchro, 1, nil) then
		local mg2 = Duel.GetMatchingGroup(nil, tp, LOCATION_HAND, 0, nil)
		if mg2:GetCount() > 0 then
			mg:Merge(mg2)
		end
	end
	local g = Duel.GetMatchingGroup(s.scfilter, tp, LOCATION_EXTRA, 0, nil, tp, mg)
	if g:GetCount() > 0 then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
		local sg = g:Select(tp, 1, 1, nil)
		local sc = sg:GetFirst()
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SMATERIAL)
		local tg = mg:SelectSubGroup(tp, s.syncheck, false, 2, #mg, tp, sc)
		Duel.SynchroSummon(tp, sc, nil, tg, #tg - 1, #tg - 1)
	end
end

function s.fcheck(tp, mg, fc, mg_all)
	--- Must include 1 ナチュル monster as material
	if not mg_all:IsExists(function(c)
		return c:IsFusionSetCard(SETCARD_ID_0)
	end, 1, nil) then
		return false
	end
	return true
end

function s.extra_target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
end


Naturia
Activate 1 of these effects;
● Special Summon 1 "Naturia" monster from your hand or GY.
● Immediately after this effect resolves, Synchro Summon 1 Synchro Monster, using monsters you control as material, including a "Naturia" monster.
● Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters you control as material, including a "Naturia" monster.
-- Naturia
local SETCARD_ID_0 = 0x2a --Naturia
local s, id, o = GetID()
function s.initial_effect(c)
	--spsummon
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	--synchro summon
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 1))
	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e2:SetType(EFFECT_TYPE_ACTIVATE)
	e2:SetCode(EVENT_FREE_CHAIN)
	e2:SetTarget(s.sctg)
	e2:SetOperation(s.scop)
	c:RegisterEffect(e2)
	--fusion summon
	local e3 = FusionSpell.CreateSummonEffect(c, {
		pre_select_mat_location = LOCATION_MZONE,
		extra_target = s.extra_target,
		additional_fcheck = s.fcheck,
	})
	e3:SetDescription(aux.Stringid(id, 2))
	c:RegisterEffect(e3)
end

function s.spfilter(c, e, tp)
	return c:IsSetCard(SETCARD_ID_0) 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 Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_HAND + LOCATION_GRAVE, 0, 1, nil, e, tp)
	end
	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND + LOCATION_GRAVE)
end

function s.spop(e, tp, eg, ep, ev, re, r, rp)
	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
		return
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
	local g = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.spfilter), tp, LOCATION_HAND + LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
	if g:GetCount() > 0 then
		Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
	end
end

function s.mfilter(c)
	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER)
end

function s.syncheck(g, tp, syncard)
	return g:IsExists(s.mfilter, 1, nil) and syncard:IsSynchroSummonable(nil, g, #g - 1, #g - 1) and aux.SynMixHandCheck(g, tp, syncard)
end

function s.scfilter(c, tp, mg)
	return mg:CheckSubGroup(s.syncheck, 2, #mg, tp, c)
end

function s.sctg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		local mg = Duel.GetSynchroMaterial(tp)
		if mg:IsExists(Card.GetHandSynchro, 1, nil) then
			local mg2 = Duel.GetMatchingGroup(nil, tp, LOCATION_HAND, 0, nil)
			if mg2:GetCount() > 0 then
				mg:Merge(mg2)
			end
		end
		return Duel.IsExistingMatchingCard(s.scfilter, tp, LOCATION_EXTRA, 0, 1, nil, tp, mg)
	end
	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
end

function s.scop(e, tp, eg, ep, ev, re, r, rp)
	local mg = Duel.GetSynchroMaterial(tp)
	if mg:IsExists(Card.GetHandSynchro, 1, nil) then
		local mg2 = Duel.GetMatchingGroup(nil, tp, LOCATION_HAND, 0, nil)
		if mg2:GetCount() > 0 then
			mg:Merge(mg2)
		end
	end
	local g = Duel.GetMatchingGroup(s.scfilter, tp, LOCATION_EXTRA, 0, nil, tp, mg)
	if g:GetCount() > 0 then
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
		local sg = g:Select(tp, 1, 1, nil)
		local sc = sg:GetFirst()
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SMATERIAL)
		local tg = mg:SelectSubGroup(tp, s.syncheck, false, 2, #mg, tp, sc)
		Duel.SynchroSummon(tp, sc, nil, tg, #tg - 1, #tg - 1)
	end
end

function s.fcheck(tp, mg, fc, mg_all)
	--- Must include 1 ナチュル monster as material
	if not mg_all:IsExists(function(c)
		return c:IsFusionSetCard(SETCARD_ID_0)
	end, 1, nil) then
		return false
	end
	return true
end

function s.extra_target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
end

