import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class DamageHandler {
    private Properties config;

    public DamageHandler() {
        config = new Properties();
        try {
            config.load(new FileInputStream("game_config.ini"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public void applyDamage(Player player) {
        double armorLoss = Double.parseDouble(config.getProperty("ArmorDurabilityLoss"));
        double helmetLoss = Double.parseDouble(config.getProperty("HelmetDurabilityLoss"));
        double bodyDamageMultiplier = Double.parseDouble(config.getProperty("BodyDamageMultiplier"));

        player.setArmorDurability(player.getArmorDurability() - armorLoss);
        player.setHelmetDurability(player.getHelmetDurability() - helmetLoss);

        double bodyDamage = 100 * bodyDamageMultiplier;
        player.setBodyHealth(player.getBodyHealth() - bodyDamage);
    }

    public static void main(String[] args) {
        Player player = new Player(100, 100, 100);
        DamageHandler handler = new DamageHandler();
        handler.applyDamage(player);

        System.out.println("Armor Durability: " + player.getArmorDurability());
        System.out.println("Helmet Durability: " + player.getHelmetDurability());
        System.out.println("Body Health: " + player.getBodyHealth());
    }
}

class Player {
    private double armorDurability;
    private double helmetDurability;
    private double bodyHealth;

    public Player(double armorDurability, double helmetDurability, double bodyHealth) {
        this.armorDurability = armorDurability;
        this.helmetDurability = helmetDurability;
        this.bodyHealth = bodyHealth;
    }

    public double getArmorDurability() {
        return armorDurability;
    }

    public void setArmorDurability(double armorDurability) {
        this.armorDurability = armorDurability;
    }

    public double getHelmetDurability() {
        return helmetDurability;
    }

    public void setHelmetDurability(double helmetDurability) {
        this.helmetDurability = helmetDurability;
    }

    public double getBodyHealth() {
        return bodyHealth;
    }

    public void setBodyHealth(double bodyHealth) {
        this.bodyHealth = bodyHealth;
    }
}
