From 8a58c68152277526421f404bd35bd909f74d4111 Mon Sep 17 00:00:00 2001 From: lieren2023 <131325076+lieren2023@users.noreply.github.com> Date: Wed, 5 Jun 2024 23:33:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E4=BD=BF=E7=94=A8=E5=90=9B=E6=9B=B9=E6=93=8D?= =?UTF-8?q?=E5=92=8C=E5=90=9B=E5=AD=99=E6=9D=83=E6=8A=80=E8=83=BD=E7=9A=84?= =?UTF-8?q?=E8=AF=AD=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mode/guozhan.js | 52 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/mode/guozhan.js b/mode/guozhan.js index da53003c0..479eae002 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -1023,12 +1023,10 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }, fakeduoshi: { audio: "duoshi", - audioname2: { gz_jun_sunquan: "jiahe_duoshi" }, global: "fakeduoshi_global", subSkill: { global: { audio: "duoshi", - audioname2: { gz_jun_sunquan: "jiahe_duoshi" }, forceaudio: true, enable: "chooseToUse", filter(event, player) { @@ -15783,6 +15781,22 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { player.addTempSkill(link, "jiananUpdate"); player.addTempSkill("jianan_eff", "jiananUpdate"); game.log(player, "获得了技能", "#g【" + get.translation(result.control) + "】"); + + // 语音修复 + var map = { + new_retuxi: "jianan_tuxi", + qiaobian: "jianan_qiaobian", + fakexiaoguo: "jianan_xiaoguo", + gzjieyue: "jianan_jieyue", + new_duanliang: "jianan_duanliang" + }; + var mapSkills = map[link]; + game.broadcastAll(function () { + var info = lib.skill[link]; + if (!info.audioname2) info.audioname2 = {}; + info.audioname2[player.name1] = mapSkills; + info.audioname2[player.name2] = mapSkills; + }, link); }, }, jianan_eff: { @@ -19112,10 +19126,10 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { event.num = zhu.getExpansions("yuanjiangfenghuotu").length; "step 1"; var list = []; - if (event.num >= 1 && !player.hasSkill("jiahe_reyingzi")) list.push("reyingzi"); - if (event.num >= 2 && !player.hasSkill("jiahe_haoshi")) list.push("haoshi"); - if (event.num >= 3 && !player.hasSkill("jiahe_shelie")) list.push("shelie"); - if (event.num >= 4 && !player.hasSkill("jiahe_duoshi")) list.push("fakeduoshi"); + if (event.num >= 1 && !(player.hasSkill("reyingzi") || player.hasSkill("jiahe_reyingzi"))) list.push("reyingzi"); + if (event.num >= 2 && !(player.hasSkill("haoshi") || player.hasSkill("jiahe_haoshi"))) list.push("haoshi"); + if (event.num >= 3 && !(player.hasSkill("shelie") || player.hasSkill("jiahe_shelie"))) list.push("shelie"); + if (event.num >= 4 && !player.hasSkill("fakeduoshi")) list.push("fakeduoshi"); if (!list.length) { event.finish(); return; @@ -19157,8 +19171,30 @@ game.import("mode", function (lib, game, ui, get, ai, _status) { }); "step 2"; if (result.control != "cancel2") { - var skill = (result.control != "fakeduoshi" ? "jiahe_" : "") + result.control; - player.addTempSkills(skill); + var map = { + reyingzi: "jiahe_reyingzi", + haoshi: "jiahe_haoshi", + shelie: "jiahe_shelie", + fakeduoshi: "fakeduoshi" + }; + var skills = map[result.control]; + player.addTempSkills(skills); + + // 语音修复 + if (skills == "fakeduoshi") { + var mapSkills = "jiahe_duoshi"; + game.broadcastAll(function () { + var info = lib.skill[skills]; + if (!info.audioname2) info.audioname2 = {}; + info.audioname2[player.name1] = mapSkills; + info.audioname2[player.name2] = mapSkills; + var subSkillInfo = info.subSkill.global; + if (!subSkillInfo.audioname2) subSkillInfo.audioname2 = {}; + subSkillInfo.audioname2[player.name1] = mapSkills; + subSkillInfo.audioname2[player.name2] = mapSkills; + }, skills); + } + if (!event.done) player.logSkill("jiahe_put"); // game.log(player,'获得了技能','【'+get.translation(skill)+'】'); if (event.num >= 5 && !event.done) {