From fd6f42804d3f8313942718f6274b0e993909caca Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sat, 11 May 2024 14:31:49 +0800 Subject: [PATCH] =?UTF-8?q?OL=E7=95=8C=E9=AB=98=E9=A1=BA=E3=80=90=E9=99=B7?= =?UTF-8?q?=E9=98=B5=E3=80=91=E6=95=88=E6=9E=9C=E8=B0=83=E6=95=B4=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=AB=98=E9=A1=BA=E3=80=90=E9=99=B7=E9=98=B5?= =?UTF-8?q?=E3=80=91=E6=8F=8F=E8=BF=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/onlyOL/skill.js | 70 +++++++++++++++++++++++++++++++++- character/onlyOL/translate.js | 2 +- character/yijiang/translate.js | 2 +- 3 files changed, 70 insertions(+), 4 deletions(-) diff --git a/character/onlyOL/skill.js b/character/onlyOL/skill.js index a0634a4cb..8066ac080 100644 --- a/character/onlyOL/skill.js +++ b/character/onlyOL/skill.js @@ -688,14 +688,80 @@ const skills = { result: { bool }, } = await player.chooseToCompare(target); if (bool) { - player.storage.xinxianzhen = target; - player.addTempSkill("xinxianzhen2"); + player.markAuto("olxianzhen_effect", [target]); + player.addTempSkill("olxianzhen_effect"); } else { player.markAuto("olxianzhen_buff", [target]); player.addTempSkill("olxianzhen_buff"); } }, subSkill: { + effect: { + charlotte: true, + onremove: true, + audio: "rexianzhen", + mod: { + targetInRange(card, player, target) { + if (player.getStorage("olxianzhen_effect").includes(target)) return true; + }, + cardUsableTarget(card, player, target) { + if (player.getStorage("olxianzhen_effect").includes(target)) return true; + }, + }, + trigger: { player: "useCard2" }, + filter(event, player) { + if (event.card.name != "sha" && get.type(event.card) != "trick") return false; + if (!Array.isArray(event.targets)) return false; + return game.hasPlayer(target => { + if (!player.getStorage("olxianzhen_effect").includes(target)) return false; + return !event.targets.includes(target) && lib.filter.targetEnabled2(event.card, player, target); + }); + }, + async cost(event, trigger, player) { + const targets = game.filterPlayer(target => { + if (!player.getStorage("olxianzhen_effect").includes(target)) return false; + return trigger.targets.includes(target) && lib.filter.targetEnabled2(trigger.card, player, target); + }); + if (targets.length == 1) { + const target = targets[0]; + const bool = await player.chooseBool(get.prompt("olxianzhen_effect", target), "令" + get.translation(target) + "也成为" + get.translation(trigger.card) + "的目标").forResult("bool"); + event.result = { bool: bool, targets: targets }; + } else { + event.result = await player + .chooseTarget(get.prompt("olxianzhen_effect"), "令任意名【陷阵】拼点成功的目标角色也成为" + get.translation(trigger.card) + "的目标", (card, player, target) => { + const trigger = get.event().getTrigger(); + if (!player.getStorage("olxianzhen_effect").includes(target)) return false; + return trigger.targets.includes(target) && lib.filter.targetEnabled2(trigger.card, player, target); + }) + .set("ai", target => { + const player = get.event("player"), + trigger = get.event().getTrigger(); + return get.effect(target, trigger.card, player, player); + }) + .forResult(); + } + }, + content() { + trigger.targets.addArray(event.targets); + game.log(event.targets, "成为了", trigger.card, "的额外目标"); + }, + ai: { + unequip: true, + skillTagFilter(player, tag, arg) { + if (!arg || !arg.target || !player.getStorage("olxianzhen_effect").includes(arg.target)) return false; + }, + effect: { + player(card, player, target, current, isLink) { + if (isLink || !target) return; + if (!player.getStorage("olxianzhen_effect").includes(target) && ["sha", "guohe", "shunshou", "huogong", "juedou"].includes(card.name)) { + if (get.effect(target, card, player, player) > 0) { + return [1, 2]; + } + } + }, + }, + }, + }, buff: { charlotte: true, onremove: true, diff --git a/character/onlyOL/translate.js b/character/onlyOL/translate.js index 1854ec216..d33be95a9 100644 --- a/character/onlyOL/translate.js +++ b/character/onlyOL/translate.js @@ -38,7 +38,7 @@ const translates = { ol_gaoshun: "OL界高顺", ol_gaoshun_prefix: "OL界", olxianzhen: "陷阵", - olxianzhen_info: "出牌阶段限一次,你可以与一名角色拼点。若你赢,本回合你无视该角色的防具且对其使用牌没有次数和距离限制,且当你使用【杀】或普通锦囊牌指定其他角色为唯一目标时可以令该角色也成为此牌的目标;若你没赢,本回合你不能对其使用【杀】且你的【杀】不计入手牌上限。", + olxianzhen_info: "出牌阶段限一次,你可以与一名角色拼点。若你赢,本回合你无视该角色的防具且对其使用牌没有次数和距离限制,且当你使用【杀】或普通锦囊牌指定目标时,可以令该角色也成为此牌的目标;若你没赢,本回合你不能对其使用【杀】且你的【杀】不计入手牌上限。", ol_sb_yuanshao: "OL谋袁绍", ol_sb_yuanshao_prefix: "OL谋", olsbhetao: "合讨", diff --git a/character/yijiang/translate.js b/character/yijiang/translate.js index 6e2f21b4d..c1c26a03e 100644 --- a/character/yijiang/translate.js +++ b/character/yijiang/translate.js @@ -222,7 +222,7 @@ const translates = { xianzhen: "陷阵", xianzhen_info: "出牌阶段限一次,你可以与一名角色拼点。若你赢,你获得以下效果直到回合结束:无视与该角色的距离;无视该角色的防具且对其使用【杀】没有次数限制。若你没赢,你不能使用【杀】直到回合结束。", xinxianzhen: "陷阵", - xinxianzhen_info: "出牌阶段限一次,你可以与一名角色拼点。若你赢,你获得以下效果直到回合结束:无视该角色的防具且对其使用牌没有次数和距离限制,且当你使用【杀】或普通锦囊牌指定其他角色为唯一目标时可以令该角色也成为此牌的目标。若你没赢,你不能使用【杀】且你的【杀】不计入手牌上限直到回合结束。", + xinxianzhen_info: "出牌阶段限一次,你可以与一名角色拼点。若你赢,你获得以下效果直到回合结束:无视该角色的防具且对其使用牌没有次数和距离限制,且当你使用【杀】或普通锦囊牌指定唯一目标时,可以令该角色也成为此牌的目标。若你没赢,你不能使用【杀】且你的【杀】不计入手牌上限直到回合结束。", xinxianzhen2: "陷阵", jinjiu: "禁酒", jinjiu_info: "锁定技,你的【酒】均视为【杀】。",