From d781b069f54457c96443f6ca160c0397f9ae9ad1 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Wed, 5 Jun 2024 17:54:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=AF=9B=E7=8E=A0=E3=80=90=E7=A7=89?= =?UTF-8?q?=E6=B8=85=E3=80=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/mobile/skill.js | 107 ++++++++++++++++++---------------- character/mobile/translate.js | 2 +- 2 files changed, 59 insertions(+), 50 deletions(-) diff --git a/character/mobile/skill.js b/character/mobile/skill.js index 1d0faa786..04170494f 100644 --- a/character/mobile/skill.js +++ b/character/mobile/skill.js @@ -7091,38 +7091,46 @@ const skills = { bingqing: { audio: 2, trigger: { player: "useCardAfter" }, - direct: true, - filter: function (event, player) { - var suit = get.suit(event.card); + filter(event, player) { + const evt = event.getParent("phaseUse"); + if (!evt || !evt.player || evt.player != player) return false; + const suit = get.suit(event.card); if (!lib.suit.includes(suit)) return false; - var evt = event.getParent("phaseUse"); - if (!evt || player != evt.player) return false; - var list = [], - history = player.getHistory("useCard"); - if (history.length < 2) return false; - for (var i of history) { - if (i.getParent("phaseUse") != evt) continue; - var suit2 = get.suit(i.card); - if (!lib.suit.includes(suit2)) continue; - if (i != event && suit2 == suit) return false; - if (i.finished) list.add(suit2); - } - return list.length > 1 && list.length < 5; + if ( + player + .getHistory("useCard", evtx => { + return evtx.getParent("phaseUse") == evt && get.suit(evtx.card) == suit; + }) + .indexOf(event) != 0 + ) + return false; + return Array.from({ length: 3 }) + .map((_, i) => i + 2) + .includes( + player + .getHistory( + "useCard", + evtx => { + return evtx.getParent("phaseUse") == evt && lib.suit.includes(get.suit(evtx.card)); + }, + event + ) + .reduce((list, evtx) => list.add(get.suit(evtx.card)), []).length + ); }, - content: function () { - "step 0"; - var suit = get.suit(trigger.card); - var evt = event.getParent("phaseUse"); - var list = [], - history = player.getHistory("useCard"); - for (var i of history) { - if (i.getParent("phaseUse") != evt) continue; - var suit2 = get.suit(i.card); - if (!lib.suit.includes(suit2)) continue; - if (i.finished) list.add(suit2); - } - var prompt, filterTarget, ai; - switch (list.length) { + async cost(event, trigger, player) { + const evt = trigger.getParent("phaseUse"); + const num = player + .getHistory( + "useCard", + evtx => { + return evtx.getParent("phaseUse") == evt && lib.suit.includes(get.suit(evtx.card)); + }, + trigger + ) + .reduce((list, evtx) => list.add(get.suit(evtx.card)), []).length; + let prompt, filterTarget, ai; + switch (num) { case 2: prompt = "令一名角色摸两张牌"; filterTarget = function (card, player, target) { @@ -7144,7 +7152,7 @@ const skills = { }; ai = function (target) { var player = _status.event.player; - return get.effect(target, { name: "guohe_copy" }, player, player); + return get.effect(target, { name: "guohe" }, player, player); }; break; case 4: @@ -7158,29 +7166,30 @@ const skills = { }; break; default: - event.finish(); + event.result = { bool: false }; return; } - event.num = list.length; - player.chooseTarget(get.prompt("bingqing"), prompt, filterTarget).set("ai", ai); - "step 1"; - if (result.bool) { - var target = result.targets[0]; - player.logSkill("bingqing", target); - event.target = target; - event.goto(num); - } else event.finish(); - "step 2"; - target.draw(2); - event.finish(); - "step 3"; - player.discardPlayerCard(target, true, "hej"); - event.finish(); - "step 4"; - target.damage(); + let result = await player.chooseTarget(get.prompt("bingqing"), prompt, filterTarget).set("ai", ai).forResult(); + result.cost_data = num; + event.result = result; + }, + async content(event, trigger, player) { + const target = event.targets[0]; + switch (event.cost_data) { + case 2: + await target.draw(2); + break; + case 3: + await player.discardPlayerCard(target, true, "hej"); + break; + case 4: + await target.damage(); + break; + } }, }, yingfeng: { + audio: 2, trigger: { player: "phaseZhunbeiBegin" }, direct: true, content: function () { diff --git a/character/mobile/translate.js b/character/mobile/translate.js index ccc06fedd..89461bb75 100644 --- a/character/mobile/translate.js +++ b/character/mobile/translate.js @@ -541,7 +541,7 @@ const translates = { spqishe_info: "你可以将一张装备牌当做【酒】使用。你的手牌上限+X(X为你装备区内的牌数)。", sp_maojie: "毛玠", bingqing: "秉清", - bingqing_info: "当你于出牌阶段内使用的牌结算结束后,若你于本阶段内使用的所有已结算结束的其他牌与此牌花色均不相同,则你可根据X的值执行对应效果:为2,你令一名角色摸两张牌;为3,你弃置一名角色区域内的一张牌;为4,你对一名其他角色造成1点伤害。(X为你本阶段内使用过的已结算结束的牌中包含的花色数)", + bingqing_info: "当你于出牌阶段内使用的牌结算完毕后,若你于本阶段内此前使用的所有牌的花色与此牌花色均不相同,则你可根据X的值执行对应效果:为2,你令一名角色摸两张牌;为3,你弃置一名角色区域内的一张牌;为4,你对一名其他角色造成1点伤害。(X为你于本阶段内此前使用的所有牌包含的花色数+1)", yingfeng: "迎奉", yingfeng_info: "准备阶段,你可以令一名角色获得“奉”标记并移除场上所有其他的“奉”标记。有“奉”标记的角色使用牌没有距离限制。", xin_sunxiu: "手杀界孙休", From 39ab07253080e78aee36777f0e276265642b3247 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Wed, 5 Jun 2024 17:57:13 +0800 Subject: [PATCH 2/3] =?UTF-8?q?cost=E5=B1=9E=E6=80=A7=E6=B7=BB=E5=8A=A0ski?= =?UTF-8?q?ll=5Fpopup=EF=BC=8C=E4=B8=BAfalse=E5=88=99=E4=B8=8D=E8=BF=9B?= =?UTF-8?q?=E8=A1=8ClogSkill?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/library/element/content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noname/library/element/content.js b/noname/library/element/content.js index cae0033e3..42c90d99e 100644 --- a/noname/library/element/content.js +++ b/noname/library/element/content.js @@ -2725,7 +2725,7 @@ export const Content = { if (get.itemtype(targets) === "player") { targets = [targets]; } - if (info.popup != false && !info.direct) { + if (info.popup != false && !info.direct && !("skill_popup" in result && !Boolean(result["skill_popup"]))) { let popup_info = event.skill; if (typeof info.popup === "string") popup_info = [event.skill, info.popup]; if (info.logLine === false) player.logSkill(popup_info, false, info.line); From 615c6b6b470d63c8b650b285c1fd875f9e8d04c0 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Wed, 5 Jun 2024 18:35:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0OL=E4=B8=BA=E8=A3=B4?= =?UTF-8?q?=E7=A7=80=E6=89=93=E7=9A=84=E8=A1=A5=E4=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补丁× 注意事项√ --- character/sp/skill.js | 6 ++++++ character/sp/translate.js | 1 + 2 files changed, 7 insertions(+) diff --git a/character/sp/skill.js b/character/sp/skill.js index 4b27fa0b3..da7f27964 100644 --- a/character/sp/skill.js +++ b/character/sp/skill.js @@ -386,7 +386,13 @@ const skills = { trigger.increase("num"); }, countSkill(player) { + //飞扬跋扈,OL你无敌了 + const list = [ + ["feiyang", "飞扬"], + ["bahu", "跋扈"], + ]; return player.getSkills(null, false, false).filter(i => { + if (list.some(text => i.includes(text[0]) && get.translation(i) == text[1])) return true; const info = get.info(i); return !info || !info.charlotte; }).length; diff --git a/character/sp/translate.js b/character/sp/translate.js index 29c3cf9a6..daabe4292 100644 --- a/character/sp/translate.js +++ b/character/sp/translate.js @@ -1255,6 +1255,7 @@ const translates = { olmaozhu_info: "锁定技。①你的手牌上限和使用【杀】的额定次数+X(X为你拥有的技能数)。②当你于出牌阶段首次对技能数小于你的角色造成伤害时,此伤害+1。", oljinlan: "尽览", oljinlan_info: "出牌阶段限一次,你可以将手牌数摸至Y张(Y为场上技能数最多的角色的技能数)。", + oljinlan_append: '
  • 补丁×注意事项:
    〖飞扬〗〖跋扈〗计入〖茂著〗〖尽览〗的技能数计算', caimao: "蔡瑁", olzuolian: "佐练", olzuolian_tag: "展示牌",