1
0
Fork 0
mirror of https://github.com/em-squared/5e-drs.git synced 2025-10-30 13:14:20 +00:00

calculateur de rencontres

This commit is contained in:
Maxime Moraine 2021-02-15 12:17:44 +01:00
parent 82fc936b2d
commit 07b671b99d
10 changed files with 391 additions and 41 deletions

View file

@ -1,4 +1,5 @@
import {stats} from '../../data/stats'
import {CHALLENGES} from '../../data/monsters'
// Calcul du modificateur de caractéristique
export function getModifier (score) {
@ -68,3 +69,12 @@ export function displayMonsterTypeSizeAlignment (monster, hideAlignment = false,
}
return result
}
// Retourne le nombre de points de combat pour un indice de dangerosité
export function getPCbyChallenge(challenge) {
let challengeIndex = CHALLENGES.findIndex(item => item.value == challenge)
if (challengeIndex > -1) {
return CHALLENGES[challengeIndex].pc
}
return false
}