--Blanc --coded by Concordia function c68709326.initial_effect(c) --search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(68709326,1)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,68709326) e1:SetCondition(c68709326.shcon) e1:SetTarget(c68709326.shtg) e1:SetOperation(c68709326.shop) c:RegisterEffect(e1) --float local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(68709326,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_DESTROYED) e2:SetCountLimit(1,68719326) e2:SetCondition(c68709326.condition) e2:SetTarget(c68709326.target) e2:SetOperation(c68709326.operation) c:RegisterEffect(e2) end function c68709326.shcon(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsSetCard(0xf08) or re:GetHandler():IsSetCard(0xf09) end function c68709326.filter(c) return c:IsSetCard(0xf08) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() end function c68709326.shtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c68709326.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c68709326.shop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c68709326.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 function c68709326.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp end function c68709326.cfilter(c,e,tp) return c:IsSetCard(0xf08) and not c:IsCode(68709326) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c68709326.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c68709326.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function c68709326.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c68709326.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end