diff --git a/CHANGELOG.md b/CHANGELOG.md index 9618d27c..a5260d4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # ChangeLog +## v0.5.0 + +在前面几个版本的bug基本解决后加一个中版本号。 + +好了我们继续来看AI怎么弄,这一块就是纯lua了 + +___ + ## v0.4.21 & v0.4.22 & v0.4.23 - 修复了确认键亮起时取消键不可用的bug diff --git a/CMakeLists.txt b/CMakeLists.txt index e2a7b9ca..3ecd9c80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.22) -project(FreeKill VERSION 0.4.23) +project(FreeKill VERSION 0.5.0) add_definitions(-DFK_VERSION=\"${CMAKE_PROJECT_VERSION}\") find_package(Qt6 REQUIRED COMPONENTS diff --git a/Fk/RoomElement/CardItem.qml b/Fk/RoomElement/CardItem.qml index dfc2a168..3bf01bb8 100644 --- a/Fk/RoomElement/CardItem.qml +++ b/Fk/RoomElement/CardItem.qml @@ -133,7 +133,7 @@ Item { Rectangle { id: virt_rect - visible: root.virt_name !== "" && root.virt_name !== root.name + visible: known && root.virt_name !== "" && root.virt_name !== root.name width: parent.width height: 20 y: 40 @@ -218,6 +218,7 @@ Item { columns: 2 rowSpacing: 1 columnSpacing: 0 + visible: known Repeater { model: mark delegate: cardMarkDelegate diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 73d53069..ac41faf3 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -3,8 +3,8 @@ + android:versionCode="500" + android:versionName="0.5.0"> diff --git a/image/splash.jpg b/image/splash.jpg index 287635cd..ad8a4811 100644 Binary files a/image/splash.jpg and b/image/splash.jpg differ diff --git a/lua/client/client_util.lua b/lua/client/client_util.lua index cab293f8..5c1b97fb 100644 --- a/lua/client/client_util.lua +++ b/lua/client/client_util.lua @@ -781,6 +781,7 @@ function GetCardProhibitReason(cid) response = "method_response_play", discard = "method_discard", } + if not fn_table[method] then return "" end local status_skills = Fk:currentRoom().status_skills[ProhibitSkill] or Util.DummyTable local s @@ -815,6 +816,7 @@ function GetTargetTip(pid) local card = handler.selected_card --[[@as Card?]] local skill = Fk.skills[handler.skill_name] local photo = handler.scene.items["Photo"][pid] --[[@as Photo]] + if not photo then return {} end local selectable = photo.enabled local extra_data = handler.extra_data diff --git a/lua/client/i18n/zh_CN.lua b/lua/client/i18n/zh_CN.lua index 8b4cc862..3c55c223 100644 --- a/lua/client/i18n/zh_CN.lua +++ b/lua/client/i18n/zh_CN.lua @@ -362,9 +362,9 @@ FreeKill使用的是libgit2的C API,与此同时使用Git完成拓展包的下 ["Resume"] = "继续", ["Bulletin Info"] = [==[ - ## v0.4.21 + ## v0.5.0 - UI重构!还有很长一段路要走…… + 更新了不少内容!但是想不起来更新了什么了 ]==], } diff --git a/lua/core/player.lua b/lua/core/player.lua index c789ce5b..4549e08c 100644 --- a/lua/core/player.lua +++ b/lua/core/player.lua @@ -1194,10 +1194,10 @@ function Player:isBuddy(other) return self.id == id or table.contains(self.buddy_list, id) end -local function defaultCardVisible(self, cardId, area, owner, falsy) - local public_areas = {Card.DiscardPile, Card.Processing, Card.Void, Card.PlayerEquip, Card.PlayerJudge} - local player_areas = {Card.PlayerHand, Card.PlayerSpecial} +local public_areas = {Card.DiscardPile, Card.Processing, Card.Void, Card.PlayerEquip, Card.PlayerJudge} +local player_areas = {Card.PlayerHand, Card.PlayerSpecial} +local function defaultCardVisible(self, cardId, area, owner, falsy) if area == Card.DrawPile then return false elseif table.contains(public_areas, area) then return not falsy elseif table.contains(player_areas, area) then diff --git a/lua/server/ai/init.lua b/lua/server/ai/init.lua index c214c30f..feafb446 100644 --- a/lua/server/ai/init.lua +++ b/lua/server/ai/init.lua @@ -15,10 +15,10 @@ if UsingNewCore then require "standard.ai" -- require "maneuvering.ai" else - directories = FileIO.ls("packages") - require "packages.standard.ai" - require "packages.standard_cards.ai" - require "packages.maneuvering.ai" + --directories = FileIO.ls("packages") + --require "packages.standard.ai" + --require "packages.standard_cards.ai" + --require "packages.maneuvering.ai" end table.removeOne(directories, "standard") table.removeOne(directories, "standard_cards") diff --git a/lua/server/events/gameflow.lua b/lua/server/events/gameflow.lua index 11989c4c..1ff490b5 100644 --- a/lua/server/events/gameflow.lua +++ b/lua/server/events/gameflow.lua @@ -328,13 +328,16 @@ function Phase:main() room.logic:trigger(fk.AfterDrawNCards, player, data) end, [Player.Play] = function() - player._play_phase_end = false + player._phase_end = false room:doBroadcastNotify("UpdateSkill", "", {player}) while not player.dead do if player._phase_end then break end - logic:trigger(fk.StartPlayCard, player, nil, true) + local data = { timeout = room.timeout } + logic:trigger(fk.StartPlayCard, player, data, true) - local result = Request:new(player, "PlayCard"):getResult(player) + local req = Request:new(player, "PlayCard") + req.timeout = data.timeout + local result = req:getResult(player) if result == "" then break end local useResult = room:handleUseCardReply(player, result) diff --git a/lua/server/network.lua b/lua/server/network.lua index 3611bec0..1b2b7ead 100644 --- a/lua/server/network.lua +++ b/lua/server/network.lua @@ -18,6 +18,7 @@ ---@field private _asked boolean? @ 是否询问过了 ---@field public focus_players? ServerPlayer[] @ 要moveFocus的玩家们 默认参与者 ---@field public focus_text? string @ 要moveFocus的文字 默认self.command +---@field public no_time_waste_check? boolean local Request = class("Request") -- TODO: 懒得思考了 @@ -310,10 +311,12 @@ function Request:_finish() end if self.result[p.id] == nil then self.result[p.id] = self.default_reply[p.id] or "" - p._timewaste_count = p._timewaste_count + 1 - if p._timewaste_count >= 3 and p.serverplayer:getState() == fk.Player_Online then - p._timewaste_count = 0 - p.serverplayer:emitKick() + if not self.no_time_waste_check then + p._timewaste_count = p._timewaste_count + 1 + if p._timewaste_count >= 3 and p.serverplayer:getState() == fk.Player_Online then + p._timewaste_count = 0 + p.serverplayer:emitKick() + end end else p._timewaste_count = 0 diff --git a/lua/server/room.lua b/lua/server/room.lua index 3000b621..f7de92c9 100644 --- a/lua/server/room.lua +++ b/lua/server/room.lua @@ -665,6 +665,7 @@ function Room:animDelay(sec) local req = Request:new(self.alive_players, "EmptyRequest") req.focus_text = '' req.timeout = sec + req.no_time_waste_check = true req:ask() end