name: Nutrient
card_text: During damage calculation, when you are about to take 2000 or more battle damage: Gain 4000 LP first.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCategory(CATEGORY_RECOVER)
  	e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetBattleDamage(tp) >= 2000
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_RECOVER, nil, 0, tp, 4000)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Recover(tp, 4000, REASON_EFFECT)
  end
  
  
source_text: Nutrient
  During damage calculation, when you are about to take 2000 or more battle damage: Gain 4000 LP first.
target_text: -- Nutrient
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCategory(CATEGORY_RECOVER)
  	e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetBattleDamage(tp) >= 2000
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_RECOVER, nil, 0, tp, 4000)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Recover(tp, 4000, REASON_EFFECT)
  end
  
  