Enhance sheets
This commit is contained in:
@@ -154,6 +154,7 @@ export class Hero6Utility {
|
||||
'systems/fvtt-hero-system-6/templates/partials/editor-notes-gm.hbs',
|
||||
'systems/fvtt-hero-system-6/templates/partials/partial-roll-select.hbs',
|
||||
'systems/fvtt-hero-system-6/templates/partials/partial-actor-characteristic-block.hbs',
|
||||
'systems/fvtt-hero-system-6/templates/partials/partial-actor-full-charac.hbs',
|
||||
'systems/fvtt-hero-system-6/templates/partials/partial-actor-status.hbs',
|
||||
'systems/fvtt-hero-system-6/templates/partials/partial-options-abilities.hbs',
|
||||
'systems/fvtt-hero-system-6/templates/partials/partial-item-nav.hbs',
|
||||
@@ -301,6 +302,9 @@ export class Hero6Utility {
|
||||
if (rollData.charac) {
|
||||
target = rollData.charac.roll
|
||||
}
|
||||
if (rollData.item) {
|
||||
target = rollData.item.system.roll
|
||||
}
|
||||
|
||||
// Performs roll
|
||||
console.log("Roll formula", diceFormula)
|
||||
@@ -323,6 +327,9 @@ export class Hero6Utility {
|
||||
if ( myRoll.terms[0].total == 18) { // Always a failure
|
||||
rollData.isSuccess = false
|
||||
}
|
||||
if (rollData.isSuccess ) {
|
||||
rollData.margin = target - rollData.result
|
||||
}
|
||||
|
||||
let msg = await this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-hero-system-6/templates/chat/chat-generic-result.hbs`, rollData)
|
||||
|
Reference in New Issue
Block a user