name: Rahu
card_text: Fusion Summon 1 "Dracotail" monster from your Extra Deck, using monsters from your hand, Deck, or field, also for the rest of this turn after this card resolves, you cannot Special Summon from the Extra Deck, except Fusion Monsters. You can only activate 1 "Rahu Dracotail" per turn.
external_ids: local SETCARD_ID_0 = 0x1c9 --Dracotail
  
lua: local SETCARD_ID_0 = 0x1c9 --Dracotail
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--activate
  	local e1 = FusionSpell.CreateSummonEffect(c, {
  		fusfilter = s.fusfilter,
  		pre_select_mat_location = LOCATION_HAND | LOCATION_MZONE | LOCATION_DECK,
  		stage_x_operation = s.stage_x_operation,
  	})
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_FUSION_SUMMON + CATEGORY_DECKDES)
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	c:RegisterEffect(e1)
  end
  
  function s.fusfilter(c)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  
  function s.stage_x_operation(e, tc, tp, stage)
  	if stage == FusionSpell.STAGE_AT_ALL_OPERATION_FINISH then
  		if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then
  			return
  		end
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_FIELD)
  		e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  		e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  		e1:SetTargetRange(1, 0)
  		e1:SetTarget(s.splimit)
  		e1:SetReset(RESET_PHASE + PHASE_END)
  		Duel.RegisterEffect(e1, tp)
  	end
  end
  
  function s.splimit(e, c)
  	return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
  end
  
  
source_text: Rahu
  Fusion Summon 1 "Dracotail" monster from your Extra Deck, using monsters from your hand, Deck, or field, also for the rest of this turn after this card resolves, you cannot Special Summon from the Extra Deck, except Fusion Monsters. You can only activate 1 "Rahu Dracotail" per turn.
target_text: -- Rahu
  local SETCARD_ID_0 = 0x1c9 --Dracotail
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--activate
  	local e1 = FusionSpell.CreateSummonEffect(c, {
  		fusfilter = s.fusfilter,
  		pre_select_mat_location = LOCATION_HAND | LOCATION_MZONE | LOCATION_DECK,
  		stage_x_operation = s.stage_x_operation,
  	})
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_FUSION_SUMMON + CATEGORY_DECKDES)
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	c:RegisterEffect(e1)
  end
  
  function s.fusfilter(c)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  
  function s.stage_x_operation(e, tc, tp, stage)
  	if stage == FusionSpell.STAGE_AT_ALL_OPERATION_FINISH then
  		if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then
  			return
  		end
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_FIELD)
  		e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  		e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  		e1:SetTargetRange(1, 0)
  		e1:SetTarget(s.splimit)
  		e1:SetReset(RESET_PHASE + PHASE_END)
  		Duel.RegisterEffect(e1, tp)
  	end
  end
  
  function s.splimit(e, c)
  	return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
  end
  
  