Commit 29ba409
Fix Ultrathink Triumph and Despair Calculation in Dice Results with Extensive Rule Tests (#18)
* fix(dice): correct counting of triumphs and despairs in dice results
The summing logic for dice results was updated to include triumphs in successes and despairs in failures. Additionally, dice face definitions for proficiency and challenge dice were corrected to not double count successes and failures with triumphs and despairs respectively. Corresponding tests were updated to reflect these changes.
Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
* test(triumph-despair-rules): add comprehensive tests for triumphs and despairs counting
Add a new test suite verifying the Star Wars RPG rule that triumphs count as successes and despairs count as failures. The tests cover rolled and automatic triumphs/despairs, their combination with regular successes/failures, net success/failure calculations, and ensure no double-counting occurs.
Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
---------
Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>1 parent 2153f11 commit 29ba409
File tree
4 files changed
+359
-6
lines changed- src
- tests
4 files changed
+359
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
| 219 | + | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
0 commit comments