Class and Racial Level-Up Gains

The advance_level function calculates how much a character gains when leveling. These gains may depend on class and the character’s current stats. Races provide no direct bonuses, but their stat caps can influence the values used in the formulas.

Hit Points

Formula: con_app[CON].hitp + number_range(class_table[class].hp_min, class_table[class].hp_max)

Constitution contributes a fixed bonus from con_app. A class-specific random range is added to determine final HP gain.

Mana

Formula: number_range(2, (2 * INT + WIS) / 5)

If the class is flagged with fMana = false, the mana gain is halved. Wisdom and intelligence drive this gain.

Movement

Formula: number_range(1, (CON + DEX) / 6)

Movement gain is influenced by constitution and dexterity, scaled by one-sixth.

Practice Points

Formula: wis_app[WIS].practice

Practice points come directly from the wisdom application table.

Summary of Class and Race Influence

Gain Class Influence Race Influence
Hit Points Random range from hp_min-hp_max in class_table None
Mana Halved if fMana = false None
Movement None None
Practice Points None None

Races do not directly modify the gains above. However, they define maximum stats through pc_race_table, which can indirectly impact the gains by limiting the values returned from get_curr_stat().