"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CloudSerpentHorn = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const utils_1 = require("../../../services/utils");
const stats_1 = require("../../../simulation/stats");
const utils_2 = require("../../../utils");
exports.CloudSerpentHorn = {
    cardIds: ["BG35_MagicItem_849"],
    baseAvengeValue: () => 3,
    avenge: (_minion, input) => {
        const rightMost = input.board[input.board.length - 1];
        if (!rightMost)
            return;
        const attackToGive = rightMost.attack;
        const dragons = input.board.filter((e) => e !== rightMost &&
            e.health > 0 &&
            !e.definitelyDead &&
            (0, utils_2.hasCorrectTribe)(e, input.hero, reference_data_1.Race.DRAGON, input.gameState.anomalies, input.gameState.allCards));
        const target = (0, utils_1.pickRandom)(dragons);
        if (target) {
            (0, stats_1.modifyStats)(target, rightMost, attackToGive, 0, input.board, input.hero, input.gameState);
        }
    },
};
//# sourceMappingURL=cloud-serpent-horn.js.map