"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TimewarpedMagnanimoose = void 0;
const utils_1 = require("../../../services/utils");
const deathrattle_spawns_1 = require("../../../simulation/deathrattle-spawns");
const utils_2 = require("../../../utils");
exports.TimewarpedMagnanimoose = {
    cardIds: ["BG34_Giant_619", "BG34_Giant_619_G"],
    deathrattleSpawn: (minion, input) => {
        var _a;
        const loops = minion.cardId === "BG34_Giant_619_G" ? 2 : 1;
        const spawned = [];
        for (let i = 0; i < loops; i++) {
            const randomMinion = (_a = (0, utils_1.pickRandom)(input.gameState.gameState.playerInitial.board)) !== null && _a !== void 0 ? _a : (0, utils_1.pickRandom)(input.gameState.gameState.opponentInitial.board);
            if (!randomMinion) {
                return [];
            }
            const clone = (0, utils_2.copyEntity)(randomMinion);
            spawned.push(...(0, deathrattle_spawns_1.simplifiedSpawnEntities)(clone.cardId, 1, input, clone));
        }
        return spawned;
    },
};
//# sourceMappingURL=timewarped-magnanimoose.js.map