"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShipJumper = void 0;
const deathrattle_spawns_1 = require("../../../simulation/deathrattle-spawns");
const spawns_1 = require("../../../simulation/spawns");
exports.ShipJumper = {
    cardIds: ["BG35_700", "BG35_700_G"],
    rally: (minion, input) => {
        if (!input.defendingEntity) {
            return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
        }
        const spawnInput = {
            boardWithDeadEntity: input.attackingBoard,
            boardWithDeadEntityHero: input.attackingHero,
            gameState: input.gameState,
            deadEntity: input.attacker,
            otherBoard: input.defendingBoard,
            otherBoardHero: input.defendingHero,
        };
        const golden = minion.cardId === "BG35_700_G";
        const spawnCardId = golden
            ? "TB_BaconUps_141t"
            : "BGS_061t";
        const spawns = (0, deathrattle_spawns_1.simplifiedSpawnEntities)(spawnCardId, 1, spawnInput);
        spawns.forEach((s) => {
            const bonusAtk = golden ? 2 * minion.attack : minion.attack;
            s.attack = s.attack + bonusAtk;
            s.maxAttack = s.attack;
            s.attackImmediately = true;
        });
        const spawned = (0, spawns_1.performEntitySpawns)(spawns, spawnInput.boardWithDeadEntity, spawnInput.boardWithDeadEntityHero, minion, input.attackingBoard.length - input.attackingBoard.indexOf(input.attacker) - 1, spawnInput.otherBoard, spawnInput.otherBoardHero, spawnInput.gameState, true, input.defendingEntity);
        spawned.forEach((e) => {
            e.hasAttacked = undefined;
        });
        return {
            dmgDoneByAttacker: 0,
            dmgDoneByDefender: 0,
        };
    },
};
//# sourceMappingURL=ship-jumper.js.map