"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BloodboundEarrings = void 0;
const blood_gems_1 = require("../../../simulation/blood-gems");
exports.BloodboundEarrings = {
    cardIds: [
        "BG32_MagicItem_808",
        "BG32_MagicItem_808t",
    ],
    afterTavernSpellCast: (trinket, input) => {
        var _a;
        if (input.source !== input.hero)
            return;
        trinket.scriptDataNum1 = ((_a = trinket.scriptDataNum1) !== null && _a !== void 0 ? _a : 4) - 1;
        if (trinket.scriptDataNum1 <= 0) {
            trinket.scriptDataNum1 = 4;
            const isUpgraded = trinket.cardId === "BG32_MagicItem_808t";
            const gemsPerMinion = isUpgraded ? 2 : 1;
            for (const entity of input.board) {
                if (entity.health <= 0 || entity.definitelyDead)
                    continue;
                (0, blood_gems_1.playBloodGemsOn)(trinket, entity, gemsPerMinion, input.board, input.hero, input.otherBoard, input.otherHero, input.gameState);
            }
        }
    },
};
//# sourceMappingURL=bloodbound-earrings.js.map