name: The
card_text: All monsters you control gain 500 ATK. Once per turn, this card cannot be destroyed by card effects. While you control 2 or more face-up Attack Position monsters, your opponent cannot target your monster(s) with the lowest ATK for an attack. If this card is activated: Destroy all Special Summoned monsters you control. You cannot Special Summon monsters from the Extra Deck. You can only activate "The Seal of Orichalcos" once per Duel.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_DUEL + EFFECT_COUNT_CODE_OATH)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.acttg)
  	e1:SetOperation(s.actop)
  	c:RegisterEffect(e1)
  	--spsummon limit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_FZONE)
  	e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetTargetRange(1, 0)
  	e2:SetTarget(s.sumlimit)
  	c:RegisterEffect(e2)
  	--
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetRange(LOCATION_FZONE)
  	e3:SetCode(EFFECT_UPDATE_ATTACK)
  	e3:SetTargetRange(LOCATION_MZONE, 0)
  	e3:SetValue(500)
  	c:RegisterEffect(e3)
  	--
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_SINGLE)
  	e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e4:SetRange(LOCATION_FZONE)
  	e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
  	e4:SetCountLimit(1)
  	e4:SetValue(s.valcon)
  	c:RegisterEffect(e4)
  	--atk limit
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_FIELD)
  	e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
  	e5:SetRange(LOCATION_FZONE)
  	e5:SetTargetRange(0, LOCATION_MZONE)
  	e5:SetCondition(s.atkcon)
  	e5:SetValue(s.atlimit)
  	c:RegisterEffect(e5)
  end
  function s.desfilter(c)
  	return c:IsSummonType(SUMMON_TYPE_SPECIAL)
  end
  function s.acttg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, 0, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.actop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, 0, nil)
  	if g:GetCount() > 0 then
  		Duel.Destroy(g, REASON_EFFECT)
  	end
  end
  function s.sumlimit(e, c, sump, sumtype, sumpos, targetp)
  	return c:IsLocation(LOCATION_EXTRA)
  end
  function s.valcon(e, re, r, rp)
  	return bit.band(r, REASON_EFFECT) ~= 0
  end
  function s.atkcon(e)
  	return Duel.IsExistingMatchingCard(Card.IsPosition, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 2, nil, POS_FACEUP_ATTACK)
  end
  function s.atkfilter(c, atk)
  	return c:IsFaceup() and c:GetAttack() < atk
  end
  function s.atlimit(e, c)
  	return c:IsFaceup() and not Duel.IsExistingMatchingCard(s.atkfilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, c, c:GetAttack())
  end
  
  
source_text: The
  All monsters you control gain 500 ATK. Once per turn, this card cannot be destroyed by card effects. While you control 2 or more face-up Attack Position monsters, your opponent cannot target your monster(s) with the lowest ATK for an attack. If this card is activated: Destroy all Special Summoned monsters you control. You cannot Special Summon monsters from the Extra Deck. You can only activate "The Seal of Orichalcos" once per Duel.
target_text: -- The
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_DUEL + EFFECT_COUNT_CODE_OATH)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.acttg)
  	e1:SetOperation(s.actop)
  	c:RegisterEffect(e1)
  	--spsummon limit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_FZONE)
  	e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetTargetRange(1, 0)
  	e2:SetTarget(s.sumlimit)
  	c:RegisterEffect(e2)
  	--
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetRange(LOCATION_FZONE)
  	e3:SetCode(EFFECT_UPDATE_ATTACK)
  	e3:SetTargetRange(LOCATION_MZONE, 0)
  	e3:SetValue(500)
  	c:RegisterEffect(e3)
  	--
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_SINGLE)
  	e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e4:SetRange(LOCATION_FZONE)
  	e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
  	e4:SetCountLimit(1)
  	e4:SetValue(s.valcon)
  	c:RegisterEffect(e4)
  	--atk limit
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_FIELD)
  	e5:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
  	e5:SetRange(LOCATION_FZONE)
  	e5:SetTargetRange(0, LOCATION_MZONE)
  	e5:SetCondition(s.atkcon)
  	e5:SetValue(s.atlimit)
  	c:RegisterEffect(e5)
  end
  function s.desfilter(c)
  	return c:IsSummonType(SUMMON_TYPE_SPECIAL)
  end
  function s.acttg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, 0, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.actop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, 0, nil)
  	if g:GetCount() > 0 then
  		Duel.Destroy(g, REASON_EFFECT)
  	end
  end
  function s.sumlimit(e, c, sump, sumtype, sumpos, targetp)
  	return c:IsLocation(LOCATION_EXTRA)
  end
  function s.valcon(e, re, r, rp)
  	return bit.band(r, REASON_EFFECT) ~= 0
  end
  function s.atkcon(e)
  	return Duel.IsExistingMatchingCard(Card.IsPosition, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 2, nil, POS_FACEUP_ATTACK)
  end
  function s.atkfilter(c, atk)
  	return c:IsFaceup() and c:GetAttack() < atk
  end
  function s.atlimit(e, c)
  	return c:IsFaceup() and not Duel.IsExistingMatchingCard(s.atkfilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, c, c:GetAttack())
  end
  
  