Generate a YGOPro Lua script for the following Yu-Gi-Oh card effect:
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 of Shabti
local s,id=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(Cost.SelfDiscard)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
end
s.listed_series={SET_GRAVEKEEPERS}
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.operation(e,tp,eg,ep,ev,re,r,rp,chk)
	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(s.tgfilter)
	e1:SetValue(1)
	Duel.RegisterEffect(e1,tp)
end
function s.tgfilter(e,c)
	return c:IsSetCard(SET_GRAVEKEEPERS)
end