"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArchaicScroll = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
exports.ArchaicScroll = {
    cardIds: ["BG32_MagicItem_930"],
    afterTavernSpellCast: (trinket, input) => {
        var _a, _b;
        trinket.scriptDataNum1 = ((_a = trinket.scriptDataNum1) !== null && _a !== void 0 ? _a : 6) - 1;
        if (trinket.scriptDataNum1 <= 0) {
            trinket.scriptDataNum1 = 6;
            const tier = (_b = input.hero.tavernTier) !== null && _b !== void 0 ? _b : 6;
            const cardId = input.gameState.cardsData.getRandomMinionForTribe(reference_data_1.Race.NAGA, tier, []);
            if (cardId) {
                (0, cards_in_hand_1.addCardsInHand)(input.hero, input.board, [cardId], input.gameState);
            }
        }
    },
};
//# sourceMappingURL=archaic-scroll.js.map