name: Brotherhood
card_text: If this card is in your GY: You can send a total of 2 "Fire Fist" / "Fire Formation" cards from your hand and/or face-up field to the GY; Special Summon this card from your GY. You can only use the effect of "Brotherhood of the Fire Fist - Buffalo" once per turn.
external_ids: local CARD_ID_0 = 46241344 --Brotherhood of the Fire Fist - Eagle
  local SETCARD_ID_0 = 0x79 --Fire
  
lua: local CARD_ID_0 = 46241344 --Brotherhood of the Fire Fist - Eagle
  local SETCARD_ID_0 = 0x79 --Fire
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--spsummon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_GRAVE)
  	e1:SetCountLimit(1, id)
  	e1:SetCost(s.spcost)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c)
  	return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(SETCARD_ID_0, 0x7c) and c:IsAbleToGraveAsCost()
  end
  function s.cfilter1(c, g, tp)
  	return g:IsExists(s.cfilter2, 1, c, c, tp)
  end
  function s.cfilter2(c, mc, tp)
  	return Duel.GetMZoneCount(tp, Group.FromCards(c, mc)) > 0
  end
  function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	local sg = Duel.GetMatchingGroup(s.cfilter, tp, LOCATION_HAND + LOCATION_ONFIELD, 0, nil)
  	if chk == 0 then
  		return sg:IsExists(s.cfilter1, 1, nil, sg, tp) or (Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0)
  	end
  	if
  		sg:IsExists(s.cfilter1, 1, nil, sg, tp)
  		and (not Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) or Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 or not Duel.SelectYesNo(tp, aux.Stringid(46241344, 0)))
  	then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  		local g1 = sg:FilterSelect(tp, s.cfilter1, 1, 1, nil, sg, tp)
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  		local g2 = sg:FilterSelect(tp, s.cfilter2, 1, 1, g1:GetFirst(), g1:GetFirst(), tp)
  		g1:Merge(g2)
  		Duel.SendtoGrave(g1, REASON_COST)
  	end
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	if e:GetHandler():IsRelateToEffect(e) then
  		Duel.SpecialSummon(e:GetHandler(), 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  
source_text: Brotherhood
  If this card is in your GY: You can send a total of 2 "Fire Fist" / "Fire Formation" cards from your hand and/or face-up field to the GY; Special Summon this card from your GY. You can only use the effect of "Brotherhood of the Fire Fist - Buffalo" once per turn.
target_text: -- Brotherhood
  local CARD_ID_0 = 46241344 --Brotherhood of the Fire Fist - Eagle
  local SETCARD_ID_0 = 0x79 --Fire
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--spsummon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_GRAVE)
  	e1:SetCountLimit(1, id)
  	e1:SetCost(s.spcost)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c)
  	return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(SETCARD_ID_0, 0x7c) and c:IsAbleToGraveAsCost()
  end
  function s.cfilter1(c, g, tp)
  	return g:IsExists(s.cfilter2, 1, c, c, tp)
  end
  function s.cfilter2(c, mc, tp)
  	return Duel.GetMZoneCount(tp, Group.FromCards(c, mc)) > 0
  end
  function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	local sg = Duel.GetMatchingGroup(s.cfilter, tp, LOCATION_HAND + LOCATION_ONFIELD, 0, nil)
  	if chk == 0 then
  		return sg:IsExists(s.cfilter1, 1, nil, sg, tp) or (Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0)
  	end
  	if
  		sg:IsExists(s.cfilter1, 1, nil, sg, tp)
  		and (not Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) or Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 or not Duel.SelectYesNo(tp, aux.Stringid(46241344, 0)))
  	then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  		local g1 = sg:FilterSelect(tp, s.cfilter1, 1, 1, nil, sg, tp)
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  		local g2 = sg:FilterSelect(tp, s.cfilter2, 1, 1, g1:GetFirst(), g1:GetFirst(), tp)
  		g1:Merge(g2)
  		Duel.SendtoGrave(g1, REASON_COST)
  	end
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	if e:GetHandler():IsRelateToEffect(e) then
  		Duel.SpecialSummon(e:GetHandler(), 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  