local m=77709005 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 function con(e) local tp=e:GetHandlerPlayer() return Duel.GetCurrentPhase()~=PHASE_DRAW and Duel.GetTurnPlayer()~=tp end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_TO_HAND) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetCondition(con) -- e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK)) e1:SetValue(1) c:RegisterEffect(e1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_DRAW) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetCondition(con) -- e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK)) e1:SetValue(1) c:RegisterEffect(e1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,m) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetTarget(cm.target) e1:SetOperation(cm.activate) c:RegisterEffect(e1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_DISCARD) e1:SetProperty(0x14000+EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_TOHAND) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToHand() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end) c:RegisterEffect(e1) end function cm.filter(c) return Sekka.IsLap(c) and c:IsAbleToHand() end function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,3,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function cm.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,3,3,nil) if g:GetCount()>2 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) end end