Table of Contents

Class ClassSO

Namespace
ElectricDrill.AstraRpgFramework.Classes
Assembly
com.electricdrill.astra-rpg-framework.Runtime.dll

Represents a character class in the RPG system. It can be used to define how attributes and stats grow over levels.

[MovedFrom(true, "ElectricDrill.AstraRpgFramework.Classes", "com.electricdrill.astra-rpg-framework.Runtime", "Class")]
public class ClassSO : ScriptableObject, IHasStatSet, IHasAttributeSet, IEditorValidatable, ITaggable
Inheritance
object
ClassSO
Implements

Fields

_attributeSet

The set of attributes associated with this class.

[SerializeField]
protected AttributeSetSO _attributeSet

Field Value

AttributeSetSO

_maxHpGrowthFormula

The growth formula for the maximum HP. This is a baseline value that can be used to calculate the maximum HP of characters of this class at different levels.

[SerializeField]
protected GrowthFormulaSO _maxHpGrowthFormula

Field Value

GrowthFormulaSO

_statSet

The set of stats associated with this class.

[SerializeField]
protected StatSetSO _statSet

Field Value

StatSetSO

Properties

AttributeSet

Gets the AttributeSet for this class.

public virtual AttributeSetSO AttributeSet { get; }

Property Value

AttributeSetSO

StatSet

Gets the StatSet for this class.

public virtual StatSetSO StatSet { get; }

Property Value

StatSetSO

Tags

The tags associated with this object.

public GameTagSet Tags { get; }

Property Value

GameTagSet

Methods

GetAttributeAt(AttributeSO, int)

Calculates the value of a specific attribute at a given level.

public virtual long GetAttributeAt(AttributeSO attribute, int level)

Parameters

attribute AttributeSO

The attribute to calculate.

level int

The level to calculate the attribute value for.

Returns

long

The value of the attribute at the specified level.

GetMaxHpAt(int)

Calculates the maximum HP for a given level.

public long GetMaxHpAt(int level)

Parameters

level int

The level to calculate the max HP for.

Returns

long

The maximum HP at the specified level.

GetStatAt(StatSO, int)

Calculates the value of a specific stat at a given level.

public virtual long GetStatAt(StatSO stat, int level)

Parameters

stat StatSO

The stat to calculate.

level int

The level to calculate the stat value for.

Returns

long

The value of the stat at the specified level.

Exceptions

ArgumentException

Thrown when the growth formula for the stat is not set.