name: Dragonoid
card_text: Activate this card by paying 1000 LP. During your Main Phase: You can Special Summon 1 "Dragonoid Token" (Machine/EARTH/Level 1/ATK 300/DEF 300) in Attack Position, you cannot Special Summon monsters from the Extra Deck for the rest of this turn, also during the End Phase your opponent Special Summons 1 "Dragonoid Token" to their field in Attack Position (even if this card leaves the field). You can use this effect of "Dragonoid Generator" up to twice per turn.
external_ids: local CARD_ID_0 = 28053764 --Dragonoid Token
  
lua: local CARD_ID_0 = 28053764 --Dragonoid Token
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCost(s.cost)
  	c:RegisterEffect(e1)
  	--Special Summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetCountLimit(2, id)
  	e2:SetTarget(s.tktg)
  	e2:SetOperation(s.tkop)
  	c:RegisterEffect(e2)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckLPCost(tp, 1000)
  	end
  	Duel.PayLPCost(tp, 1000)
  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, 300, 300, 1, RACE_MACHINE, ATTRIBUTE_EARTH, POS_FACEUP_ATTACK)
  	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)
  	local c = e:GetHandler()
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetTargetRange(1, 0)
  	e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation, LOCATION_EXTRA))
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  	if
  		Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 or not Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, 0, TYPES_TOKEN_MONSTER, 300, 300, 1, RACE_MACHINE, ATTRIBUTE_EARTH, POS_FACEUP_ATTACK)
  	then
  		return
  	end
  	local token = Duel.CreateToken(tp, id + 1)
  	Duel.SpecialSummon(token, 0, tp, tp, false, false, POS_FACEUP_ATTACK)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EVENT_PHASE + PHASE_END)
  	e2:SetCountLimit(1)
  	e2:SetOperation(s.tkop2)
  	e2:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e2, tp)
  end
  function s.tkop2(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(1 - tp, LOCATION_MZONE) <= 0 then
  		return
  	end
  	if not Duel.IsPlayerCanSpecialSummonMonster(1 - tp, id + 1, 0, TYPES_TOKEN_MONSTER, 300, 300, 1, RACE_MACHINE, ATTRIBUTE_EARTH, POS_FACEUP_ATTACK) then
  		return
  	end
  	Duel.Hint(HINT_CARD, 0, id)
  	local token = Duel.CreateToken(1 - tp, id + 1)
  	Duel.SpecialSummon(token, 0, 1 - tp, 1 - tp, false, false, POS_FACEUP_ATTACK)
  end
  
  
source_text: Dragonoid
  Activate this card by paying 1000 LP. During your Main Phase: You can Special Summon 1 "Dragonoid Token" (Machine/EARTH/Level 1/ATK 300/DEF 300) in Attack Position, you cannot Special Summon monsters from the Extra Deck for the rest of this turn, also during the End Phase your opponent Special Summons 1 "Dragonoid Token" to their field in Attack Position (even if this card leaves the field). You can use this effect of "Dragonoid Generator" up to twice per turn.
target_text: -- Dragonoid
  local CARD_ID_0 = 28053764 --Dragonoid Token
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCost(s.cost)
  	c:RegisterEffect(e1)
  	--Special Summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetCountLimit(2, id)
  	e2:SetTarget(s.tktg)
  	e2:SetOperation(s.tkop)
  	c:RegisterEffect(e2)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckLPCost(tp, 1000)
  	end
  	Duel.PayLPCost(tp, 1000)
  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, 300, 300, 1, RACE_MACHINE, ATTRIBUTE_EARTH, POS_FACEUP_ATTACK)
  	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)
  	local c = e:GetHandler()
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetTargetRange(1, 0)
  	e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation, LOCATION_EXTRA))
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  	if
  		Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 or not Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, 0, TYPES_TOKEN_MONSTER, 300, 300, 1, RACE_MACHINE, ATTRIBUTE_EARTH, POS_FACEUP_ATTACK)
  	then
  		return
  	end
  	local token = Duel.CreateToken(tp, id + 1)
  	Duel.SpecialSummon(token, 0, tp, tp, false, false, POS_FACEUP_ATTACK)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EVENT_PHASE + PHASE_END)
  	e2:SetCountLimit(1)
  	e2:SetOperation(s.tkop2)
  	e2:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e2, tp)
  end
  function s.tkop2(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(1 - tp, LOCATION_MZONE) <= 0 then
  		return
  	end
  	if not Duel.IsPlayerCanSpecialSummonMonster(1 - tp, id + 1, 0, TYPES_TOKEN_MONSTER, 300, 300, 1, RACE_MACHINE, ATTRIBUTE_EARTH, POS_FACEUP_ATTACK) then
  		return
  	end
  	Duel.Hint(HINT_CARD, 0, id)
  	local token = Duel.CreateToken(1 - tp, id + 1)
  	Duel.SpecialSummon(token, 0, 1 - tp, 1 - tp, false, false, POS_FACEUP_ATTACK)
  end
  
  