diff --git a/formation.lua b/formation.lua index 4ddca757d08e5808e409abe5a019ebf4051a39a3..ff0dbd9c1be2085a979e2efc21b5fe06f93b5e20 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,7 +199,7 @@ 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_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 @@ -218,14 +217,16 @@ 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, } - +huyuan:addRelatedSkill(huyuan_active) caohong:addSkill(heyi) caohong:addSkill(huyuan) Fk:addSkill(feiying) @@ -240,7 +241,7 @@ Fk:loadTranslationTable{ ["heyi"] = "鹤翼", [":heyi"] = "阵法技,与你处于同一队列的角色拥有〖飞影〗。", ["ld__huyuan"] = "护援", - [":ld__huyuan"] = "结束阶段,你可选择:1.将一张手牌交给一名角色;2.将一张装备牌置入一名角色的装备区,然后弃置场上的一张牌。", + [":ld__huyuan"] = "结束阶段,你可选择:1.将一张手牌交给一名角色;2.将一张装备牌置入一名角色的装备区,然后你可以弃置场上的一张牌。", ["huyuan_active"] = "护援", ["ld__huyuan_give"] = "给出手牌", @@ -506,7 +507,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) diff --git a/hegemony_standard.lua b/hegemony_standard.lua index f6af7b9041c7f18b6f9cf4ed0478a4fda915213e..5841404dcb0bc2827a2a5258ffb2b3e09e79b119 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"] = "还以为我已经不再年轻……", } @@ -2834,7 +2838,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 +2899,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 +2913,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 +2931,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 +2989,7 @@ zoushi:addSkill(qingcheng) Fk:loadTranslationTable{ ["hs__zoushi"] = "邹氏", ["huoshui"] = "祸水", - [":huoshui"] = "锁定技,你的回合内:1.其他角色不能明置其武将牌;2.当你使用【杀】或【万箭齐发】指定目标后,你令此牌不能被与你势力不同且有暗置武将牌的角色响应。", + [":huoshui"] = "锁定技,你的回合内:1.其他角色不能明置其武将牌;2.当你使用【杀】或【万箭齐发】时,你令此牌不能被与你势力不同且有暗置武将牌的角色响应。", ["qingcheng"] = "倾城", [":qingcheng"] = "出牌阶段,你可弃置一张黑色牌并选择一名武将牌均明置的其他角色,然后你暗置其一张武将牌。然后若你以此法弃置的牌是黑色装备牌,则你可再选择另一名武将牌均明置的其他角色,暗置其一张武将牌。", diff --git a/lord_ex.lua b/lord_ex.lua index 049fd03ccdadaf4e2baa93605803d45d35f0b789..b674c8ca6e7da0b38cd327733d7b119d250fa0b8 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"] = "", diff --git a/offline_heg.lua b/offline_heg.lua index 5ebb9c1c0bdb23185c706badc7c6ca38518a2612..a65d6b97afbbc017e38cfe8375a91d609cb87a8c 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 diff --git a/power.lua b/power.lua index 621637bbaaa9fff0be12b5f7624dd3a27fdb46ab..26cfd0821fd88abf3c9832ba73250540470cfa71 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 diff --git a/util.lua b/util.lua index ce442c82778c66267461f9607289a45b5174d306..34177e8a83de5bfdda632adc0fb20eef0422207c 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)