From ef51ce57f078c8251e555a76c42e27c44a3c77a0 Mon Sep 17 00:00:00 2001 From: aeauseth Date: Fri, 1 Mar 2024 21:31:04 -0800 Subject: [PATCH 1/2] Lightning Reflexes initiative #775 --- module/combat.js | 6 +++--- module/combatTracker.js | 6 +++--- module/herosystem6e.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/combat.js b/module/combat.js index f60eb372..d92ae640 100644 --- a/module/combat.js +++ b/module/combat.js @@ -35,9 +35,9 @@ export class HeroSystem6eCombat extends Combat { let dexValue = combatant.actor.system.characteristics[characteristic].value; let spdValue = combatant.actor.system.characteristics.spd.value; - let intValue = combatant.actor.system.characteristics.int.value; + //let intValue = combatant.actor.system.characteristics.int.value; - let initiativeValue = dexValue + spdValue / 100 + intValue / 10000; + let initiativeValue = dexValue + spdValue / 100; // + intValue / 10000; if (initiativeValue != combatant.initiative) { updates.push({ @@ -103,7 +103,7 @@ export class HeroSystem6eCombat extends Combat { _id: combatant.id, }); - combatantLR.initiative = lightning_reflex_initiative; + combatantLR.initiative = 99; //lightning_reflex_initiative; combatantLR.flags.lightningReflexesAlias = lightning_reflex_alias; diff --git a/module/combatTracker.js b/module/combatTracker.js index 7f88b585..bb86dec7 100644 --- a/module/combatTracker.js +++ b/module/combatTracker.js @@ -102,11 +102,11 @@ export class HeroSystem6eCombatTracker extends CombatTracker { combatant.actor.system.characteristics[ characteristic ].value; - const intValue = - combatant.actor.system.characteristics.int.value; + const spdValue = + combatant.actor.system.characteristics.spd.value; context.turns[t].initiative = dexValue + - intValue / 100 + + spdValue / 100 + combatant.initiative + parseInt(levels); } diff --git a/module/herosystem6e.js b/module/herosystem6e.js index 82408e16..c6d543a2 100644 --- a/module/herosystem6e.js +++ b/module/herosystem6e.js @@ -68,7 +68,7 @@ Hooks.once("init", async function () { */ CONFIG.Combat.initiative = { formula: - "@characteristics.dex.value + (@characteristics.int.value / 100)", + "@characteristics.dex.value + (@characteristics.spd.value / 100)", decimals: 2, }; From 81b5d725c0e24094039ba858fe6f22be78226eb2 Mon Sep 17 00:00:00 2001 From: aeauseth Date: Fri, 1 Mar 2024 21:32:39 -0800 Subject: [PATCH 2/2] minor fix --- module/combat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/combat.js b/module/combat.js index d92ae640..64121eb4 100644 --- a/module/combat.js +++ b/module/combat.js @@ -103,7 +103,7 @@ export class HeroSystem6eCombat extends Combat { _id: combatant.id, }); - combatantLR.initiative = 99; //lightning_reflex_initiative; + combatantLR.initiative = lightning_reflex_initiative; combatantLR.flags.lightningReflexesAlias = lightning_reflex_alias;