"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BalefulIncense = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const reborn_1 = require("../../../keywords/reborn");
const utils_1 = require("../../../utils");
exports.BalefulIncense = {
    cardIds: ["BG32_MagicItem_360"],
    startOfCombat: (trinket, input) => {
        const undead = input.playerBoard.filter((e) => (0, utils_1.hasCorrectTribe)(e, input.playerEntity, reference_data_1.Race.UNDEAD, input.gameState.anomalies, input.gameState.allCards));
        const left = undead[0];
        if (!!left) {
            (0, reborn_1.updateReborn)(left, true, input.playerBoard, input.playerEntity, input.opponentEntity, input.gameState);
            if (undead.length > 1) {
                const right = undead[undead.length - 1];
                (0, reborn_1.updateReborn)(right, true, input.playerBoard, input.playerEntity, input.opponentEntity, input.gameState);
            }
        }
        return true;
    },
};
//# sourceMappingURL=baleful-incense.js.map