Pot
Target 3 banished monsters; shuffle all 3 into the Deck, then draw 1 card. You can only activate 1 "Pot of Acquisitiveness" per turn.
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_TODECK + CATEGORY_DRAW)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.filter(c)
	return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.sfilter(c, tp)
	return c:IsLocation(LOCATION_DECK) and c:IsControler(tp)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return chkc:IsLocation(LOCATION_REMOVED) and s.filter(chkc)
	end
	if chk == 0 then
		return Duel.IsPlayerCanDraw(tp, 1) and Duel.IsExistingTarget(s.filter, tp, LOCATION_REMOVED, LOCATION_REMOVED, 3, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_REMOVED, LOCATION_REMOVED, 3, 3, nil)
	Duel.SetOperationInfo(0, CATEGORY_TODECK, g, g:GetCount(), 0, 0)
	Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 1)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local tg = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
	if not tg or tg:FilterCount(Card.IsRelateToEffect, nil, e) ~= 3 then
		return
	end
	Duel.SendtoDeck(tg, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
	local g = Duel.GetOperatedGroup()
	if g:IsExists(s.sfilter, 1, nil, tp) then
		Duel.ShuffleDeck(tp)
	end
	if g:IsExists(s.sfilter, 1, nil, 1 - tp) then
		Duel.ShuffleDeck(1 - tp)
	end
	local ct = g:FilterCount(Card.IsLocation, nil, LOCATION_DECK + LOCATION_EXTRA)
	if ct == 3 then
		Duel.BreakEffect()
		Duel.Draw(tp, 1, REASON_EFFECT)
	end
end


Pot
Target 3 banished monsters; shuffle all 3 into the Deck, then draw 1 card. You can only activate 1 "Pot of Acquisitiveness" per turn.
-- Pot
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_TODECK + CATEGORY_DRAW)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.filter(c)
	return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.sfilter(c, tp)
	return c:IsLocation(LOCATION_DECK) and c:IsControler(tp)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return chkc:IsLocation(LOCATION_REMOVED) and s.filter(chkc)
	end
	if chk == 0 then
		return Duel.IsPlayerCanDraw(tp, 1) and Duel.IsExistingTarget(s.filter, tp, LOCATION_REMOVED, LOCATION_REMOVED, 3, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_REMOVED, LOCATION_REMOVED, 3, 3, nil)
	Duel.SetOperationInfo(0, CATEGORY_TODECK, g, g:GetCount(), 0, 0)
	Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 1)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local tg = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
	if not tg or tg:FilterCount(Card.IsRelateToEffect, nil, e) ~= 3 then
		return
	end
	Duel.SendtoDeck(tg, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
	local g = Duel.GetOperatedGroup()
	if g:IsExists(s.sfilter, 1, nil, tp) then
		Duel.ShuffleDeck(tp)
	end
	if g:IsExists(s.sfilter, 1, nil, 1 - tp) then
		Duel.ShuffleDeck(1 - tp)
	end
	local ct = g:FilterCount(Card.IsLocation, nil, LOCATION_DECK + LOCATION_EXTRA)
	if ct == 3 then
		Duel.BreakEffect()
		Duel.Draw(tp, 1, REASON_EFFECT)
	end
end

