"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TwilightWatcher = void 0;
const reference_data_1 = require("@firestone-hs/reference-data");
const stats_1 = require("../../../simulation/stats");
const utils_1 = require("../../../utils");
exports.TwilightWatcher = {
    cardIds: ["BG33_245", "BG33_245_G"],
    onWheneverAnotherMinionAttacks: (minion, input) => {
        return process(minion, input);
    },
    rally: (minion, input) => {
        return process(minion, input);
    },
};
const process = (minion, input) => {
    if (!(0, utils_1.hasCorrectTribe)(input.attacker, input.attackingHero, reference_data_1.Race.DRAGON, input.gameState.anomalies, input.gameState.allCards)) {
        return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
    }
    const mult = minion.cardId === "BG33_245_G" ? 2 : 1;
    const candidates = input.attackingBoard.filter((e) => (0, utils_1.hasCorrectTribe)(e, input.attackingHero, reference_data_1.Race.DRAGON, input.gameState.anomalies, input.gameState.allCards));
    for (const target of candidates) {
        (0, stats_1.modifyStats)(target, input.attacker, 1 * mult, 3 * mult, input.attackingBoard, input.attackingHero, input.gameState);
    }
    return { dmgDoneByAttacker: 0, dmgDoneByDefender: 0 };
};
//# sourceMappingURL=twilight-watcher.js.map