diff --git a/Sentinel Comics RPG/SCRPG-Sheet.html b/Sentinel Comics RPG/SCRPG-Sheet.html index 6e61a5e0b4..70e79018e4 100644 --- a/Sentinel Comics RPG/SCRPG-Sheet.html +++ b/Sentinel Comics RPG/SCRPG-Sheet.html @@ -201,9 +201,9 @@

Current Health

-
+
-
+
@@ -300,7 +300,7 @@
-
+
@@ -346,7 +346,7 @@
Current -
+
@@ -1476,9 +1476,9 @@ }); // CODE FOR HEALTH RANGES from TOTAL HP - on('change:greenmax sheet:opened', function() { - getAttrs(['greenmax'], function(values) { - var indexg = parseInt(values.greenmax); + on('change:health_max sheet:opened', function() { + getAttrs(['health_max'], function(values) { + var indexg = parseInt(values.health_max); var indexy = Math.round((indexg+2)*0.7); var indexr = Math.round((indexg+2)/3); if (indexg === 37) { @@ -1675,6 +1675,9 @@ case version < 1: update_to_v1(); break; + case version < 1.1: + update_to_v1_1(); + break; case version < 2: // add another function here when you need it break; @@ -1752,4 +1755,16 @@ }); }); }; + + function update_to_v1_1() { + getAttrs(["version","greenmax","currenthp"], function(v) { + let output = {}; + output.version = 1.1; + output["health"] = currenthp; + output["health_max"] = greenmax; + setAttrs(output, + {silent: true}, + versionator(output.version)); + }); + };