"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SilentEnforcer = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const attack_1 = require("../../../simulation/attack");
const utils_1 = require("../../../utils");
exports.SilentEnforcer = {
    cardIds: ["BG33_156", "BG33_156_G"],
    deathrattleSpawn: (minion, input) => {
        const mult = minion.cardId === "BG33_156_G" ? 2 : 1;
        const friendlyMinionsAliveAtStart = input.boardWithDeadEntity.filter((e) => e.health > 0 && !e.definitelyDead);
        const opponentMinionsAliveAtStart = input.otherBoard.filter((e) => e.health > 0 && !e.definitelyDead);
        for (let i = 0; i < mult; i++) {
            const friendlyTargets = friendlyMinionsAliveAtStart.filter((e) => !(0, utils_1.hasCorrectTribe)(e, input.boardWithDeadEntityHero, reference_data_1.Race.DEMON, input.gameState.anomalies, input.gameState.allCards));
            input.gameState.spectator.registerPowerTargets(minion, friendlyTargets, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.otherBoardHero);
            (0, attack_1.dealDamageToMinions)(friendlyTargets, input.boardWithDeadEntity, input.boardWithDeadEntityHero, minion, 2, input.otherBoard, input.otherBoardHero, input.gameState);
            const enemyTargets = opponentMinionsAliveAtStart;
            input.gameState.spectator.registerPowerTargets(minion, enemyTargets, input.otherBoard, input.otherBoardHero, input.otherBoardHero);
            (0, attack_1.dealDamageToMinions)(enemyTargets, input.otherBoard, input.otherBoardHero, minion, 2, input.boardWithDeadEntity, input.boardWithDeadEntityHero, input.gameState);
        }
        return [];
    },
};
//# sourceMappingURL=silent-enforcer.js.map