"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bristlebach = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const blood_gems_1 = require("../../../simulation/blood-gems");
const utils_1 = require("../../../utils");
exports.Bristlebach = {
    cardIds: ["BG26_157", "BG26_157_G"],
    baseAvengeValue: () => 2,
    avenge: (avenger, input) => {
        var _a;
        const bristlebachMultiplier = avenger.cardId === "BG26_157_G" ? 4 : 2;
        const { board, hero, otherBoard, otherHero, gameState } = input;
        for (let i = 0; i < bristlebachMultiplier; i++) {
            for (const entity of board) {
                const isValidTarget = ((_a = hero.trinkets) === null || _a === void 0 ? void 0 : _a.some((t) => t.cardId === "BG32_MagicItem_274")) ||
                    (0, utils_1.hasCorrectTribe)(entity, hero, reference_data_1.Race.QUILBOAR, gameState.anomalies, gameState.allCards);
                if (isValidTarget) {
                    (0, blood_gems_1.playBloodGemsOn)(avenger, entity, 1, board, hero, otherBoard, otherHero, gameState);
                    gameState.spectator.registerPowerTarget(avenger, entity, board, hero, otherHero);
                }
            }
        }
    },
};
//# sourceMappingURL=bristlebach.js.map