name: Ancient
card_text: 1 FIRE Tuner + 1+ non-Tuner Pyro monsters
  If this card is Synchro Summoned: Banish cards from your opponent's GY, up to the number of cards in their hand, and if you do, this card gains 200 ATK for each card banished by this effect.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, aux.FilterBoolFunction(Card.IsAttribute, ATTRIBUTE_FIRE), aux.NonTuner(Card.IsRace, RACE_PYRO), 1)
  	c:EnableReviveLimit()
  	--remove
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_REMOVE)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCondition(s.remcon)
  	e1:SetTarget(s.remtg)
  	e1:SetOperation(s.remop)
  	c:RegisterEffect(e1)
  end
  function s.remcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
  end
  function s.remtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_REMOVE, nil, 1, 1 - tp, LOCATION_GRAVE)
  end
  function s.remop(e, tp, eg, ep, ev, re, r, rp)
  	local ht = Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND)
  	if ht == 0 then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local rg = Duel.SelectMatchingCard(tp, Card.IsAbleToRemove, tp, 0, LOCATION_GRAVE, 1, ht, nil)
  	local c = e:GetHandler()
  	if rg:GetCount() > 0 then
  		Duel.Remove(rg, POS_FACEUP, REASON_EFFECT)
  		if c:IsFacedown() or not c:IsRelateToEffect(e) then
  			return
  		end
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(rg:GetCount() * 200)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  		c:RegisterEffect(e1)
  	end
  end
  
  
source_text: Ancient
  1 FIRE Tuner + 1+ non-Tuner Pyro monsters
  If this card is Synchro Summoned: Banish cards from your opponent's GY, up to the number of cards in their hand, and if you do, this card gains 200 ATK for each card banished by this effect.
target_text: -- Ancient
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, aux.FilterBoolFunction(Card.IsAttribute, ATTRIBUTE_FIRE), aux.NonTuner(Card.IsRace, RACE_PYRO), 1)
  	c:EnableReviveLimit()
  	--remove
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_REMOVE)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCondition(s.remcon)
  	e1:SetTarget(s.remtg)
  	e1:SetOperation(s.remop)
  	c:RegisterEffect(e1)
  end
  function s.remcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
  end
  function s.remtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_REMOVE, nil, 1, 1 - tp, LOCATION_GRAVE)
  end
  function s.remop(e, tp, eg, ep, ev, re, r, rp)
  	local ht = Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND)
  	if ht == 0 then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local rg = Duel.SelectMatchingCard(tp, Card.IsAbleToRemove, tp, 0, LOCATION_GRAVE, 1, ht, nil)
  	local c = e:GetHandler()
  	if rg:GetCount() > 0 then
  		Duel.Remove(rg, POS_FACEUP, REASON_EFFECT)
  		if c:IsFacedown() or not c:IsRelateToEffect(e) then
  			return
  		end
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(rg:GetCount() * 200)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  		c:RegisterEffect(e1)
  	end
  end
  
  