Options
All
  • Public
  • Public/Protected
  • All
Menu

Creates a player with the given parameters or the default parameters.

Hierarchy

  • Player

Index

Constructors

  • new Player(name?: string, health?: number, stamina?: number, mana?: number, equipment?: Equipment): Player

Properties

equipment: Equipment

Determines what equipment the player has.

see

Equipment class for more details.

health: number

Determines how much health the player has.

mana: number

Determines how much mana the player has.

name: string

Determines the name of the player.

stamina: number

Determines how much stamina the player has.

Accessors

  • get getDamage(): number
  • get getDefense(): number
  • get getHealth(): number
  • get getMana(): number
  • get getStamina(): number

Methods

  • injure(amount: number): Player
  • Damages the player by taking the original damage and decrease it by the defense to a minimum of 0 damage.

    Parameters

    • amount: number

      The amount to damage the player for.

    Returns Player

Generated using TypeDoc