heal(amount) {
    const revisedAmount =
      this.health + amount > this.maxHealth
        ? this.maxHealth - this.health
        : amount;
    this.health += revisedAmount;
    this.log(`receives ${amount} health, up to ${this.health} health`);
  }
/**
   * Adds the given amount of health in HP.
   *
   * @param {number} amount The amount of HP to add.
   */
Adds the given amount of health in HP.
@param {number} amount The amount of HP to add.
Adds the given amount of health in HP . @param { number } amount The amount of HP to add .
heal(amount) {
    const revisedAmount =
      this.health + amount > this.maxHealth
        ? this.maxHealth - this.health
        : amount;
    this.health += revisedAmount;
    this.log(`receives ${amount} health, up to ${this.health} health`);
  }
heal ( amount ) { const revisedAmount = this . health + amount > this . maxHealth ? this . maxHealth - this . health : amount ; this . health += revisedAmount ; this . log ( ` ${ amount } ${ this . health } ` ) ; }
Adds the given amount of health in HP.
Adds the given amount of health in HP .