name: Time-Tearing
card_text: For the rest of this Duel, apply the following effects.
  ● You cannot activate monster effects in the hand.
  ● Draw 2 cards instead of 1 for your normal draw during your Draw Phase.
  ● You can conduct 2 Normal Summons/Sets per turn, not just 1.
  You can banish this card from your GY, then discard 1 "Time-Tearing Morganite"; your opponent cannot activate monster effects when you Normal Summon this turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	e1:SetLabel(id)
  	c:RegisterEffect(e1)
  	--act limit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_GRAVE)
  	e2:SetCost(s.cost)
  	e2:SetTarget(s.target)
  	e2:SetOperation(s.operation)
  	e2:SetLabel(19403424)
  	c:RegisterEffect(e2)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	local ct = e:GetLabel()
  	if chk == 0 then
  		return Duel.GetFlagEffect(tp, ct) == 0
  	end
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 2))
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT)
  	e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e1:SetTargetRange(1, 0)
  	e1:SetValue(s.aclimit)
  	Duel.RegisterEffect(e1, tp)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetCode(EFFECT_DRAW_COUNT)
  	e2:SetTargetRange(1, 0)
  	e2:SetValue(2)
  	Duel.RegisterEffect(e2, tp)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetTargetRange(1, 0)
  	e3:SetValue(2)
  	Duel.RegisterEffect(e3, tp)
  	Duel.RegisterFlagEffect(tp, id, 0, 0, 1)
  end
  function s.aclimit(e, re, tp)
  	return re:GetActivateLocation() == LOCATION_HAND and re:IsActiveType(TYPE_MONSTER)
  end
  function s.filter(c)
  	return c:IsCode(id) and c:IsDiscardable()
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	local c = e:GetHandler()
  	if chk == 0 then
  		return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_HAND, 0, 1, nil)
  	end
  	Duel.Remove(c, POS_FACEUP, REASON_COST)
  	Duel.DiscardHand(tp, s.filter, 1, 1, REASON_COST + REASON_DISCARD, nil)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_SUMMON_SUCCESS)
  	e1:SetCondition(s.nsumcon)
  	e1:SetOperation(s.nsumsuc)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  	Duel.RegisterFlagEffect(tp, id + 1, RESET_PHASE + PHASE_END, 0, 1)
  end
  function s.nsumcon(e, tp, eg, ep, ev, re, r, rp)
  	local ec = eg:GetFirst()
  	return ec and ec:IsControler(tp)
  end
  function s.nsumsuc(e, tp, eg, ep, ev, re, r, rp)
  	Duel.SetChainLimitTillChainEnd(s.efun)
  end
  function s.efun(e, ep, tp)
  	return ep == tp or not e:IsActiveType(TYPE_MONSTER)
  end
  
  
source_text: Time-Tearing
  For the rest of this Duel, apply the following effects.
  ● You cannot activate monster effects in the hand.
  ● Draw 2 cards instead of 1 for your normal draw during your Draw Phase.
  ● You can conduct 2 Normal Summons/Sets per turn, not just 1.
  You can banish this card from your GY, then discard 1 "Time-Tearing Morganite"; your opponent cannot activate monster effects when you Normal Summon this turn.
target_text: -- Time-Tearing
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	e1:SetLabel(id)
  	c:RegisterEffect(e1)
  	--act limit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_GRAVE)
  	e2:SetCost(s.cost)
  	e2:SetTarget(s.target)
  	e2:SetOperation(s.operation)
  	e2:SetLabel(19403424)
  	c:RegisterEffect(e2)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	local ct = e:GetLabel()
  	if chk == 0 then
  		return Duel.GetFlagEffect(tp, ct) == 0
  	end
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 2))
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT)
  	e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e1:SetTargetRange(1, 0)
  	e1:SetValue(s.aclimit)
  	Duel.RegisterEffect(e1, tp)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetCode(EFFECT_DRAW_COUNT)
  	e2:SetTargetRange(1, 0)
  	e2:SetValue(2)
  	Duel.RegisterEffect(e2, tp)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetTargetRange(1, 0)
  	e3:SetValue(2)
  	Duel.RegisterEffect(e3, tp)
  	Duel.RegisterFlagEffect(tp, id, 0, 0, 1)
  end
  function s.aclimit(e, re, tp)
  	return re:GetActivateLocation() == LOCATION_HAND and re:IsActiveType(TYPE_MONSTER)
  end
  function s.filter(c)
  	return c:IsCode(id) and c:IsDiscardable()
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	local c = e:GetHandler()
  	if chk == 0 then
  		return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_HAND, 0, 1, nil)
  	end
  	Duel.Remove(c, POS_FACEUP, REASON_COST)
  	Duel.DiscardHand(tp, s.filter, 1, 1, REASON_COST + REASON_DISCARD, nil)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_SUMMON_SUCCESS)
  	e1:SetCondition(s.nsumcon)
  	e1:SetOperation(s.nsumsuc)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  	Duel.RegisterFlagEffect(tp, id + 1, RESET_PHASE + PHASE_END, 0, 1)
  end
  function s.nsumcon(e, tp, eg, ep, ev, re, r, rp)
  	local ec = eg:GetFirst()
  	return ec and ec:IsControler(tp)
  end
  function s.nsumsuc(e, tp, eg, ep, ev, re, r, rp)
  	Duel.SetChainLimitTillChainEnd(s.efun)
  end
  function s.efun(e, ep, tp)
  	return ep == tp or not e:IsActiveType(TYPE_MONSTER)
  end
  
  