Adamancipator
1 Tuner + 1+ non-Tuner monsters
During your Main Phase: You can excavate the top 5 cards of your Deck, and if you do, you can Special Summon 1 excavated Rock monster in Defense Position, also place the rest on the bottom of your Deck in any order. During your opponent's turn, if a WIND monster is in your GY (Quick Effect): You can target 1 card in your opponent's GY; banish it. You can only use each effect of "Adamancipator Risen - Raptite" once per turn.
local s, id, o = GetID()
function s.initial_effect(c)
	--synchro summon
	aux.AddSynchroProcedure(c, nil, aux.NonTuner(nil), 1)
	c:EnableReviveLimit()
	--spsummon
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_DECKDES)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCountLimit(1, id)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	--remove
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 1))
	e2:SetCategory(CATEGORY_REMOVE)
	e2:SetType(EFFECT_TYPE_QUICK_O)
	e2:SetCode(EVENT_FREE_CHAIN)
	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e2:SetRange(LOCATION_MZONE)
	e2:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
	e2:SetCountLimit(1, id + 1)
	e2:SetCondition(s.rmcon)
	e2:SetTarget(s.rmtg)
	e2:SetOperation(s.rmop)
	c:RegisterEffect(e2)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetFieldGroupCount(tp, LOCATION_DECK, 0) > 4
	end
end
function s.spfilter(c, e, tp)
	return c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP_DEFENSE)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	if Duel.GetFieldGroupCount(tp, LOCATION_DECK, 0) <= 4 then
		return
	end
	Duel.ConfirmDecktop(tp, 5)
	local g = Duel.GetDecktopGroup(tp, 5)
	local ct = g:GetCount()
	if ct > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and g:FilterCount(s.spfilter, nil, e, tp) > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 2)) then
		Duel.DisableShuffleCheck()
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
		local sg = g:FilterSelect(tp, s.spfilter, 1, 1, nil, e, tp)
		Duel.SpecialSummon(sg, 0, tp, tp, false, false, POS_FACEUP_DEFENSE)
		ct = g:GetCount() - sg:GetCount()
	end
	if ct > 0 then
		Duel.SortDecktop(tp, tp, ct)
		for i = 1, ct do
			local mg = Duel.GetDecktopGroup(tp, 1)
			Duel.MoveSequence(mg:GetFirst(), SEQ_DECKBOTTOM)
		end
	end
end
function s.rmcon(e, tp, eg, ep, ev, re, r, rp)
	return Duel.GetTurnPlayer() == 1 - tp and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_GRAVE, 0, 1, nil, ATTRIBUTE_WIND)
end
function s.rmtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1 - tp) and chkc:IsAbleToRemove()
	end
	if chk == 0 then
		return Duel.IsExistingTarget(Card.IsAbleToRemove, tp, 0, LOCATION_GRAVE, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
	local g = Duel.SelectTarget(tp, Card.IsAbleToRemove, tp, 0, LOCATION_GRAVE, 1, 1, nil)
	Duel.SetOperationInfo(0, CATEGORY_REMOVE, g, 1, 0, 0)
end
function s.rmop(e, tp, eg, ep, ev, re, r, rp)
	local tc = Duel.GetFirstTarget()
	if tc:IsRelateToEffect(e) then
		Duel.Remove(tc, POS_FACEUP, REASON_EFFECT)
	end
end


Adamancipator
1 Tuner + 1+ non-Tuner monsters
During your Main Phase: You can excavate the top 5 cards of your Deck, and if you do, you can Special Summon 1 excavated Rock monster in Defense Position, also place the rest on the bottom of your Deck in any order. During your opponent's turn, if a WIND monster is in your GY (Quick Effect): You can target 1 card in your opponent's GY; banish it. You can only use each effect of "Adamancipator Risen - Raptite" once per turn.
-- Adamancipator
local s, id, o = GetID()
function s.initial_effect(c)
	--synchro summon
	aux.AddSynchroProcedure(c, nil, aux.NonTuner(nil), 1)
	c:EnableReviveLimit()
	--spsummon
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_DECKDES)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCountLimit(1, id)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	--remove
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 1))
	e2:SetCategory(CATEGORY_REMOVE)
	e2:SetType(EFFECT_TYPE_QUICK_O)
	e2:SetCode(EVENT_FREE_CHAIN)
	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e2:SetRange(LOCATION_MZONE)
	e2:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
	e2:SetCountLimit(1, id + 1)
	e2:SetCondition(s.rmcon)
	e2:SetTarget(s.rmtg)
	e2:SetOperation(s.rmop)
	c:RegisterEffect(e2)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetFieldGroupCount(tp, LOCATION_DECK, 0) > 4
	end
end
function s.spfilter(c, e, tp)
	return c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP_DEFENSE)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	if Duel.GetFieldGroupCount(tp, LOCATION_DECK, 0) <= 4 then
		return
	end
	Duel.ConfirmDecktop(tp, 5)
	local g = Duel.GetDecktopGroup(tp, 5)
	local ct = g:GetCount()
	if ct > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and g:FilterCount(s.spfilter, nil, e, tp) > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 2)) then
		Duel.DisableShuffleCheck()
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
		local sg = g:FilterSelect(tp, s.spfilter, 1, 1, nil, e, tp)
		Duel.SpecialSummon(sg, 0, tp, tp, false, false, POS_FACEUP_DEFENSE)
		ct = g:GetCount() - sg:GetCount()
	end
	if ct > 0 then
		Duel.SortDecktop(tp, tp, ct)
		for i = 1, ct do
			local mg = Duel.GetDecktopGroup(tp, 1)
			Duel.MoveSequence(mg:GetFirst(), SEQ_DECKBOTTOM)
		end
	end
end
function s.rmcon(e, tp, eg, ep, ev, re, r, rp)
	return Duel.GetTurnPlayer() == 1 - tp and Duel.IsExistingMatchingCard(Card.IsAttribute, tp, LOCATION_GRAVE, 0, 1, nil, ATTRIBUTE_WIND)
end
function s.rmtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1 - tp) and chkc:IsAbleToRemove()
	end
	if chk == 0 then
		return Duel.IsExistingTarget(Card.IsAbleToRemove, tp, 0, LOCATION_GRAVE, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
	local g = Duel.SelectTarget(tp, Card.IsAbleToRemove, tp, 0, LOCATION_GRAVE, 1, 1, nil)
	Duel.SetOperationInfo(0, CATEGORY_REMOVE, g, 1, 0, 0)
end
function s.rmop(e, tp, eg, ep, ev, re, r, rp)
	local tc = Duel.GetFirstTarget()
	if tc:IsRelateToEffect(e) then
		Duel.Remove(tc, POS_FACEUP, REASON_EFFECT)
	end
end

