From 6a4f33b75c54b8ccc0108ae031b6c3e3eb5bb9e7 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Fri, 19 Apr 2024 22:04:28 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/shenhua.js | 2 ++ character/xianding.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/character/shenhua.js b/character/shenhua.js index 607075312..9df90bd42 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -6134,8 +6134,10 @@ game.import("character", function () { } }, ai: { + halfneg: true, directHit_ai: true, skillTagFilter: function (player, tag, arg) { + if (tag === "directHit_ai") return; if ( arg.card.name != "sha" || !arg.target.hasSex("female") || diff --git a/character/xianding.js b/character/xianding.js index efbc5c73b..693673dfc 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -4306,6 +4306,9 @@ game.import("character", function () { content: function () { lib.skill.dcluoyan.init(player, "dcluoyan"); }, + ai: { + combo: "dcxingwu" + }, }, retianxiang_daxiaoqiao: { audio: "tianxiang_daxiaoqiao", From cd6e6faeadac5f584d1e18c9e3267437c75b9647 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Fri, 19 Apr 2024 22:05:51 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8DfilterCard=E4=BC=A0?= =?UTF-8?q?=E5=8F=82=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/library/element/player.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noname/library/element/player.js b/noname/library/element/player.js index 421247310..8288f7dc5 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -4524,7 +4524,7 @@ export class Player extends HTMLDivElement { if (typeof this.selectCard == "function") return false; if (this.complexCard || this.complexSelect || this.filterOk) return false; var cards = this.player.getCards(this.position); - if (cards.some(card => !this.filterCard(card, this))) return false; + if (cards.some(card => !this.filterCard(card, this.player))) return false; var num = cards.length; for (var i = 0; i < cards.length; i++) { if (!lib.filter.cardDiscardable(cards[i], this.player, this)) num--; @@ -4783,7 +4783,7 @@ export class Player extends HTMLDivElement { if (typeof this.selectCard == "function") return false; if (this.complexCard || this.complexSelect || this.filterOk) return false; var cards = this.player.getCards(this.position); - if (cards.some(card => !this.filterCard(card, this))) return false; + if (cards.some(card => !this.filterCard(card, this.player))) return false; return get.select(this.selectCard)[0] >= this.player.countCards(this.position); }; next.setContent("chooseCard"); From 58b9332a87b7947f0f87f9ce2f09a4032d67611b Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Fri, 19 Apr 2024 22:18:48 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E3=80=90=E4=BD=90?= =?UTF-8?q?=E4=BD=91=E3=80=91=E4=B8=BA=E5=9E=83=E5=9C=BE=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/mobile.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/character/mobile.js b/character/mobile.js index 38dbc9102..eb8d7e132 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -604,7 +604,7 @@ game.import("character", function () { usable: 1, zhuanhuanji: true, filterTarget(card, player, target) { - if (player.storage.mbzuoyou) return target.countCards("h"); + if (player.storage.mbzuoyou) return target.countCards("h") >= 2; return true; }, async content(event, trigger, player) { @@ -612,12 +612,13 @@ game.import("character", function () { target = event.target; if (event.name === "mbzuoyou") player.changeZhuanhuanji("mbzuoyou"); if (!storage) { - await target.draw(3); - await target.chooseToDiscard(2, true, "he"); + await target.draw(2); + await target.chooseToDiscard(1, true, "h"); } else { await target.chooseToDiscard( target === player ? "佐佑" : `${get.translation(player)}对你发动了【佐佑】`, - "请弃置一张手牌,然后获得1点护甲", + "请弃置两张手牌,然后获得1点护甲", + 2, true ); await target.changeHujia(1, null, true); @@ -628,8 +629,8 @@ game.import("character", function () { intro: { content(storage, player) { if (!storage) - return "转换技。出牌阶段限一次,你可以令一名角色摸三张牌,然后其弃置两张牌。"; - return "转换技。出牌阶段限一次,你可以令一名角色弃置一张手牌,然后其获得1点护甲。"; + return "转换技。出牌阶段限一次,你可以令一名角色摸两张牌,然后其弃置一张手牌。"; + return "转换技。出牌阶段限一次,你可以令一名手牌数不少于二的角色弃置两张手牌,然后其获得1点护甲。"; }, }, ai: { @@ -21192,7 +21193,7 @@ game.import("character", function () { lizhaojiaobo: "李昭焦伯", mbzuoyou: "佐佑", mbzuoyou_info: - "转换技。出牌阶段限一次,阴:你可以令一名角色摸三张牌,然后其弃置两张牌;阳:你可以令一名角色弃置一张手牌,然后其获得1点护甲。", + "转换技。出牌阶段限一次,阴:你可以令一名角色摸两张牌,然后其弃置一张手牌;阳:你可以令一名手牌数不少于二的角色弃置两张手牌,然后其获得1点护甲。", mbshishou: "侍守", mbshishou_info: "锁定技。当你发动〖佐佑〗后,若目标角色不为你,你执行〖佐佑〗中目标角色未执行的一项。", From 611714353b16eddcedad81c8a7cd2badd939851a Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Fri, 19 Apr 2024 22:22:23 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E3=80=90=E8=BF=9E?= =?UTF-8?q?=E8=AE=A8=E3=80=91ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/sp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/character/sp.js b/character/sp.js index 1654df052..8b9ace269 100755 --- a/character/sp.js +++ b/character/sp.js @@ -1005,7 +1005,7 @@ game.import("character", function () { } return list; }, []); - return Math[att > 0 ? "max" : "min"].apply(Math, list); + return Math[att > 0 ? "max" : "min"].apply(Math, effs); }) .forResult(); }, From d34942b0989f8d658289d0d107a23ebd6f74475b Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Fri, 19 Apr 2024 22:42:38 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E3=80=90=E6=A6=BB?= =?UTF-8?q?=E8=B0=9F=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/extra.js | 223 +++++++++++++++++++++++---------------------- 1 file changed, 116 insertions(+), 107 deletions(-) diff --git a/character/extra.js b/character/extra.js index 77939c610..d38d9034e 100755 --- a/character/extra.js +++ b/character/extra.js @@ -604,18 +604,18 @@ game.import("character", function () { if ( player.hp < 2 || target.hp + - target.countCards("h", (card) => - target.canSaveCard(card, target) - ) <= - 1 + - trigger.targets.some((current) => - current.hasMark("zhengqing") - ) + target.countCards("h", (card) => + target.canSaveCard(card, target) + ) <= + 1 + + trigger.targets.some((current) => + current.hasMark("zhengqing") + ) ) allIn = true; if ( cards.map((card) => get.value(card)).reduce((p, c) => p + c, 0) / - cards.length > + cards.length > 5 ) allIn = true; @@ -755,9 +755,18 @@ game.import("character", function () { changeSeat: true, derivation: "tamo_faq", async content(event, trigger, player) { - const toSortPlayers = game.filterPlayer((current) => !current.isZhu2()); + const toSortPlayers = game.filterPlayer((current) => { + return ( + !current.isZhu2() || + get.mode() == "doudizhu" && current.getSeatNum() == 3 + ); + }); toSortPlayers.sortBySeat(game.findPlayer2((current) => current.getSeatNum() == 1, true)); - const next = player.chooseToMove("榻谟:是否分配所有角色的座次?"); + const next = player.chooseToMove("榻谟:是否分配" + + (game.countPlayer() > toSortPlayers.length ? + "除主公" + (get.mode() == "doudizhu" ? "和三号位外" : "外") : "") + + "所有角色的座次?" + ); next.set("list", [ [ "(以下排列的顺序即为发动技能后角色的座次顺序)", @@ -920,8 +929,8 @@ game.import("character", function () { trigger: { player: "phaseAfter" }, filter(event, player) { return game.hasPlayer(target => { - if(target==player||target.countCards('h')+player.countCards('h')==0) return false; - return get.mode()=='identity'||target.countCards('h')<=player.countCards('h')+1; + if (target == player || target.countCards('h') + player.countCards('h') == 0) return false; + return get.mode() == 'identity' || target.countCards('h') <= player.countCards('h') + 1; }); }, direct: true, @@ -933,8 +942,8 @@ game.import("character", function () { get.prompt("zhimeng"), "与一名其他角色平分手牌", (card, player, target) => { - if(target==player||target.countCards('h')+player.countCards('h')==0) return false; - return get.mode()=='identity'||target.countCards('h')<=player.countCards('h')+1; + if (target == player || target.countCards('h') + player.countCards('h') == 0) return false; + return get.mode() == 'identity' || target.countCards('h') <= player.countCards('h') + 1; } ) .set("ai", (target) => { @@ -1638,9 +1647,8 @@ game.import("character", function () { var bodies = _status.event.player .getStorage("jxzhaoluan_effect") .filter((i) => i.isIn()); - return `选择一名角色,你令${get.translation(bodies)}${ - bodies.length > 1 ? "中的一人" : "" - }减1点体力上限,然后你对选择的角色造成1点伤害。`; + return `选择一名角色,你令${get.translation(bodies)}${bodies.length > 1 ? "中的一人" : "" + }减1点体力上限,然后你对选择的角色造成1点伤害。`; }, delay: false, content() { @@ -1757,9 +1765,9 @@ game.import("character", function () { .chooseButton( [ "挈挟:选择" + - (num > 1 ? "至多" : "") + - get.cnNumber(num) + - "张武将置入武器栏", + (num > 1 ? "至多" : "") + + get.cnNumber(num) + + "张武将置入武器栏", [ list, function (item, type, position, noclick, node) { @@ -1835,8 +1843,7 @@ game.import("character", function () { `