--created by manu, coded by Lyris local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetRange(LOCATION_HAND) e1:SetValue(0) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCost(s.cost) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id+100) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetTarget(s.tg) e3:SetOperation(s.op) c:RegisterEffect(e3) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsPublic() end end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)~=0 end end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmDecktop(1-tp,1) local g=Duel.GetDecktopGroup(1-tp,1) local tc=g:GetFirst() if not tc then return end if tc:IsSetCard(0x70b) and tc:GetOwner()==tp then local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then c:CompleteProcedure() end elseif tc:IsAbleToHand() then Duel.DisableShuffleCheck() Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ShuffleHand(1-tp) end end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK) end function s.filter(c) return c:IsSetCard(0x70b) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end function s.op(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end Duel.ConfirmDecktop(tp,3) local g=Duel.GetDecktopGroup(tp,3):Filter(s.filter,nil) if #g>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil) Duel.DisableShuffleCheck() Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) Duel.ShuffleHand(tp) Duel.SortDecktop(tp,tp,2) return end Duel.ShuffleDeck(tp) end