"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProtectiveRing = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const divine_shield_1 = require("../../../keywords/divine-shield");
const utils_1 = require("../../../services/utils");
const utils_2 = require("../../../utils");
exports.ProtectiveRing = {
    cardIds: ["BG35_MagicItem_711"],
    startOfCombat: (trinket, input) => {
        const pirates = input.playerBoard.filter((e) => (0, utils_2.hasCorrectTribe)(e, input.playerEntity, reference_data_1.Race.PIRATE, input.gameState.anomalies, input.gameState.allCards));
        const targets = (0, utils_1.pickMultipleRandomAlive)(pirates, 3);
        for (const target of targets) {
            (0, divine_shield_1.updateDivineShield)(target, input.playerBoard, input.playerEntity, input.opponentEntity, true, input.gameState);
        }
        return { hasTriggered: true, shouldRecomputeCurrentAttacker: false };
    },
};
//# sourceMappingURL=protective-ring.js.map