package com.openosrs.client.api.types;

public class CombatStateChange {
    private final boolean inCombat;
    private final NPC target;

    public CombatStateChange(boolean inCombat, NPC target) {
        this.inCombat = inCombat;
        this.target = target;
    }

    public boolean isInCombat() { return inCombat; }
    public NPC getTarget() { return target; }

    @Override
    public String toString() {
        return String.format("CombatStateChange: %s%s",
            inCombat ? "Entered combat" : "Exited combat",
            target != null ? " with " + target.getName() : "");
    }
}
