Add new compendiums
This commit is contained in:
@@ -287,9 +287,24 @@ export class CrucibleUtility {
|
||||
if (!myRoll) { // New rolls only of no rerolls
|
||||
myRoll = new Roll(diceFormula).roll({ async: false })
|
||||
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
||||
rollData.roll = myRoll
|
||||
}
|
||||
rollData.roll = myRoll
|
||||
rollData.nbSuccess = myRoll.total
|
||||
if (rollData.rollAdvantage) {
|
||||
let myRoll2 = new Roll(diceFormula).roll({ async: false })
|
||||
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
||||
if ( myRoll2.total > rollData.nbSuccess) {
|
||||
rollData.roll = myRoll2
|
||||
rollData.nbSuccess = myRoll2.total
|
||||
}
|
||||
}
|
||||
// Manage exp
|
||||
if (rollData.skill) {
|
||||
let nbSkillSuccess = rollData.roll.terms[2].total
|
||||
if ( nbSkillSuccess == 0 || nbSkillSuccess == rollData.skill.data.level) {
|
||||
actor.incrementSkillExp(rollData.skill._id, 1)
|
||||
}
|
||||
}
|
||||
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-crucible-rpg/templates/chat-generic-result.html`, rollData)
|
||||
|
Reference in New Issue
Block a user