mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-06 21:01:26 +02:00
Merge pull request #106 from dwoos/no-dex-penalty
Add a field to armor to ignore dexterity
This commit is contained in:
@@ -195,10 +195,11 @@ class ArmorClass:
|
||||
armor = actor.armor or NoArmor()
|
||||
ac = armor.base_armor_class
|
||||
# calculate and apply modifiers
|
||||
if armor.dexterity_mod_max is None:
|
||||
ac += actor.dexterity.modifier
|
||||
else:
|
||||
ac += min(actor.dexterity.modifier, armor.dexterity_mod_max)
|
||||
if armor.dexterity_applied:
|
||||
if armor.dexterity_mod_max is None:
|
||||
ac += actor.dexterity.modifier
|
||||
else:
|
||||
ac += min(actor.dexterity.modifier, armor.dexterity_mod_max)
|
||||
if actor.has_feature(NaturalArmor):
|
||||
ac = max(ac, 13 + actor.dexterity.modifier)
|
||||
shield = actor.shield or NoShield()
|
||||
|
||||
Reference in New Issue
Block a user