name: Fushi
card_text: This card cannot be Special Summoned. This card returns to the owner's hand during the End Phase of the turn that this card is Normal Summoned or flipped face-up. When this card inflicts Battle Damage to your opponent's Life Points, increase your Life Points by an amount equal to the Battle Damage.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--spirit return
  	aux.EnableSpiritReturn(c, EVENT_SUMMON_SUCCESS, EVENT_FLIP)
  	--cannot special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e1:SetValue(aux.FALSE)
  	c:RegisterEffect(e1)
  	--recover
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 1))
  	e4:SetCategory(CATEGORY_RECOVER)
  	e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e4:SetCode(EVENT_BATTLE_DAMAGE)
  	e4:SetCondition(s.condition)
  	e4:SetTarget(s.target)
  	e4:SetOperation(s.operation)
  	c:RegisterEffect(e4)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return ep ~= tp
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetTargetPlayer(tp)
  	Duel.SetTargetParam(ev)
  	Duel.SetOperationInfo(0, CATEGORY_RECOVER, nil, 0, tp, ev)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
  	Duel.Recover(p, d, REASON_EFFECT)
  end
  
  
source_text: Fushi
  This card cannot be Special Summoned. This card returns to the owner's hand during the End Phase of the turn that this card is Normal Summoned or flipped face-up. When this card inflicts Battle Damage to your opponent's Life Points, increase your Life Points by an amount equal to the Battle Damage.
target_text: -- Fushi
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--spirit return
  	aux.EnableSpiritReturn(c, EVENT_SUMMON_SUCCESS, EVENT_FLIP)
  	--cannot special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e1:SetValue(aux.FALSE)
  	c:RegisterEffect(e1)
  	--recover
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 1))
  	e4:SetCategory(CATEGORY_RECOVER)
  	e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e4:SetCode(EVENT_BATTLE_DAMAGE)
  	e4:SetCondition(s.condition)
  	e4:SetTarget(s.target)
  	e4:SetOperation(s.operation)
  	c:RegisterEffect(e4)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return ep ~= tp
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetTargetPlayer(tp)
  	Duel.SetTargetParam(ev)
  	Duel.SetOperationInfo(0, CATEGORY_RECOVER, nil, 0, tp, ev)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
  	Duel.Recover(p, d, REASON_EFFECT)
  end
  
  