foundryvtt-wh4-lang-fr-fr/scripts/U1UpSRJOSjPpO4HS.js

4 lines
287 B
JavaScript

let mutations = await game.wfrp4e.utility.findAll("mutation", "Chargement des mutations")
let roll = Math.floor(CONFIG.Dice.randomUniform() * mutations.length);
this.actor.createEmbeddedDocuments("Item", [mutations[roll]]);
this.script.scriptNotification(`Ajout ${mutations[roll].name}`)