diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e5ee4cc..593fe9aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ # ChangeLog -## v0.3.14 +## v0.4.0 && v0.3.14 修复bug,详见git log +- 新增canPindian,禁止技新增prohibitPindian + ___ ## v0.3.13 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a313000..eb191021 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16) -project(FreeKill VERSION 0.3.14) +project(FreeKill VERSION 0.4.0) add_definitions(-DFK_VERSION=\"${CMAKE_PROJECT_VERSION}\") find_package(Qt6 REQUIRED COMPONENTS diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index c9f7dc8c..72cbc5c0 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -3,8 +3,8 @@ + android:versionCode="400" + android:versionName="0.4.0"> diff --git a/lua/client/i18n/zh_CN.lua b/lua/client/i18n/zh_CN.lua index 2e9f32ac..567470a8 100644 --- a/lua/client/i18n/zh_CN.lua +++ b/lua/client/i18n/zh_CN.lua @@ -112,7 +112,7 @@ Fk:loadTranslationTable{ 开发者: RalphR Nyutanislavsky xxyheaven 妖梦厨 -贡献者: 假象 deepskybird 板蓝根 +贡献者: 假象 deepskybird 板蓝根 s1134s 喑黒毀灭емо公主 鸣谢: Mogara @@ -122,7 +122,7 @@ Fk:loadTranslationTable{ Qt是一个C++图形界面应用程序开发框架,拥有强大的跨平台能力以及易于使用的API。 -本程序使用Qt 6.4,主要利用QtQuick开发UI,同时也使用Qt的网络库开发服务端程序。 +本程序使用Qt 6.5,主要利用QtQuick开发UI,同时也使用Qt的网络库开发服务端程序。 官网: https://www.qt.io ]], @@ -301,9 +301,13 @@ FreeKill使用的是libgit2的C API,与此同时使用Git完成拓展包的下 ["Resume"] = "继续", ["Bulletin Info"] = [==[ - ## v0.3.14 + ## v0.4.0 - 此为测试版本,不在主服上线。 + 整个游戏的UI都或多或少的更新了。增加播放卡牌配音的功能。 + + BGM复活。游戏内可以调节音量了。 + + 被房主踢掉的人半分钟内不可以进入同一房间,防止卡房。 ]==], } diff --git a/lua/core/player.lua b/lua/core/player.lua index d4b2d369..9ee0e6af 100644 --- a/lua/core/player.lua +++ b/lua/core/player.lua @@ -938,6 +938,25 @@ function Player:prohibitReveal(isDeputy) return false end +---@param to Player +---@param ignoreFromKong? boolean +---@param ignoreToKong? boolean +function Player:canPindian(to, ignoreFromKong, ignoreToKong) + if self:isKongcheng() and not ignoreFromKong then + return false + end + if to:isKongcheng() and not ignoreToKong then + return false + end + local status_skills = Fk:currentRoom().status_skills[ProhibitSkill] or Util.DummyTable + for _, skill in ipairs(status_skills) do + if skill:prohibitPindian(self, to) then + return false + end + end + return true +end + --转换技状态阳 fk.SwitchYang = 0 --转换技状态阴 diff --git a/lua/core/skill_type/prohibit.lua b/lua/core/skill_type/prohibit.lua index 4a8c5e4f..a1324de3 100644 --- a/lua/core/skill_type/prohibit.lua +++ b/lua/core/skill_type/prohibit.lua @@ -32,4 +32,11 @@ function ProhibitSkill:prohibitDiscard(player, card) return false end +---@param from Player +---@param to Player +---@return boolean +function ProhibitSkill:prohibitPindian(from, to) + return false +end + return ProhibitSkill diff --git a/lua/fk_ex.lua b/lua/fk_ex.lua index 2a8dec69..aa9f94bc 100644 --- a/lua/fk_ex.lua +++ b/lua/fk_ex.lua @@ -300,6 +300,7 @@ end ---@field public prohibit_use? fun(self: ProhibitSkill, player: Player, card: Card): boolean? ---@field public prohibit_response? fun(self: ProhibitSkill, player: Player, card: Card): boolean? ---@field public prohibit_discard? fun(self: ProhibitSkill, player: Player, card: Card): boolean? +---@field public prohibit_pindian? fun(self: ProhibitSkill, from: Player, to: Player): boolean? ---@param spec ProhibitSpec ---@return ProhibitSkill @@ -312,6 +313,7 @@ function fk.CreateProhibitSkill(spec) skill.prohibitUse = spec.prohibit_use or skill.prohibitUse skill.prohibitResponse = spec.prohibit_response or skill.prohibitResponse skill.prohibitDiscard = spec.prohibit_discard or skill.prohibitDiscard + skill.prohibitPindian = spec.prohibit_pindian or skill.prohibitPindian return skill end