Support signed power point affixes

This commit is contained in:
2026-03-15 13:30:16 +01:00
parent 1c03ca4586
commit cc6df978ef
6 changed files with 158 additions and 47 deletions

View File

@@ -3,6 +3,7 @@
@using System.Diagnostics.CodeAnalysis
@using RolemasterDb.App.Domain
@using RolemasterDb.App.Features
@using PowerPointModifierNotation = RolemasterDb.CriticalParsing.PowerPointModifierNotation
@if (EffectiveEffects.Count > 0)
{
@@ -61,7 +62,7 @@
CriticalEffectCodes.DirectHits => $"+{effect.ValueInteger?.ToString() ?? string.Empty}",
CriticalEffectCodes.FoePenalty
or CriticalEffectCodes.AttackerBonusNextRound => effect.Modifier?.ToString() ?? string.Empty,
CriticalEffectCodes.PowerPointModifier => effect.ValueExpression ?? string.Empty,
CriticalEffectCodes.PowerPointModifier => PowerPointModifierNotation.FormatSignedExpression(effect.ValueExpression) ?? string.Empty,
_ => effect.ValueInteger?.ToString()
?? effect.Modifier?.ToString()
?? effect.ValueExpression