From 49ef090d08d591fec7b777863792b042cf025bed Mon Sep 17 00:00:00 2001 From: lieren2023 <131325076+lieren2023@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:23:13 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8DTW=E6=82=96=E9=80=86?= =?UTF-8?q?=E6=8A=80=E8=83=BD=E4=B8=8E=E6=8F=8F=E8=BF=B0=E4=B8=8D=E7=AC=A6?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/xianding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/character/xianding.js b/character/xianding.js index aa1b34a2c..efbc5c73b 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -19631,7 +19631,7 @@ game.import("character", function () { zhugemengxue: "诸葛梦雪", dcjichun: "寄春", dcjichun_info: - "出牌阶段限一次,你可以展示一张手牌并选择一项:①将此牌交给一名手牌数小于你的角色,然后摸X张牌。②弃置此牌并弃置一名手牌数大于你的角色区域里至多X张牌。(X为此牌牌名字数)", + "出牌阶段限一次,你可以展示一张牌并选择一项:①将此牌交给一名手牌数小于你的角色,然后摸X张牌。②弃置此牌并弃置一名手牌数大于你的角色区域里至多X张牌。(X为此牌牌名字数)", dchanying: "寒英", dchanying_info: "准备阶段,你可以亮出牌堆里的一张非赠物装备牌,然后令一名手牌数等于你的角色使用此牌。", From 33a812fd3d0e473b69254509048698f382f5223d Mon Sep 17 00:00:00 2001 From: lieren2023 <131325076+lieren2023@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:26:58 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E8=AF=B8=E8=91=9B=E6=A2=A6=E9=9B=AA?= =?UTF-8?q?=E5=AF=84=E6=98=A5=E6=8F=8F=E8=BF=B0=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/tw.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/character/tw.js b/character/tw.js index 9c1cc61cd..e4e72e310 100644 --- a/character/tw.js +++ b/character/tw.js @@ -18750,7 +18750,9 @@ game.import("character", function () { audio: 2, enable: "phaseUse", usable: 1, - filterTarget: lib.filter.notMe, + filterTarget: function (card, player, target) { + return target.hp >= player.hp; + }, content: function () { "step 0"; var str = get.translation(target); From 8a8783300b41af617a31c9f9d96d62350a6eb717 Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Fri, 19 Apr 2024 19:36:34 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=8A=80=E8=83=BD=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/ddd.js | 13 +++++++++---- character/huicui.js | 17 +++++++++++++++-- character/jsrg.js | 3 +++ character/offline.js | 4 ++++ character/old.js | 11 ++++++++++- character/sp.js | 3 +++ 6 files changed, 44 insertions(+), 7 deletions(-) diff --git a/character/ddd.js b/character/ddd.js index 07065aeb2..adaa7e8ba 100644 --- a/character/ddd.js +++ b/character/ddd.js @@ -3361,6 +3361,9 @@ game.import("character", function () { content() { player.draw(3); }, + ai: { + combo: "dddfusi" + }, }, dddchashi: { trigger: { global: "phaseUseBegin" }, @@ -5113,6 +5116,9 @@ game.import("character", function () { }, }, }, + ai: { + combo: "dddyouxue" + }, }, dddyouxue_old: { audio: 2, @@ -6624,7 +6630,7 @@ game.import("character", function () { "锁定技。出牌阶段开始时,你选择一名角色,其弃置两张牌,然后你对一名角色造成1点伤害。" + (player.storage["dddxiaheng_del"] ? "" - : "。“若两名角色:均不为你,你失去一点体力上限;为同一名角色,你失去一点体力;然后若以此法对包括你在内三名不同的角色造成伤害,删除双引号里的描述内容”") + : "“若两名角色:均不为你,你失去一点体力上限;为同一名角色,你失去一点体力;然后若以此法对包括你在内三名不同的角色造成伤害,删除双引号里的描述内容”") ); }, dddshichao(player) { @@ -6638,9 +6644,8 @@ game.import("character", function () { return ( "转换技,摸牌阶段,你" + (player.hasMark("dddxuanlun_del") ? "" : "可") + - "展示手牌(无牌则不展示),并改为摸其中" + - (!player.storage["dddlanghuai"] ? "包含" : "缺少") + - "花色数的牌。" + "展示手牌(无牌则不展示),并改为摸其中:" + + (player.storage["dddlanghuai"] ? '阴:包含花色数的牌;阳:缺少花色数的牌。' : '阴:包含花色数的牌;阳:缺少花色数的牌。') ); }, dddxuanlun(player) { diff --git a/character/huicui.js b/character/huicui.js index 802280436..d1bc8a563 100644 --- a/character/huicui.js +++ b/character/huicui.js @@ -8005,6 +8005,9 @@ game.import("character", function () { return false; }, }, + ai: { + neg: true + }, }, //公孙度 dczhenze: { @@ -10831,7 +10834,10 @@ game.import("character", function () { player.addTempSkill("zhishi_mark", { player: "phaseBegin" }); } }, - ai: { expose: 0.3 }, + ai: { + combo: "xunli", + expose: 0.3 + }, subSkill: { mark: { trigger: { @@ -12096,6 +12102,9 @@ game.import("character", function () { } } }, + ai: { + combo: "huguan" + }, }, mingluan: { audio: 2, @@ -15060,6 +15069,10 @@ game.import("character", function () { content: function () { player.removeMark("recangchu", Math.min(player.countMark("recangchu"), trigger.num || 1)); }, + ai: { + combo: "recangchu", + neg: true + }, group: "reshishou2", }, reshishou2: { @@ -15493,7 +15506,7 @@ game.import("character", function () { var list = ["sha", "shan", "tao", "jiu"]; for (var i of list) { var strx = "【" + get.translation(i) + "】"; - if (!info || !info[0].includes(i)) + if (info && !info[0].includes(i)) strx = '' + strx + ""; str += strx; if (i != "jiu") str += "/"; diff --git a/character/jsrg.js b/character/jsrg.js index d5015f55d..1d2830e01 100644 --- a/character/jsrg.js +++ b/character/jsrg.js @@ -8741,6 +8741,9 @@ game.import("character", function () { .set("cards", trigger.cards); } }, + ai: { + combo: "jsrglirang" + }, }, //朱儁 jsrgfendi: { diff --git a/character/offline.js b/character/offline.js index f606dda50..662a28be9 100644 --- a/character/offline.js +++ b/character/offline.js @@ -4049,6 +4049,7 @@ game.import("character", function () { result: { player: 1, }, + combo: "zyquanji" }, }, //孙綝 @@ -6954,6 +6955,9 @@ game.import("character", function () { player.loseToDiscardpile(cards); if (num <= 1) player.draw(); }, + ai: { + combo: "spyicong" + }, }, sptuji2: { onremove: true, diff --git a/character/old.js b/character/old.js index a4f2eaeed..aaf9d071f 100755 --- a/character/old.js +++ b/character/old.js @@ -1169,7 +1169,13 @@ game.import("character", function () { content: function () { player.addToExpansion(cards, player, "give").gaintag.add("old_jijun"); }, - ai: { order: 1, result: { player: 1 } }, + ai: { + order: 1, + result: { + player: 1 + }, + combo: "old_fangtong" + }, }, old_fangtong: { trigger: { @@ -1186,6 +1192,9 @@ game.import("character", function () { var winners = player.getFriends(); game.over(player == game.me || winners.includes(game.me)); }, + ai:{ + combo: "oldjijun" + }, }, oldanxu: { enable: "phaseUse", diff --git a/character/sp.js b/character/sp.js index a20e01600..039a6784a 100755 --- a/character/sp.js +++ b/character/sp.js @@ -32648,6 +32648,9 @@ game.import("character", function () { player.gain(event.togain, "gain2"); } }, + ai: { + combo: "xinfu_falu" + }, }, zhenyi_spade: { trigger: { From 79b2fd1787e2b493b9a14cba5852d5f1f3e7d6a2 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Fri, 19 Apr 2024 19:54:40 +0800 Subject: [PATCH 04/10] v1.10.11.2 metadata --- game/update.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/game/update.js b/game/update.js index 3ad3d7dbe..374e6f21f 100644 --- a/game/update.js +++ b/game/update.js @@ -1,13 +1,9 @@ window.noname_update = { - version: "1.10.11.1", + version: "1.10.11.2", update: "NULL", //新版本更新文件较多,直接强制进行全量更新 changeLog: [ - "整合@Rintim @mengxinzxz @nonameShijian @lieren2023 @itsnoteasytonameaccount @kuangshen04 @IceCola97 @PZ157 @universe-st @Iking123 @copcap @nineMangos 的Pull Request", - "OL族王广、族王明山、界王异、刘辟、SP孙策;十周年曹芳、武关羽、神华佗、SP甄姬", - "手杀SP毌丘俭、曹髦、成济、李昭&焦伯;海外服颜良、文丑、袁谭", - "添加“无限火力”单挑模式", - "拆分“技能的消耗”和“技能的效果”,加入“按点卖血”等同时机多次发动技能的机制,逐步淘汰direct:true的写法", - "其他AI优化与bug修复", + "整合@Rintim @nonameShijian @copcap @PZ157 @mengxinzxz @lieren2023 的Pull Request", + "bug修复", ], files: [], }; 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 05/10] =?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 06/10] =?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 07/10] =?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 08/10] =?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 09/10] =?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 () { `
${skillstr}
`, node ); @@ -1863,18 +1870,18 @@ game.import("character", function () { if (lib.skill[skills[i]] && lib.skill[skills[i]].nobracket) { uiintro.add( '
' + - get.translation(skills[i]) + - "
" + - get.skillInfoTranslation(skills[i]) + - "
" + get.translation(skills[i]) + + "
" + + get.skillInfoTranslation(skills[i]) + + "
" ); } else { uiintro.add( '
【' + - translation + - "】
" + - get.skillInfoTranslation(skills[i]) + - "
" + translation + + "】
" + + get.skillInfoTranslation(skills[i]) + + "
" ); } if (lib.translate[skills[i] + "_append"]) { @@ -2425,10 +2432,10 @@ game.import("character", function () { ) return false; var card = { - name: event.card.name, - nature: event.card.nature, - isCard: true, - }, + name: event.card.name, + nature: event.card.nature, + isCard: true, + }, list = event._dccuixin; for (var target of list) { var targetx = player[target](); @@ -2455,10 +2462,10 @@ game.import("character", function () { player .chooseBool( "摧心:是否视为对" + - get.translation(list[0]) + - "使用" + - get.translation(card) + - "?" + get.translation(list[0]) + + "使用" + + get.translation(card) + + "?" ) .set("goon", get.effect(list[0], card, player, player) > 0) .set("ai", () => _status.event.goon); @@ -3301,8 +3308,8 @@ game.import("character", function () { return 15; }) .set("forceDie", true).judge2 = function (result) { - return result.bool; - }; + return result.bool; + }; "step 1"; var num = game.countPlayer(function (current) { return current != player && current.hasMark("twwuhun"); @@ -3594,15 +3601,15 @@ game.import("character", function () { evt.set( "openskilldialog", "选择" + - get.translation(name) + - "(" + - get.translation(result.links[0]) + - ")的目标" + get.translation(name) + + "(" + + get.translation(result.links[0]) + + ")的目标" ); evt.set("norestore", true); evt.set("custom", { add: {}, - replace: { window() {} }, + replace: { window() { } }, }); } else { delete evt.result.skill; @@ -3787,11 +3794,11 @@ game.import("character", function () { return [ 1, 0.8 * - game.countPlayer((current) => { - return current.countCards("e", (card) => { - return get.suit(card, current) == suit; - }); - }), + game.countPlayer((current) => { + return current.countCards("e", (card) => { + return get.suit(card, current) == suit; + }); + }), ]; }, target: (card, player, target) => { @@ -4805,9 +4812,9 @@ game.import("character", function () { return ( numx + num * - game.countPlayer(function (current) { - return current.hasSkill("yingba"); - }) + game.countPlayer(function (current) { + return current.hasSkill("yingba"); + }) ); }, }, @@ -5532,10 +5539,10 @@ game.import("character", function () { .chooseTarget( get.prompt("dangmo"), "为" + - get.translation(trigger.card) + - "增加至多" + - get.translation(num) + - "个目标", + get.translation(trigger.card) + + "增加至多" + + get.translation(num) + + "个目标", [1, num], function (card, player, target) { var evt = _status.event.getTrigger(); @@ -5581,8 +5588,8 @@ game.import("character", function () { return 1; }) .set("callback", lib.skill.reshuishi.callback).judge2 = function (result) { - return result.bool ? true : false; - }; + return result.bool ? true : false; + }; "step 2"; var cards = cards.filterInD(); if (cards.length) @@ -6015,10 +6022,10 @@ game.import("character", function () { .chooseCard( "h", "交给" + - get.translation(player) + - "一张" + - get.translation(suit) + - "花色的手牌", + get.translation(player) + + "一张" + + get.translation(suit) + + "花色的手牌", true, function (card, player) { return get.suit(card, player) == _status.event.suit; @@ -6294,10 +6301,10 @@ game.import("character", function () { .set( "prompt", "把" + - get.translation(card) + - "移动到" + - (event.index2 == 0 ? "弃" : "") + - "牌堆的..." + get.translation(card) + + "移动到" + + (event.index2 == 0 ? "弃" : "") + + "牌堆的..." ); } "step 5"; @@ -6323,13 +6330,13 @@ game.import("character", function () { .set( "prompt", "把" + - get.translation(card) + - "移动到" + - get.translation(event.target2) + - "的..." + get.translation(card) + + "移动到" + + get.translation(event.target2) + + "的..." ).ai = function () { - return 0; - }; + return 0; + }; } } "step 6"; @@ -6667,8 +6674,8 @@ game.import("character", function () { num == 3 ? event.numFixed : !game.hasPlayer(function (current) { - return current.hasEnabledSlot(); - }) + return current.hasEnabledSlot(); + }) ) return false; return ( @@ -7041,12 +7048,12 @@ game.import("character", function () { !target._new_guixin_eff && get.tag(card, "damage") && target.hp > - (player.hasSkillTag("damageBonus", true, { - card: card, - target: target, - }) - ? 2 - : 1) + (player.hasSkillTag("damageBonus", true, { + card: card, + target: target, + }) + ? 2 + : 1) ) { if (player.hasSkillTag("jueqing", false, target)) return [1, -2]; target._new_guixin_eff = true; @@ -8006,12 +8013,12 @@ game.import("character", function () { !target._guixin_eff && get.tag(card, "damage") && target.hp > - (player.hasSkillTag("damageBonus", true, { - card: card, - target: target, - }) - ? 2 - : 1) + (player.hasSkillTag("damageBonus", true, { + card: card, + target: target, + }) + ? 2 + : 1) ) { if (player.hasSkillTag("jueqing", false, target)) return [1, -2]; target._guixin_eff = true; @@ -8211,10 +8218,10 @@ game.import("character", function () { .set( "allUse", player.getExpansions("qixing").length >= - game.countPlayer(function (current) { - return get.attitude(player, current) > 4; - }) * - 2 + game.countPlayer(function (current) { + return get.attitude(player, current) > 4; + }) * + 2 ); "step 1"; if (result.bool) { @@ -8492,10 +8499,10 @@ game.import("character", function () { ) ) { let suits = player.getDiscardableCards(player, "h").reduce((map, card) => { - const suit = get.suit(card, player); - if (!map[suit]) map[suit] = []; - return map; - }, {}), + const suit = get.suit(card, player); + if (!map[suit]) map[suit] = []; + return map; + }, {}), cards = []; Object.keys(suits).forEach((i) => { suits[i].addArray( @@ -8505,11 +8512,11 @@ game.import("character", function () { }); return ( player.hp + - player.countCards( - "h", - (card) => !cards.includes(card) && player.canSaveCard(card, player) - ) - - 3 > + player.countCards( + "h", + (card) => !cards.includes(card) && player.canSaveCard(card, player) + ) - + 3 > 0 ); } @@ -9444,9 +9451,9 @@ game.import("character", function () { return ( player.storage.nzry_junlve >= num && num == - game.countPlayer(function (current) { - return get.attitude(player, current) < 0; - }) + game.countPlayer(function (current) { + return get.attitude(player, current) < 0; + }) ); }, filterTarget(card, player, target) { @@ -9471,8 +9478,8 @@ game.import("character", function () { return _status.event.targets.includes(target); }) .set("targets", targets).ai = function () { - return 1; - }; + return 1; + }; "step 2"; if (result.bool) { result.targets[0].damage("fire", "nocard"); @@ -10838,12 +10845,14 @@ game.import("character", function () { tamo: "榻谟", tamo_info: "游戏开始时,你可以重新分配除主公外所有角色的座次。", + tamo_info_doudizhu: + "游戏开始时,你可以重新分配除主公和三号位外所有角色的座次。", tamo_faq: "FAQ", tamo_faq_info: "
  • Q:在一号位不为主公的情况下,〖榻谟〗如何结算?
  • A:该角色可以正常进行座次交换。若受此技能影响导致一号位角色发生了变化,则以排列后的一号位角色为起始角色开始本局游戏。
  • ", zhimeng: "智盟", - zhimeng_info_identity:'回合结束后,你可以选择一名其他角色。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。', - zhimeng_info:'回合结束后,你可以选择一名手牌数不大于Y的其他角色(Y为你的手牌数+1)。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。', + zhimeng_info_identity: '回合结束后,你可以选择一名其他角色。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。', + zhimeng_info: '回合结束后,你可以选择一名手牌数不大于Y的其他角色(Y为你的手牌数+1)。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。', shen_xuzhu: "神许褚", shen_xuzhu_prefix: "神", zhengqing: "争擎", From d5edc2b9b172d45239bad030c1943037f7712e21 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Fri, 19 Apr 2024 22:58:44 +0800 Subject: [PATCH 10/10] v1.10.11.3 metadata --- game/update.js | 3 +-- noname/library/element/player.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/game/update.js b/game/update.js index 374e6f21f..2bbef6d9f 100644 --- a/game/update.js +++ b/game/update.js @@ -1,8 +1,7 @@ window.noname_update = { - version: "1.10.11.2", + version: "1.10.11.3", update: "NULL", //新版本更新文件较多,直接强制进行全量更新 changeLog: [ - "整合@Rintim @nonameShijian @copcap @PZ157 @mengxinzxz @lieren2023 的Pull Request", "bug修复", ], files: [], diff --git a/noname/library/element/player.js b/noname/library/element/player.js index 8288f7dc5..0fabfa39b 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.player))) return false; + if (cards.some(card => !this.filterCard(card, this.player, this))) 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.player))) return false; + if (cards.some(card => !this.filterCard(card, this.player, this))) return false; return get.select(this.selectCard)[0] >= this.player.countCards(this.position); }; next.setContent("chooseCard");