--Sin パラレルギア
local s,id,o=GetID()
function s.initial_effect(c)
	--sin territory
	c:SetUniqueOnField(1,1,s.uqfilter,LOCATION_MZONE)
	--synchro custom
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetCode(EFFECT_TUNER_MATERIAL_LIMIT)
	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
	e1:SetTarget(s.synlimit)
	e1:SetTargetRange(1,1)
	e1:SetValue(LOCATION_HAND)
	c:RegisterEffect(e1)
	--hand synchro
	local e2=Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_SINGLE)
	e2:SetCode(55863245) --- たつのこ
	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
	c:RegisterEffect(e2)
	--hand synchro limit
	local e3=Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_SINGLE)
	e3:SetCode(EFFECT_TUNER_MATERIAL_LIMIT)
	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
	e3:SetTarget(s.handsynlimit)
	c:RegisterEffect(e3)
end
function s.sfilter(c)
	return c:IsOriginalCodeRule(598988,1710476,9433350,36521459,37115575,55343236) and not c:IsDisabled()
end
function s.uqfilter(c)
	if Duel.IsPlayerAffectedByEffect(c:GetControler(),75223115)
		and Duel.IsExistingMatchingCard(s.sfilter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,nil) then
		return c:IsCode(id)
	else
		return false
	end
end
function s.synlimit(e,c)
	return c:IsSetCard(0x23)
end

function s.handsynlimit(e,c)
	return c:IsLocation(LOCATION_HAND) and c:IsSetCard(0x23)
end
