name: Drill
card_text: When this card inflicts Battle Damage to your opponent's Life Points, you can select 1 "Parasite Paracide" card from your Deck, shuffle the Deck, and place "Parasite Paracide" on top of the Deck.
external_ids: local CARD_ID_0 = 27911549 --Parasite Paracide
  
lua: local CARD_ID_0 = 27911549 --Parasite Paracide
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--search
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_BATTLE_DAMAGE)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return ep == 1 - tp
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(Card.IsCode, tp, LOCATION_DECK, 0, 1, nil, CARD_ID_0) and Duel.GetFieldGroupCount(tp, LOCATION_DECK, 0) > 1
  	end
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(id, 1))
  	local g = Duel.SelectMatchingCard(tp, Card.IsCode, tp, LOCATION_DECK, 0, 1, 1, nil, CARD_ID_0)
  	local tc = g:GetFirst()
  	if tc then
  		Duel.ShuffleDeck(tp)
  		Duel.MoveSequence(tc, SEQ_DECKTOP)
  		Duel.ConfirmDecktop(tp, 1)
  	end
  end
  
  
source_text: Drill
  When this card inflicts Battle Damage to your opponent's Life Points, you can select 1 "Parasite Paracide" card from your Deck, shuffle the Deck, and place "Parasite Paracide" on top of the Deck.
target_text: -- Drill
  local CARD_ID_0 = 27911549 --Parasite Paracide
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--search
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_BATTLE_DAMAGE)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return ep == 1 - tp
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(Card.IsCode, tp, LOCATION_DECK, 0, 1, nil, CARD_ID_0) and Duel.GetFieldGroupCount(tp, LOCATION_DECK, 0) > 1
  	end
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(id, 1))
  	local g = Duel.SelectMatchingCard(tp, Card.IsCode, tp, LOCATION_DECK, 0, 1, 1, nil, CARD_ID_0)
  	local tc = g:GetFirst()
  	if tc then
  		Duel.ShuffleDeck(tp)
  		Duel.MoveSequence(tc, SEQ_DECKTOP)
  		Duel.ConfirmDecktop(tp, 1)
  	end
  end
  
  