"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WildfeatherDuster = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const cards_in_hand_1 = require("../../../simulation/cards-in-hand");
const utils_1 = require("../../../utils");
exports.WildfeatherDuster = {
    cardIds: ["BG35_MagicItem_700"],
    afterOtherSpawned: (trinket, input) => {
        var _a;
        if (!(0, utils_1.hasCorrectTribe)(input.spawned, input.hero, reference_data_1.Race.BEAST, input.gameState.anomalies, input.gameState.allCards)) {
            return;
        }
        trinket.scriptDataNum1 = (trinket.scriptDataNum1 || 0) + 1;
        if (trinket.scriptDataNum1 >= 6) {
            trinket.scriptDataNum1 = 0;
            const tier = (_a = input.hero.tavernTier) !== null && _a !== void 0 ? _a : 6;
            const cardId = input.gameState.cardsData.getRandomMinionForTribe(reference_data_1.Race.BEAST, tier, []);
            if (cardId) {
                (0, cards_in_hand_1.addCardsInHand)(input.hero, input.board, [cardId], input.gameState);
            }
        }
    },
};
//# sourceMappingURL=wildfeather-duster.js.map