name: Speaker
card_text: While you control another "Ice Barrier" monster, Defense Position monsters your opponent controls cannot change their battle positions. You can only use each of the following effects of "Speaker for the Ice Barriers" once per turn. If you control an "Ice Barrier" monster: You can Special Summon this card from your hand. If you control an "Ice Barrier" monster: You can banish this card from your GY; Special Summon 1 "Ice Barrier Token" (Aqua/WATER/Level 1/ATK 0/DEF 0).
external_ids: local CARD_ID_0 = 44308318 --Ice Barrier Token
  local SETCARD_ID_0 = 0x2f --Ice
  
lua: local CARD_ID_0 = 44308318 --Ice Barrier Token
  local SETCARD_ID_0 = 0x2f --Ice
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Cannot Change a Battle Position
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
  	e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(0, LOCATION_MZONE)
  	e1:SetTarget(s.postg)
  	e1:SetCondition(s.poscon)
  	c:RegisterEffect(e1)
  	--Special Summon from a hand
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_HAND)
  	e2:SetCountLimit(1, id)
  	e2:SetCondition(s.spcon)
  	e2:SetTarget(s.sptg)
  	e2:SetOperation(s.spop)
  	c:RegisterEffect(e2)
  	--Special Summon a Token
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 1))
  	e3:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
  	e3:SetType(EFFECT_TYPE_IGNITION)
  	e3:SetRange(LOCATION_GRAVE)
  	e3:SetCountLimit(1, id + 1)
  	e3:SetCost(aux.bfgcost)
  	e3:SetCondition(s.tkcon)
  	e3:SetTarget(s.tktg)
  	e3:SetOperation(s.tkop)
  	c:RegisterEffect(e3)
  end
  function s.posfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.poscon(e)
  	return Duel.IsExistingMatchingCard(s.posfilter, e:GetHandler():GetControler(), LOCATION_MZONE, 0, 1, e:GetHandler())
  end
  function s.postg(e, c)
  	return c:IsDefensePos()
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil)
  end
  function s.sptg(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.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
  end
  function s.tkfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.tkcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.IsExistingMatchingCard(s.tkfilter, tp, LOCATION_MZONE, 0, 1, nil)
  end
  function s.tktg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, 0, TYPES_TOKEN_MONSTER, 0, 0, 1, RACE_AQUA, ATTRIBUTE_WATER)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, 0, 0)
  end
  function s.tkop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
  		return
  	end
  	if Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, 0, TYPES_TOKEN_MONSTER, 0, 0, 1, RACE_AQUA, ATTRIBUTE_WATER) then
  		local token = Duel.CreateToken(tp, id + 1)
  		Duel.SpecialSummon(token, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  
source_text: Speaker
  While you control another "Ice Barrier" monster, Defense Position monsters your opponent controls cannot change their battle positions. You can only use each of the following effects of "Speaker for the Ice Barriers" once per turn. If you control an "Ice Barrier" monster: You can Special Summon this card from your hand. If you control an "Ice Barrier" monster: You can banish this card from your GY; Special Summon 1 "Ice Barrier Token" (Aqua/WATER/Level 1/ATK 0/DEF 0).
target_text: -- Speaker
  local CARD_ID_0 = 44308318 --Ice Barrier Token
  local SETCARD_ID_0 = 0x2f --Ice
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Cannot Change a Battle Position
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
  	e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetTargetRange(0, LOCATION_MZONE)
  	e1:SetTarget(s.postg)
  	e1:SetCondition(s.poscon)
  	c:RegisterEffect(e1)
  	--Special Summon from a hand
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_HAND)
  	e2:SetCountLimit(1, id)
  	e2:SetCondition(s.spcon)
  	e2:SetTarget(s.sptg)
  	e2:SetOperation(s.spop)
  	c:RegisterEffect(e2)
  	--Special Summon a Token
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 1))
  	e3:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
  	e3:SetType(EFFECT_TYPE_IGNITION)
  	e3:SetRange(LOCATION_GRAVE)
  	e3:SetCountLimit(1, id + 1)
  	e3:SetCost(aux.bfgcost)
  	e3:SetCondition(s.tkcon)
  	e3:SetTarget(s.tktg)
  	e3:SetOperation(s.tkop)
  	c:RegisterEffect(e3)
  end
  function s.posfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.poscon(e)
  	return Duel.IsExistingMatchingCard(s.posfilter, e:GetHandler():GetControler(), LOCATION_MZONE, 0, 1, e:GetHandler())
  end
  function s.postg(e, c)
  	return c:IsDefensePos()
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil)
  end
  function s.sptg(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.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
  end
  function s.tkfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.tkcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.IsExistingMatchingCard(s.tkfilter, tp, LOCATION_MZONE, 0, 1, nil)
  end
  function s.tktg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, 0, TYPES_TOKEN_MONSTER, 0, 0, 1, RACE_AQUA, ATTRIBUTE_WATER)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, 0, 0)
  end
  function s.tkop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
  		return
  	end
  	if Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, 0, TYPES_TOKEN_MONSTER, 0, 0, 1, RACE_AQUA, ATTRIBUTE_WATER) then
  		local token = Duel.CreateToken(tp, id + 1)
  		Duel.SpecialSummon(token, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  