name: Fluffal
card_text: Pendulum Scale = 8
  [ Pendulum Effect ]
  You can target 1 "Fluffal" or "Edge Imp" monster in your GY; Special Summon it, also, you cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Fusion Monsters (even if this card leaves the field). You can only use this effect of "Fluffal Angel" once per turn.
  ----------------------------------------
  [ Monster Effect ]
  You can Tribute this card, then target 1 "Frightfur" Fusion Monster in your GY; discard 1 card, and if you do, Special Summon the targeted monster. You can only use this effect of "Fluffal Angel" once per turn.
external_ids: local SETCARD_ID_0 = 0xad --Frightfur
  local SETCARD_ID_1 = 0xa9 --Fluffal
  
lua: local SETCARD_ID_0 = 0xad --Frightfur
  local SETCARD_ID_1 = 0xa9 --Fluffal
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--pendulum summon
  	aux.EnablePendulumAttribute(c)
  	--sp summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_PZONE)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  	--sp summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetCountLimit(1, id + 1)
  	e2:SetCost(s.spcost)
  	e2:SetTarget(s.sptg2)
  	e2:SetOperation(s.spop2)
  	c:RegisterEffect(e2)
  end
  function s.filter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_1, 0xc3) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc, e, tp)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, LOCATION_GRAVE, 0, 1, nil, e, tp) and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP)
  	end
  	local e1 = Effect.CreateEffect(c)
  	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
  function s.splimit(e, c)
  	return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
  end
  function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsReleasable()
  	end
  	Duel.Release(e:GetHandler(), REASON_COST)
  end
  function s.filter2(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_1) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.sptg2(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter2(chkc, e, tp)
  	end
  	if chk == 0 then
  		return Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0) > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > -1 and Duel.IsExistingTarget(s.filter2, tp, LOCATION_GRAVE, 0, 1, nil, e, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectTarget(tp, s.filter2, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	Duel.SetOperationInfo(0, CATEGORY_HANDES, nil, 0, tp, 1)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, 1, 0, 0)
  end
  function s.spop2(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
  		return
  	end
  	if Duel.DiscardHand(tp, nil, 1, 1, REASON_EFFECT + REASON_DISCARD) == 0 then
  		return
  	end
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  
source_text: Fluffal
  Pendulum Scale = 8
  [ Pendulum Effect ]
  You can target 1 "Fluffal" or "Edge Imp" monster in your GY; Special Summon it, also, you cannot Special Summon monsters from the Extra Deck for the rest of this turn, except Fusion Monsters (even if this card leaves the field). You can only use this effect of "Fluffal Angel" once per turn.
  ----------------------------------------
  [ Monster Effect ]
  You can Tribute this card, then target 1 "Frightfur" Fusion Monster in your GY; discard 1 card, and if you do, Special Summon the targeted monster. You can only use this effect of "Fluffal Angel" once per turn.
target_text: -- Fluffal
  local SETCARD_ID_0 = 0xad --Frightfur
  local SETCARD_ID_1 = 0xa9 --Fluffal
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--pendulum summon
  	aux.EnablePendulumAttribute(c)
  	--sp summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_PZONE)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  	--sp summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetCountLimit(1, id + 1)
  	e2:SetCost(s.spcost)
  	e2:SetTarget(s.sptg2)
  	e2:SetOperation(s.spop2)
  	c:RegisterEffect(e2)
  end
  function s.filter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_1, 0xc3) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc, e, tp)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, LOCATION_GRAVE, 0, 1, nil, e, tp) and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectTarget(tp, s.filter, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP)
  	end
  	local e1 = Effect.CreateEffect(c)
  	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
  function s.splimit(e, c)
  	return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
  end
  function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsReleasable()
  	end
  	Duel.Release(e:GetHandler(), REASON_COST)
  end
  function s.filter2(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_1) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.sptg2(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter2(chkc, e, tp)
  	end
  	if chk == 0 then
  		return Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0) > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > -1 and Duel.IsExistingTarget(s.filter2, tp, LOCATION_GRAVE, 0, 1, nil, e, tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectTarget(tp, s.filter2, tp, LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	Duel.SetOperationInfo(0, CATEGORY_HANDES, nil, 0, tp, 1)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, g, 1, 0, 0)
  end
  function s.spop2(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
  		return
  	end
  	if Duel.DiscardHand(tp, nil, 1, 1, REASON_EFFECT + REASON_DISCARD) == 0 then
  		return
  	end
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP)
  	end
  end
  
  