roll fix
This commit is contained in:
@@ -2,11 +2,11 @@ export class TotemRoll {
|
||||
|
||||
static roll(actorId, label, NoD, Reroll = 0, params = {}){
|
||||
const actor = game.actors.get(actorId);
|
||||
let formula = '{' + NoD + "d10";
|
||||
if (Reroll > 0){
|
||||
formula += 'r' + Reroll;
|
||||
let formula = '' + (parseInt(NoD,10) + parseInt(Reroll,10)) + "d10";
|
||||
if (Reroll > 0 && params.difficulty != undefined){
|
||||
formula += 'kh' + (parseInt(NoD,10) -1);
|
||||
}
|
||||
formula += (params.difficulty != undefined) ? "}cs>" + params.difficulty : "}cs>7";
|
||||
formula += (params.difficulty != undefined) ? "cs>" + params.difficulty : "cs>7";
|
||||
let roll = new Roll(formula, actor.getRollData());
|
||||
roll.toMessage({
|
||||
speaker: ChatMessage.getSpeaker({ actor: actor }),
|
||||
|
||||
Reference in New Issue
Block a user