daggerheart/module
George Brocklehurst 1e828547bb
Apply the first downtime move before picking the second one (#383)
* Downtime: allow moves to be taken individually.

Fixes https://github.com/Foundryborne/daggerheart/issues/374

Some downtime moves require a roll to see how successful they are. In these
cases, the player might want to see how their first move works out before
they select their next one.

This commit updates the downtime dialog to allow for this behaviour:

- The "Take Downtime" button is enabled whenever any moves are selected.
- Clicking the button only closes the dialog when all moves have been made.

To keep track of this, the `nrChoices` object has been expanded to include a
`taken` counter, which is increased whenever a move is taken.

After making one move the selection is reset, but the number of moves
displayed in the dialog header and the number of permitted selections both
take the number of taken moves into account.

* Fix heading in short rest chat message.

Prior to this commit the heading for a short rest chat message was "long
rest".

* Remove unused template context.

* Extract method for repeated calculation.

In the downtime dialog, we need to calculate the number of selected moves in
several places. This commit extracts a method to handle that, which reduces
repetition and hopefully makes the code more readable.
2025-07-20 12:40:11 +02:00
..
applications Apply the first downtime move before picking the second one (#383) 2025-07-20 12:40:11 +02:00
canvas [Feature/Fixes] Adversary Touchups (#359) 2025-07-16 15:17:34 -03:00
config Feature/336 damage targeted resources (#376) 2025-07-19 15:48:50 +02:00
data [Fix] Localization Misses (#381) 2025-07-20 04:15:26 +02:00
dice Feature/336 damage targeted resources (#376) 2025-07-19 15:48:50 +02:00
documents Feature/336 damage targeted resources (#376) 2025-07-19 15:48:50 +02:00
enrichers Language Organization (#281) 2025-07-06 17:43:12 +02:00
helpers Bug/103 enrich htmlfield content before its used in applications (#369) 2025-07-19 22:21:46 +02:00
systemRegistration Bug/103 enrich htmlfield content before its used in applications (#369) 2025-07-19 22:21:46 +02:00
_module.mjs File Structure Rework (#262) 2025-07-05 00:26:33 +02:00