public int modifyHP(int amount) {
        this.hp = Math.max(0, Math.min(this.maxHp, this.hp + amount));
        return this.hp;
    }