--猫梦镜 local m=33711406 local cm=_G["c"..m] function cm.initial_effect(c) --negate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TOHAND+CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,m) e1:SetCondition(cm.discon) e1:SetCost(cm.discost) e1:SetTarget(cm.distg) e1:SetOperation(cm.disop) c:RegisterEffect(e1) end function cm.discon(e,tp,eg,ep,ev,re,r,rp) return rp==tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return not c:IsPublic() end end function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not re:GetHandler():IsStatus(STATUS_DISABLED) end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK) end function cm.tgfilter(c) return c:IsDefense(1800) and c:IsAbleToGrave() end function cm.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK) Duel.ConfirmCards(tp,g) local sg=g:Filter(cm.tgfilter,nil) if sg:GetCount()>0 then sg=sg:Select(tp,1,1,nil) if Duel.SendtoGrave(sg,REASON_EFFECT)==0 then return end local sg=Duel.GetOperatedGroup() local tc=sg:GetFirst() if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then if tc:IsLocation(LOCATION_GRAVE) and c:IsAbleToGrave() and tc:IsControler(1-tp) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then Duel.SendtoHand(tc,tp,REASON_EFFECT) end end end end end