Dream
If a "Dream Mirror" monster you control would be Tributed to activate its own effect, shuffle it into the Deck instead of sending it to the GY. During the Main Phase: You can send this face-up card to the GY; place 1 of your "Dream Mirror of Joy" or "Dream Mirror of Terror" that is banished or in your GY, face-up in your Field Zone, then you can Special Summon 1 monster from your hand that specifically lists that card you placed in its text.
local CARD_ID_0 = 74665651 --Dream Mirror of Joy
local CARD_ID_1 = 1050355 --Dream Mirror of Terror
local SETCARD_ID_0 = 0x131 --Dream

local CARD_ID_0 = 74665651 --Dream Mirror of Joy
local CARD_ID_1 = 1050355 --Dream Mirror of Terror
local SETCARD_ID_0 = 0x131 --Dream
local s, id, o = GetID()
function s.initial_effect(c)
	aux.AddCodeList(c, CARD_ID_0, CARD_ID_1)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	c:RegisterEffect(e1)
	--remove
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD)
	e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE + EFFECT_FLAG_IGNORE_IMMUNE)
	e2:SetRange(LOCATION_SZONE)
	e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
	e2:SetTarget(s.rmtg)
	e2:SetTargetRange(LOCATION_MZONE, 0)
	e2:SetValue(LOCATION_DECKSHF)
	c:RegisterEffect(e2)
	--place
	local e3 = Effect.CreateEffect(c)
	e3:SetDescription(aux.Stringid(id, 0))
	e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e3:SetType(EFFECT_TYPE_QUICK_O)
	e3:SetCode(EVENT_FREE_CHAIN)
	e3:SetRange(LOCATION_SZONE)
	e3:SetCondition(s.tfcon)
	e3:SetCost(s.tfcost)
	e3:SetTarget(s.tftg)
	e3:SetOperation(s.tfop)
	c:RegisterEffect(e3)
end
function s.rmtg(e, c)
	local re = c:GetReasonEffect()
	return c:IsSetCard(SETCARD_ID_0) and c:IsReason(REASON_COST) and c:IsReason(REASON_RELEASE) and re and re:IsActivated() and re:GetHandler() == c
end
function s.tfcon(e, tp, eg, ep, ev, re, r, rp)
	return Duel.GetCurrentPhase() == PHASE_MAIN1 or Duel.GetCurrentPhase() == PHASE_MAIN2
end
function s.tfcost(e, tp, eg, ep, ev, re, r, rp, chk)
	local c = e:GetHandler()
	if chk == 0 then
		return c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED)
	end
	Duel.SendtoGrave(c, REASON_COST)
end
function s.tffilter(c)
	return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(CARD_ID_0, CARD_ID_1)
end
function s.tftg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(s.tffilter, tp, LOCATION_GRAVE + LOCATION_REMOVED, 0, 1, nil)
	end
end
function s.spfilter(c, e, tp, code)
	return c:IsCanBeSpecialSummoned(e, 0, tp, false, false) and aux.IsCodeListed(c, code)
end
function s.tfop(e, tp, eg, ep, ev, re, r, rp)
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOFIELD)
	local tg = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.tffilter), tp, LOCATION_GRAVE + LOCATION_REMOVED, 0, 1, 1, nil, tp)
	if #tg == 0 then
		return
	end
	Duel.HintSelection(tg)
	local tc = tg:GetFirst()
	local fc = Duel.GetFieldCard(tp, LOCATION_FZONE, 0)
	if fc then
		Duel.SendtoGrave(fc, REASON_RULE)
		Duel.BreakEffect()
	end
	if Duel.MoveToField(tc, tp, tp, LOCATION_FZONE, POS_FACEUP, true) then
		local g = Duel.GetMatchingGroup(s.spfilter, tp, LOCATION_HAND, 0, nil, e, tp, tc:GetCode())
		if #g > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 1)) then
			Duel.BreakEffect()
			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
			local sg = g:Select(tp, 1, 1, nil)
			Duel.SpecialSummon(sg, 0, tp, tp, false, false, POS_FACEUP)
		end
	end
end


Dream
If a "Dream Mirror" monster you control would be Tributed to activate its own effect, shuffle it into the Deck instead of sending it to the GY. During the Main Phase: You can send this face-up card to the GY; place 1 of your "Dream Mirror of Joy" or "Dream Mirror of Terror" that is banished or in your GY, face-up in your Field Zone, then you can Special Summon 1 monster from your hand that specifically lists that card you placed in its text.
-- Dream
local CARD_ID_0 = 74665651 --Dream Mirror of Joy
local CARD_ID_1 = 1050355 --Dream Mirror of Terror
local SETCARD_ID_0 = 0x131 --Dream
local s, id, o = GetID()
function s.initial_effect(c)
	aux.AddCodeList(c, CARD_ID_0, CARD_ID_1)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	c:RegisterEffect(e1)
	--remove
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD)
	e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE + EFFECT_FLAG_IGNORE_IMMUNE)
	e2:SetRange(LOCATION_SZONE)
	e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
	e2:SetTarget(s.rmtg)
	e2:SetTargetRange(LOCATION_MZONE, 0)
	e2:SetValue(LOCATION_DECKSHF)
	c:RegisterEffect(e2)
	--place
	local e3 = Effect.CreateEffect(c)
	e3:SetDescription(aux.Stringid(id, 0))
	e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e3:SetType(EFFECT_TYPE_QUICK_O)
	e3:SetCode(EVENT_FREE_CHAIN)
	e3:SetRange(LOCATION_SZONE)
	e3:SetCondition(s.tfcon)
	e3:SetCost(s.tfcost)
	e3:SetTarget(s.tftg)
	e3:SetOperation(s.tfop)
	c:RegisterEffect(e3)
end
function s.rmtg(e, c)
	local re = c:GetReasonEffect()
	return c:IsSetCard(SETCARD_ID_0) and c:IsReason(REASON_COST) and c:IsReason(REASON_RELEASE) and re and re:IsActivated() and re:GetHandler() == c
end
function s.tfcon(e, tp, eg, ep, ev, re, r, rp)
	return Duel.GetCurrentPhase() == PHASE_MAIN1 or Duel.GetCurrentPhase() == PHASE_MAIN2
end
function s.tfcost(e, tp, eg, ep, ev, re, r, rp, chk)
	local c = e:GetHandler()
	if chk == 0 then
		return c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED)
	end
	Duel.SendtoGrave(c, REASON_COST)
end
function s.tffilter(c)
	return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(CARD_ID_0, CARD_ID_1)
end
function s.tftg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(s.tffilter, tp, LOCATION_GRAVE + LOCATION_REMOVED, 0, 1, nil)
	end
end
function s.spfilter(c, e, tp, code)
	return c:IsCanBeSpecialSummoned(e, 0, tp, false, false) and aux.IsCodeListed(c, code)
end
function s.tfop(e, tp, eg, ep, ev, re, r, rp)
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOFIELD)
	local tg = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.tffilter), tp, LOCATION_GRAVE + LOCATION_REMOVED, 0, 1, 1, nil, tp)
	if #tg == 0 then
		return
	end
	Duel.HintSelection(tg)
	local tc = tg:GetFirst()
	local fc = Duel.GetFieldCard(tp, LOCATION_FZONE, 0)
	if fc then
		Duel.SendtoGrave(fc, REASON_RULE)
		Duel.BreakEffect()
	end
	if Duel.MoveToField(tc, tp, tp, LOCATION_FZONE, POS_FACEUP, true) then
		local g = Duel.GetMatchingGroup(s.spfilter, tp, LOCATION_HAND, 0, nil, e, tp, tc:GetCode())
		if #g > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 1)) then
			Duel.BreakEffect()
			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
			local sg = g:Select(tp, 1, 1, nil)
			Duel.SpecialSummon(sg, 0, tp, tp, false, false, POS_FACEUP)
		end
	end
end

