name: Oracle
card_text: If only your opponent controls a monster, you can Special Summon this card (from your hand). When this card on the field is destroyed and sent to the GY: You can add 1 "Fire Ant Ascator" or "Supay" from your Deck to your hand.
external_ids: local CARD_ID_0 = 78552773 --Supay
  local CARD_ID_1 = 78275321 --Fire Ant Ascator
  
lua: local CARD_ID_0 = 78552773 --Supay
  local CARD_ID_1 = 78275321 --Fire Ant Ascator
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SPSUMMON_PROC)
  	e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetCondition(s.spcon)
  	c:RegisterEffect(e1)
  	--search
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
  	e2:SetCode(EVENT_TO_GRAVE)
  	e2:SetCondition(s.shcon)
  	e2:SetTarget(s.shtg)
  	e2:SetOperation(s.shop)
  	c:RegisterEffect(e2)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	return Duel.GetFieldGroupCount(c:GetControler(), LOCATION_MZONE, 0) == 0
  		and Duel.GetFieldGroupCount(c:GetControler(), 0, LOCATION_MZONE) > 0
  		and Duel.GetLocationCount(c:GetControler(), LOCATION_MZONE) > 0
  end
  function s.shcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
  end
  function s.filter(c)
  	return c:IsCode(CARD_ID_1, CARD_ID_0) and c:IsAbleToHand()
  end
  function s.shtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_DECK, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
  end
  function s.shop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g = Duel.SelectMatchingCard(tp, s.filter, tp, LOCATION_DECK, 0, 1, 1, nil)
  	if g:GetCount() > 0 then
  		Duel.SendtoHand(g, nil, REASON_EFFECT)
  		Duel.ConfirmCards(1 - tp, g)
  	end
  end
  
  
source_text: Oracle
  If only your opponent controls a monster, you can Special Summon this card (from your hand). When this card on the field is destroyed and sent to the GY: You can add 1 "Fire Ant Ascator" or "Supay" from your Deck to your hand.
target_text: -- Oracle
  local CARD_ID_0 = 78552773 --Supay
  local CARD_ID_1 = 78275321 --Fire Ant Ascator
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SPSUMMON_PROC)
  	e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetCondition(s.spcon)
  	c:RegisterEffect(e1)
  	--search
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 0))
  	e2:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
  	e2:SetCode(EVENT_TO_GRAVE)
  	e2:SetCondition(s.shcon)
  	e2:SetTarget(s.shtg)
  	e2:SetOperation(s.shop)
  	c:RegisterEffect(e2)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	return Duel.GetFieldGroupCount(c:GetControler(), LOCATION_MZONE, 0) == 0
  		and Duel.GetFieldGroupCount(c:GetControler(), 0, LOCATION_MZONE) > 0
  		and Duel.GetLocationCount(c:GetControler(), LOCATION_MZONE) > 0
  end
  function s.shcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
  end
  function s.filter(c)
  	return c:IsCode(CARD_ID_1, CARD_ID_0) and c:IsAbleToHand()
  end
  function s.shtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_DECK, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
  end
  function s.shop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g = Duel.SelectMatchingCard(tp, s.filter, tp, LOCATION_DECK, 0, 1, 1, nil)
  	if g:GetCount() > 0 then
  		Duel.SendtoHand(g, nil, REASON_EFFECT)
  		Duel.ConfirmCards(1 - tp, g)
  	end
  end
  
  