name: Excode
card_text: 2+ Cyberse monsters
  When this card is Link Summoned: You can choose unused Main Monster Zones equal to the number of monsters currently in the Extra Monster Zones; those zones cannot be used while this monster is face-up on the field. You can only use this effect of "Excode Talker" once per turn. Monsters this card points to gain 500 ATK, also they cannot be destroyed by card effects.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	aux.AddLinkProcedure(c, aux.FilterBoolFunction(Card.IsLinkRace, RACE_CYBERSE), 2)
  	--lock zones
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(s.lzcon)
  	e1:SetTarget(s.lztg)
  	e1:SetOperation(s.lzop)
  	c:RegisterEffect(e1)
  	--atk up/indestructable
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e2:SetTarget(s.tgtg)
  	e2:SetValue(500)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
  	e3:SetValue(1)
  	c:RegisterEffect(e3)
  end
  function s.lzcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
  end
  function s.lzfilter(c)
  	return c:GetSequence() > 4
  end
  function s.lztg(e, tp, eg, ep, ev, re, r, rp, chk)
  	local ct = Duel.GetMatchingGroupCount(s.lzfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
  	if chk == 0 then
  		return ct > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE, PLAYER_NONE, 0) + Duel.GetLocationCount(1 - tp, LOCATION_MZONE, PLAYER_NONE, 0) > ct
  	end
  	local dis = Duel.SelectDisableField(tp, ct, LOCATION_MZONE, LOCATION_MZONE, 0xe000e0)
  	e:SetLabel(dis)
  	Duel.Hint(HINT_ZONE, tp, dis)
  end
  function s.lzop(e, tp, eg, ep, ev, re, r, rp)
  	local zone = e:GetLabel()
  	if tp == 1 then
  		zone = ((zone & 0xffff) << 16) | ((zone >> 16) & 0xffff)
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e1:SetCode(EFFECT_DISABLE_FIELD)
  	e1:SetValue(zone)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  	e:GetHandler():RegisterEffect(e1)
  end
  function s.tgtg(e, c)
  	return e:GetHandler():GetLinkedGroup():IsContains(c)
  end
  
  
source_text: Excode
  2+ Cyberse monsters
  When this card is Link Summoned: You can choose unused Main Monster Zones equal to the number of monsters currently in the Extra Monster Zones; those zones cannot be used while this monster is face-up on the field. You can only use this effect of "Excode Talker" once per turn. Monsters this card points to gain 500 ATK, also they cannot be destroyed by card effects.
target_text: -- Excode
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	aux.AddLinkProcedure(c, aux.FilterBoolFunction(Card.IsLinkRace, RACE_CYBERSE), 2)
  	--lock zones
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(s.lzcon)
  	e1:SetTarget(s.lztg)
  	e1:SetOperation(s.lzop)
  	c:RegisterEffect(e1)
  	--atk up/indestructable
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e2:SetTarget(s.tgtg)
  	e2:SetValue(500)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
  	e3:SetValue(1)
  	c:RegisterEffect(e3)
  end
  function s.lzcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
  end
  function s.lzfilter(c)
  	return c:GetSequence() > 4
  end
  function s.lztg(e, tp, eg, ep, ev, re, r, rp, chk)
  	local ct = Duel.GetMatchingGroupCount(s.lzfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
  	if chk == 0 then
  		return ct > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE, PLAYER_NONE, 0) + Duel.GetLocationCount(1 - tp, LOCATION_MZONE, PLAYER_NONE, 0) > ct
  	end
  	local dis = Duel.SelectDisableField(tp, ct, LOCATION_MZONE, LOCATION_MZONE, 0xe000e0)
  	e:SetLabel(dis)
  	Duel.Hint(HINT_ZONE, tp, dis)
  end
  function s.lzop(e, tp, eg, ep, ev, re, r, rp)
  	local zone = e:GetLabel()
  	if tp == 1 then
  		zone = ((zone & 0xffff) << 16) | ((zone >> 16) & 0xffff)
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e1:SetCode(EFFECT_DISABLE_FIELD)
  	e1:SetValue(zone)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  	e:GetHandler():RegisterEffect(e1)
  end
  function s.tgtg(e, c)
  	return e:GetHandler():GetLinkedGroup():IsContains(c)
  end
  
  