#include <iostream>
#include <string>
#include <unordered_map>
#include <limits>

class DamageCompensator {
private:
    std::unordered_map<std::string, float> baseDamage = {
        {"M416", 41.0f},
        {"AKM", 47.0f},
        {"SCAR-L", 41.0f},
        {"P90", 25.0f},
        {"Vector", 31.0f},
        {"AUG", 41.0f},
        {"MG3", 40.0f}
    };

    float maxDamage = std::numeric_limits<float>::max();

public:
    void applyMaxDamage(const std::string& weapon) {
        if (baseDamage.find(weapon) != baseDamage.end()) {
            std::cout << "原始伤害: " << baseDamage[weapon] << std::endl;
            baseDamage[weapon] = maxDamage;
            std::cout << "应用伤害补偿后，" << weapon << " 的伤害已设置为最大值。" << std::endl;
        } else {
            std::cout << "未找到武器: " << weapon << std::endl;
        }
    }

    void printDamage(const std::string& weapon) {
        if (baseDamage.find(weapon) != baseDamage.end()) {
            std::cout << weapon << " 当前伤害: " << baseDamage[weapon] << std::endl;
        } else {
            std::cout << "未找到武器: " << weapon << std::endl;
        }
    }
};

int main() {
    DamageCompensator compensator;

    std::string weapon = "M416";
    compensator.printDamage(weapon);
    compensator.applyMaxDamage(weapon);
    compensator.printDamage(weapon);

    return 0;
}
