Skip to content

Commit

Permalink
Fix for bonus stress calculation when missing talent
Browse files Browse the repository at this point in the history
  • Loading branch information
qkmaxware committed May 24, 2021
1 parent a132467 commit fd6021c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TrekSharp.AdventureTools/Shared/LifepathWizard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
<WizardStage ValidatationFunction=hasUpbringing>
<Content>
<p>
Select an upbrining for your character. Upbrinings represent the potential values and skilles your character would have been experienced to while in their formative years. Your character may choose to embrace this upbrining or reject it.
Select an upbrining for your character. Upbrinings represent the potential values and skills your character would have been experienced to while in their formative years. Your character may choose to embrace this upbrining or reject it.
</p>
<ListSelect @ref=upbringingSelect Title="UPBRINGING" List=upbringings Filterable=true OnSelectionChanged=StateHasChanged>
<Info>
Expand Down
2 changes: 1 addition & 1 deletion TrekSharp/src/Character.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public int Determination {
set => _det = (value < 0 ? 0 : value);
}

public override int BonusStress => Talents.Select(talent => talent.StressModifier).Sum();
public override int BonusStress => Talents.Select(talent => talent?.StressModifier ?? 0).Sum();

}

Expand Down

0 comments on commit fd6021c

Please sign in to comment.