name: Abyssal
card_text: Pay 1000 Life Points. Declare a Type and an Attribute. Your opponent must send 1 monster with both the declared Type and Attribute from their hand or Deck to the Graveyard.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckLPCost(tp, 1000)
  	end
  	Duel.PayLPCost(tp, 1000)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATTRIBUTE)
  	local att = Duel.AnnounceAttribute(tp, 1, ATTRIBUTE_ALL)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RACE)
  	local rc = Duel.AnnounceRace(tp, 1, RACE_ALL)
  	e:SetLabel(att)
  	Duel.SetTargetPlayer(1 - tp)
  	Duel.SetTargetParam(rc)
  	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, nil, 1, 1 - tp, LOCATION_HAND + LOCATION_DECK)
  end
  function s.filter(c, rc, att)
  	return c:IsRace(rc) and c:IsAttribute(att) and c:IsAbleToGrave()
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local att = e:GetLabel()
  	local p, rc = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g = Duel.SelectMatchingCard(p, s.filter, p, LOCATION_HAND + LOCATION_DECK, 0, 1, 1, nil, rc, att)
  	if g:GetCount() > 0 then
  		Duel.SendtoGrave(g, REASON_EFFECT)
  	end
  end
  
  
source_text: Abyssal
  Pay 1000 Life Points. Declare a Type and an Attribute. Your opponent must send 1 monster with both the declared Type and Attribute from their hand or Deck to the Graveyard.
target_text: -- Abyssal
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckLPCost(tp, 1000)
  	end
  	Duel.PayLPCost(tp, 1000)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATTRIBUTE)
  	local att = Duel.AnnounceAttribute(tp, 1, ATTRIBUTE_ALL)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RACE)
  	local rc = Duel.AnnounceRace(tp, 1, RACE_ALL)
  	e:SetLabel(att)
  	Duel.SetTargetPlayer(1 - tp)
  	Duel.SetTargetParam(rc)
  	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, nil, 1, 1 - tp, LOCATION_HAND + LOCATION_DECK)
  end
  function s.filter(c, rc, att)
  	return c:IsRace(rc) and c:IsAttribute(att) and c:IsAbleToGrave()
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local att = e:GetLabel()
  	local p, rc = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g = Duel.SelectMatchingCard(p, s.filter, p, LOCATION_HAND + LOCATION_DECK, 0, 1, 1, nil, rc, att)
  	if g:GetCount() > 0 then
  		Duel.SendtoGrave(g, REASON_EFFECT)
  	end
  end
  
  