name: Gravekeeper's
card_text: At the start of your Main Phase 1: Apply 1 of the following effects until the end of your opponent's turn.
  ● Neither player can activate card effects in the GY.
  ● Neither player can banish cards from the GY.
  ● Neither player can Special Summon monsters from the GYs.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCondition(s.condition)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetCurrentPhase() == PHASE_MAIN1 and not Duel.CheckPhaseActivity()
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local op = Duel.SelectOption(tp, aux.Stringid(id, 0), aux.Stringid(id, 1), aux.Stringid(id, 2))
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT)
  	e1:SetTargetRange(1, 1)
  	if op == 0 then
  		e1:SetDescription(aux.Stringid(id, 0))
  		e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  		e1:SetValue(s.actlimit)
  	elseif op == 1 then
  		e1:SetDescription(aux.Stringid(id, 1))
  		e1:SetCode(EFFECT_CANNOT_REMOVE)
  		e1:SetTarget(s.rmlimit)
  	else
  		e1:SetDescription(aux.Stringid(id, 2))
  		e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  		e1:SetTarget(s.splimit)
  	end
  	e1:SetReset(RESET_PHASE + PHASE_END + RESET_OPPO_TURN)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.actlimit(e, re, tp)
  	return re:GetActivateLocation() == LOCATION_GRAVE
  end
  function s.rmlimit(e, c)
  	return c:IsLocation(LOCATION_GRAVE)
  end
  function s.splimit(e, c)
  	return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER)
  end
  
  
source_text: Gravekeeper's
  At the start of your Main Phase 1: Apply 1 of the following effects until the end of your opponent's turn.
  ● Neither player can activate card effects in the GY.
  ● Neither player can banish cards from the GY.
  ● Neither player can Special Summon monsters from the GYs.
target_text: -- Gravekeeper's
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCondition(s.condition)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetCurrentPhase() == PHASE_MAIN1 and not Duel.CheckPhaseActivity()
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local op = Duel.SelectOption(tp, aux.Stringid(id, 0), aux.Stringid(id, 1), aux.Stringid(id, 2))
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CLIENT_HINT)
  	e1:SetTargetRange(1, 1)
  	if op == 0 then
  		e1:SetDescription(aux.Stringid(id, 0))
  		e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  		e1:SetValue(s.actlimit)
  	elseif op == 1 then
  		e1:SetDescription(aux.Stringid(id, 1))
  		e1:SetCode(EFFECT_CANNOT_REMOVE)
  		e1:SetTarget(s.rmlimit)
  	else
  		e1:SetDescription(aux.Stringid(id, 2))
  		e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  		e1:SetTarget(s.splimit)
  	end
  	e1:SetReset(RESET_PHASE + PHASE_END + RESET_OPPO_TURN)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.actlimit(e, re, tp)
  	return re:GetActivateLocation() == LOCATION_GRAVE
  end
  function s.rmlimit(e, c)
  	return c:IsLocation(LOCATION_GRAVE)
  end
  function s.splimit(e, c)
  	return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_MONSTER)
  end
  
  