From 9a30275640e79bc7ad41a875e4800a9d26650a9e Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Sat, 29 Jul 2023 18:11:57 +0200 Subject: [PATCH] Use initiative --- modules/hero6-actor.js | 2 +- modules/hero6-combat.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/hero6-actor.js b/modules/hero6-actor.js index 73e97ba..1cc75d9 100644 --- a/modules/hero6-actor.js +++ b/modules/hero6-actor.js @@ -463,7 +463,7 @@ export class Hero6Actor extends Actor { getBaseInit(turn) { if ( turn != this.turn) { let r = new Roll("1d6").roll({ async: false }) - this.currentInit = this.system.characteristics.dex.value + (r.total / 10) + this.currentInit = this.system.characteristics.dex.initiative + (r.total / 10) this.turn = turn } return this.currentInit diff --git a/modules/hero6-combat.js b/modules/hero6-combat.js index 1533fec..81f2196 100644 --- a/modules/hero6-combat.js +++ b/modules/hero6-combat.js @@ -44,7 +44,7 @@ export class Hero6Combat extends Combat { /* -------------------------------------------- */ holdAction(combatantId) { this.rebuildInitiative() - console.log("Rebuilding.....") + //console.log("Rebuilding.....") } /* -------------------------------------------- */ @@ -145,7 +145,7 @@ export class Hero6Combat extends Combat { } if (updList.length > 0) { await this.updateEmbeddedDocuments("Combatant", updList); - console.log("Rebuild INIT", updList) + //console.log("Rebuild INIT", updList) for (let c of updList) { if (c.initiative != 0) { return true