name: Forgotten
card_text: While this card is on the field, this card's name becomes "Umi". Once per turn: You can target 1 Level 4 or lower Fish, Sea Serpent or Aqua-Type monster you control; banish that target. During your End Phase: Special Summon the monster(s) banished by this effect.
external_ids: local CARD_ID_0 = 22702055 --Umi
  
lua: local CARD_ID_0 = 22702055 --Umi
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_0)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--instant(chain)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetCategory(CATEGORY_REMOVE)
  	e2:SetType(EFFECT_TYPE_QUICK_O)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetCode(EVENT_FREE_CHAIN)
  	e2:SetCountLimit(1)
  	e2:SetTarget(s.target)
  	e2:SetOperation(s.operation)
  	c:RegisterEffect(e2)
  	--code
  	aux.EnableChangeCode(c, CARD_ID_0)
  	--special summon
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 2))
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetCode(EVENT_PHASE + PHASE_END)
  	e3:SetCountLimit(1)
  	e3:SetCondition(s.spcon)
  	e3:SetTarget(s.sptg)
  	e3:SetOperation(s.spop)
  	c:RegisterEffect(e3)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsLevelBelow(4) and c:IsRace(RACE_FISH + RACE_SEASERPENT + RACE_AQUA) and c:IsAbleToRemove()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, LOCATION_MZONE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_MZONE, 0, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_REMOVE, g, 1, 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc and tc:IsRelateToEffect(e) and tc:IsRace(RACE_FISH + RACE_SEASERPENT + RACE_AQUA) and Duel.Remove(tc, POS_FACEUP, REASON_EFFECT) ~= 0 and tc:IsLocation(LOCATION_REMOVED) then
  		local fid = e:GetHandler():GetFieldID()
  		tc:RegisterFlagEffect(43889634, RESET_EVENT + RESETS_STANDARD, 0, 1, fid)
  	end
  end
  function s.spfilter(c, fid)
  	return c:GetFlagEffect(43889634) ~= 0 and c:GetFlagEffectLabel(43889634) == fid
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	local fid = e:GetHandler():GetFieldID()
  	return Duel.GetTurnPlayer() == tp and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_REMOVED, LOCATION_REMOVED, 1, nil, fid)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local fid = e:GetHandler():GetFieldID()
  	local tg = Duel.GetMatchingGroup(s.spfilter, tp, LOCATION_REMOVED, LOCATION_REMOVED, nil, fid)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, tg, 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local fid = e:GetHandler():GetFieldID()
  	local tg = Duel.GetMatchingGroup(s.spfilter, tp, LOCATION_REMOVED, LOCATION_REMOVED, nil, fid)
  	if #tg > 0 then
  		Duel.SpecialSummon(tg, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  
source_text: Forgotten
  While this card is on the field, this card's name becomes "Umi". Once per turn: You can target 1 Level 4 or lower Fish, Sea Serpent or Aqua-Type monster you control; banish that target. During your End Phase: Special Summon the monster(s) banished by this effect.
target_text: -- Forgotten
  local CARD_ID_0 = 22702055 --Umi
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_0)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--instant(chain)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetCategory(CATEGORY_REMOVE)
  	e2:SetType(EFFECT_TYPE_QUICK_O)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetCode(EVENT_FREE_CHAIN)
  	e2:SetCountLimit(1)
  	e2:SetTarget(s.target)
  	e2:SetOperation(s.operation)
  	c:RegisterEffect(e2)
  	--code
  	aux.EnableChangeCode(c, CARD_ID_0)
  	--special summon
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 2))
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetCode(EVENT_PHASE + PHASE_END)
  	e3:SetCountLimit(1)
  	e3:SetCondition(s.spcon)
  	e3:SetTarget(s.sptg)
  	e3:SetOperation(s.spop)
  	c:RegisterEffect(e3)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsLevelBelow(4) and c:IsRace(RACE_FISH + RACE_SEASERPENT + RACE_AQUA) and c:IsAbleToRemove()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, LOCATION_MZONE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_MZONE, 0, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_REMOVE, g, 1, 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc and tc:IsRelateToEffect(e) and tc:IsRace(RACE_FISH + RACE_SEASERPENT + RACE_AQUA) and Duel.Remove(tc, POS_FACEUP, REASON_EFFECT) ~= 0 and tc:IsLocation(LOCATION_REMOVED) then
  		local fid = e:GetHandler():GetFieldID()
  		tc:RegisterFlagEffect(43889634, RESET_EVENT + RESETS_STANDARD, 0, 1, fid)
  	end
  end
  function s.spfilter(c, fid)
  	return c:GetFlagEffect(43889634) ~= 0 and c:GetFlagEffectLabel(43889634) == fid
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	local fid = e:GetHandler():GetFieldID()
  	return Duel.GetTurnPlayer() == tp and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_REMOVED, LOCATION_REMOVED, 1, nil, fid)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local fid = e:GetHandler():GetFieldID()
  	local tg = Duel.GetMatchingGroup(s.spfilter, tp, LOCATION_REMOVED, LOCATION_REMOVED, nil, fid)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, tg, 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local fid = e:GetHandler():GetFieldID()
  	local tg = Duel.GetMatchingGroup(s.spfilter, tp, LOCATION_REMOVED, LOCATION_REMOVED, nil, fid)
  	if #tg > 0 then
  		Duel.SpecialSummon(tg, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  