"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TimewarpedRadioStar = void 0;
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
const utils_1 = require("../../../utils");
exports.TimewarpedRadioStar = {
    cardIds: ["BG34_Giant_330", "BG34_Giant_330_G"],
    deathrattleSpawn: (minion, input) => {
        const isMinionDead = minion.definitelyDead || minion.health <= 0;
        if (!isMinionDead || !minion.lastAffectedByEntity) {
            return [];
        }
        const mult = minion.cardId === "BG34_Giant_330_G" ? 2 : 1;
        const clone = (0, utils_1.copyEntity)(minion.lastAffectedByEntity);
        clone.health = clone.maxHealth;
        const radioEntities = Array.from({ length: mult }).map(() => ({
            ...clone,
            entityId: input.gameState.sharedState.currentEntityId++,
        }));
        (0, cards_in_hand_1.addCardsInHand)(input.boardWithDeadEntityHero, input.boardWithDeadEntity, radioEntities, input.gameState);
        return [];
    },
};
//# sourceMappingURL=timewarped-radio-star.js.map