diff --git a/D&D_OED/DnD_OED.html b/D&D_OED/DnD_OED.html index f55f400dd2..e9cda3a533 100644 --- a/D&D_OED/DnD_OED.html +++ b/D&D_OED/DnD_OED.html @@ -134,126 +134,135 @@
- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +   -
Total Weight
+
Total Encumbrance
Move Rate
  - - + + -
0 to 1/3 Strength
+
0 to 1/3 Strength
12
  -
1/3 to 2/3 Strength
+
1/3 to 2/3 Strength
9
-
2/3 to Strength
+
2/3 to Strength
6
@@ -410,40 +419,40 @@ // Gather encumbrance fields const items = []; - for ( i = 1; i < 38; i++ ) { - items.push( 'weight_' + i ); + for ( i = 1; i <= 40; i++ ) { + items.push( 'enc_' + i ); } items.reverse(); // Compute total encumbrance - var total = 0; + var total = 0; items.forEach( item => { on( `change:${item} sheet:opened`, () => { getAttrs( items, values => { - items.forEach( weight => { - total = total + parseFloat( values[weight] )||0 + items.forEach( enc => { + total = total + parseFloat( values[enc] )||0 }); - setAttrs({total: total}); + setAttrs({total_enc: total}); }); }); }); // Compute movement rate on ("change:total change:str sheet:opened", function() { - getAttrs(["str","total"], function(vals) { + getAttrs(["str","total_enc"], function(vals) { var moveRate = 0; const strVal = parseInt(vals.str)||0; - const totalWeight = parseFloat(vals.total)||0; - if (totalWeight <= strVal * 1 / 3.) { + const totalEnc = parseFloat(vals.total_enc)||0; + if (totalEnc <= strVal * 1 / 3.) { moveRate = 12; } - else if (totalWeight <= strVal * 2 / 3.) { + else if (totalEnc <= strVal * 2 / 3.) { moveRate = 9; } - else if (totalWeight <= strVal * 1) { + else if (totalEnc <= strVal * 1) { moveRate = 6; } - else if (totalWeight <= strVal * 2) { + else if (totalEnc <= strVal * 2) { moveRate = 3; } else { diff --git a/D&D_OED/translation.json b/D&D_OED/translation.json index b44d3bffb8..f40ba89017 100644 --- a/D&D_OED/translation.json +++ b/D&D_OED/translation.json @@ -28,12 +28,12 @@ "special-u": "Special", "equipment-u": "EQUIPMENT", "item-u":"Item", - "weight-u":"Weight", + "enc-u":"Enc.", "total-u":"Total:", - "totalWeight-u":"Total Weight", - "totalWeight1-u":"0 to 1/3 Strength", - "totalWeight2-u":"1/3 to 2/3 Strength", - "totalWeight3-u":"2/3 to Strength", + "totalEnc-u":"Total Encumbrance", + "totalEnc1-u":"0 to 1/3 Strength", + "totalEnc2-u":"1/3 to 2/3 Strength", + "totalEnc3-u":"2/3 to Strength", "scale-u":"Scale 1\" = 5'", "money-u":"Money", "spellbook-u": "SPELLBOOK",