fix(combat): apply save negates to targeted spell damage effects
This commit is contained in:
@@ -35,7 +35,8 @@ SaveType = Literal["fort", "ref", "will", "none"]
|
||||
class DamageEffect:
|
||||
formula: DiceExpr
|
||||
types: tuple[str, ...]
|
||||
half_on_save: bool = True
|
||||
# False = save negates (targeted); True = half damage on save (ray/line/cone/AoE)
|
||||
half_on_save: bool = False
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -216,7 +217,7 @@ def _parse_effect(data: Json) -> SpellEffect:
|
||||
return DamageEffect(
|
||||
formula=parse_dice(_as_str(effect["formula"])),
|
||||
types=tuple(_as_str(t) for t in _as_list(effect["types"])),
|
||||
half_on_save=bool(effect.get("half_on_save", True)),
|
||||
half_on_save=bool(effect.get("half_on_save", False)),
|
||||
)
|
||||
if effect_type == "condition":
|
||||
return ConditionEffect(
|
||||
|
||||
Reference in New Issue
Block a user