diff --git a/Fk/Pages/Room.qml b/Fk/Pages/Room.qml index a8622381..8db1f875 100644 --- a/Fk/Pages/Room.qml +++ b/Fk/Pages/Room.qml @@ -747,6 +747,26 @@ Item { } } + // manualBox: same as popupBox, but must be closed manually + Loader { + id: manualBox + z: 999 + onSourceChanged: { + if (item === null) + return; + item.finished.connect(() => sourceComponent = undefined); + item.widthChanged.connect(() => manualBox.moveToCenter()); + item.heightChanged.connect(() => manualBox.moveToCenter()); + moveToCenter(); + } + onSourceComponentChanged: sourceChanged(); + + function moveToCenter() { + item.x = Math.round((roomArea.width - item.width) / 2); + item.y = Math.round(roomArea.height * 0.67 - item.height / 2); + } + } + Loader { id: popupBox z: 999 @@ -772,27 +792,6 @@ Item { } } - // manualBox: same as popupBox, but must be closed manually - Loader { - id: manualBox - z: 999 - onSourceChanged: { - if (item === null) - return; - item.finished.connect(() => sourceComponent = undefined); - item.widthChanged.connect(() => manualBox.moveToCenter()); - item.heightChanged.connect(() => manualBox.moveToCenter()); - moveToCenter(); - } - onSourceComponentChanged: sourceChanged(); - - function moveToCenter() - { - item.x = Math.round((roomArea.width - item.width) / 2); - item.y = Math.round(roomArea.height * 0.67 - item.height / 2); - } - } - Loader { id: bigAnim anchors.fill: parent diff --git a/lua/client/client_util.lua b/lua/client/client_util.lua index 6a3966d7..52591d31 100644 --- a/lua/client/client_util.lua +++ b/lua/client/client_util.lua @@ -691,8 +691,63 @@ function CheckSurrenderAvailable(playedTime) end function SaveRecord() +<<<<<<< HEAD local c = ClientInstance c.client:saveRecord(json.encode(c.record), c.record[2]) +======= + local c = ClientInstance + c.client:saveRecord(json.encode(c.record), c.record[2]) +end + +function GetCardProhibitReason(cid, method, pattern) + local card = Fk:getCardById(cid) + if not card then return "" end + if method == "play" and not card.skill:canUse(Self, card) then return "" end + if method ~= "play" and not card:matchPattern(pattern) then return "" end + if method == "play" then method = "use" end + + local status_skills = Fk:currentRoom().status_skills[ProhibitSkill] or Util.DummyTable + local s + for _, skill in ipairs(status_skills) do + local fn = method == "use" and skill.prohibitUse or skill.prohibitResponse + if fn(skill, Self, card) then + s = skill + break + end + end + if not s then return "" end + + -- try to return a translated string + local skillName = s.name + local ret = Fk:translate(skillName) + if ret ~= skillName then + -- TODO: translate + return ret .. "禁" .. (method == "use" and "使用" or "打出") + elseif skillName:endsWith("_prohibit") and skillName:startsWith("#") then + return Fk:translate(skillName:sub(2, -10)) .. "禁" .. (method == "use" and "使用" or "打出") + else + return ret + end +end + +function PoxiPrompt(poxi_type, data) + local poxi = Fk.poxi_methods[poxi_type] + if not poxi or not poxi.prompt then return "" end + if type(poxi.prompt) == "string" then return Fk:translate(poxi.prompt) end + return poxi.prompt(data) +end + +function PoxiFilter(poxi_type, to_select, selected, data) + local poxi = Fk.poxi_methods[poxi_type] + if not poxi then return "false" end + return json.encode(poxi.card_filter(to_select, selected, data)) +end + +function PoxiFeasible(poxi_type, selected, data) + local poxi = Fk.poxi_methods[poxi_type] + if not poxi then return "false" end + return json.encode(poxi.feasible(selected, data)) +>>>>>>> 30b363ef775598c6c6510ceb17e70ca01bd2f677 end dofile "lua/client/i18n/init.lua" diff --git a/mkfksource.sh b/mkfksource.sh index 51c04416..a2144a9f 100755 --- a/mkfksource.sh +++ b/mkfksource.sh @@ -3,7 +3,7 @@ dir=FreeKill-${FK_VER} mkdir $dir echo Copying -cp -r ./Freekill/.git $dir +cp -r ./FreeKill/.git $dir cd $dir git restore . diff --git a/waiting_tips.txt b/waiting_tips.txt index 4dd7104b..c8ed62e9 100644 --- a/waiting_tips.txt +++ b/waiting_tips.txt @@ -8,10 +8,10 @@ 给FreeKill的GitHub仓库点一个star吧! 你可以在武将一览界面禁将,在你创建的房间中禁用武将不会出现在选将框。 如果你遇到了bug,请截图并反馈给开发者 -如果你想要制作FK的mod,需要先学习Lua语言 +如果你想要制作新月杀的mod,需要先学习Lua语言 目光所及短寸吾才之间满腹狭目之阿瞒有我见袁本良计初只能窥取冀州便是底竟不从易成略在胸如反掌之良计速出吾才满目光所及腹袁本初竟短寸之间不从之 吔! -想要参与到FK的开发工作中?那么就从制作自己的Mod开始吧! +想要参与到新月杀的开发工作中?那么就从制作自己的Mod开始吧! 在游戏的一些地方,长按可以显示该元素的详情。如果你用的是电脑版的话可以用鼠标右键代替长按。 注意:官方不支持任何形式的账号交易行为,请妥善保管好您的账号密码。请勿与他人共享账号。因账号交易、共享引起的账号争议官方均不受理。 如果牌不好的话,就请辱骂GK的发牌员吧 @@ -19,8 +19,9 @@ 神曰:“MBKS” 正在匹配势均力敌的对手…… 匹配到界徐盛 先喝酒还是先上刀,这是个值得考虑的问题 -在抱怨FK只有标准包?那么去试着参与联机吧 +在抱怨新月杀只有标准包?那么去试着参与联机吧 如果在牌局内想查看技能,可以长按想要看技能的角色 -FK的开服很简单,只要单机启动就可以当做服务器使用了 -用Linux也能搭建FK服务器,起始页推荐的联机IP就是跑在Linux服务器上的 +新月杀的开服很简单,只要单机启动就可以当做服务器使用了 +用Linux也能搭建新月杀服务器,起始页推荐的联机IP就是跑在Linux服务器上的 我们的游戏正在蒸蒸日上哦~ +请素质游戏!不要做出烧条之类的举动哦~