name: Gate
card_text: Cannot be Normal Summoned/Set. Must first be Special Summoned (from your hand) by Tributing 1 "Sanga of the Thunder", "Kazejin", and "Suijin".
external_ids: local CARD_ID_0 = 62340868 --Kazejin
  local CARD_ID_1 = 25955164 --Sanga of the Thunder
  local CARD_ID_2 = 98434877 --Suijin
  
lua: local CARD_ID_0 = 62340868 --Kazejin
  local CARD_ID_1 = 25955164 --Sanga of the Thunder
  local CARD_ID_2 = 98434877 --Suijin
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_1, CARD_ID_0, CARD_ID_2)
  	c:EnableReviveLimit()
  	--special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SPSUMMON_PROC)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetCondition(s.spcon)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  end
  s.spchecks = aux.CreateChecks(Card.IsCode, { CARD_ID_1, CARD_ID_0, CARD_ID_2 })
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	local g = Duel.GetReleaseGroup(tp, false, REASON_SPSUMMON)
  	return g:CheckSubGroupEach(s.spchecks, aux.mzctcheckrel, tp, REASON_SPSUMMON)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk, c)
  	local g = Duel.GetReleaseGroup(tp, false, REASON_SPSUMMON)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RELEASE)
  	local sg = g:SelectSubGroupEach(tp, s.spchecks, true, aux.mzctcheckrel, tp, REASON_SPSUMMON)
  	if sg then
  		sg:KeepAlive()
  		e:SetLabelObject(sg)
  		return true
  	else
  		return false
  	end
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp, c)
  	local g = e:GetLabelObject()
  	Duel.Release(g, REASON_SPSUMMON)
  	g:DeleteGroup()
  end
  
  
source_text: Gate
  Cannot be Normal Summoned/Set. Must first be Special Summoned (from your hand) by Tributing 1 "Sanga of the Thunder", "Kazejin", and "Suijin".
target_text: -- Gate
  local CARD_ID_0 = 62340868 --Kazejin
  local CARD_ID_1 = 25955164 --Sanga of the Thunder
  local CARD_ID_2 = 98434877 --Suijin
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_1, CARD_ID_0, CARD_ID_2)
  	c:EnableReviveLimit()
  	--special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SPSUMMON_PROC)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetCondition(s.spcon)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  end
  s.spchecks = aux.CreateChecks(Card.IsCode, { CARD_ID_1, CARD_ID_0, CARD_ID_2 })
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	local g = Duel.GetReleaseGroup(tp, false, REASON_SPSUMMON)
  	return g:CheckSubGroupEach(s.spchecks, aux.mzctcheckrel, tp, REASON_SPSUMMON)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk, c)
  	local g = Duel.GetReleaseGroup(tp, false, REASON_SPSUMMON)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RELEASE)
  	local sg = g:SelectSubGroupEach(tp, s.spchecks, true, aux.mzctcheckrel, tp, REASON_SPSUMMON)
  	if sg then
  		sg:KeepAlive()
  		e:SetLabelObject(sg)
  		return true
  	else
  		return false
  	end
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp, c)
  	local g = e:GetLabelObject()
  	Duel.Release(g, REASON_SPSUMMON)
  	g:DeleteGroup()
  end
  
  