diff --git a/lua/client/client.lua b/lua/client/client.lua index 80bb17ec..71ae114a 100644 --- a/lua/client/client.lua +++ b/lua/client/client.lua @@ -391,6 +391,7 @@ fk.client_callback["AskForCardChosen"] = function(jsonData) if #equip ~= 0 then table.insert(ui_data.card_data, { "$Equip", equip }) end if #judge ~= 0 then table.insert(ui_data.card_data, { "$Judge", judge }) end else + ui_data._id = id ui_data._reason = reason ui_data._prompt = prompt end @@ -429,6 +430,7 @@ fk.client_callback["AskForCardsChosen"] = function(jsonData) if #equip ~= 0 then table.insert(ui_data.card_data, { "$Equip", equip }) end if #judge ~= 0 then table.insert(ui_data.card_data, { "$Judge", judge }) end else + ui_data._id = id ui_data._min = min ui_data._max = max ui_data._reason = reason diff --git a/lua/core/util.lua b/lua/core/util.lua index 77cabc5c..1e2a823c 100644 --- a/lua/core/util.lua +++ b/lua/core/util.lua @@ -335,6 +335,7 @@ end function table:insertIfNeed(element) if not table.contains(self, element) then table.insert(self, element) + return true end end diff --git a/lua/server/events/gameflow.lua b/lua/server/events/gameflow.lua index 2c8ebea5..5f096687 100644 --- a/lua/server/events/gameflow.lua +++ b/lua/server/events/gameflow.lua @@ -385,4 +385,9 @@ GameEvent.cleaners[GameEvent.Phase] = function(self) end end end + + for _, p in ipairs(room.players) do + p:filterHandcards() + room:broadcastProperty(p, "MaxCards") + end end diff --git a/packages/standard/aux_skills.lua b/packages/standard/aux_skills.lua index a3b527ab..dcbca2a4 100644 --- a/packages/standard/aux_skills.lua +++ b/packages/standard/aux_skills.lua @@ -119,10 +119,6 @@ local exChooseSkill = fk.CreateActiveSkill{ return table.contains(self.targets, to_select) end end, - min_target_num = function(self) return self.min_target_num end, - max_target_num = function(self) return self.max_target_num end, - min_card_num = function(self) return self.min_card_num end, - max_card_num = function(self) return self.max_card_num end, } local maxCardsSkill = fk.CreateMaxCardsSkill{