From 5931d461e279e38ad61362f736df8a855ccba3dd Mon Sep 17 00:00:00 2001 From: 1039727228 <161940407+1039727228@users.noreply.github.com> Date: Sun, 2 Jun 2024 12:29:29 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E4=B8=BA=E6=89=8B=E6=9D=80=E8=92=8B?= =?UTF-8?q?=E7=90=AC=E5=B0=BD=E7=98=81=E5=8A=A0changeSeat=E6=A0=87?= =?UTF-8?q?=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为手杀蒋琬尽瘁加changeSeat标签 --- character/shiji/skill.js | 1 + 1 file changed, 1 insertion(+) diff --git a/character/shiji/skill.js b/character/shiji/skill.js index 9fcf161dc..eb9873cdf 100644 --- a/character/shiji/skill.js +++ b/character/shiji/skill.js @@ -943,6 +943,7 @@ const skills = { audio: 2, enable: "phaseUse", usable: 1, + changeSeat: true, limited: true, skillAnimation: true, animationColor: "orange", From 4e761b21174078ec7fe78ae44940db4148e5d0f9 Mon Sep 17 00:00:00 2001 From: ZiG60020405 <47026578+zhichaoxi2006@users.noreply.github.com> Date: Sun, 2 Jun 2024 16:50:12 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E6=B7=BB=E5=8A=A0get.plainText=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/extra/skill.js | 12 ++++++------ character/yingbian/skill.js | 2 +- noname/get/index.js | 10 ++++++++++ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/character/extra/skill.js b/character/extra/skill.js index 8d2cf937e..07fb96d74 100644 --- a/character/extra/skill.js +++ b/character/extra/skill.js @@ -1438,7 +1438,7 @@ const skills = { var info = lib.character[name]; if ( info[3].some(function (skill) { - var info = get.skillInfoTranslation(skill); + var info = get.plainText(get.skillInfoTranslation(skill)); if (!info.includes("【杀】")) return false; var list = get.skillCategoriesOf(skill, player); list.remove("锁定技"); @@ -1470,7 +1470,7 @@ const skills = { var name = button.link; var info = lib.character[name]; var skills = info[3].filter(function (skill) { - var info = get.skillInfoTranslation(skill); + var info = get.plainText(get.skillInfoTranslation(skill)); if (!info.includes("【杀】")) return false; var list = get.skillCategoriesOf(skill, get.player()); list.remove("锁定技"); @@ -1509,7 +1509,7 @@ const skills = { node = ui.create.buttonPresets.character(item, "character", position, noclick); const info = lib.character[item]; const skills = info[3].filter(function (skill) { - var info = get.skillInfoTranslation(skill); + var info = get.plainText(get.skillInfoTranslation(skill)); if (!info.includes("【杀】")) return false; var list = get.skillCategoriesOf(skill, get.player()); list.remove("锁定技"); @@ -1588,7 +1588,7 @@ const skills = { var maxHp = get.infoMaxHp(info[2]); if (maxHp != 1) card.distance = { attackFrom: 1 - maxHp }; var skills = info[3].filter(function (skill) { - var info = get.skillInfoTranslation(skill); + var info = get.plainText(get.skillInfoTranslation(skill)); if (!info.includes("【杀】")) return false; var list = get.skillCategoriesOf(skill, get.player()); list.remove("锁定技"); @@ -1617,10 +1617,10 @@ const skills = { if (skills.length) { for (var skill of skills) { if (lib.skill[skill].nobracket) { - append += '
' + get.translation(skill) + '
' + get.skillInfoTranslation(skill) + "


"; + append += '
' + get.translation(skill) + '
' + get.plainText(get.skillInfoTranslation(skill)) + "


"; } else { var translation = lib.translate[skill + "_ab"] || get.translation(skill).slice(0, 2); - append += '
【' + translation + '】
' + get.skillInfoTranslation(skill) + "


"; + append += '
【' + translation + '】
' + get.plainText(get.skillInfoTranslation(skill)) + "


"; } } str = str.slice(0, str.length - 8); diff --git a/character/yingbian/skill.js b/character/yingbian/skill.js index 52e8458d4..25019f6ca 100644 --- a/character/yingbian/skill.js +++ b/character/yingbian/skill.js @@ -1750,7 +1750,7 @@ const skills = { var skill = lib.skill[j]; if (!skill || skill.juexingji || skill.hiddenSkill || skill.zhuSkill || skill.dutySkill || skill.chargeSkill || lib.skill.bolan.banned.includes(j)) continue; if (skill.init || (skill.ai && (skill.ai.combo || skill.ai.notemp || skill.ai.neg))) continue; - var info = lib.translate[j + "_info"]; + var info = get.plainText(lib.translate[j + "_info"]); if (info && info.indexOf("出牌阶段限一次") != -1) skills.add(j); } } diff --git a/noname/get/index.js b/noname/get/index.js index 2ff7d104c..c4826002b 100644 --- a/noname/get/index.js +++ b/noname/get/index.js @@ -974,6 +974,16 @@ export class Get { return target; } + /** + * 用于将HTML代码转换为纯文本。 + * @param { string } htmlContent + * @returns { string } + */ + plainText(htmlContent) { + var parser = new DOMParser(); + var doc = parser.parseFromString(htmlContent || '', 'text/html'); + return doc.body.textContent || doc.body.innerText; + } inpilefull(type) { var list = []; for (var i in lib.cardPile) { From 8c84806aff674c7aba94815ef1a2519892a97cbb Mon Sep 17 00:00:00 2001 From: ZiG60020405 <47026578+zhichaoxi2006@users.noreply.github.com> Date: Sun, 2 Jun 2024 16:54:22 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=95=E6=8C=91?= =?UTF-8?q?=E7=9A=84get.attitude=E5=87=BD=E6=95=B0=E4=B8=8D=E6=A3=80?= =?UTF-8?q?=E6=B5=8Bfrom=E6=88=96to=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mode/single.js | 1 + 1 file changed, 1 insertion(+) diff --git a/mode/single.js b/mode/single.js index caab69e66..ab36f47a0 100644 --- a/mode/single.js +++ b/mode/single.js @@ -1562,6 +1562,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }, get: { attitude: function (from, to) { + if (!from || !to) return 0; if (from.identity == to.identity) return 10; return -10; }, From 8d2df83edd756502465ddada44cd52e2c72ea8dc Mon Sep 17 00:00:00 2001 From: ZiG60020405 <47026578+zhichaoxi2006@users.noreply.github.com> Date: Sun, 2 Jun 2024 16:56:22 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A5=AD=E9=A3=8E?= =?UTF-8?q?=E5=8D=A7=E9=BE=99=E5=9B=A0=E4=BD=93=E5=8A=9B=E6=B5=81=E5=A4=B1?= =?UTF-8?q?=E8=80=8C=E5=A4=B1=E5=8E=BB=E6=98=9F=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mode/boss.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mode/boss.js b/mode/boss.js index 833e216fa..a999e09f5 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -7171,10 +7171,10 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { return player.countCards("h") == 0; }, x6: function (player, event) { - return event.hasNature("fire"); + if(event.hasNature) return event.hasNature("fire"); }, x5: function (player, event) { - return event.hasNature("thunder"); + if(event.hasNature) return event.hasNature("thunder"); }, x4: function (player, event) { return event.name == "loseHp"; From b0b9a8fa7b5835cc1e4d2c830a49414401b55f8b Mon Sep 17 00:00:00 2001 From: lieren2023 <131325076+lieren2023@users.noreply.github.com> Date: Sun, 2 Jun 2024 21:04:30 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E5=9B=BD=E6=88=98=E5=90=9B=E4=B8=BB?= =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E5=8F=B0=E8=AF=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mode/guozhan.js | 151 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 108 insertions(+), 43 deletions(-) diff --git a/mode/guozhan.js b/mode/guozhan.js index d42c79879..ebd46bb67 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -826,9 +826,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { gz_sp_dongzhuo: ["male", "qun", 4, ["hengzheng", "fakebaoling"]], gz_zhangren: ["male", "qun", 4, ["chuanxin", "fengshi"]], - gz_jun_liubei: ["male", "shu", 4, ["zhangwu", "jizhao", "shouyue", "wuhujiangdaqi"]], - gz_jun_zhangjiao: ["male", "qun", 4, ["wuxin", "hongfa", "wendao", "huangjintianbingfu"]], - gz_jun_sunquan: ["male", "wu", 4, ["jiahe", "lianzi", "jubao", "yuanjiangfenghuotu"]], + gz_jun_liubei: ["male", "shu", 4, ["zhangwu", "jizhao", "shouyue"]], + gz_jun_zhangjiao: ["male", "qun", 4, ["wuxin", "hongfa", "wendao"]], + gz_jun_sunquan: ["male", "wu", 4, ["jiahe", "lianzi", "jubao"]], gz_liqueguosi: ["male", "qun", 4, ["gzxiongsuan"]], gz_zuoci: ["male", "qun", 3, ["fakeyigui", "fakejihun"], ["gzskin"]], @@ -864,7 +864,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { gz_lukang: ["male", "wu", 4, ["fakejueyan", "fakekeshou"], ["gzskin"]], gz_yuanshu: ["male", "qun", 4, ["gzweidi", "gzyongsi"], ["gzskin"]], gz_zhangxiu: ["male", "qun", 4, ["gzfudi", "gzcongjian"], ["gzskin"]], - gz_jun_caocao: ["male", "wei", 4, ["jianan", "huibian", "gzzongyu", "wuziliangjiangdao"], []], + gz_jun_caocao: ["male", "wei", 4, ["jianan", "huibian", "gzzongyu"], []], gz_jin_zhangchunhua: ["female", "jin", 3, ["gzhuishi", "fakeqingleng"]], gz_jin_simayi: ["male", "jin", 3, ["fakequanbian", "smyyingshi", "fakezhouting"]], @@ -925,6 +925,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { //官盗2023 fakexiaoguo: { audio: "xiaoguo", + audioname2: { gz_jun_caocao: "jianan_xiaoguo" }, trigger: { global: "phaseZhunbeiBegin" }, filter(event, player) { return ( @@ -15639,19 +15640,21 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }, }, jianan: { - audio: 2, + audio: true, unique: true, forceunique: true, - group: "wuziliangjiangdao", - derivation: "wuziliangjiangdao", + derivation: ["wuziliangjiangdao", "new_retuxi", "qiaobian", "fakexiaoguo", "gzjieyue", "new_duanliang"], lordSkill: true, - global: "g_jianan", + global: ["wuziliangjiangdao", "g_jianan"], + init(player) { + player.markSkill("wuziliangjiangdao"); + }, }, g_jianan: { trigger: { player: ["phaseZhunbeiBegin", "phaseBefore", "dieBegin"], }, - audio: "jianan", + audio: "wuziliangjiangdao", forceaudio: true, filter: function (event, player, name) { if (name != "phaseZhunbeiBegin") return get.is.jun(player) && player.identity == "wei"; @@ -15779,6 +15782,11 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { jianan_eff: { ai: { nomingzhi: true }, }, + jianan_tuxi: { audio: true }, + jianan_qiaobian: { audio: true }, + jianan_xiaoguo: { audio: true }, + jianan_jieyue: { audio: true }, + jianan_duanliang: { audio: true }, huibian: { enable: "phaseUse", audio: 2, @@ -15823,9 +15831,11 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }, gzzongyu: { audio: 2, + derivation: "liulongcanjia", unique: true, forceunique: true, - group: ["gzzongyu_others", "gzzongyu_player"], + group: "gzzongyu_others", + global: "gzzongyu_player", ai: { threaten: 1.2, }, @@ -15873,9 +15883,11 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }, player: { audio: "gzzongyu", + forceaudio: true, trigger: { player: "equipAfter" }, forced: true, filter: function (event, player) { + if (!player.skills.includes("gzzongyu")) return false; if (!["equip3", "equip4"].includes(get.subtype(event.card))) return false; for (var i = 0; i < ui.discardPile.childElementCount; i++) { if (ui.discardPile.childNodes[i].name == "liulongcanjia") return true; @@ -15913,6 +15925,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }, }, wuziliangjiangdao: { + audio: 2, nopop: true, unique: true, forceunique: true, @@ -16317,6 +16330,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }, }, audio: ["jieyue", 2], + audioname2: { gz_jun_caocao: "jianan_jieyue" }, }, jianglue: { @@ -16857,6 +16871,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }, locked: false, audio: "duanliang1", + audioname2: { gz_jun_caocao: "jianan_duanliang" }, enable: "chooseToUse", filterCard: function (card) { if (get.type(card) != "basic" && get.type(card) != "equip") return false; @@ -18828,6 +18843,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { enable: "phaseUse", usable: 1, audio: 2, + derivation: "gzzhiheng", filterCard: true, check: function (card) { if (get.type(card) == "equip") return 0; @@ -18899,6 +18915,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }, trigger: { player: "phaseJieshuBegin" }, audio: 2, + derivation: "dinglanyemingzhu", forced: true, unique: true, filter: function (event, player) { @@ -18935,14 +18952,20 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }, }, jiahe: { + audio: true, unique: true, forceunique: true, lordSkill: true, - locked: false, - audio: 2, - derivation: "yuanjiangfenghuotu", mark: true, - global: ["jiahe_put", "jiahe_skill"], + derivation: ["yuanjiangfenghuotu", "jiahe_reyingzi", "jiahe_haoshi", "jiahe_shelie", "jiahe_duoshi"], + global: ["yuanjiangfenghuotu", "jiahe_damage", "jiahe_put", "jiahe_skill"], + init(player) { + player.markSkill("yuanjiangfenghuotu"); + }, + }, + jiahe_damage: { + audio: ["yuanjiangfenghuotu3.mp3", "yuanjiangfenghuotu4.mp3"], + forceaudio: true, ai: { threaten: 2, }, @@ -18971,7 +18994,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }, jiahe_put: { enable: "phaseUse", - audio: 2, + audio: ["yuanjiangfenghuotu", 2], forceaudio: true, filter: function (event, player) { var zhu = get.zhu(player, "jiahe"); @@ -19130,9 +19153,10 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { inherit: "shelie", }, jiahe_duoshi: { - inherit: "duoshi", + inherit: "fakeduoshi", }, yuanjiangfenghuotu: { + audio: 4, unique: true, forceunique: true, nopop: true, @@ -19150,7 +19174,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { dialog.addSmall(content); } dialog.addText( - '