From 1e029df1abd58d9e8ace921198ff7f51b225ed62 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Sat, 20 Apr 2024 22:32:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E3=80=90=E5=AE=88?= =?UTF-8?q?=E6=88=90=E3=80=91=E3=80=90=E6=80=A5=E7=AD=B9=E3=80=91=E3=80=90?= =?UTF-8?q?=E5=8B=8B=E5=BE=B7=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/huicui.js | 38 +++++++++++++------------------------- character/mobile.js | 6 +++--- character/tw.js | 4 ++-- 3 files changed, 18 insertions(+), 30 deletions(-) diff --git a/character/huicui.js b/character/huicui.js index 380fa70f4..2aa470492 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -1536,38 +1536,26 @@ game.import("character", function () { return evt && evt.hs && evt.hs.length && current.countCards("h") == 0; }); }, - direct: true, - async content(event, trigger, player) { + async cost(event, trigger, player) { const targetx = _status.currentPhase; const targets = game .filterPlayer((current) => { - if (targetx && current == targetx) return false; + if (targetx && current == targetx || !current.isIn()) return false; let evt = trigger.getl(current); return evt && evt.hs && evt.hs.length && current.countCards("h") == 0; }) .sortBySeat(targetx || player); - for (const target of targets) { - if (!target.isIn()) continue; - const { - result: { bool }, - } = await player - .chooseBool(get.prompt2("dcshoucheng", target)) - .set("choice", get.attitude(player, target) > 0); - if (bool) { - player.logSkill("dcshoucheng", target); - if (target != player) player.addExpose(0.2); - target.draw(2); - } - } + event.result = await player + .chooseTarget("是否对" + (targets.length > 1 ? "其中一名角色" : get.translation(targets[0])) + "发动【守成】?", + "令其摸两张牌") + .set("ai", target => get.attitude(get.event(player), target)) + .forResult(); }, - ai: { - threaten(player, target) { - return Math.sqrt( - game.countPlayer((i) => { - return get.attitude(target, i) > 0; - }) - ); - }, + usable: 1, + async content(event, trigger, player) { + const target = event.targets[0]; + if (get.mode() != "identity" || player.identity != "nei") player.addExpose(0.2); + target.draw(2); }, subSkill: { ai: { @@ -16244,7 +16232,7 @@ game.import("character", function () { dcshengxi: "生息", dcshengxi_info: "弃牌阶段结束时,若你本回合未造成过伤害,你可以摸两张牌。", dcshoucheng: "守成", - dcshoucheng_info: "一名角色于其回合外失去最后的手牌后,你可令其摸两张牌。", + dcshoucheng_info: "每回合限一次,当一名角色于其回合外失去手牌后,若其没有手牌,你可令其摸两张牌。", dc_liuli: "刘理", dcfuli: "抚黎", dcfuli_info: diff --git a/character/mobile.js b/character/mobile.js index dc1010d2a..5441f9d7a 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -9722,9 +9722,9 @@ game.import("character", function () { "step 1"; if (result.number < 7) { var source = trigger.source; - if (source && source.isIn() && source.countCards("he") > 0) { + if (source && source.isIn() && source.countCards("h") > 0) { player.line(source); - source.chooseToDiscard("he", true); + source.chooseToDiscard("h", true); } } }, @@ -20724,7 +20724,7 @@ game.import("character", function () { simafu: "司马孚", xunde: "勋德", xunde_info: - "一名角色受到伤害后,若你至其的距离不大于1,则你可判定。若判定结果:大于5,你令该角色获得判定牌;小于7,你令伤害来源弃置一张牌。", + "一名角色受到伤害后,若你至其的距离不大于1,则你可判定。若判定结果:大于5,你令该角色获得判定牌;小于7,你令伤害来源弃置一张手牌。", chenjie: "臣节", chenjie_info: "一名角色的判定牌生效前,你可打出一张花色相同的牌。系统将你打出的牌作为新判定牌,将原判定牌置入弃牌堆。然后你摸两张牌。", diff --git a/character/tw.js b/character/tw.js index e4e72e310..8ef63639e 100644 --- a/character/tw.js +++ b/character/tw.js @@ -5425,7 +5425,7 @@ game.import("character", function () { return val; }, prompt: () => "选择要交出的牌和要交给的目标", - selectCard: 1, + selectCard: [1, Infinity], discard: false, lose: false, delay: false, @@ -20495,7 +20495,7 @@ game.import("character", function () { tw_jiangji_prefix: "TW", twjichou: "急筹", twjichou_info: - "①每回合限一次。你可以视为使用一张未被〖急筹①〗记录过的普通锦囊牌并记录此牌。②你无法响应或{使用对应实体牌包含你的手牌的}〖急筹①〗记录过的锦囊牌。③出牌阶段限一次。你可将手牌中的一张〖急筹①〗记录过的锦囊牌交给其他角色。", + "①每回合限一次。你可以视为使用一张未被〖急筹①〗记录过的普通锦囊牌并记录此牌。②你无法响应或{使用对应实体牌包含你的手牌的}〖急筹①〗记录过的锦囊牌。③出牌阶段限一次。你可将手牌中任意张〖急筹①〗记录过的锦囊牌交给其他角色。", twjilun: "机论", twjilun_info: "当你受到伤害后,你可以摸X张牌(X为〖急筹①〗记录数且至少为1,至多为5),或视为使用一张〖急筹①〗记录过且未被〖机论〗记录过的普通锦囊牌并记录此牌。", From 39af1a521240d8f59b8bc6fcfbf0742a52702ea2 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Sat, 20 Apr 2024 23:06:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E3=80=90=E5=BA=94?= =?UTF-8?q?=E6=97=B6=E3=80=91=EF=BC=8C=E4=BF=AE=E5=A4=8Dui/index.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/huicui.js | 30 +++++++++++++----------------- noname/ui/index.js | 1 + 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/character/huicui.js b/character/huicui.js index 2aa470492..72a1c7331 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -1063,39 +1063,30 @@ game.import("character", function () { filter(event, player) { if (!event.isFirstTarget) return false; if (get.type(event.card) !== "trick") return false; - const evt = event.getParent(); - const evts = game.getGlobalHistory("useCard", null, evt).slice().remove(evt); - return event.targets.some((target) => { - return evts.some((evt) => evt.targets.includes(target)); - }); + return true; }, direct: true, async content(event, trigger, player) { - const evt = trigger.getParent(); - const evts = game.getGlobalHistory("useCard", null, evt).slice().remove(evt); - const chooseableTargets = trigger.targets.filter((target) => { - return evts.some((evt) => evt.targets.includes(target)); - }); const result = await player .chooseTarget() .set("prompt", get.prompt("dcyingshi")) .set( "prompt2", - `令一名可选角色选择本回合未被选择过的一项:⒈令你于此牌结算结束后视为对其使用一张${get.translation( + `令其中一名角色选择本回合未被选择过的一项:⒈令你于此牌结算结束后视为对其使用一张${get.translation( trigger.card.name )};⒉弃置${get.cnNumber(player.countCards("e"))}张牌,此牌对其无效。` ) .set("filterTarget", (card, player, target) => { return get.event("targets").includes(target); }) - .set("targets", chooseableTargets) + .set("targets", trigger.targets) .set( "toFriends", (() => { - const isPositive = chooseableTargets.some((current) => { + const isPositive = trigger.targets.some((current) => { return get.effect(current, trigger.card, trigger.player, player) > 0; }), - isNegative = chooseableTargets.some((current) => { + isNegative = trigger.targets.some((current) => { return get.effect(current, trigger.card, trigger.player, player) < -5; }); if ( @@ -1547,8 +1538,13 @@ game.import("character", function () { .sortBySeat(targetx || player); event.result = await player .chooseTarget("是否对" + (targets.length > 1 ? "其中一名角色" : get.translation(targets[0])) + "发动【守成】?", - "令其摸两张牌") - .set("ai", target => get.attitude(get.event(player), target)) + "令其摸两张牌", + (card, player, target) => { + return get.event("targets").includes(target); + } + ) + .set("targets", targets) + .set("ai", target => get.attitude(get.event("player"), target)) .forResult(); }, usable: 1, @@ -16252,7 +16248,7 @@ game.import("character", function () { "其他角色的出牌阶段限一次。其可以交给你一张牌,若此牌为装备牌,你可以使用之,然后其本回合攻击范围+X(X为你装备区里的牌数)。若你以此法替换了装备,你与其各摸两张牌。", dcyingshi: "应时", dcyingshi_info: - "每回合每项各限一次。当你使用普通锦囊牌指定第一个目标后,若有目标不为本回合第一次成为牌的目标,则你可以令其选择一项:⒈令你于此牌结算结束后视为对其使用一张与此牌牌名相同的牌;⒉弃置X张牌,此牌对其无效(X为你装备区里的牌数)。", + "每回合每项各限一次。当你使用普通锦囊牌指定目标后,你可令其中一个目标选择一项:⒈令你于此牌结算结束后视为对其使用一张与此牌牌名相同的牌;⒉弃置X张牌,此牌对其无效(X为你装备区里的牌数)。", dc_wangling: "王淩", dcjichou: "集筹", dcjichou_info: diff --git a/noname/ui/index.js b/noname/ui/index.js index aedd06936..2d524574e 100644 --- a/noname/ui/index.js +++ b/noname/ui/index.js @@ -141,6 +141,7 @@ export class UI { */ toastQueue = []; + /** * @type {HTMLDivElement} */ cardPile;