name: Nidhogg,
card_text: You can only control 1 "Nidhogg, Generaider Boss of Ice". When your opponent would Special Summon a monster(s) (Quick Effect): You can Tribute 1 "Generaider" monster or 1 Wyrm monster; negate the Summon, and if you do, destroy that monster(s). You can only use this effect of "Nidhogg, Generaider Boss of Ice" once per turn.
external_ids: local SETCARD_ID_0 = 0x134 --Generaider
  
lua: local SETCARD_ID_0 = 0x134 --Generaider
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:SetUniqueOnField(1, 0, id)
  	--disable special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DISABLE_SUMMON + CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_QUICK_O)
  	e1:SetCode(EVENT_SPSUMMON)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(s.discon)
  	e1:SetCost(s.discost)
  	e1:SetTarget(s.distg)
  	e1:SetOperation(s.disop)
  	c:RegisterEffect(e1)
  end
  function s.discon(e, tp, eg, ep, ev, re, r, rp)
  	return tp ~= ep and Duel.GetCurrentChain() == 0
  end
  function s.costfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) or c:IsRace(RACE_WYRM)
  end
  function s.discost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckReleaseGroup(tp, s.costfilter, 1, nil)
  	end
  	local g = Duel.SelectReleaseGroup(tp, s.costfilter, 1, 1, nil)
  	Duel.Release(g, REASON_COST)
  end
  function s.distg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DISABLE_SUMMON, eg, eg:GetCount(), 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, eg, eg:GetCount(), 0, 0)
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.NegateSummon(eg)
  	Duel.Destroy(eg, REASON_EFFECT)
  end
  
  
source_text: Nidhogg,
  You can only control 1 "Nidhogg, Generaider Boss of Ice". When your opponent would Special Summon a monster(s) (Quick Effect): You can Tribute 1 "Generaider" monster or 1 Wyrm monster; negate the Summon, and if you do, destroy that monster(s). You can only use this effect of "Nidhogg, Generaider Boss of Ice" once per turn.
target_text: -- Nidhogg,
  local SETCARD_ID_0 = 0x134 --Generaider
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:SetUniqueOnField(1, 0, id)
  	--disable special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DISABLE_SUMMON + CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_QUICK_O)
  	e1:SetCode(EVENT_SPSUMMON)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(s.discon)
  	e1:SetCost(s.discost)
  	e1:SetTarget(s.distg)
  	e1:SetOperation(s.disop)
  	c:RegisterEffect(e1)
  end
  function s.discon(e, tp, eg, ep, ev, re, r, rp)
  	return tp ~= ep and Duel.GetCurrentChain() == 0
  end
  function s.costfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) or c:IsRace(RACE_WYRM)
  end
  function s.discost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckReleaseGroup(tp, s.costfilter, 1, nil)
  	end
  	local g = Duel.SelectReleaseGroup(tp, s.costfilter, 1, 1, nil)
  	Duel.Release(g, REASON_COST)
  end
  function s.distg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_DISABLE_SUMMON, eg, eg:GetCount(), 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, eg, eg:GetCount(), 0, 0)
  end
  function s.disop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.NegateSummon(eg)
  	Duel.Destroy(eg, REASON_EFFECT)
  end
  
  