diff --git a/Shadowrun5thEdition/Shadowrun5thEdition.html b/Shadowrun5thEdition/Shadowrun5thEdition.html index 85055b9171..11df817ec4 100644 --- a/Shadowrun5thEdition/Shadowrun5thEdition.html +++ b/Shadowrun5thEdition/Shadowrun5thEdition.html @@ -3837,6 +3837,21 @@ on("change:repeating_weapon", function() { }); }); + //Setting the Default attribute name for default skill + on("change:default_attribute", function() { + getAttrs(["default_attribute", "default_display"], function(v) { + const display = (v.default_display); + const attribute = (v.default_attribute); + let update = {}; + + //This sets a hidden input with the Attribute name so the roll template can use it to indicate what attribute was rolled + let attributeNew = attribute.slice(2, -1); + if (attributeNew != display) {update["default_display"] = attributeNew;}; + + setAttrs(update); + }); + }); + //REFACTORED Range & MELEE UPDATES ['repeating_range', 'repeating_melee',