"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EarthsongShaman = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const blood_gems_1 = require("../../../simulation/blood-gems");
const cards_data_1 = require("../../cards-data");
exports.EarthsongShaman = {
    cardIds: ["BG35_431", "BG35_431_G"],
    endOfTurn: (minion, input) => {
        const isG = minion.cardId === "BG35_431_G";
        let bonusKw = 0;
        for (const kw of cards_data_1.validBonusKeywords) {
            if (kw === reference_data_1.GameTag.POISONOUS) {
                continue;
            }
            if ((0, cards_data_1.hasKeyword)(minion, kw)) {
                bonusKw++;
            }
        }
        const rounds = 1 + bonusKw;
        const gemsPerBoardMinion = isG ? 2 : 1;
        for (let r = 0; r < rounds; r++) {
            for (const e of input.board) {
                (0, blood_gems_1.playBloodGemsOn)(minion, e, gemsPerBoardMinion, input.board, input.hero, input.otherBoard, input.otherHero, input.gameState);
            }
        }
        return true;
    },
};
//# sourceMappingURL=earthsong-shaman.js.map