"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleAutomatonPortraitForPlayer = exports.AutomatonPortrait = void 0;
const deathrattle_spawns_1 = require("../../../simulation/deathrattle-spawns");
const spawns_1 = require("../../../simulation/spawns");
exports.AutomatonPortrait = {
    cardIds: ["BG30_MagicItem_303"],
    startOfCombatTiming: 'start-of-combat',
    startOfCombat: (trinket, input) => {
        trinket.scriptDataNum1 = 1;
        return { hasTriggered: true, shouldRecomputeCurrentAttacker: true };
    },
};
const handleAutomatonPortraitForPlayer = (trinket, playerBoard, playerEntity, opponentBoard, opponentEntity, gameState) => {
    if (playerBoard.length < 7 && trinket.scriptDataNum1 > 0) {
        const newMinions = (0, deathrattle_spawns_1.spawnEntities)("BG_TTN_401", 1, playerBoard, playerEntity, opponentBoard, opponentEntity, gameState, playerEntity.friendly, false);
        (0, spawns_1.performEntitySpawns)(newMinions, playerBoard, playerEntity, playerEntity, 0, opponentBoard, opponentEntity, gameState);
        trinket.scriptDataNum1 = 0;
    }
};
exports.handleAutomatonPortraitForPlayer = handleAutomatonPortraitForPlayer;
//# sourceMappingURL=automaton-portrait.js.map