"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RovingSailor = void 0;
const utils_1 = require("../../../services/utils");
const stats_1 = require("../../../simulation/stats");
exports.RovingSailor = {
    cardIds: ["BG35_702", "BG35_702_G"],
    battlecry: (minion, input) => {
        var _a;
        const isG = minion.cardId === "BG35_702_G";
        const spellTurn = (_a = input.hero.globalInfo.TavernSpellsCastThisTurn) !== null && _a !== void 0 ? _a : 0;
        const applications = (isG ? 2 : 1) * (1 + spellTurn);
        const candidates = input.board.filter((e) => e.entityId !== minion.entityId);
        for (let i = 0; i < applications; i++) {
            const t = (0, utils_1.pickRandom)(candidates);
            if (t) {
                (0, stats_1.modifyStats)(t, minion, 2, 2, input.board, input.hero, input.gameState);
            }
        }
        return true;
    },
};
//# sourceMappingURL=roving-sailor.js.map