测试服的第一个bug fix

- 修复了Fk.currentResponsePattern的无懈可击寿命过长的的bug
This commit is contained in:
YoumuKon 2023-06-17 10:45:53 +08:00 committed by GitHub
parent e0abde669a
commit a7fa1d9ec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -88,8 +88,8 @@ Flickable {
id: warning
anchors.rightMargin: 8
visible: {
const avail = JSON.parse(Backend.callLuaFunction("GetAvailableGeneralsNum", []));
config.disabledPack; // visible
const avail = JSON.parse(Backend.callLuaFunction("GetAvailableGeneralsNum", []));
const ret = avail < config.preferredGeneralNum * config.preferedPlayerNum;
return ret;
}

View File

@ -1586,11 +1586,11 @@ function Room:askForUseCard(player, card_name, pattern, prompt, cancelable, extr
Fk.currentResponsePattern = pattern
local result = self:doRequest(player, command, json.encode(data))
Fk.currentResponsePattern = nil
if result ~= "" then
return self:handleUseCardReply(player, result)
end
Fk.currentResponsePattern = nil
end
return nil
end
@ -1631,6 +1631,7 @@ function Room:askForResponse(player, card_name, pattern, prompt, cancelable, ext
Fk.currentResponsePattern = pattern
local result = self:doRequest(player, command, json.encode(data))
Fk.currentResponsePattern = nil
if result ~= "" then
local use = self:handleUseCardReply(player, result)
@ -1638,7 +1639,6 @@ function Room:askForResponse(player, card_name, pattern, prompt, cancelable, ext
return use.card
end
end
Fk.currentResponsePattern = nil
end
return nil
end
@ -2291,6 +2291,7 @@ function Room:handleCardEffect(event, cardEffectEvent)
self:useCard(use)
end
end
Fk.currentResponsePattern = nil
elseif event == fk.CardEffecting then
if cardEffectEvent.card.skill then
execGameEvent(GameEvent.SkillEffect, function ()