"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BellowingTyrant = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const stats_1 = require("../../../simulation/stats");
const utils_1 = require("../../../utils");
const bellowingTyrantAttack = 4;
const bellowingTyrantHealth = 3;
exports.BellowingTyrant = {
    cardIds: ["BG31_361", "BG31_361_G"],
    onSpawned: (minion, input) => {
        input.hero.globalInfo.BeastsSummonedThisGame += 1;
        const mult = minion.cardId === "BG31_361_G" ? 2 : 1;
        const statsBonus = mult * input.hero.globalInfo.BeastsSummonedThisGame;
        (0, stats_1.modifyStats)(minion, minion, input.applyAttackAuras ? bellowingTyrantAttack * statsBonus : 0, input.applyHealthAuras ? bellowingTyrantHealth * statsBonus : 0, input.board, input.hero, input.gameState);
    },
    onDespawned: (minion, input) => {
        const mult = minion.cardId === "BG31_361_G" ? 2 : 1;
        if (input.applyAttackAuras) {
            minion.attack = Math.max(0, minion.attack - bellowingTyrantAttack * mult * input.hero.globalInfo.BeastsSummonedThisGame);
        }
        if (input.applyHealthAuras) {
            minion.health = Math.max(1, minion.health - bellowingTyrantHealth * mult * input.hero.globalInfo.BeastsSummonedThisGame);
        }
    },
    onOtherSpawned: (minion, input) => {
        if (!(0, utils_1.hasCorrectTribe)(input.spawned, input.hero, reference_data_1.Race.BEAST, input.gameState.anomalies, input.gameState.allCards)) {
            return;
        }
        input.hero.globalInfo.BeastsSummonedThisGame += 1;
        const mult = minion.cardId === "BG31_361_G" ? 2 : 1;
        const statsBonus = mult * 1;
        (0, stats_1.modifyStats)(minion, minion, bellowingTyrantAttack * statsBonus, bellowingTyrantHealth * statsBonus, input.board, input.hero, input.gameState);
    },
};
//# sourceMappingURL=bellowing-tyrant.js.map