"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Malorne = void 0;
exports.Malorne = {
    cardIds: ["BG32_HERO_001_Buddy", "BG32_HERO_001_Buddy_G"],
    onSpawned: (minion, input) => {
        const mult = minion.cardId === "BG32_HERO_001_Buddy_G" ? 2 : 1;
        const totalGoldSpent = input.hero.globalInfo.GoldSpentThisGame;
        const baseBuff = Math.floor(totalGoldSpent / 3);
        if (input.applyAttackAuras) {
            minion.attack += baseBuff * mult;
        }
        if (input.applyHealthAuras) {
            minion.health += baseBuff * mult;
        }
    },
    onDespawned: (minion, input) => {
        const mult = minion.cardId === "BG32_HERO_001_Buddy_G" ? 2 : 1;
        const totalGoldSpent = input.hero.globalInfo.GoldSpentThisGame;
        const baseBuff = Math.floor(totalGoldSpent / 3);
        if (input.applyAttackAuras) {
            minion.attack = Math.max(0, minion.attack - baseBuff * mult);
        }
        if (input.applyHealthAuras) {
            minion.health = Math.max(1, minion.health - baseBuff * mult);
        }
    },
};
//# sourceMappingURL=malorne.js.map