name: Spiritual
card_text: The first time each Beast, Beast-Warrior, or Plant monster you control would be destroyed by battle each turn, it is not destroyed.
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)
  	c:RegisterEffect(e1)
  	--
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetTarget(s.indtg)
  	e2:SetCountLimit(1)
  	e2:SetValue(s.valcon)
  	c:RegisterEffect(e2)
  end
  function s.indtg(e, c)
  	return c:IsRace(RACE_PLANT + RACE_BEAST + RACE_BEASTWARRIOR)
  end
  function s.valcon(e, re, r, rp)
  	return bit.band(r, REASON_BATTLE) ~= 0
  end
  
  
source_text: Spiritual
  The first time each Beast, Beast-Warrior, or Plant monster you control would be destroyed by battle each turn, it is not destroyed.
target_text: -- Spiritual
  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)
  	c:RegisterEffect(e1)
  	--
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetTarget(s.indtg)
  	e2:SetCountLimit(1)
  	e2:SetValue(s.valcon)
  	c:RegisterEffect(e2)
  end
  function s.indtg(e, c)
  	return c:IsRace(RACE_PLANT + RACE_BEAST + RACE_BEASTWARRIOR)
  end
  function s.valcon(e, re, r, rp)
  	return bit.band(r, REASON_BATTLE) ~= 0
  end
  
  