Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
468 B
1
Indexable
Never
import Race from './Race';

class Halfling extends Race {
  private _maxLifePoints: number;

  private static _halflingInstances = 0;

  constructor(name: string, dexterity: number) {
    super(name, dexterity);
    this._maxLifePoints = 60;
    Halfling._halflingInstances += 1;
  }

  get maxLifePoints(): number {
    return this._maxLifePoints;
  }

  static createdRacesInstances(): number {
    return Halfling._halflingInstances;
  }
}

export default Halfling;
Leave a Comment