mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-15 19:22:25 +08:00
Bug fix (#326)
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:
parent
726602873e
commit
dfbe59e2b6
|
@ -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
|
||||
|
|
|
@ -335,6 +335,7 @@ end
|
|||
function table:insertIfNeed(element)
|
||||
if not table.contains(self, element) then
|
||||
table.insert(self, element)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue
Block a user