name: Steelswarm
card_text: At the start of your Main Phase 1, if you control no Spell/Trap Cards: You can Special Summon this card from your Graveyard. You cannot Special Summon another monster(s) the turn you activate this effect. While this card is face-up on the field, it cannot be Tributed, except for the Tribute Summon of a "Steelswarm" monster, and cannot be used as a Synchro Material Monster.
external_ids: local SETCARD_ID_0 = 0x100a --Steelswarm
  
lua: local SETCARD_ID_0 = 0x100a --Steelswarm
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Special Summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetRange(LOCATION_GRAVE)
  	e1:SetCondition(s.condition)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	--cannot release
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
  	e2:SetValue(1)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_UNRELEASABLE_SUM)
  	e3:SetValue(s.sumlimit)
  	c:RegisterEffect(e3)
  	--cannot be synchro material
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_SINGLE)
  	e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
  	e4:SetValue(1)
  	c:RegisterEffect(e4)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetCurrentPhase() == PHASE_MAIN1
  		and not Duel.CheckPhaseActivity()
  		and e:GetHandler():IsSetCard(SETCARD_ID_0)
  		and not Duel.IsExistingMatchingCard(Card.IsType, tp, LOCATION_ONFIELD, 0, 1, nil, TYPE_SPELL + TYPE_TRAP)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetActivityCount(tp, ACTIVITY_SPSUMMON) == 0
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_OATH)
  	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	e1:SetTargetRange(1, 0)
  	e1:SetLabelObject(e)
  	e1:SetTarget(s.splimit)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.splimit(e, c, sump, sumtype, sumpos, targetp, se)
  	return e:GetLabelObject() ~= se
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	if e:GetHandler():IsRelateToEffect(e) then
  		Duel.SpecialSummon(e:GetHandler(), 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  function s.sumlimit(e, c)
  	return not c:IsSetCard(SETCARD_ID_0)
  end
  
  
source_text: Steelswarm
  At the start of your Main Phase 1, if you control no Spell/Trap Cards: You can Special Summon this card from your Graveyard. You cannot Special Summon another monster(s) the turn you activate this effect. While this card is face-up on the field, it cannot be Tributed, except for the Tribute Summon of a "Steelswarm" monster, and cannot be used as a Synchro Material Monster.
target_text: -- Steelswarm
  local SETCARD_ID_0 = 0x100a --Steelswarm
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Special Summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetRange(LOCATION_GRAVE)
  	e1:SetCondition(s.condition)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	--cannot release
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
  	e2:SetValue(1)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_UNRELEASABLE_SUM)
  	e3:SetValue(s.sumlimit)
  	c:RegisterEffect(e3)
  	--cannot be synchro material
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_SINGLE)
  	e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
  	e4:SetValue(1)
  	c:RegisterEffect(e4)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetCurrentPhase() == PHASE_MAIN1
  		and not Duel.CheckPhaseActivity()
  		and e:GetHandler():IsSetCard(SETCARD_ID_0)
  		and not Duel.IsExistingMatchingCard(Card.IsType, tp, LOCATION_ONFIELD, 0, 1, nil, TYPE_SPELL + TYPE_TRAP)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetActivityCount(tp, ACTIVITY_SPSUMMON) == 0
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_OATH)
  	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	e1:SetTargetRange(1, 0)
  	e1:SetLabelObject(e)
  	e1:SetTarget(s.splimit)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.splimit(e, c, sump, sumtype, sumpos, targetp, se)
  	return e:GetLabelObject() ~= se
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	if e:GetHandler():IsRelateToEffect(e) then
  		Duel.SpecialSummon(e:GetHandler(), 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  function s.sumlimit(e, c)
  	return not c:IsSetCard(SETCARD_ID_0)
  end
  
  