From bc0962ff894e5bf6f8a94df717a0a75632ef458f Mon Sep 17 00:00:00 2001 From: cyxkw <1503720452@qq.com> Date: Wed, 6 Nov 2024 05:13:14 +0000 Subject: [PATCH 01/11] update formation.lua. Signed-off-by: cyxkw <1503720452@qq.com> --- formation.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/formation.lua b/formation.lua index 4ddca75..8984de0 100644 --- a/formation.lua +++ b/formation.lua @@ -200,15 +200,12 @@ local huyuan = fk.CreateTriggerSkill{ can_trigger = function (self, event, target, player, data) return player:hasSkill(self) and player.phase == Player.Finish and not player:isNude() end, - on_cost = function (self, event, target, player, data) + on_use = function (self, event, target, player, data) + local room = player.room local success, dat = player.room:askForUseActiveSkill(player, "huyuan_active", "#ld__huyuan-choose", true) if success then self.cost_data = dat - return true end - end, - on_use = function (self, event, target, player, data) - local room = player.room local dat = self.cost_data local choice = dat.interaction if choice == "ld__huyuan_give" then @@ -218,9 +215,11 @@ local huyuan = fk.CreateTriggerSkill{ if not player.dead then local targets = table.map(table.filter(room.alive_players, function(p) return #p:getCardIds("ej") > 0 end), Util.IdMapper) - local to2 = room:askForChoosePlayers(player, targets, 1, 1, "#ld__huyuan_discard-choose", self.name, false, true) + local to2 = room:askForChoosePlayers(player, targets, 1, 1, "#ld__huyuan_discard-choose", self.name, true, true) + if #to2 > 0 then local cid = room:askForCardChosen(player, room:getPlayerById(to2[1]), "ej", self.name) room:throwCard({cid}, self.name, room:getPlayerById(to2[1]), player) + end end end end, @@ -240,7 +239,7 @@ Fk:loadTranslationTable{ ["heyi"] = "鹤翼", [":heyi"] = "阵法技,与你处于同一队列的角色拥有〖飞影〗。", ["ld__huyuan"] = "护援", - [":ld__huyuan"] = "结束阶段,你可选择:1.将一张手牌交给一名角色;2.将一张装备牌置入一名角色的装备区,然后弃置场上的一张牌。", + [":ld__huyuan"] = "结束阶段,你可选择:1.将一张手牌交给一名角色;2.将一张装备牌置入一名角色的装备区,然后你可以弃置场上的一张牌。", ["huyuan_active"] = "护援", ["ld__huyuan_give"] = "给出手牌", @@ -506,7 +505,7 @@ local niaoxiangTrigger = fk.CreateTriggerSkill{ events = {fk.TargetSpecified}, can_trigger = function(self, event, target, player, data) return player:hasSkill(self) and data.card.trueName == "slash" and H.inSiegeRelation(target, player, player.room:getPlayerById(data.to)) - and #player.room.alive_players > 3 + and #player.room.alive_players > 3 and H.hasShownSkill(player,niaoxiang) end, on_cost = Util.TrueFunc, on_use = function(self, event, target, player, data) -- Gitee From e2cdc258525ced76800f410d004414722e300da7 Mon Sep 17 00:00:00 2001 From: cyxkw <1503720452@qq.com> Date: Wed, 6 Nov 2024 05:40:59 +0000 Subject: [PATCH 02/11] update hegemony_standard.lua. Signed-off-by: cyxkw <1503720452@qq.com> --- hegemony_standard.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hegemony_standard.lua b/hegemony_standard.lua index f6af7b9..2e546f2 100644 --- a/hegemony_standard.lua +++ b/hegemony_standard.lua @@ -2834,7 +2834,7 @@ local kuangfu = fk.CreateTriggerSkill{ name = "hs__kuangfu", events = {fk.TargetSpecified}, can_trigger = function (self, event, target, player, data) - if player:hasSkill(self) and data.card and data.card.trueName == "slash" and player.phase == Player.Play and player:usedSkillTimes(self.name, Player.HistoryPhase) == 0 then + if player:hasSkill(self) and data.card and data.card.trueName == "slash" and player.phase == Player.Play and player:usedSkillTimes(self.name, Player.HistoryPhase) == 0 and target == player then for _, p in ipairs(AimGroup:getAllTargets(data.tos)) do if #player.room:getPlayerById(p):getCardIds(Player.Equip) > 0 then return true @@ -2895,7 +2895,7 @@ local huoshui = fk.CreateTriggerSkill{ -- FIXME name = "huoshui", anim_type = "control", frequency = Skill.Compulsory, - events = {fk.TurnStart, fk.GeneralRevealed, fk.EventAcquireSkill, fk.EventLoseSkill, fk.Deathed, fk.TargetSpecified}, + events = {fk.TurnStart, fk.GeneralRevealed, fk.EventAcquireSkill, fk.EventLoseSkill, fk.Deathed, fk.CardUsing}, can_trigger = function(self, event, target, player, data) if target ~= player or player.room.current ~= player then return false end if event == fk.TurnStart then @@ -2909,8 +2909,8 @@ local huoshui = fk.CreateTriggerSkill{ -- FIXME if table.contains(Fk.generals[v]:getSkillNameList(), self.name) then return true end end end - elseif event == fk.TargetSpecified then - return player:hasSkill(self) and data.firstTarget and (data.card.trueName == "slash" or data.card.trueName == "archery_attack") + elseif event == fk.CardUsing then + return player:hasSkill(self) and (data.card.trueName == "slash" or data.card.trueName == "archery_attack") else return player:hasSkill(self, true, true) end @@ -2927,7 +2927,7 @@ local huoshui = fk.CreateTriggerSkill{ -- FIXME table.insert(targets, p.id) end room:doIndicate(player.id, targets) - elseif event == fk.TargetSpecified then + elseif event == fk.CardUsing then local targets = table.filter(room.alive_players, function(p) return (not H.compareKingdomWith(p, player)) and H.getGeneralsRevealedNum(p) == 1 end) if #targets > 0 then data.disresponsiveList = data.disresponsiveList or {} @@ -2985,7 +2985,7 @@ zoushi:addSkill(qingcheng) Fk:loadTranslationTable{ ["hs__zoushi"] = "邹氏", ["huoshui"] = "祸水", - [":huoshui"] = "锁定技,你的回合内:1.其他角色不能明置其武将牌;2.当你使用【杀】或【万箭齐发】指定目标后,你令此牌不能被与你势力不同且有暗置武将牌的角色响应。", + [":huoshui"] = "锁定技,你的回合内:1.其他角色不能明置其武将牌;2.当你使用【杀】或【万箭齐发】时,你令此牌不能被与你势力不同且有暗置武将牌的角色响应。", ["qingcheng"] = "倾城", [":qingcheng"] = "出牌阶段,你可弃置一张黑色牌并选择一名武将牌均明置的其他角色,然后你暗置其一张武将牌。然后若你以此法弃置的牌是黑色装备牌,则你可再选择另一名武将牌均明置的其他角色,暗置其一张武将牌。", -- Gitee From c6ee8bc0883b6859b7e409dec613cb6c072206d8 Mon Sep 17 00:00:00 2001 From: cyxkw <1503720452@qq.com> Date: Wed, 6 Nov 2024 05:42:13 +0000 Subject: [PATCH 03/11] update hegemony_standard.lua. Signed-off-by: cyxkw <1503720452@qq.com> --- hegemony_standard.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hegemony_standard.lua b/hegemony_standard.lua index 2e546f2..5841404 100644 --- a/hegemony_standard.lua +++ b/hegemony_standard.lua @@ -1700,7 +1700,11 @@ Fk:loadTranslationTable{ [":hs__qianxun"] = "锁定技,当你成为【顺手牵羊】或【乐不思蜀】的目标时,你取消此目标。", ["duoshi"] = "度势", [":duoshi"] = "出牌阶段开始时,你可以视为使用一张【以逸待劳】。", - + + ["$hs__qianxun1"] = "儒生脱尘,不为贪逸淫乐之事。", + ["$hs__qianxun2"] = "谦谦君子,不饮盗泉之水。", + ["$duoshi1"] = "以今日之大势,当行此计。", + ["$duoshi2"] = "国之大计,审势为先。", ["~hs__luxun"] = "还以为我已经不再年轻……", } -- Gitee From 76afa2cea34f5041b56873b533dad6a7f7a5aadc Mon Sep 17 00:00:00 2001 From: cyxkw <1503720452@qq.com> Date: Wed, 6 Nov 2024 05:43:47 +0000 Subject: [PATCH 04/11] update power.lua. Signed-off-by: cyxkw <1503720452@qq.com> --- power.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/power.lua b/power.lua index 621637b..26cfd08 100644 --- a/power.lua +++ b/power.lua @@ -1462,6 +1462,7 @@ local duanliang_invalidityJA = fk.CreateInvaliditySkill { local jianan = fk.CreateTriggerSkill{ name = "jianan", anim_type = "support", + frequency = Skill.Compulsory, events = {fk.EventPhaseStart}, can_trigger = function (self, event, target, player, data) if not (target == player and not target:isNude() and target.phase == Player.Start) then return end -- Gitee From 5db5178e93112599b1523e4ef1745083c65e67bf Mon Sep 17 00:00:00 2001 From: cyxkw <1503720452@qq.com> Date: Wed, 6 Nov 2024 05:45:26 +0000 Subject: [PATCH 05/11] update lord_ex.lua. Signed-off-by: cyxkw <1503720452@qq.com> --- lord_ex.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lord_ex.lua b/lord_ex.lua index 049fd03..b674c8c 100644 --- a/lord_ex.lua +++ b/lord_ex.lua @@ -222,7 +222,7 @@ local fangyuanTrigger = fk.CreateTriggerSkill{ local prev_player = player:getLastAlive() local next_player = player:getNextAlive() return player:hasSkill(self) and player.phase == Player.Finish and H.inSiegeRelation(prev_player, next_player, player) - and #player.room.alive_players > 3 + and #player.room.alive_players > 3 and H.hasShownSkill(player, fangyuan) end, on_cost = Util.TrueFunc, on_use = function(self, event, target, player, data) @@ -310,6 +310,7 @@ Fk:loadTranslationTable{ ["ld__juejue_putcard"] = "将牌置入弃牌堆", ["#ld__fangyuan-choose"] = "方圆:选择此围攻关系中的一名围攻角色,视为对其使用一张【杀】", + ["#ld__fangyuan_trigger"] = "方圆", ["$ld__juejue1"] = "", ["$ld__juejue2"] = "", -- Gitee From 23d9a41cc53b8a3e1846008dc4713e9493dc35cd Mon Sep 17 00:00:00 2001 From: cyxkw <1503720452@qq.com> Date: Wed, 6 Nov 2024 05:46:58 +0000 Subject: [PATCH 06/11] update hegemony.lua. Signed-off-by: cyxkw <1503720452@qq.com> --- hegemony.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hegemony.lua b/hegemony.lua index 8b3bfc5..5dc4d44 100644 --- a/hegemony.lua +++ b/hegemony.lua @@ -732,8 +732,8 @@ local heg_rule = fk.CreateTriggerSkill{ -- room:setPlayerMark(player, "_wild_gained", 1) -- end elseif player:getMark("__heg_join_wild") == 0 and player:getMark("__heg_construct_wild") == 0 then - -- player.role = player.kingdom - room:setPlayerProperty(player, "role", player.kingdom) + player.role = player.kingdom + -- room:setPlayerProperty(player, "role", player.kingdom) end for _, v in pairs(H.getKingdomPlayersNum(room)) do -- Gitee From 16e3ddc4bdc9cb3213d6178520c9e42851c5947e Mon Sep 17 00:00:00 2001 From: cyxkw <1503720452@qq.com> Date: Wed, 6 Nov 2024 05:50:06 +0000 Subject: [PATCH 07/11] update util.lua. Signed-off-by: cyxkw <1503720452@qq.com> --- util.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util.lua b/util.lua index ce442c8..34177e8 100644 --- a/util.lua +++ b/util.lua @@ -931,8 +931,10 @@ end ---@param player ServerPlayer ---@param isMain bool @ 是否为主将,默认副将 ---@param isHidden bool @ 是否暗置变更 +---@param num? integer @ 选将数量,默认为3 H.transformGeneral = function(room, player, isMain, isHidden) local orig = isMain and player.general or player.deputyGeneral + num = num or 3 if not orig then return false end if orig == "anjiang" then player:revealGeneral(not isMain, true) @@ -950,7 +952,7 @@ H.transformGeneral = function(room, player, isMain, isHidden) end local generals = room:findGenerals(function(g) return Fk.generals[g].kingdom == kingdom or Fk.generals[g].subkingdom== kingdom - end, 3) + end, num) local general = room:askForGeneral(player, generals, 1, true) ---@type string table.removeOne(generals, general) table.insert(generals, orig) -- Gitee From b9911bff7994a88d995b23642d892407ee00ffdd Mon Sep 17 00:00:00 2001 From: cyxkw <1503720452@qq.com> Date: Fri, 8 Nov 2024 08:50:58 +0000 Subject: [PATCH 08/11] update formation.lua. Signed-off-by: cyxkw <1503720452@qq.com> --- formation.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/formation.lua b/formation.lua index 8984de0..ff0dbd9 100644 --- a/formation.lua +++ b/formation.lua @@ -192,7 +192,6 @@ local huyuan_active = fk.CreateActiveSkill{ end end, } -Fk:addSkill(huyuan_active) local huyuan = fk.CreateTriggerSkill{ name = 'ld__huyuan', anim_type = "defensive", @@ -200,12 +199,15 @@ local huyuan = fk.CreateTriggerSkill{ can_trigger = function (self, event, target, player, data) return player:hasSkill(self) and player.phase == Player.Finish and not player:isNude() end, - on_use = function (self, event, target, player, data) - local room = player.room + on_cost = function (self, event, target, player, data) local success, dat = player.room:askForUseActiveSkill(player, "huyuan_active", "#ld__huyuan-choose", true) if success then self.cost_data = dat + return true end + end, + on_use = function (self, event, target, player, data) + local room = player.room local dat = self.cost_data local choice = dat.interaction if choice == "ld__huyuan_give" then @@ -224,7 +226,7 @@ local huyuan = fk.CreateTriggerSkill{ end end, } - +huyuan:addRelatedSkill(huyuan_active) caohong:addSkill(heyi) caohong:addSkill(huyuan) Fk:addSkill(feiying) -- Gitee From 9f14e78fa873ceacaf9818071fd6fb5ba6baed17 Mon Sep 17 00:00:00 2001 From: cyxkw <1503720452@qq.com> Date: Fri, 8 Nov 2024 08:52:26 +0000 Subject: [PATCH 09/11] update offline_heg.lua. Signed-off-by: cyxkw <1503720452@qq.com> --- offline_heg.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offline_heg.lua b/offline_heg.lua index 5ebb9c1..a65d6b9 100644 --- a/offline_heg.lua +++ b/offline_heg.lua @@ -467,7 +467,7 @@ local xionghuo_record = fk.CreateTriggerSkill{ can_trigger = function(self, event, target, player, data) if player:hasSkill(xionghuo) then if event == fk.GeneralRevealed then - if player:usedSkillTimes(self.name, Player.HistoryGame) == 0 then + if player:usedSkillTimes(xionghuo.name, Player.HistoryGame) == 0 then for _, v in pairs(data) do if table.contains(Fk.generals[v]:getSkillNameList(), xionghuo.name) then return true end end -- Gitee From f75baf5b5f99f0ceaa46007e5b8a692e6c207c92 Mon Sep 17 00:00:00 2001 From: cyxkw <1503720452@qq.com> Date: Fri, 8 Nov 2024 09:37:31 +0000 Subject: [PATCH 10/11] update hegemony.lua. Signed-off-by: cyxkw <1503720452@qq.com> --- hegemony.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hegemony.lua b/hegemony.lua index 5dc4d44..aa69124 100644 --- a/hegemony.lua +++ b/hegemony.lua @@ -732,8 +732,8 @@ local heg_rule = fk.CreateTriggerSkill{ -- room:setPlayerMark(player, "_wild_gained", 1) -- end elseif player:getMark("__heg_join_wild") == 0 and player:getMark("__heg_construct_wild") == 0 then - player.role = player.kingdom - -- room:setPlayerProperty(player, "role", player.kingdom) + --player.role = player.kingdom + room:setPlayerProperty(player, "role", player.kingdom) end for _, v in pairs(H.getKingdomPlayersNum(room)) do -- Gitee From 2a15f902d05b89ff2f09faad01c5faa26b474923 Mon Sep 17 00:00:00 2001 From: cyxkw <1503720452@qq.com> Date: Fri, 8 Nov 2024 13:03:33 +0000 Subject: [PATCH 11/11] update hegemony.lua. Signed-off-by: cyxkw <1503720452@qq.com> --- hegemony.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hegemony.lua b/hegemony.lua index aa69124..8b3bfc5 100644 --- a/hegemony.lua +++ b/hegemony.lua @@ -732,7 +732,7 @@ local heg_rule = fk.CreateTriggerSkill{ -- room:setPlayerMark(player, "_wild_gained", 1) -- end elseif player:getMark("__heg_join_wild") == 0 and player:getMark("__heg_construct_wild") == 0 then - --player.role = player.kingdom + -- player.role = player.kingdom room:setPlayerProperty(player, "role", player.kingdom) end -- Gitee