"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RingBearer = void 0;
const cast_tavern_spell_1 = require("../../../mechanics/cast-tavern-spell");
const tickRingBearer = (ringBearer, input) => {
    var _a;
    ringBearer.scriptDataNum1 = ((_a = ringBearer.scriptDataNum1) !== null && _a !== void 0 ? _a : 0) + 1;
    const ringMult = ringBearer.cardId === "BG34_921_G" ? 2 : 1;
    while (ringBearer.scriptDataNum1 >= 2) {
        ringBearer.scriptDataNum1 -= 2;
        for (let i = 0; i < ringMult; i++) {
            (0, cast_tavern_spell_1.castTavernSpell)("BG28_168", {
                spellCardId: "BG28_168",
                source: input.attackingHero,
                target: null,
                board: input.attackingBoard,
                hero: input.attackingHero,
                otherBoard: input.defendingBoard,
                otherHero: input.defendingHero,
                gameState: input.gameState,
            });
        }
    }
    return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
};
exports.RingBearer = {
    cardIds: ["BG34_921", "BG34_921_G"],
    onWheneverAnotherMinionAttacks: (minion, input) => tickRingBearer(minion, input),
    rally: (minion, input) => tickRingBearer(minion, input),
};
//# sourceMappingURL=ring-bearer.js.map