name: Elemental
card_text: "Elemental HERO Neos" + 3 "Neo-Spacian" monsters with different Attributes
  Must first be Special Summoned (from your Extra Deck) by shuffling the above cards you control into the Deck. (You do not use "Polymerization".) If this card is Special Summoned from the Extra Deck: You can activate this effect; for the rest of this turn, your opponent cannot activate cards, also cards your opponent controls cannot activate their effects. Your opponent cannot activate cards or effects in response to this effect's activation. Once per turn, during the End Phase: Shuffle this card into the Extra Deck, and if you do, destroy all cards your opponent controls.
external_ids: local CARD_ID_0 = 89943723 --Elemental HERO Neos
  local SETCARD_ID_0 = 0x1f --Neo-Spacian
  
lua: local CARD_ID_0 = 89943723 --Elemental HERO Neos
  local SETCARD_ID_0 = 0x1f --Neo-Spacian
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcCodeFun(c, CARD_ID_0, s.ffilter, 3, true, true)
  	aux.AddContactFusionProcedure(c, Card.IsAbleToDeckOrExtraAsCost, LOCATION_ONFIELD, 0, aux.ContactFusionSendToDeck(c))
  	--special summon condition
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetValue(s.splimit)
  	c:RegisterEffect(e1)
  	--return
  	aux.EnableNeosReturn(c, s.retop, s.set_category)
  	--act limit
  	local e5 = Effect.CreateEffect(c)
  	e5:SetDescription(aux.Stringid(id, 1))
  	e5:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e5:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e5:SetProperty(EFFECT_FLAG_DELAY)
  	e5:SetCondition(s.limcon)
  	e5:SetTarget(s.limtg)
  	e5:SetOperation(s.limop)
  	c:RegisterEffect(e5)
  end
  s.material_setcode = 0x8
  function s.ffilter(c, fc, sub, mg, sg)
  	return c:IsType(TYPE_MONSTER)
  		and c:IsFusionSetCard(SETCARD_ID_0)
  		and (not sg or not sg:Filter(Card.IsFusionSetCard, nil, SETCARD_ID_0):IsExists(Card.IsFusionAttribute, 1, c, c:GetFusionAttribute()))
  end
  function s.splimit(e, se, sp, st)
  	return not e:GetHandler():IsLocation(LOCATION_EXTRA)
  end
  function s.set_category(e, tp, eg, ep, ev, re, r, rp)
  	e:SetCategory(CATEGORY_TODECK + CATEGORY_DESTROY)
  	local g = Duel.GetMatchingGroup(nil, tp, 0, LOCATION_ONFIELD, e:GetHandler())
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, #g, 0, 0)
  end
  function s.retop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) or c:IsFacedown() then
  		return
  	end
  	Duel.SendtoDeck(c, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  	if c:IsLocation(LOCATION_EXTRA) then
  		local g = Duel.GetMatchingGroup(nil, tp, 0, LOCATION_ONFIELD, nil)
  		Duel.Destroy(g, REASON_EFFECT)
  	end
  end
  function s.limcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonLocation(LOCATION_EXTRA)
  end
  function s.limtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetChainLimit(s.chainlm)
  end
  function s.chainlm(e, rp, tp)
  	return tp == rp
  end
  function s.limop(e, tp, eg, ep, ev, re, r, rp)
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetTargetRange(0, 1)
  	e1:SetValue(s.aclimit)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.aclimit(e, re, tp)
  	return re:GetHandler():IsOnField() or re:IsHasType(EFFECT_TYPE_ACTIVATE)
  end
  
  
source_text: Elemental
  "Elemental HERO Neos" + 3 "Neo-Spacian" monsters with different Attributes
  Must first be Special Summoned (from your Extra Deck) by shuffling the above cards you control into the Deck. (You do not use "Polymerization".) If this card is Special Summoned from the Extra Deck: You can activate this effect; for the rest of this turn, your opponent cannot activate cards, also cards your opponent controls cannot activate their effects. Your opponent cannot activate cards or effects in response to this effect's activation. Once per turn, during the End Phase: Shuffle this card into the Extra Deck, and if you do, destroy all cards your opponent controls.
target_text: -- Elemental
  local CARD_ID_0 = 89943723 --Elemental HERO Neos
  local SETCARD_ID_0 = 0x1f --Neo-Spacian
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcCodeFun(c, CARD_ID_0, s.ffilter, 3, true, true)
  	aux.AddContactFusionProcedure(c, Card.IsAbleToDeckOrExtraAsCost, LOCATION_ONFIELD, 0, aux.ContactFusionSendToDeck(c))
  	--special summon condition
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetValue(s.splimit)
  	c:RegisterEffect(e1)
  	--return
  	aux.EnableNeosReturn(c, s.retop, s.set_category)
  	--act limit
  	local e5 = Effect.CreateEffect(c)
  	e5:SetDescription(aux.Stringid(id, 1))
  	e5:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e5:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e5:SetProperty(EFFECT_FLAG_DELAY)
  	e5:SetCondition(s.limcon)
  	e5:SetTarget(s.limtg)
  	e5:SetOperation(s.limop)
  	c:RegisterEffect(e5)
  end
  s.material_setcode = 0x8
  function s.ffilter(c, fc, sub, mg, sg)
  	return c:IsType(TYPE_MONSTER)
  		and c:IsFusionSetCard(SETCARD_ID_0)
  		and (not sg or not sg:Filter(Card.IsFusionSetCard, nil, SETCARD_ID_0):IsExists(Card.IsFusionAttribute, 1, c, c:GetFusionAttribute()))
  end
  function s.splimit(e, se, sp, st)
  	return not e:GetHandler():IsLocation(LOCATION_EXTRA)
  end
  function s.set_category(e, tp, eg, ep, ev, re, r, rp)
  	e:SetCategory(CATEGORY_TODECK + CATEGORY_DESTROY)
  	local g = Duel.GetMatchingGroup(nil, tp, 0, LOCATION_ONFIELD, e:GetHandler())
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, #g, 0, 0)
  end
  function s.retop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) or c:IsFacedown() then
  		return
  	end
  	Duel.SendtoDeck(c, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  	if c:IsLocation(LOCATION_EXTRA) then
  		local g = Duel.GetMatchingGroup(nil, tp, 0, LOCATION_ONFIELD, nil)
  		Duel.Destroy(g, REASON_EFFECT)
  	end
  end
  function s.limcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonLocation(LOCATION_EXTRA)
  end
  function s.limtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetChainLimit(s.chainlm)
  end
  function s.chainlm(e, rp, tp)
  	return tp == rp
  end
  function s.limop(e, tp, eg, ep, ev, re, r, rp)
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetTargetRange(0, 1)
  	e1:SetValue(s.aclimit)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.aclimit(e, re, tp)
  	return re:GetHandler():IsOnField() or re:IsHasType(EFFECT_TYPE_ACTIVATE)
  end
  
  