"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BluegillFlippers = void 0;
const stats_1 = require("../../../simulation/stats");
const baseAttackBuff = 4;
const baseHealthBuff = 4;
exports.BluegillFlippers = {
    cardIds: ["BG32_MagicItem_893"],
    afterTavernSpellCast: (trinket, input) => {
        var _a, _b, _c, _d, _e, _f;
        if (input.source !== input.hero)
            return;
        const board = (_a = input.board) !== null && _a !== void 0 ? _a : [];
        if (board.length > 0) {
            const leftMost = board[0];
            if (leftMost) {
                (0, stats_1.modifyStats)(leftMost, trinket, baseAttackBuff, baseHealthBuff, input.board, input.hero, input.gameState);
            }
        }
        const hand = (_b = input.hero.hand) !== null && _b !== void 0 ? _b : [];
        if (hand.length > 0) {
            const leftMost = hand.filter((c) => !!c.maxHealth)[0];
            if (leftMost) {
                const refCard = input.gameState.allCards.getCard(leftMost.cardId);
                if ((refCard === null || refCard === void 0 ? void 0 : refCard.attack) != null) {
                    leftMost.attack = ((_d = (_c = leftMost.attack) !== null && _c !== void 0 ? _c : refCard.attack) !== null && _d !== void 0 ? _d : 0) + baseAttackBuff;
                    leftMost.health = ((_f = (_e = leftMost.health) !== null && _e !== void 0 ? _e : refCard.health) !== null && _f !== void 0 ? _f : 0) + baseHealthBuff;
                }
            }
        }
    },
};
//# sourceMappingURL=bluegill-flippers.js.map