用当前技能代替”此武将牌“

This commit is contained in:
157 2024-05-05 17:09:49 +08:00
parent 95c6a4d167
commit 2ec1162731
1 changed files with 26 additions and 13 deletions

View File

@ -6439,8 +6439,8 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
.set("prompt", "近谀:请暗置一张武将牌") .set("prompt", "近谀:请暗置一张武将牌")
.set("ai", function () { .set("ai", function () {
var target = _status.event.player; var target = _status.event.player;
if (target.name == "gz_pengyang") return "主将"; if (get.character(target.name, 3).includes("gzjinyu")) return "主将";
if (target.name2 == "gz_pengyang") return "副将"; if (get.character(target.name2, 3).includes("gzjinyu")) return "副将";
if ( if (
lib.character[target.name][3].some((skill) => { lib.character[target.name][3].some((skill) => {
var info = get.info(skill); var info = get.info(skill);
@ -7528,7 +7528,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
trigger: { player: "showCharacterAfter" }, trigger: { player: "showCharacterAfter" },
forced: true, forced: true,
filter: function (event, player) { filter: function (event, player) {
return event.toShow.includes("gz_xf_huangquan") && !player.storage.gzdianhu_effect; return event.toShow.some(name => {
return get.character(name, 3).includes("gzdianhu");
}) && !player.storage.gzdianhu_effect;
}, },
content: function () { content: function () {
"step 0"; "step 0";
@ -8645,7 +8647,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
audio: "xuanbei", audio: "xuanbei",
trigger: { player: "showCharacterAfter" }, trigger: { player: "showCharacterAfter" },
filter: function (event, player) { filter: function (event, player) {
return !player.storage.gzxuanbei && event.toShow.includes("gz_yangyan"); return !player.storage.gzxuanbei && event.toShow.some(name => {
return get.character(name, 3).includes("gzxuanbei");
});
}, },
forced: true, forced: true,
locked: false, locked: false,
@ -9565,7 +9569,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
trigger: { player: "showCharacterAfter" }, trigger: { player: "showCharacterAfter" },
forced: true, forced: true,
filter: function (event, player) { filter: function (event, player) {
return event.toShow.includes("gz_liaohua") && !player.storage.gzdangxian_draw; return event.toShow.some(name => {
return get.character(name, 3).includes("gzdangxian");
}) && !player.storage.gzdangxian_draw;
}, },
content: function () { content: function () {
player.storage.gzdangxian_draw = true; player.storage.gzdangxian_draw = true;
@ -13038,7 +13044,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
}, },
content: function () { content: function () {
trigger.cancel(); trigger.cancel();
player.removeCharacter(player.name1 == "gz_yanbaihu" ? 0 : 1); player.removeCharacter(get.character(player.name1, 3).includes("gzyjili") ? 0 : 1);
}, },
}, },
}, },
@ -14721,7 +14727,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
}, },
forced: true, forced: true,
filter: function (event, player) { filter: function (event, player) {
return event.toShow.includes("gz_zuoci") && !player.storage.yigui_init; return event.toShow.some(name => {
return get.character(name, 3).includes("yigui");
}) && !player.storage.yigui_init;
}, },
content: function () { content: function () {
player.storage.yigui_init = true; player.storage.yigui_init = true;
@ -16347,8 +16355,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
if (event.filterName(event.current.name2)) list.push("副将"); if (event.filterName(event.current.name2)) list.push("副将");
if (list.length > 1) if (list.length > 1)
event.current.chooseControl(["主将", "副将"]).set("ai", function () { event.current.chooseControl(["主将", "副将"]).set("ai", function () {
if (player.name1 == "gz_fazheng") return 0; let player = _status.event.player;
if (player.name2 == "gz_fazheng") return 1; if (get.character(player.name1, 3).includes("gzxuanhuo")) return 0;
if (get.character(player.name2, 3).includes("gzxuanhuo")) return 1;
return Math.random() > 0.5 ? 0 : 1; return Math.random() > 0.5 ? 0 : 1;
}).prompt = "选择并展示一张武将牌,然后执行军令"; }).prompt = "选择并展示一张武将牌,然后执行军令";
else event._result = { index: list[0] == "主将" ? 0 : 1 }; else event._result = { index: list[0] == "主将" ? 0 : 1 };
@ -17008,9 +17017,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
break; break;
} }
} }
if (event.target.name == "gz_zhoutai") { if (get.character(event.target.name, 3).includes("buqu")) {
choice = "主将"; choice = "主将";
} else if (event.target.name2 == "gz_zhoutai") { } else if (get.character(event.target.name2, 3).includes("buqu")) {
choice = "副将"; choice = "副将";
} }
player player
@ -20608,8 +20617,12 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
trigger: { player: ["showCharacterAfter", "removeCharacterBefore"] }, trigger: { player: ["showCharacterAfter", "removeCharacterBefore"] },
filter: function (event, player) { filter: function (event, player) {
if (event.name == "removeCharacter" || event.name == "changeVice") if (event.name == "removeCharacter" || event.name == "changeVice")
return event.toRemove == "gz_mifuren" && player.isDamaged(); return event.toRemove.some(name => {
return event.toShow.includes("gz_mifuren"); return get.character(name, 3).includes("gzguixiu");
}) && player.isDamaged();
return event.toShow.some(name => {
return get.character(name, 3).includes("gzguixiu");
});
}, },
content: function () { content: function () {
if (trigger.name == "showCharacter") { if (trigger.name == "showCharacter") {