Stats

From Arx Libertatis Wiki
Revision as of 14:47, 10 July 2012 by Ds (talk | contribs)
Jump to navigation Jump to search

Besides attributes and skills, the player has the following stats in Arx Fatalis. These cannot be directly modified by spending points when leveling up but instead are computed from the player level, attributes, skills, equipped items and active spells.

Health

Also known as "Life" in the source code.

raw_max_health = raw_constitution * (level + 2)
full_max_health = full_constitution * (level + 2)

Player health is never above full_max_health. If health drops to 0 the player dies - duh.


Mana

base_max_mana = raw_mental * (level + 1)
full_max_mana = full_mental * (level + 1);

Player mana is always in the range [0, full_max_mana].


Armor Class

base_armor_class = max(1, floor(base_defense / 10 - 1))

Equipped items can increase or decrease the armor class:

modabs_armor_class = ∑<item>[ modabs(<item>, armor_class) ]

Alternatively, equipped items can also add or remove a percentage of the armor class:

modrel(<item>, armor_class) = modpercent(<item>, armor_class) / 100
modrel_armor_class = ∑<item>[ modrel(<item>, armor_class) ] * ( base_armor_class + modabs_armor_class )

Armor/lower armor spells subtract/add one point per caster level to the armor class. Other spells don't modify the armor class directly.

modspell(armor_class, Armor,       <caster_level>) = 1 * <caster_level>
modspell(armor_class, Lower armor, <caster_level>) = -1 * <caster_level>
modspell(armor_class, <spell>,     <caster_level>) = 0
modspell_armor_class = ∑<spell>,<caster_level>[ modspell(armor_class, <spell>, <caster_level>) ]

TODO: Clarify caster_level!

The full armor class is calculated as:

full_armor_class = max(0, base_armor_class + modabs_armor_class + modrel_armor_class + modspell_armor_class + cheats)

TODO: Why use base_defense (via base_armor_class) and not full_defense for full_armor_class? (bug #322)


Magic Resistance

base_resist_magic = floor(raw_mental * 2 * (1 + base_casting / 200));

Equipped items can increase or decrease the magic resistance:

modabs_resist_magic = ∑<item>[ modabs(<item>, resist_magic) ]

Alternatively, equipped items can also add or remove a percentage of the magic resistance:

modrel(<item>, resist_magic) = modpercent(<item>, resist_magic) / 100
modrel_resist_magic = ∑<item>[ modrel(<item>, resist_magic) ] * ( base_resist_magic + modabs_resist_magic )

The full magic resistance is calculated as:

full_resist_magic = max(0, base_resist_magic + modabs_resist_magic + modrel_resist_magic + cheats)

TODO: Why use raw_mental and base_casting (via base_resist_magic) and not full_mental and full_casting for full_resist_magic? (bug #322)


Poison Resistance

base_resist_poison = floor(raw_constitution * 2 + (1 + full_defense / 4));

TODO: Why use full_defense and not base_defense for base_resist_poison?

Equipped items can increase or decrease the poison resistance:

modabs_resist_poison = ∑<item>[ modabs(<item>, resist_poison) ]

Alternatively, equipped items can also add or remove a percentage of the poison resistance:

modrel(<item>, resist_poison) = modpercent(<item>, resist_poison) / 100
modrel_resist_poison = ∑<item>[ modrel(<item>, resist_poison) ] * ( base_resist_poison + modabs_resist_poison )

The full magic resistance is calculated as:

full_resist_poison = max(0, base_resist_poison + modabs_resist_poison + modrel_resist_poison + cheats)

TODO: Why use raw_constitution (via base_resist_poison) and not full_constitution for full_resist_poison? (bug #322)