"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BackToBack = void 0;
const stats_1 = require("../../../simulation/stats");
exports.BackToBack = {
    cardIds: ["BG35_952"],
    castTavernSpell: (_spellCardId, input) => {
        var _a, _b;
        const target = (_a = input.target) !== null && _a !== void 0 ? _a : input.board.find((e) => e.health > 0 && !e.definitelyDead);
        if (!target)
            return;
        const previousCasts = (_b = input.hero.globalInfo.BackToBackCastThisGame) !== null && _b !== void 0 ? _b : 0;
        const repetitions = 1 + previousCasts;
        for (let i = 0; i < repetitions; i++) {
            (0, stats_1.modifyStats)(target, input.source, 4, 4, input.board, input.hero, input.gameState);
        }
        input.hero.globalInfo.BackToBackCastThisGame = previousCasts + 1;
    },
};
//# sourceMappingURL=back-to-back.js.map