name: Wiz,
card_text: If this card is Special Summoned: You can gain 500 LP for each monster "Fur Hire" you control with a different name, except "Wiz, Sage Fur Hire". When your opponent activates a Spell/Trap Card or effect (Quick Effect): You can discard 1 card "Fur Hire"; negate the activation. You can only use each effect of "Wiz, Sage Fur Hire" once per turn.
external_ids: local SETCARD_ID_0 = 0x114 --Fur
  
lua: local SETCARD_ID_0 = 0x114 --Fur
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--recover
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_RECOVER)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetProperty(EFFECT_FLAG_DELAY)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.rectg)
  	e1:SetOperation(s.recop)
  	c:RegisterEffect(e1)
  	--negate
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_NEGATE)
  	e2:SetType(EFFECT_TYPE_QUICK_O)
  	e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DAMAGE_CAL)
  	e2:SetCode(EVENT_CHAINING)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, id + 1)
  	e2:SetCondition(s.negcon)
  	e2:SetCost(s.negcost)
  	e2:SetTarget(s.negtg)
  	e2:SetOperation(s.negop)
  	c:RegisterEffect(e2)
  end
  function s.recfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and not c:IsCode(id)
  end
  function s.rectg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.recfilter, tp, LOCATION_MZONE, 0, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(s.recfilter, tp, LOCATION_MZONE, 0, nil)
  	local rec = g:GetClassCount(Card.GetCode) * 500
  	Duel.SetOperationInfo(0, CATEGORY_RECOVER, nil, 0, tp, rec)
  end
  function s.recop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.recfilter, tp, LOCATION_MZONE, 0, nil)
  	local rec = g:GetClassCount(Card.GetCode) * 500
  	Duel.Recover(tp, rec, REASON_EFFECT)
  end
  function s.negcon(e, tp, eg, ep, ev, re, r, rp)
  	return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep ~= tp and re:IsActiveType(TYPE_SPELL + TYPE_TRAP) and Duel.IsChainNegatable(ev)
  end
  function s.cfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsDiscardable()
  end
  function s.negcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_HAND, 0, 1, nil)
  	end
  	Duel.DiscardHand(tp, s.cfilter, 1, 1, REASON_COST + REASON_DISCARD, nil)
  end
  function s.negtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_NEGATE, eg, 1, 0, 0)
  end
  function s.negop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.NegateActivation(ev)
  end
  
  
source_text: Wiz,
  If this card is Special Summoned: You can gain 500 LP for each monster "Fur Hire" you control with a different name, except "Wiz, Sage Fur Hire". When your opponent activates a Spell/Trap Card or effect (Quick Effect): You can discard 1 card "Fur Hire"; negate the activation. You can only use each effect of "Wiz, Sage Fur Hire" once per turn.
target_text: -- Wiz,
  local SETCARD_ID_0 = 0x114 --Fur
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--recover
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_RECOVER)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetProperty(EFFECT_FLAG_DELAY)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.rectg)
  	e1:SetOperation(s.recop)
  	c:RegisterEffect(e1)
  	--negate
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_NEGATE)
  	e2:SetType(EFFECT_TYPE_QUICK_O)
  	e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DAMAGE_CAL)
  	e2:SetCode(EVENT_CHAINING)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, id + 1)
  	e2:SetCondition(s.negcon)
  	e2:SetCost(s.negcost)
  	e2:SetTarget(s.negtg)
  	e2:SetOperation(s.negop)
  	c:RegisterEffect(e2)
  end
  function s.recfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0) and not c:IsCode(id)
  end
  function s.rectg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.recfilter, tp, LOCATION_MZONE, 0, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(s.recfilter, tp, LOCATION_MZONE, 0, nil)
  	local rec = g:GetClassCount(Card.GetCode) * 500
  	Duel.SetOperationInfo(0, CATEGORY_RECOVER, nil, 0, tp, rec)
  end
  function s.recop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.recfilter, tp, LOCATION_MZONE, 0, nil)
  	local rec = g:GetClassCount(Card.GetCode) * 500
  	Duel.Recover(tp, rec, REASON_EFFECT)
  end
  function s.negcon(e, tp, eg, ep, ev, re, r, rp)
  	return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep ~= tp and re:IsActiveType(TYPE_SPELL + TYPE_TRAP) and Duel.IsChainNegatable(ev)
  end
  function s.cfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsDiscardable()
  end
  function s.negcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_HAND, 0, 1, nil)
  	end
  	Duel.DiscardHand(tp, s.cfilter, 1, 1, REASON_COST + REASON_DISCARD, nil)
  end
  function s.negtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_NEGATE, eg, 1, 0, 0)
  end
  function s.negop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.NegateActivation(ev)
  end
  
  