name: Striker
card_text: 1 Level 4 or lower Dragon monster
  If this card is Link Summoned: You can add 1 "Boot Sector Launch" from your Deck to your hand. You can target 1 face-up monster you control and 1 "Rokket" monster in your GY; destroy that monster on the field, and if you do, add that other monster from the GY to your hand. You can only use each effect of "Striker Dragon" once per turn.
external_ids: local CARD_ID_0 = 36668118 --Boot Sector Launch
  local SETCARD_ID_0 = 0x102 --Rokket
  
lua: local CARD_ID_0 = 36668118 --Boot Sector Launch
  local SETCARD_ID_0 = 0x102 --Rokket
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_0)
  	--link summon
  	aux.AddLinkProcedure(c, s.mfilter, 1)
  	c:EnableReviveLimit()
  	--tohand
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetProperty(EFFECT_FLAG_DELAY)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(s.thcon1)
  	e1:SetTarget(s.thtg1)
  	e1:SetOperation(s.thop1)
  	c:RegisterEffect(e1)
  	--tohand
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_DESTROY + CATEGORY_TOHAND)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, id + 1)
  	e2:SetTarget(s.thtg2)
  	e2:SetOperation(s.thop2)
  	c:RegisterEffect(e2)
  end
  function s.mfilter(c)
  	return c:IsLevelBelow(4) and c:IsLinkRace(RACE_DRAGON)
  end
  function s.thcon1(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
  end
  function s.thfilter1(c)
  	return c:IsCode(CARD_ID_0) and c:IsAbleToHand()
  end
  function s.thtg1(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.thfilter1, tp, LOCATION_DECK, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
  end
  function s.thop1(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g = Duel.SelectMatchingCard(tp, s.thfilter1, 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
  function s.thfilter2(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
  end
  function s.thtg2(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsFaceup, tp, LOCATION_MZONE, 0, 1, nil) and Duel.IsExistingTarget(s.thfilter2, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g1 = Duel.SelectTarget(tp, Card.IsFaceup, tp, LOCATION_MZONE, 0, 1, 1, nil)
  	e:SetLabelObject(g1:GetFirst())
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g2 = Duel.SelectTarget(tp, s.thfilter2, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g1, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, g2, 1, 0, 0)
  end
  function s.thop2(e, tp, eg, ep, ev, re, r, rp)
  	local tc1, tc2 = Duel.GetFirstTarget()
  	if tc1 ~= e:GetLabelObject() then
  		tc1, tc2 = tc2, tc1
  	end
  	if tc1:IsRelateToEffect(e) and Duel.Destroy(tc1, REASON_EFFECT) > 0 and tc2:IsRelateToEffect(e) then
  		Duel.SendtoHand(tc2, nil, REASON_EFFECT)
  	end
  end
  
  
source_text: Striker
  1 Level 4 or lower Dragon monster
  If this card is Link Summoned: You can add 1 "Boot Sector Launch" from your Deck to your hand. You can target 1 face-up monster you control and 1 "Rokket" monster in your GY; destroy that monster on the field, and if you do, add that other monster from the GY to your hand. You can only use each effect of "Striker Dragon" once per turn.
target_text: -- Striker
  local CARD_ID_0 = 36668118 --Boot Sector Launch
  local SETCARD_ID_0 = 0x102 --Rokket
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_0)
  	--link summon
  	aux.AddLinkProcedure(c, s.mfilter, 1)
  	c:EnableReviveLimit()
  	--tohand
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetProperty(EFFECT_FLAG_DELAY)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(s.thcon1)
  	e1:SetTarget(s.thtg1)
  	e1:SetOperation(s.thop1)
  	c:RegisterEffect(e1)
  	--tohand
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_DESTROY + CATEGORY_TOHAND)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, id + 1)
  	e2:SetTarget(s.thtg2)
  	e2:SetOperation(s.thop2)
  	c:RegisterEffect(e2)
  end
  function s.mfilter(c)
  	return c:IsLevelBelow(4) and c:IsLinkRace(RACE_DRAGON)
  end
  function s.thcon1(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
  end
  function s.thfilter1(c)
  	return c:IsCode(CARD_ID_0) and c:IsAbleToHand()
  end
  function s.thtg1(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.thfilter1, tp, LOCATION_DECK, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, nil, 1, tp, LOCATION_DECK)
  end
  function s.thop1(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g = Duel.SelectMatchingCard(tp, s.thfilter1, 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
  function s.thfilter2(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
  end
  function s.thtg2(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return false
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(Card.IsFaceup, tp, LOCATION_MZONE, 0, 1, nil) and Duel.IsExistingTarget(s.thfilter2, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g1 = Duel.SelectTarget(tp, Card.IsFaceup, tp, LOCATION_MZONE, 0, 1, 1, nil)
  	e:SetLabelObject(g1:GetFirst())
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  	local g2 = Duel.SelectTarget(tp, s.thfilter2, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g1, 1, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, g2, 1, 0, 0)
  end
  function s.thop2(e, tp, eg, ep, ev, re, r, rp)
  	local tc1, tc2 = Duel.GetFirstTarget()
  	if tc1 ~= e:GetLabelObject() then
  		tc1, tc2 = tc2, tc1
  	end
  	if tc1:IsRelateToEffect(e) and Duel.Destroy(tc1, REASON_EFFECT) > 0 and tc2:IsRelateToEffect(e) then
  		Duel.SendtoHand(tc2, nil, REASON_EFFECT)
  	end
  end
  
  