name: Naturia
card_text: When a "Naturia" monster you control is targeted for an attack (Quick Effect): You can send this card from the field to the GY; negate that attack, then end the Battle Phase.
external_ids: local SETCARD_ID_0 = 0x2a --Naturia
  
lua: local SETCARD_ID_0 = 0x2a --Naturia
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--negate attack
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_QUICK_O)
  	e1:SetCode(EVENT_BE_BATTLE_TARGET)
  	e1:SetRange(LOCATION_MZONE)
  	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 ec = eg:GetFirst()
  	return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(SETCARD_ID_0)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsAbleToGraveAsCost()
  	end
  	Duel.SendtoGrave(e:GetHandler(), REASON_COST)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.NegateAttack() then
  		Duel.SkipPhase(1 - tp, PHASE_BATTLE, RESET_PHASE + PHASE_BATTLE_STEP, 1)
  	end
  end
  
  
source_text: Naturia
  When a "Naturia" monster you control is targeted for an attack (Quick Effect): You can send this card from the field to the GY; negate that attack, then end the Battle Phase.
target_text: -- Naturia
  local SETCARD_ID_0 = 0x2a --Naturia
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--negate attack
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_QUICK_O)
  	e1:SetCode(EVENT_BE_BATTLE_TARGET)
  	e1:SetRange(LOCATION_MZONE)
  	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 ec = eg:GetFirst()
  	return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(SETCARD_ID_0)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsAbleToGraveAsCost()
  	end
  	Duel.SendtoGrave(e:GetHandler(), REASON_COST)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.NegateAttack() then
  		Duel.SkipPhase(1 - tp, PHASE_BATTLE, RESET_PHASE + PHASE_BATTLE_STEP, 1)
  	end
  end
  
  