mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 12:11:07 +01:00
Fixed so downtime actiosn can be used again
This commit is contained in:
parent
481ce46edf
commit
6ee02bb37b
7 changed files with 66 additions and 21 deletions
|
|
@ -178,10 +178,17 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
|
|||
}
|
||||
|
||||
static async takeDowntime() {
|
||||
const moves = Object.values(this.moveData).flatMap(category => {
|
||||
return Object.values(category.moves)
|
||||
.filter(x => x.selected)
|
||||
.flatMap(move => [...Array(move.selected).keys()].map(_ => move));
|
||||
const moves = Object.keys(this.moveData).flatMap(categoryKey => {
|
||||
const category = this.moveData[categoryKey];
|
||||
return Object.keys(category.moves)
|
||||
.filter(x => category.moves[x].selected)
|
||||
.flatMap(key => {
|
||||
const move = category.moves[key];
|
||||
return [...Array(move.selected).keys()].map(_ => ({
|
||||
...move,
|
||||
movePath: `${categoryKey}.moves.${key}`
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue