修复国战【慈威】

This commit is contained in:
157 2024-04-28 16:36:56 +08:00
parent 94511b2b86
commit 3b58eb7846
1 changed files with 7 additions and 4 deletions

View File

@ -5045,10 +5045,13 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
async content(event, trigger, player) { async content(event, trigger, player) {
trigger.targets.length = 0; trigger.targets.length = 0;
trigger.all_excluded = true; trigger.all_excluded = true;
if (get.type(trigger.card) == "equip" && !get.owner(trigger.card)) { const cards = trigger.cards.filter(i => !get.owner(i));
await player.gain(trigger.card, "gain2"); if (cards.length && get.type(trigger.card) == "equip") {
if (get.owner(trigger.card) == player && player.hasUseTarget(trigger.card)) { await player.gain(cards, "gain2");
await player.chooseUseTarget(trigger.card); for (let i of cards) {
if (get.owner(i) == player && player.hasUseTarget(i)) {
await player.chooseUseTarget(i);
}
} }
} }
}, },