Loading...
Searching...
No Matches
AdventureCore.AttributeStat Class Referenceabstract

Detailed Description

base class for stats, stats are metrics that do not have a value themselfes
instead they are calculated using a base value and then incorporating attributes and modifiers
for example a defense stat that has a base value and increases with the characters strength attribute and armor equipment
how the final value is calculated is defined in the concrete implementations, modifiers are applied afterwards

https://adventure.softleitner.com/manual/attribute

Inheritance diagram for AdventureCore.AttributeStat:
AdventureCore.ConstantStat AdventureCore.MultipliedStat AdventureCore.TieredStat

Public Member Functions

int GetValue (AttributePool attributePool, int baseValue)
 calculate the stat value
 
IEnumerable< AttributeTypeGetContributors ()
 retrieves the attributes that contribute to the stats calculation
 

Member Function Documentation

◆ GetContributors()

IEnumerable< AttributeType > AdventureCore.AttributeStat.GetContributors ( )
abstract

retrieves the attributes that contribute to the stats calculation

Returns
any attributes used in this stats calculation

◆ GetValue()

int AdventureCore.AttributeStat.GetValue ( AttributePool attributePool,
int baseValue )
abstract

calculate the stat value

Parameters
attributePoolthe pool from which attribute values needed for the calculation can be retrieved
baseValuethe base value before the calculation
Returns
the calculated stat value