From 878970ad3b0aa4ededcab183c4e2526a38c7bc09 Mon Sep 17 00:00:00 2001 From: andyspix Date: Wed, 9 Feb 2022 14:29:54 -0800 Subject: [PATCH] add ability for token bar values to be used in tie-breakers --- GroupInitiative/GroupInitiative.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GroupInitiative/GroupInitiative.js b/GroupInitiative/GroupInitiative.js index e088150..53ec168 100644 --- a/GroupInitiative/GroupInitiative.js +++ b/GroupInitiative/GroupInitiative.js @@ -348,6 +348,13 @@ const GroupInitiative = (() => { // eslint-disable-line no-unused-vars }, desc: 'Adds the accompanying attribute as a decimal (0.01)' }, + 'tie-breaker-token_bar': { + type: adjustments.TOKEN, + func: function(t, idx) { + return 0.01*(parseFloat(t.get(`bar${idx}_value`))||0); + }, + desc: 'Apply the bonus from the numbered bar on the token as a decimal (0.01), Defaults to 0 in the absence of a number' + }, 'ceiling': { type: adjustments.STAT, func: function(v) {