forked from public/foundryvtt-reve-de-dragon
Small cleanup
- extrait de méthode pour tirage dans un array - utilisation des operateur ?: / ??
This commit is contained in:
@ -59,4 +59,12 @@ export class Misc {
|
||||
}
|
||||
}
|
||||
|
||||
static rollOneOf(array) {
|
||||
return array[new Roll("1d" + array.length).evaluate().total - 1];
|
||||
}
|
||||
|
||||
static distinct(array) {
|
||||
return [...new Set(array)];
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user