"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DramalocSticker = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const stats_1 = require("../../../simulation/stats");
const utils_1 = require("../../../utils");
exports.DramalocSticker = {
    cardIds: ["BG35_MagicItem_754"],
    startOfCombat: (trinket, input) => {
        var _a, _b;
        const hand = (_a = input.playerEntity.hand) !== null && _a !== void 0 ? _a : [];
        if (hand.length === 0) {
            return { hasTriggered: false, shouldRecomputeCurrentAttacker: false };
        }
        let highestAttack = 0;
        for (const card of hand) {
            const refCard = input.gameState.allCards.getCard(card.cardId);
            const attack = (_b = refCard === null || refCard === void 0 ? void 0 : refCard.attack) !== null && _b !== void 0 ? _b : 0;
            if (attack > highestAttack) {
                highestAttack = attack;
            }
        }
        if (highestAttack === 0) {
            return { hasTriggered: false, shouldRecomputeCurrentAttacker: false };
        }
        let triggered = false;
        for (const entity of input.playerBoard) {
            if ((0, utils_1.hasCorrectTribe)(entity, input.playerEntity, reference_data_1.Race.MURLOC, input.gameState.anomalies, input.gameState.allCards)) {
                (0, stats_1.modifyStats)(entity, trinket, highestAttack, 0, input.playerBoard, input.playerEntity, input.gameState);
                triggered = true;
            }
        }
        return { hasTriggered: triggered, shouldRecomputeCurrentAttacker: false };
    },
};
//# sourceMappingURL=dramaloc-sticker.js.map