--Neo-Tempester Dragon Knight function c249001098.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(2) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_TO_GRAVE) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,249001098) e1:SetCondition(c249001098.spcon) e1:SetTarget(c249001098.sptg) e1:SetOperation(c249001098.spop) c:RegisterEffect(e1) --excavate local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(10321588,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetTarget(c249001098.target) e2:SetOperation(c249001098.operation) c:RegisterEffect(e2) end function c249001098.cfilter(c,tp) return c:IsSetCard(0x228) and c:IsType(TYPE_MONSTER) and not c:IsCode(249001098) and c:IsControler(tp) end function c249001098.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(c249001098.cfilter,1,nil,tp) end function c249001098.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c249001098.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end function c249001098.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end end function c249001098.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end Duel.ConfirmDecktop(tp,1) local g=Duel.GetDecktopGroup(tp,1) local tc=g:GetFirst() if tc:IsSetCard(0x228) and tc:IsAbleToHand() then Duel.DisableShuffleCheck() Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ShuffleHand(tp) else Duel.MoveSequence(tc,1) end end