Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StatFactory

Hierarchy

  • StatFactory

Implements

Index

Constructors

Accessors

Methods

Constructors

constructor

  • Parameters

    • host: IStatHost
    • type: Stat

      The Stat this factory is building

    • Default value value: number = 0

      The starting value of this stat. Defaults to 0

    Returns StatFactory

Accessors

stat

  • Returns Stat

value

  • get value(): number
  • Returns number

Methods

get

setBonus

  • setBonus(bonus: number): this
  • Sets the "bonus" for the stat. This changes the value that will be returned.

    Parameters

    • bonus: number

    Returns this

setChangeTimer

  • Sets the stat to change over time.

    Parameters

    • timer: number

      The number of turns that should pass before the stat should change.

    • Optional initializer: undefined | ((factory: StatChangeTimerFactory) => any)

    Returns this

setMax

  • setMax(max: number, canExceed?: undefined | true): this
  • Sets the max value this stat can be

    Parameters

    • max: number
    • Optional canExceed: undefined | true

    Returns this

setValue

  • setValue(value: number): this
  • Parameters

    • value: number

    Returns this

Generated using TypeDoc