From 362be5ea28ecee5f155a68ac68bf9b01b3497166 Mon Sep 17 00:00:00 2001 From: johnmoney-code <64189467+johnmoney-code@users.noreply.github.com> Date: Mon, 5 Apr 2021 00:04:51 -0700 Subject: [PATCH] last min checksz fixed armor display not displaying total soak made another attempt at the psyker thing, but it failed again. I went to go phone for help, we'll get em next time. In the meantime, the dropdown works as usual, but DoS adds willpower's unnat at the end. That should fit 80% of people's needs, and we'll have a more permanent fix soon. --- Only-War-Enhanced/OnlyWarEnhanced.html | 63 +++++++++++++------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/Only-War-Enhanced/OnlyWarEnhanced.html b/Only-War-Enhanced/OnlyWarEnhanced.html index 2d6401edcf..48351a4185 100644 --- a/Only-War-Enhanced/OnlyWarEnhanced.html +++ b/Only-War-Enhanced/OnlyWarEnhanced.html @@ -70,6 +70,7 @@ + @@ -1771,18 +1772,19 @@
Pen
-
Focus Power
+ +
Power Mod
- +
@@ -2549,6 +2551,7 @@ ]; on('sheet:opened ' + fieldsFA.map(field => 'change:' + field).join(' '), function() { getAttrs(fieldsFA, function(values) { + var fatigue_mod = parseInt(values['fatigue_mod'], 10) || 0; var tou = parseInt(values['tou'], 10) || 0; var tou_unnat = parseInt(values['tou_unnat'], 10) || 0; var tou_advancement = parseInt(values['tou_advancement'], 10) || 0; @@ -2757,32 +2760,27 @@ // ['change:repeating_psychicabilities:p_focus','wptotal','pertotal','psyniscience_total', // 'wp_unnat','per_unnat','psyniscience_unnat' // ]; -/* TODO: get this sheetworker right - const repeatingSkills = 'active', 'knowledge', 'language'; - - repeatingSkills.forEach(skill => { - getSectionIDs(skill, idarray => { - let attributes = [] - idarray.forEach(id => attributes.push(`repeating_${skill}_${id}_limit`)) - - //You will probably need to join the attributes array above with whatever other attributes you want to get - - getAttrs(attributes, values => { - let update = {} - for (let [key, value] of Object.entries(values)) { - const repRowID = processingFunctions.getReprowid(key) - - // You may want to do this and another getAttrs if your value is like this @{strength} - // value.slice(2, -1) - - update[`${repRowID}_display_limit`] = //Do Math - } - setAttrs(update) - }) - }) - }) - */ - +/* TODO: make this work + on('sheet:opened change:repeating_psychicabilities:p_focus change:wptotal change:wp_unnat', function() { + getAttrs([ + 'p_focus', 'wptotal', 'wp_unnat' + ], function(values) { + var p_focus = parseInt(values['p_focus']) || 0; + var wptotal = values.wptotal; + var wp_unnat = parseInt(values['wp_unnat']) || 0; + + switch (p_focus) { + case 0: + setAttrs({ + psy_ab_total_finder: wptotal, + psy_ab_unnat.finder: wp_unnat + }); + break; + } + + }); + }); +*/ @@ -3095,7 +3093,7 @@
Roll
-
{{roll}}
+
{{roll}}
@@ -3113,11 +3111,12 @@ {{#attack}} -
{{character}} rolls to {{#psy}}focus{{/psy}}{{^psy}}hit{{/psy}} with {{weapon}}
+
{{character}} rolls to hit with {{weapon}}
{{#loc}}
{{/loc}} {{^loc}}
{{/loc}}
+
Target: