"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeepwaterClan = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const stats_1 = require("../../../simulation/stats");
const utils_1 = require("../../../utils");
exports.DeepwaterClan = {
    cardIds: ["BG35_149", "BG35_149_G"],
    castTavernSpell: (spellCardId, input) => {
        var _a;
        const mult = spellCardId === "BG35_149_G" ? 2 : 1;
        const target = (_a = input.target) !== null && _a !== void 0 ? _a : input.board.find((e) => e.health > 0 && !e.definitelyDead);
        if (target) {
            (0, stats_1.modifyStats)(target, input.source, 2 * mult, 2 * mult, input.board, input.hero, input.gameState);
        }
        for (const entity of input.board) {
            if (entity.health <= 0 || entity.definitelyDead)
                continue;
            if ((0, utils_1.hasCorrectTribe)(entity, input.hero, reference_data_1.Race.MURLOC, input.gameState.anomalies, input.gameState.allCards)) {
                (0, stats_1.modifyStats)(entity, input.source, 2 * mult, 2 * mult, input.board, input.hero, input.gameState);
            }
        }
    },
};
//# sourceMappingURL=deepwater-clan.js.map