"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SanlaynScribe = void 0;
const stats_1 = require("../../../simulation/stats");
const utils_1 = require("../../../utils");
exports.SanlaynScribe = {
    cardIds: ["BGDUO31_208", "BGDUO31_208_G"],
    onSpawned: (minion, input) => {
        const mult = minion.cardId === "BGDUO31_208" ? 1 : 2;
        const statsBonus = mult * input.hero.globalInfo.SanlaynScribesDeadThisGame;
        (0, stats_1.modifyStats)(minion, minion, input.applyAttackAuras ? 4 * statsBonus : 0, input.applyHealthAuras ? 4 * statsBonus : 0, input.board, input.hero, input.gameState);
    },
    onDeath: (minion, input) => {
        input.hero.globalInfo.SanlaynScribesDeadThisGame = input.hero.globalInfo.SanlaynScribesDeadThisGame + 1;
        input.board
            .filter((entity) => entity.cardId === "BGDUO31_208" ||
            entity.cardId === "BGDUO31_208_G")
            .forEach((entity) => {
            const mult = entity.cardId === "BGDUO31_208" ? 1 : 2;
            (0, stats_1.modifyStats)(entity, minion, 4 * mult, 4 * mult, input.board, input.hero, input.gameState);
        });
        (0, utils_1.getTeamInitialStates)(input.gameState.gameState, input.hero).forEach((team) => {
            team.board
                .filter((entity) => entity.cardId === "BGDUO31_208" ||
                entity.cardId === "BGDUO31_208_G")
                .forEach((entity) => {
                const mult = entity.cardId === "BGDUO31_208" ? 1 : 2;
                entity.attack += 4 * mult;
                entity.health += 4 * mult;
                entity.maxHealth += 4 * mult;
                entity.maxAttack += 4 * mult;
            });
        });
    },
};
//# sourceMappingURL=sanlayn-scribe.js.map