"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RylakPortrait = void 0;
const deathrattle_orchestration_1 = require("../../../simulation/deathrattle-orchestration");
const rylak_metalhead_1 = require("../minion/rylak-metalhead");
exports.RylakPortrait = {
    cardIds: ["BG35_MagicItem_834"],
    startOfCombat: (trinket, input) => {
        const targets = input.playerBoard.filter((e) => rylak_metalhead_1.RylakMetalhead.cardIds.includes(e.cardId));
        for (const target of targets) {
            input.gameState.spectator.registerPowerTarget(trinket, target, input.playerBoard, input.playerEntity, input.opponentEntity);
            const indexFromRight = input.playerBoard.length - (input.playerBoard.indexOf(target) + 1);
            (0, deathrattle_orchestration_1.processDeathrattleForMinion)(target, indexFromRight, [target], input.playerEntity.friendly ? input.gameState.gameState.player : input.gameState.gameState.opponent, input.playerEntity.friendly ? input.gameState.gameState.opponent : input.gameState.gameState.player, input.gameState, false);
        }
        return true;
    },
};
//# sourceMappingURL=rylak-portrait.js.map