diff --git a/tenyear_mou.lua b/tenyear_mou.lua index 4e410c1ef74f2f22c87994be891e80246637a479..8cc5e128793af1863f8facab44bca2193d794fba 100644 --- a/tenyear_mou.lua +++ b/tenyear_mou.lua @@ -2610,7 +2610,19 @@ local quzhou = fk.CreateActiveSkill{ table.insert(idsRevealt, ids[1]) if Fk:getCardById(ids[1]).trueName == "slash" then - U.askForUseRealCard(room, player, ids, ".", self.name, nil, { expand_pile = ids, bypass_times = true }, false, false) + local has_valid_target = false + for _, target_player in ipairs(room.alive_players) do + if player:canUseTo(Fk:getCardById(ids[1]), target_player) then + has_valid_target = true + break + end + end + if has_valid_target then + U.askForUseRealCard(room, player, ids, ".", self.name, nil, { expand_pile = ids, bypass_times = true }, false, false) + else + room:notifySkillInvoked(player, self.name) + player:broadcastSkillInvoke(self.name) + end break else local choices = { "quzhou_gain" } diff --git a/tenyear_sp3.lua b/tenyear_sp3.lua index 80cf350542d6e26aab3412be22db34f65c530247..d53d6ef1003e3e769c289cbb68be0fc1e00f88c5 100644 --- a/tenyear_sp3.lua +++ b/tenyear_sp3.lua @@ -4169,6 +4169,20 @@ local yanzuo = fk.CreateActiveSkill{ end) end) if #cards > 0 then + local has_valid_target = false + for _, card_id in ipairs(cards) do + for _, target_player in ipairs(room.alive_players) do + if player:canUseTo(Fk:getCardById(card_id), target_player) then + has_valid_target = true + break + end + end + if not has_valid_target then + room:notifySkillInvoked(player, self.name) + player:broadcastSkillInvoke(self.name) + return + end + end local use = U.askForUseRealCard(room, player, cards, nil, self.name, "#yanzuo-ask", {expand_pile = cards, bypass_times = true}, true, false) if use then