1. 修复askForCard(s)Chosen
2. table.insertIfNeed添加返回值
3. 每轮每回合结束后filter手牌并播报手牌上限
4. 修复ex__choose

---------

Co-authored-by: YoumuKon <38815081+YoumuKon@users.noreply.github.com>
This commit is contained in:
Nyutanislavsky 2024-02-27 17:21:28 +08:00 committed by GitHub
parent 726602873e
commit dfbe59e2b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -335,6 +335,7 @@ end
function table:insertIfNeed(element)
if not table.contains(self, element) then
table.insert(self, element)
return true
end
end

View File

@ -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

View File

@ -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{