fix(combat): correct spell DC formula
This commit is contained in:
@@ -834,8 +834,11 @@ class CombatEngine:
|
||||
f"round {self._current_round} {caster.combatant.id}: "
|
||||
f"cast {spell_name} -> NO LINE OF EFFECT"
|
||||
)
|
||||
return
|
||||
dc = spell.base_dc + caster.combatant.level
|
||||
# DC = 10 + spell level + caster's casting ability modifier
|
||||
ability_name = caster.combatant.casting_ability.lower()
|
||||
ability_score = getattr(caster.combatant.abilities, f"{ability_name}_score")
|
||||
ability_mod = (ability_score - 10) // 2
|
||||
dc = 10 + spell.level + ability_mod
|
||||
save_result = (
|
||||
self.resolve_save(target, spell.save, dc) if spell.save != "none" else None
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user