mirror of
				https://github.com/em-squared/5e-drs.git
				synced 2025-10-30 21:24:18 +00:00 
			
		
		
		
	ajout du bestiaire
This commit is contained in:
		
							parent
							
								
									637b99110c
								
							
						
					
					
						commit
						dc30394196
					
				
					 380 changed files with 18521 additions and 635 deletions
				
			
		|  | @ -1,3 +1,5 @@ | |||
| import {stats} from '../../data/stats' | ||||
| 
 | ||||
| // Calcul du modificateur de caractéristique
 | ||||
| export function getModifier (score) { | ||||
|   return Math.floor((score - 10) / 2) | ||||
|  | @ -24,3 +26,16 @@ export function displayAbilityScore (score) { | |||
| export function getProficiencyBonus (level) { | ||||
|   return Math.ceil(level / 4) + 1 | ||||
| } | ||||
| 
 | ||||
| // Affiche l'indice de dangerosité
 | ||||
| export function displayChallenge (challenge, xp = false) { | ||||
|   let result = '' | ||||
|   if (stats.challenges[challenge]) { | ||||
|     result += stats.challenges[challenge].label | ||||
|     if (xp) { | ||||
|       result += ' (PX : ' + stats.challenges[challenge].xp + ')' | ||||
|     } | ||||
|     return result | ||||
|   } | ||||
|   return challenge | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Maxime Moraine
						Maxime Moraine