local m=77709003 local cm=_G["c"..m] xpcall(function() require("expansions/script/lap") end,function() require("expansions/sekka1217/script/lap") end) Duel.LoadScript("c37564765.lua") cm.Sekka_name_with_lap=true function cm.initial_effect(c) c:EnableReviveLimit() local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(m,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_TO_GRAVE) e1:SetCountLimit(1,m) e1:SetCondition(cm.condition) e1:SetTarget(cm.target) e1:SetOperation(cm.operation) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(69840739,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetProperty(0x14000) e2:SetCountLimit(1,m+100) e2:SetCondition(Senya.SummonTypeCondition(SUMMON_TYPE_RITUAL)) e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_HAND) end) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if g:GetCount()==0 then return end Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.ShuffleDeck(1-tp) Duel.BreakEffect() Duel.Draw(1-tp,g:GetCount()-1,REASON_EFFECT) end) c:RegisterEffect(e2) end function cm.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) end function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) end function cm.filter1(c) return Sekka.IsLap(c) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) end function cm.filter2(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function cm.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,cm.filter1,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