package com.openosrs.client.api.types;

public class HealthInfo {
    private final int current;
    private final int max;
    private final double percentage;

    public HealthInfo(int current, int max) {
        this.current = current;
        this.max = max;
        this.percentage = max > 0 ? (double) current / max : 0.0;
    }

    public int getCurrent() { return current; }
    public int getMax() { return max; }
    public double getPercentage() { return percentage; }

    public boolean isLow() { return percentage < 0.3; }
    public boolean isCritical() { return percentage < 0.15; }

    @Override
    public String toString() {
        return String.format("Health: %d/%d (%.1f%%)", current, max, percentage * 100);
    }
}
