Charm
During either player's turn: You can discard this card; until the End Phase, "Gravekeeper's" monsters you control cannot be destroyed by battle.
local SETCARD_ID_0 = 0x2e --Gravekeeper's

local SETCARD_ID_0 = 0x2e --Gravekeeper's
local s, id, o = GetID()
function s.initial_effect(c)
	--indes
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetType(EFFECT_TYPE_QUICK_O)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetRange(LOCATION_HAND)
	e1:SetCondition(s.condition)
	e1:SetCost(s.cost)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
end
function s.condition(e, tp, eg, ep, ev, re, r, rp)
	local ph = Duel.GetCurrentPhase()
	return ph ~= PHASE_MAIN2 and ph ~= PHASE_END
end
function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return e:GetHandler():IsDiscardable()
	end
	Duel.SendtoGrave(e:GetHandler(), REASON_COST + REASON_DISCARD)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local e1 = Effect.CreateEffect(e:GetHandler())
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
	e1:SetTargetRange(LOCATION_MZONE, 0)
	e1:SetReset(RESET_PHASE + PHASE_END)
	e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard, SETCARD_ID_0))
	e1:SetValue(1)
	Duel.RegisterEffect(e1, tp)
end


Charm
During either player's turn: You can discard this card; until the End Phase, "Gravekeeper's" monsters you control cannot be destroyed by battle.
-- Charm
local SETCARD_ID_0 = 0x2e --Gravekeeper's
local s, id, o = GetID()
function s.initial_effect(c)
	--indes
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetType(EFFECT_TYPE_QUICK_O)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetRange(LOCATION_HAND)
	e1:SetCondition(s.condition)
	e1:SetCost(s.cost)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
end
function s.condition(e, tp, eg, ep, ev, re, r, rp)
	local ph = Duel.GetCurrentPhase()
	return ph ~= PHASE_MAIN2 and ph ~= PHASE_END
end
function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return e:GetHandler():IsDiscardable()
	end
	Duel.SendtoGrave(e:GetHandler(), REASON_COST + REASON_DISCARD)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local e1 = Effect.CreateEffect(e:GetHandler())
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
	e1:SetTargetRange(LOCATION_MZONE, 0)
	e1:SetReset(RESET_PHASE + PHASE_END)
	e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard, SETCARD_ID_0))
	e1:SetValue(1)
	Duel.RegisterEffect(e1, tp)
end

