"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.JarOGems = 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.JarOGems = {
    cardIds: ["BG30_MagicItem_546"],
    defaultScriptDataNum: (cardId) => 2,
    afterAnotherMinionAttacks: (trinket, input) => {
        const t = trinket;
        t.scriptDataNum1--;
        if (t.scriptDataNum1 <= 0) {
            for (const entity of input.attackingBoard.filter((e) => (0, utils_1.hasCorrectTribe)(e, input.attackingHero, reference_data_1.Race.QUILBOAR, input.gameState.anomalies, input.gameState.allCards))) {
                (0, blood_gems_1.playBloodGemsOn)(t, entity, 1, input.attackingBoard, input.attackingHero, input.defendingBoard, input.defendingHero, input.gameState);
                input.gameState.spectator.registerPowerTarget(t, entity, input.attackingBoard, input.attackingHero, input.attackingHero);
            }
            t.scriptDataNum1 = input.gameState.cardsData.defaultScriptDataNum(t.cardId);
        }
        return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
    },
};
//# sourceMappingURL=jar-o-gems.js.map