Table of Contents

Class Class

Namespace
ElectricDrill.SoapRpgFramework.Classes
Assembly
com.electricdrill.soap-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.

public class Class : ScriptableObject, IHasStatSet, IHasAttributeSet
Inheritance
object
Class
Implements

Fields

_attributeSet

The set of attributes associated with this class.

[SerializeField]
protected AttributeSet _attributeSet

Field Value

AttributeSet

_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 GrowthFormula _maxHpGrowthFormula

Field Value

GrowthFormula

_statSet

The set of stats associated with this class.

[SerializeField]
protected StatSet _statSet

Field Value

StatSet

Properties

AttributeSet

Gets the AttributeSet for this class.

public virtual AttributeSet AttributeSet { get; }

Property Value

AttributeSet

StatSet

Gets the StatSet for this class.

public virtual StatSet StatSet { get; }

Property Value

StatSet

Methods

GetAttributeAt(Attribute, int)

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

public virtual long GetAttributeAt(Attribute attribute, int level)

Parameters

attribute Attribute

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(Stat, int)

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

public virtual long GetStatAt(Stat stat, int level)

Parameters

stat Stat

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.