diff --git a/lua/client/client_util.lua b/lua/client/client_util.lua index a0c8dce3b4deb7f4bbc17b2d7f594f804e408bb4..5447933a9bfc65f723f7f28b80b8c08265bbf11a 100644 --- a/lua/client/client_util.lua +++ b/lua/client/client_util.lua @@ -621,6 +621,7 @@ end function GetInteractionOfSkill(skill_name) local skill = Fk.skills[skill_name] if skill and skill.interaction then + skill.interaction.data = nil return skill:interaction() end return nil diff --git a/lua/server/room.lua b/lua/server/room.lua index 30cc9460988922604b5dc68b26dfcad12b09e866..41fc1708dcc56f8316bcf1eb6b7e6a28523b06c8 100644 --- a/lua/server/room.lua +++ b/lua/server/room.lua @@ -1858,7 +1858,13 @@ function Room:askForChoice(player, choices, skill_name, prompt, detailed, all_ch local result = self:doRequest(player, command, json.encode{ choices, all_choices, skill_name, prompt, detailed }) - if result == "" then result = choices[1] end + if result == "" then + if table.contains(choices, "Cancel") then + result = "Cancel" + else + result = choices[1] + end + end return result end @@ -2050,7 +2056,7 @@ function Room:askForGuanxing(player, cards, top_limit, bottom_limit, customNotif for i = #top, 1, -1 do table.insert(self.draw_pile, 1, top[i]) end - for i = 1, #bottom, -1 do + for i = 1, #bottom, 1 do table.insert(self.draw_pile, bottom[i]) end