Class: Upkeep

Upkeep()

new Upkeep()

Source:

Methods

CheckTimer()

Recalculate the interval and update the timer accordingly.
Source:

ComputeRates() → {boolean}

Source:
Returns:
- Whether this entity has at least one non-zero amount of resources to pay.
Type
boolean

GetInterval() → {number}

Source:
Returns:
- The interval between resource subtractions, in ms.
Type
number

GetRates() → {Object}

Source:
Returns:
- The upkeep rates in the form of { "resourceName": {number} }.
Type
Object

HandleInsufficientUpkeep()

E.g. take a hitpoint, reduce CP.
Source:

HandleSufficientUpkeep()

Reset to the previous stage.
Source:

Pay()

Try to subtract the needed resources. Data and lateness are unused.
Source: