name: Super
card_text: Cannot be Normal Summoned/Set. Must first be Special Summoned (from your hand) while your opponent controls a "Kaiju" monster. You can only control 1 "Kaiju" monster. Once per turn: You can remove 2 Kaiju Counters from anywhere on the field; equip 1 "Kaiju" monster from your hand or Graveyard to this card. This card gains ATK equal to the combined original ATK of the "Kaiju" monsters equipped to it by this effect.
external_ids: local SETCARD_ID_0 = 0xd3 --Kaiju
  local COUNTER_ID_0 = 0x37 --Kaiju
  
lua: local SETCARD_ID_0 = 0xd3 --Kaiju
  local COUNTER_ID_0 = 0x37 --Kaiju
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	c:SetUniqueOnField(1, 0, aux.FilterBoolFunction(Card.IsSetCard, SETCARD_ID_0), LOCATION_MZONE)
  	--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)
  	c:RegisterEffect(e1)
  	--equip
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetCategory(CATEGORY_EQUIP)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1)
  	e2:SetCost(s.eqcost)
  	e2:SetTarget(s.eqtg)
  	e2:SetOperation(s.eqop)
  	c:RegisterEffect(e2)
  	--atk
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e3:SetCode(EFFECT_UPDATE_ATTACK)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetValue(s.atkval)
  	c:RegisterEffect(e3)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.cfilter, tp, 0, LOCATION_MZONE, 1, nil)
  end
  function s.eqcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsCanRemoveCounter(tp, 1, 1, COUNTER_ID_0, 2, REASON_COST)
  	end
  	Duel.RemoveCounter(tp, 1, 1, COUNTER_ID_0, 2, REASON_COST)
  end
  function s.eqfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
  end
  function s.eqtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_SZONE) > 0 and Duel.IsExistingMatchingCard(s.eqfilter, tp, LOCATION_GRAVE + LOCATION_HAND, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_LEAVE_GRAVE, nil, 1, tp, LOCATION_GRAVE + LOCATION_HAND)
  end
  function s.eqop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if Duel.GetLocationCount(tp, LOCATION_SZONE) <= 0 then
  		return
  	end
  	if c:IsFacedown() or not c:IsRelateToEffect(e) then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
  	local g = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.eqfilter), tp, LOCATION_GRAVE + LOCATION_HAND, 0, 1, 1, nil)
  	local tc = g:GetFirst()
  	if tc then
  		if not Duel.Equip(tp, tc, c) then
  			return
  		end
  		tc:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 0)
  		local e1 = Effect.CreateEffect(c)
  		e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_EQUIP_LIMIT)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		e1:SetValue(s.eqlimit)
  		tc:RegisterEffect(e1)
  	end
  end
  function s.eqlimit(e, c)
  	return e:GetOwner() == c
  end
  function s.atkfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:GetAttack() >= 0 and c:GetFlagEffect(id) ~= 0
  end
  function s.atkval(e, c)
  	local g = e:GetHandler():GetEquipGroup():Filter(s.atkfilter, nil)
  	return g:GetSum(Card.GetAttack)
  end
  
  
source_text: Super
  Cannot be Normal Summoned/Set. Must first be Special Summoned (from your hand) while your opponent controls a "Kaiju" monster. You can only control 1 "Kaiju" monster. Once per turn: You can remove 2 Kaiju Counters from anywhere on the field; equip 1 "Kaiju" monster from your hand or Graveyard to this card. This card gains ATK equal to the combined original ATK of the "Kaiju" monsters equipped to it by this effect.
target_text: -- Super
  local SETCARD_ID_0 = 0xd3 --Kaiju
  local COUNTER_ID_0 = 0x37 --Kaiju
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	c:SetUniqueOnField(1, 0, aux.FilterBoolFunction(Card.IsSetCard, SETCARD_ID_0), LOCATION_MZONE)
  	--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)
  	c:RegisterEffect(e1)
  	--equip
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetCategory(CATEGORY_EQUIP)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1)
  	e2:SetCost(s.eqcost)
  	e2:SetTarget(s.eqtg)
  	e2:SetOperation(s.eqop)
  	c:RegisterEffect(e2)
  	--atk
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e3:SetCode(EFFECT_UPDATE_ATTACK)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetValue(s.atkval)
  	c:RegisterEffect(e3)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.cfilter, tp, 0, LOCATION_MZONE, 1, nil)
  end
  function s.eqcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsCanRemoveCounter(tp, 1, 1, COUNTER_ID_0, 2, REASON_COST)
  	end
  	Duel.RemoveCounter(tp, 1, 1, COUNTER_ID_0, 2, REASON_COST)
  end
  function s.eqfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
  end
  function s.eqtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_SZONE) > 0 and Duel.IsExistingMatchingCard(s.eqfilter, tp, LOCATION_GRAVE + LOCATION_HAND, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_LEAVE_GRAVE, nil, 1, tp, LOCATION_GRAVE + LOCATION_HAND)
  end
  function s.eqop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if Duel.GetLocationCount(tp, LOCATION_SZONE) <= 0 then
  		return
  	end
  	if c:IsFacedown() or not c:IsRelateToEffect(e) then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
  	local g = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.eqfilter), tp, LOCATION_GRAVE + LOCATION_HAND, 0, 1, 1, nil)
  	local tc = g:GetFirst()
  	if tc then
  		if not Duel.Equip(tp, tc, c) then
  			return
  		end
  		tc:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 0)
  		local e1 = Effect.CreateEffect(c)
  		e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_EQUIP_LIMIT)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		e1:SetValue(s.eqlimit)
  		tc:RegisterEffect(e1)
  	end
  end
  function s.eqlimit(e, c)
  	return e:GetOwner() == c
  end
  function s.atkfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:GetAttack() >= 0 and c:GetFlagEffect(id) ~= 0
  end
  function s.atkval(e, c)
  	local g = e:GetHandler():GetEquipGroup():Filter(s.atkfilter, nil)
  	return g:GetSum(Card.GetAttack)
  end
  
  