mirror of
https://github.com/em-squared/5e-drs.git
synced 2025-10-30 13:14:20 +00:00
optimisation mobile + filtres des monstres + seo
This commit is contained in:
parent
e5af8a1b4a
commit
9add7369de
17 changed files with 210 additions and 29 deletions
|
|
@ -39,3 +39,28 @@ export function displayChallenge (challenge, xp = false) {
|
|||
}
|
||||
return challenge
|
||||
}
|
||||
|
||||
// Affiche le type, la taille et l'alignement
|
||||
export function displayMonsterTypeSizeAlignment (monster, hideAlignment = false, showChallenge = false) {
|
||||
let result = ''
|
||||
if (monster.isSwarm) {
|
||||
result = 'Nuée de taille '+ monster.size + ' composée ' + stats.monsterTypes[monster.type].swarm
|
||||
if (monster.subtype) {
|
||||
result += ' (' + monster.subtype + ')'
|
||||
}
|
||||
result += ' de taille ' + monster.swarmSize
|
||||
} else {
|
||||
result = monster.type
|
||||
if (monster.subtype) {
|
||||
result += ' (' + monster.subtype + ')'
|
||||
}
|
||||
result += ' de taille ' + monster.size
|
||||
}
|
||||
if (!hideAlignment) {
|
||||
result += ', ' + monster.alignment
|
||||
}
|
||||
if (showChallenge) {
|
||||
result += ', Dangerosité : ' + displayChallenge(monster.challenge)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue