"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NightbaneIgnited = void 0;
const utils_1 = require("../../../services/utils");
const stats_1 = require("../../../simulation/stats");
exports.NightbaneIgnited = {
    cardIds: ["BG29_815", "BG29_815_G"],
    deathrattleEffect: (deadEntity, input) => {
        const { boardWithDeadEntity, boardWithDeadEntityHero, gameState } = input;
        const nightbaneLoops = deadEntity.cardId === "BG29_815_G" ? 2 : 1;
        for (let j = 0; j < nightbaneLoops; j++) {
            const pickedTargetEntityIds = [];
            for (let k = 0; k < 2; k++) {
                const target = (0, utils_1.pickRandomAlive)(boardWithDeadEntity
                    .filter((e) => !["BG29_815", "BG29_815_G"].includes(e.cardId))
                    .filter((e) => !pickedTargetEntityIds.includes(e.entityId)));
                if (!!target) {
                    pickedTargetEntityIds.push(target.entityId);
                    (0, stats_1.modifyStats)(target, deadEntity, deadEntity.attack, 0, boardWithDeadEntity, boardWithDeadEntityHero, gameState);
                }
            }
        }
    },
};
//# sourceMappingURL=nightbane-ignited.js.map