Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Value is not working

1717090609

Edited 1717091037
Nick
Pro
Hello,  So I have an issue with one of my Input fields. it can be changed with a + and - button, and there is a button that adds hp for when they rest.  They work great. Before the long rest button is clicked After the long rest button is clicked The problem is when a player changes the input manually, by clicking in the input and setting the number to another number. Like if they took 36 points of damage and were now at 0 Hit Points. Now because they changed it without using the + or - buttons when they click the Long Rest button the button can not add to the hp field correctly anymore. (See Below) Here they have gone and set their HP to 0. And when the click Long Rest this happens. The input shows 016. and if the click it again it shows 01616. (16 is the amount they would recover on a long rest.) Now if they the click the + or - buttons it changes the value fine. (I clicked the + button) Does anyone know why this is happening? Originally I thought it was because it is a text field, but when I changed it to a number field it did the same thing. so i changed it back. Also yes i know the scripts will need to be changed to all be within 1 script function. Below will be my HTML and CSS. The field in question is in <div Class="section2"> I would really love some help on this one. 
1717090629

Edited 1717090937
Nick
Pro
HTML <div class="sheet"> <input name="attr_sheettype" class="toggle" type="hidden" value="0"> <select name="attr_sheettype" class="text115"> <option value="0">Player Sheet</option> <option value="1">Camp Sheet</option> </select> <div class="playersheet"> <h1>Players Sheet</h1> <div class="section1"><!-- Name, AC, HP, Minor Wounds, Level --> <div class="header1"> <h4>&nbsp </h4> <h4>&nbsp </h4> <h4>&nbsp </h4> <h4>&nbsp </h4> <h4>&nbsp </h4> <h4>&nbsp </h4> <h4>Passive</h4> <h4>Passive</h4> <h4>Passive</h4> <h4>Name</h4> <h4>Background</h4> <h4>&nbsp </h4> <h4>Level</h4> <h4>&nbsp </h4> <h4>Proficiency</h4> <h4>Perception</h4> <h4>Insight</h4> <h4>Investigation</h4> </div> <div class="bio1"> <input name="attr_charactername" class="text200" type="text" value="Character Name"> <select name="attr_background" class="text100"> <option value="1000">---</option> <option value="1001">Acolyte</option> <option value="1002">Aristocrat</option> <option value="1003">Athlete</option> <option value="1004">Charlatan</option> <option value="1005">Criminal</option> <option value="1006">Entertainer</option> <option value="1007">Laborer</option> <option value="1008">Medic</option> <option value="1009">Scholar</option> <option value="1010">Soldier</option> <option value="1011">Survivalist</option> <option value="1012">Traveler</option> <option value="1013">Urchin</option> </select> <button name="act_leveldown" class="button1" type="action"><b>-</b></button> <input name="attr_level" class="text050" type="text" value="0" max="10"> <button name="act_levelup" class="button1" type="action"><b>+</b></button> <input name="attr_proficiency" class="text090" type="text" value="@{proficiencydisplay}" disabled="true" /> <input name="attr_passive_perception" class="text090" type="text" value="10+@{perception_total}" disabled="true" /> <input name="attr_passive_insight" class="text090" type="text" value="10+@{insight_total}" disabled="true" /> <input name="attr_passive_investigation" class="text090" type="text" value="10+@{investigation_total}" disabled="true" /> <div><!-- hidden input values --> <!-- This is where the proficiency bonus is generated --> <input name="attr_proficiencydisplay" class="text090" type="hidden" readonly /> <!-- This is where the proficiency bonus is generated --> <input name="attr_background_display" class="text090" type="hidden" readonly /> </div> <div><!-- Scripts --> <script type="text/worker"><!-- Level - Button - Used to subtract levels --> on('clicked:leveldown', function() { getAttrs(['level'], function(values) { const level = +values.level || 0; const newlevel = level -1; setAttrs({level: newlevel}); }); }); </script> <script type="text/worker"><!-- Level + Button - Used to increase levels--> on('clicked:levelup', function() { getAttrs(['level'], function(values) { const level = +values.level || 0; const newlevel = level +1; setAttrs({level: newlevel}); }); }); </script> <script type="text/worker"><!-- Proficiency - used to generate Proficiency Score--> on('sheet:opened change:level', function() { getAttrs(['level'], function(values) { const level = parseInt(values.level) || 0; let proficiencydisplay = 1; if (level >= 17) {proficiencydisplay = 6;} else if (level >=13) {proficiencydisplay = 5;} else if (level >=9) {proficiencydisplay = 4;} else if (level >=5) {proficiencydisplay = 3;} else if (level >=1) {proficiencydisplay = 2;} setAttrs({proficiencydisplay: proficiencydisplay}); }); }); </script> </div> </div> <br> <div class="header2"> <h4>Current HP</h4> <h4>Bonus</h4> <h4>Max</h4> <h4>&nbsp </h4> <h4>&nbsp </h4> <h4>Exhaustion</h4> <h4>&nbsp </h4> <h4>&nbsp </h4> <h4>Current Sanity</h4> <h4>Bonus</h4> <h4>Max</h4> </div> <div class="bio2"> <div class="bio2a1"><!-- HP Information--> <button name="act_hpdown" class="button1" type="action"><b>-</b></button> <input name="attr_current_hp" class="text050" type="text" value="0"> <button name="act_hpup" class="button1" type="action"><b>+</b></button> <h4>&nbsp </h4> <input name="attr_bonus_hp" class="text050" type="text" value="100"> <h4>&nbsp </h4> <input name="attr_max_hp_d" class="text050" type="text" value="@{max_hp}" disabled="true"/> </div> <h4>&nbsp </h4> <div class="bio2a2"><!-- Exhaustion Information--> <h4>&nbsp </h4> <button name="act_exhaustion_down" class="button1" type="action"><b>-</b></button> <input name="attr_current_exhaustion" class="text050" type="text" value="0"> <button name="act_exhaustion_up" class="button1" type="action"><b>+</b></button> <h4>&nbsp </h4> </div> <h4>&nbsp </h4> <div class="bio2a1"><!-- Sanity Information--> <button name="act_sanity_down" class="button1" type="action"><b>-</b></button> <input name="attr_current_sanity" class="text050" type="text" value="0"> <button name="act_sanity_up" class="button1" type="action"><b>+</b></button> <h4>&nbsp </h4> <input name="attr_bonus_Sanity" class="text050" type="text" value="100"> <h4>&nbsp </h4> <input name="attr_max_Sanity_d" class="text050" type="text" value="@{max_sanity}" disabled="true"/> </div> <div class="bio2b"><!-- HP Bar--> <input name="attr_current_hp" class="text040" type="hidden" value="0"> <input name="attr_toxbar" class="sheet-hidden sheet-toxbar" type="hidden" value="@{hpv}" disabled="true"> <div class="sheet-toxbar"></div> <input name="attr_max_hp" class="text040" type="hidden"> </div> <h4>&nbsp </h4> <div class="bio2b"><!-- Exhaustion Bar--> <input name="attr_current_exhaustion" class="text040" type="hidden" value="0"> <input name="attr_exhaustion_bar" class="sheet-hidden sheet-exhaustion_bar" type="hidden" value="@{exhaustionv}" disabled="true"> <div class="sheet-exhaustion_bar"></div> <input name="attr_max_exhaustion" class="text040" type="hidden" value="10"> </div> <h4>&nbsp </h4> <div class="bio2b"><!-- Sanity Bar--> <input name="attr_current_sanity" class="text040" type="hidden" value="0"> <input name="attr_sanity_bar" class="sheet-hidden sheet-sanity_bar" type="hidden" value="@{sanityv}" disabled="true"> <div class="sheet-sanity_bar"></div> <input name="attr_max_sanity" class="text040" type="hidden"> </div> <div><!-- hidden input values --> <!-- This generates your base HP from your background --> <input name="attr_background_display" class="text090" type="hidden" readonly /> </div> <div><!-- Scripts --> <script type="text/worker"><!-- Background HP Value --> on('sheet:opened change:background', function() { getAttrs(['background'], function(values) { const background = parseInt(values.background); let background_display = 0; if (background == 1001) {background_display = 6;} else if (background == 1002) {background_display = 6;} else if (background == 1003) {background_display = 10;} else if (background == 1004) {background_display = 8;} else if (background == 1005) {background_display = 8;} else if (background == 1006) {background_display = 8;} else if (background == 1007) {background_display = 10;} else if (background == 1008) {background_display = 8;} else if (background == 1009) {background_display = 6;} else if (background == 1010) {background_display = 10;} else if (background == 1011) {background_display = 10;} else if (background == 1012) {background_display = 8;} else if (background == 1013) {background_display = 8;} setAttrs({background_display: background_display}); }); }); </script> <script type="text/worker"><!-- Max HP --> on('sheet:opened change:level change:background_display change:con_mod change:bonus_hp', function (value) { getAttrs(['level','background_display','con_mod','bonus_hp'], function (value) { const level = parseInt(value.level); const background_display = parseInt(value.background_display); const con_mod = parseInt(value.con_mod); const bonus_hp = parseInt(value.bonus_hp); const hp = background_display + con_mod + ((background_display + con_mod)*level) + bonus_hp; setAttrs({max_hp:hp}); }); }); </script> <script type="text/worker"><!-- HP Bar --> on("sheet:opened change:max_hp change:current_hp", function() { getAttrs(["max_hp", "current_hp"], function(values) { var maximum = values.current_hp; var current = values.max_hp; var hpPercent = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,999]; for(let i = 0; i < hpPercent.length; i++) { if(maximum <= (current * hpPercent[i]/ 100)) {hpvalue = i; console.log("Toxic value is " + hpvalue) break; } } setAttrs({"hpv":hpvalue}); }); }); </script> <script type="text/worker"><!-- HP - Button - Used to subtract HP --> on('clicked:hpdown', function() { getAttrs(['current_hp'], function(values) { const hp = +values.current_hp || 0; const newhp = hp -1; setAttrs({current_hp: newhp}); }); }); </script> <script type="text/worker"><!-- HP + Button - Used to add HP --> on('clicked:hpup', function() { getAttrs(['current_hp'], function(values) { const hp = +values.current_hp || 0; const newhp = hp +1; setAttrs({current_hp: newhp}); }); }); </script> <script type="text/worker"><!-- Exhaustion - Button - Used to subtract Exhaustion --> on('clicked:exhaustion_down', function() { getAttrs(['current_exhaustion'], function(values) { const exhaustion = +values.current_exhaustion || 0; const newexhaustion = exhaustion -1; setAttrs({current_exhaustion: newexhaustion}); }); }); </script> <script type="text/worker"><!-- Exhaustion + Button - Used to add Exhaustion --> on('clicked:exhaustion_up', function() { getAttrs(['current_exhaustion'], function(values) { const exhaustion = +values.current_exhaustion || 0; const newexhaustion = exhaustion +1; setAttrs({current_exhaustion: newexhaustion}); }); }); </script> <script type="text/worker"><!-- Exhaustion Bar --> on("sheet:opened change:max_exhaustion change:current_exhaustion", function() { getAttrs(["max_exhaustion", "current_exhaustion"], function(values) { var maximum = values.current_exhaustion; var current = values.max_exhaustion; var exhaustionPercent = [0,10,20,30,40,50,60,70,80,90,100]; for(let i = 0; i < exhaustionPercent.length; i++) { if(maximum <= (current * exhaustionPercent[i]/ 100)) {exhaustionvalue = i; console.log("Toxic value is " + exhaustionvalue) break; } } setAttrs({"exhaustionv":exhaustionvalue}); }); }); </script> <script type="text/worker"><!-- Max Sanity --> on('sheet:opened change:level change:wis_mod change:bonus_sanity', function (value) { getAttrs(['level','wis_mod','bonus_sanity'], function (value) { const level = parseInt(value.level); const wis_mod = parseInt(value.wis_mod); const bonus_sanity = parseInt(value.bonus_sanity); const sanity = 2 + wis_mod + level + (wis_mod * level) + bonus_sanity; setAttrs({max_sanity:sanity}); }); }); </script> <script type="text/worker"><!-- Sanity Bar --> on("sheet:opened change:max_sanity change:current_sanity", function() { getAttrs(["max_sanity", "current_sanity"], function(values) { var maximum = values.current_sanity; var current = values.max_sanity; var sanityPercent = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,999]; for(let i = 0; i < sanityPercent.length; i++) { if(maximum <= (current * sanityPercent[i]/ 100)) {sanityvalue = i; console.log("Toxic value is " + sanityvalue) break; } } setAttrs({"sanityv":sanityvalue}); }); }); </script> <script type="text/worker"><!-- Sanity - Button - Used to subtract sanity --> on('clicked:sanity_down', function() { getAttrs(['current_sanity'], function(values) { const sanity = +values.current_sanity || 0; const newsanity = sanity -1; setAttrs({current_sanity: newsanity}); }); }); </script> <script type="text/worker"><!-- Sanity + Button - Used to add sanity --> on('clicked:sanity_up', function() { getAttrs(['current_sanity'], function(values) { const sanity = +values.current_sanity || 0; const newsanity = sanity +1; setAttrs({current_sanity: newsanity}); }); }); </script> </div> </div> <br> <div class="header3"> <h4>Initiative</h4> <h4>Armor</h4> <h4>Shield</h4> <h4>Bonus</h4> <h4>AC</h4> <h4>Hit Dice</h4> </div> <div class="bio3"> <input name="attr_initiative" class="text050" type="text" value="[[(@{dex_mod}*(1+@{physical_training_1})+@{alert})+.@{dex}]]" disabled="true" /> <input name="attr_equiped_armor" class="text175" type="text" value="@{equiped_armor_display}" disabled="true" /> <input name="attr_equiped_shield" class="text100" type="text" value="@{equiped_shield_display}" disabled="true" /> <input name="attr_ac_bonus" class="text050" type="text" value="0" > <input name="attr_ac" class="text050" type="text" value="[[@{ac_armor_display}+@{ac_shield_display}+@{ac_bonus}]]" disabled="true" /> <input name="attr_hit_dice" class="text050" type="text" value="0"> <button name="act_short_rest" class="button2" type="action">Short Rest</button> <button name="act_long_rest" class="button2" type="action">Long Rest</button> <div><!-- Hidden Info --> <!-- This generates the name of the armor you are wearing --> <input name="attr_equiped_armor_display" class="text150" type="hidden" readonly /> <!-- This generates the AC value of the armor you are wearing --> <input name="attr_ac_armor_display" class="text150" type="hidden" readonly /> <!-- This generates the name if the shield you have equiped --> <input name="attr_equiped_shield_display" class="text150" type="hidden" readonly /> <!-- This generates the AC value of the Shield you have equiped --> <input name="attr_ac_shield_display" class="text150" type="hidden" readonly /> <div><!-- Long Rest attributes --> <div><!-- HP Recovery --> <!-- This is the value that tells the player how many Hit points they recover when they click the long rest button --> <input name="attr_long_rest_hp" class="text150" type="hidden" readonly /> </div> <div><!-- Exhaustion Recovery --> <!-- This is the value that tells the player how mnay Exhaustion points they recover when they click the long rest button --> <input name="attr_long_rest_exhaustion" class="text150" type="hidden" readonly /> </div> <div><!-- Sanity Recovery --> <!-- This is the value that tells the player how many Sanity points they recover when they click the long rest button and they dont have the mental strength checkbox selected --> <input name="attr_basic_sanity_recovery" class="text150" type="hidden" readonly /> <!-- This is the value that tells the player how many Sanity points they recover when they click the long rest button and they have the mental strength checkbox selected --> <input name="attr_mental_sanity_recovery" class="text150" type="hidden" readonly /> <!-- This generates a value based on weather the mental strength checkbox is clicked, this value is what is used to determin the value if the sanity_recovery Value --> <input name="attr_mental_strength_display" class="text150" type="hidden" readonly /> <!-- This is the value that the Long Rest button read to display and add to sanity value on the sheet --> <input name="attr_sanity_recovery" class="text150" type="hidden" readonly /> </div> </div> </div> <div><!-- Scripts --> <script type="text/worker"><!-- Armor Text Display - This is used to generate the name of the armor you are wearing in the equiped_armor_display input --> on('sheet:opened change:armor', function() { getAttrs(['armor'], function(values) { const armor = parseInt(values.armor) || 0; let equiped_armor_display = "None"; if (armor == 00) {equiped_armor_display = "None";} else if (armor == 01) {equiped_armor_display = "Leather Jacket";} else if (armor == 02) {equiped_armor_display = "Kevlar-Lined Coat";} else if (armor == 03) {equiped_armor_display = "Stab-Proof Vest";} else if (armor == 04) {equiped_armor_display = "Soft Ballistic Vest";} else if (armor == 05) {equiped_armor_display = "Riot Gear";} else if (armor == 06) {equiped_armor_display = "Light Weight Polymer";} else if (armor == 07) {equiped_armor_display = "Ceramic Armor Vest";} else if (armor == 08) {equiped_armor_display = "Heavy Tactical Armor";} else if (armor == 09) {equiped_armor_display = "Defensive Instincts";} else if (armor == 10) {equiped_armor_display = "Unarmored Combat";} else if (armor == 11) {equiped_armor_display = "Psychic Armor";} setAttrs({equiped_armor_display: equiped_armor_display}); }); }); </script> <script type="text/worker"><!-- Armor Value - Generates the armor value of your equiped sheild --> on('sheet:opened change:armor change:dex_mod change:wis_mod change:con_mod change:int_mod', function() { getAttrs(['armor','dex_mod','con_mod','int_mod','wis_mod'], function(values) { const armor = parseInt(values.armor) || 00; const dex = parseInt(values.dex_mod); const con = parseInt(values.con_mod); const ini = parseInt(values.int_mod); const wis = parseInt(values.wis_mod); let ac_armor_display = 10 + dex; if (armor == 00) {ac_armor_display = 10 + dex;} else if (armor == 01) {ac_armor_display = 11 + dex;} else if (armor == 02) {ac_armor_display = 12 + dex;} else if (armor == 03) {ac_armor_display = 13 + dex;} else if (armor == 04) {ac_armor_display = 14 + dex;} else if (armor == 05) {ac_armor_display = 15 + dex;} else if (armor == 06) {ac_armor_display = 16;} else if (armor == 07) {ac_armor_display = 17;} else if (armor == 08) {ac_armor_display = 18;} else if (armor == 09) {ac_armor_display = 13 + ini;} else if (armor == 10) {ac_armor_display = 10 + dex + con;} else if (armor == 11) {ac_armor_display = 13 + wis;} setAttrs({ac_armor_display: ac_armor_display}); }); }); </script> <script type="text/worker"><!-- Shield Text Display - This is used to generate the name of the armor you are wearing in the equiped_shield_display input --> on('sheet:opened change:shield', function() { getAttrs(['shield'], function(values) { const shield = parseInt(values.shield) || 0; let equiped_shield_display = "None"; if (shield == 30) {equiped_shield_display = "None";} else if (shield == 31) {equiped_shield_display = "Light Shield";} else if (shield == 32) {equiped_shield_display = "Normal Shield";} else if (shield == 33) {equiped_shield_display = "Heavy Shield";} setAttrs({equiped_shield_display: equiped_shield_display}); }); }); </script> <script type="text/worker"><!-- Shield Value - Generates the armor value of your equiped sheild --> on('sheet:opened change:shield', function() { getAttrs(['shield'], function(values) { const shield = parseInt(values.shield) || 0; let ac_shield_display = 0; if (shield == 30) {ac_shield_display = 0;} else if (shield == 31) {ac_shield_display = 1;} else if (shield == 32) {ac_shield_display = 2;} else if (shield == 33) {ac_shield_display = 3;} setAttrs({ac_shield_display: ac_shield_display}); }); }); </script> <script type="text/worker"><!-- Long Rest Hit Points Recovery - This is used to generate the Value of the Hit Points that is recovered when the player clicks the Long Rest Button --> on('sheet:opened change:level change:background_display change:con change:con_mod', function (value) { getAttrs(['level','background_display','con_mod','con'], function (value) { const level = parseInt(value.level); const background_display = parseInt(value.background_display); const con_mod = parseInt(value.con_mod); const con = parseInt(value.con); const hp = ((1 + con_mod) * level) + con; setAttrs({long_rest_hp:hp}); }); }); </script> <script type="text/worker"><!-- Long Rest Exhaustion Recovery - This is used to generate the Value of the Exhaustion that is recovered when the player clicks the Long Rest Button --> on('sheet:opened change:level change:con_mod', function (value) { getAttrs(['level','con_mod'], function (value) { const level = parseInt(value.level); const con_mod = parseInt(value.con_mod); const exhaustion = con_mod + level + 1; setAttrs({long_rest_exhaustion:exhaustion}); }); }); </script> <script type="text/worker"><!-- Long Rest Sanity Recovery - This is used to generate the Value of the Sanity that is recovered when the player clicks the Long Rest Button --> on('sheet:opened change:mental_strength_display change:basic_sanity_recovery change:mental_sanity_recovery', function() { getAttrs(['mental_strength_display','basic_sanity_recovery','mental_sanity_recovery'], function(values) { const mental_sanity_recovery = parseInt(values.mental_sanity_recovery) || 0; const basic_sanity_recovery = parseInt(values.basic_sanity_recovery) || 0; const mental_strength_display = parseInt(values.mental_strength_display) || 0; let sanity_recovery = 0; if (mental_strength_display >=1) {sanity_recovery = mental_sanity_recovery;} else if (mental_strength_display >=0) {sanity_recovery = basic_sanity_recovery;} setAttrs({sanity_recovery: sanity_recovery}); }); }); </script> <script type="text/worker"><!-- Basic Sanity Recovery - This is used to generate the Value of the Sanity the player recovers if you dont have the Mental Strength Checkbox selected --> on('sheet:opened change:level change:wis_mod', function (value) { getAttrs(['level','wis_mod'], function (value) { const level = parseInt(value.level); const wis_mod = parseInt(value.wis_mod); const sanity = wis_mod + level + 1; setAttrs({basic_sanity_recovery:sanity}); }); }); </script> <script type="text/worker"><!-- Mental Sanity Recovery - This is used to generate the Value of the Sanity the player recovers if you dont have the Mental Strength Checkbox selected --> on('sheet:opened change:level change:wis', function (value) { getAttrs(['level','max_sanity'], function (value) { const level = parseInt(value.level); const max_sanity = parseInt(value.max_sanity); const sanity = max_sanity; setAttrs({mental_sanity_recovery:sanity}); }); }); </script> <script type="text/worker"><!-- Mental Strength - this is used to generate a value for the sanity recovery script to look at to choose between Basic Sanity recovery or Mental Snaity Recovery Values--> on('sheet:opened change:mental_strength', function (value) { getAttrs(['mental_strength'], function (value) { const mental_strength = parseInt(value.mental_strength); setAttrs({mental_strength_display:mental_strength}); }); }); </script> <script type="text/worker"><!-- Long Rest Button - This changes the value of the Hit Dice, HP, Exhaustion Level, and Sanity when the player clicks the long rest button--> on('clicked:long_rest', function() { getAttrs(['sanity_recovery', 'current_sanity', 'long_rest_exhaustion', 'current_exhaustion', 'long_rest_hp', 'current_hp', 'level', 'hit_dice'], function(values) { const level = values.level ||0; const new_hit_dice = level ||0; const current_hp = values.current_hp ||0; const long_rest_hp = values.long_rest_hp ||0; const new_rest_hp = current_hp + long_rest_hp ||0; const current_exhaustion = values.current_exhaustion ||0; const long_rest_exhaustion = values.long_rest_exhaustion ||0; const new_rest_exhaustion = current_exhaustion - long_rest_exhaustion ||0; const current_sanity = values.current_sanity ||0; const sanity_recovery = values.sanity_recovery ||0; const new_sanity_recovery = current_sanity + sanity_recovery ||0; setAttrs({hit_dice: new_hit_dice}); setAttrs({current_hp: new_rest_hp}); setAttrs({current_exhaustion: new_rest_exhaustion}); setAttrs({current_sanity: new_sanity_recovery}); }); }); </script> <script type="text/worker"><!-- Long Rest Button - This is used to display the Recovery information from a long rest in the chat --> on('clicked:long_rest', () => { startRoll('&{template:default} {{name=@{charactername} Long Rest}} {{HP Recover= [[@{long_rest_hp}]]}} {{Exhaustion Recovery=[[@{long_rest_exhaustion}]]}} {{Sanity Recovery=[[@{sanity_recovery}]]}}', long_rest => { finishRoll(long_rest.rollId); }); }); </script> <script type="text/worker"><!-- Short Rest Button - This changes the value of the Hit Dice when the player clicks the short rest button--> on('clicked:short_rest', function() { getAttrs(['hit_dice'], function(values) { const hit_dice = values.hit_dice ||0; const new_hit_dice = hit_dice - 1 ||0; setAttrs({hit_dice: new_hit_dice}); }); }); </script> <script type="text/worker"><!-- Short Rest Button - This is used to roll a hit dice to recover HP on a short rest --> on('clicked:short_rest', () => { startRoll('&{template:default} {{name=@{charactername} Short Rest}} {{HP Recover=[[1d@{background_display}]]}}', short_rest => { finishRoll(short_rest.rollId); }); }); </script> </div> </div> </div> </div> <div class="campsheet"> <h1>Camp Sheet</h1> </div> </div> <br> <div class="sheet"><!-- Needed for Testing - These atributes will be added later in other section of the sheet--> <div class="teststats"><!-- STR and DEX--> <input name="attr_STRENGTH" class="text115" type="text" value="STRENGTH" disabled="true" /> <input name="attr_str" class="text050" type="text" value="0"> <input name="attr_str_mod" class="text050" type="text" value="0"> <h4>&nbsp </h4> <input name="attr_DEXTERITY" class="text115" type="text" value="DEXTERITY" disabled="true" /> <input name="attr_dex" class="text050" type="text" value="0"> <input name="attr_dex_mod" class="text050" type="text" value="0"> </div> <div class="teststats"><!-- CON and INT--> <input name="attr_CONSTITUTION" class="text115" type="text" value="CONSTITUTION" disabled="true" /> <input name="attr_con" class="text050" type="text" value="0"> <input name="attr_con_mod" class="text050" type="text" value="0"> <h4>&nbsp </h4> <input name="attr_INTELLIGENCE" class="text115" type="text" value="INTELLIGENCE" disabled="true" /> <input name="attr_int" class="text050" type="text" value="0"> <input name="attr_int_mod" class="text050" type="text" value="0"> </div> <div class="teststats"><!-- WIS and CHA--> <input name="attr_WISDOM" class="text115" type="text" value="WISDOM" disabled="true" /> <input name="attr_wis" class="text050" type="text" value="0"> <input name="attr_wis_mod" class="text050" type="text" value="0"> <h4>&nbsp </h4> <input name="attr_CHARISMA" class="text115" type="text" value="CHARISMA" disabled="true" /> <input name="attr_cha" class="text050" type="text" value="0"> <input name="attr_cha_mod" class="text050" type="text" value="0"> </div> <br> <div class="testskillline"><!-- Perception, Inseight, Investagation--> <input name="attr_PERCEPTIONd" class="text150" type="text" value="PERCEPTION" disabled="true" /> <input name="attr_perception_total" class="text050" type="text" value="0"> <h4>&nbsp </h4> <input name="attr_INSIGHTd" class="text150" type="text" value="INSIGHT" disabled="true" /> <input name="attr_insight_total" class="text050" type="text" value="0"> <h4>&nbsp </h4> <input name="attr_INVESTIGATIONd" class="text150" type="text" value="INVESTIGATION" disabled="true" /> <input name="attr_investigation_total" class="text050" type="text" value="0"> </div> <br> <div class="testability"><!-- Physical Training --> <input name="attr_Physical Training" class="text200" type="text" value="Physical Training" disabled="true" /> <input name="attr_physical_training_1" class="checkbox2" type="checkbox" value="1"> </div> <div class="testability"><!-- Alert --> <input name="attr_alert" class="text200" type="text" value="Alert" disabled="true" /> <input name="attr_alert" class="checkbox2" type="checkbox" value="5"> </div> <div class="testability"><!-- Mental Strength --> <input name="attr_mental_strength_name" class="text200" type="text" value="Mental Strength" disabled="true" /> <input name="attr_mental_strength" class="checkbox2" type="checkbox" value="1" > </div> <div class="testline"><!-- Equipted Armor --> <select name="attr_armor" class="text7"> <option value="00">None</option> <option value="01">Leather Jacket</option> <option value="02">Kevlar-Lined Coat</option> <option value="03">Stab-Proof Vest</option> <option value="04">Soft Ballistic Vest</option> <option value="05">Riot Gear</option> <option value="06">Light Weight Polymer</option> <option value="07">Ceramic Armor Vest</option> <option value="08">Heavy Tactical Armor</option> <option value="09">Defensive Instincts</option> <option value="10">Unarmored Combat</option> <option value="11">Psychic Armor</option> </select> </div> <div class="testline"><!-- Equipted sheild --> <select name="attr_shield" class="text4"> <option value="30">None</option> <option value="31">Light</option> <option value="32">Normal</option> <option value="33">Heavy</option> </select> </div> <div class="testskillline"><!-- Proficiency Value Display --> <input name="attr_1.1" class="text150" type="text" value="Proficiency" disabled="true" /> <input name="attr_1.2" class="text050" type="text" value="@{proficiencydisplay}" disabled="true" /> <h4>&nbsp </h4> <input name="attr_2.1" class="text150" type="text" value="None" disabled="true" /> <input name="attr_2.2" class="text050" type="text" value="@{}" disabled="true" /> <h4>&nbsp </h4> <input name="attr_3.1" class="text150" type="text" value="None" disabled="true" /> <input name="attr_3.2" class="text050" type="text" value="@{}" disabled="true" /> </div> <div class="testskillline"><!-- Armor Value, Shield Value, and AC total Value Display --> <input name="attr_4.1" class="text150" type="text" value="Shield Value" disabled="true" /> <input name="attr_4.2" class="text050" type="text" value="@{ac_shield_display}" disabled="true" /> <h4>&nbsp </h4> <input name="attr_5.1" class="text150" type="text" value="Armor value" disabled="true" /> <input name="attr_5.2" class="text050" type="text" value="@{ac_armor_display}" disabled="true" /> <h4>&nbsp </h4> <input name="attr_6.1" class="text150" type="text" value="none" disabled="true" /> <input name="attr_6.2" class="text050" type="text" value="@{}" disabled="true" /> </div> </div>
CSS /* Sheet Body */ /* Sheet DIVs */ div.sheet{ display: grid; width:850px; justify-items: center; text-align:center; margin: 0 auto; } div.playersheet{ display: grid; width:850px; } div.campsheet{ display: grid; width:850px; } /* Sheet DIVs End*/ /* Sheet Toggle */ .toggle[value="1"] ~ .playersheet, .toggle[value="0"] ~ .campsheet{display: none;} /* Sheet Toggle End*/ /* Sheet Props */ /* Sheet Buttons */ .sheet button[class="button1"]{ height: 25px; width: 25px; color: white; background-color: black; padding: 0; text-align: center; vertical-align: middle; display: inline-block; border: 0px solid gray; border-radius: 5px; } .sheet button[class="button2"]{ height: 25px; width: 80px; color: white; background-color: black; padding: 0; text-align: center; vertical-align: middle; display: inline-block; border: 0px solid gray; border-radius: 5px; font-weight: bold; } /* Sheet Buttons End*/ /* Sheet Selection, Text, Number Heights */ .sheet select { height: 25px; text-align:center; } .sheet input[type="text"] { height: 25px; } .sheet input[type="number"] { height: 25px; } .sheet input[class="checkbox2"] { height: 25px; width: 25px; } /* Sheet Selection, Text, Number Heights End*/ /* Sheet Text Widths */ .text020{ width: 20px; text-align: center; } .text025{ width: 25px; text-align: center; } .text030{ width: 30px; text-align: center; } .text040{ width: 40px; text-align: center; } .text050{ width: 50px; text-align: center; } .text060{ width: 60px; text-align: center; } .text075{ width: 75px; text-align: center; } .text080{ width: 80px; text-align: center; } .text090{ width: 90px; text-align: center; } .text100{ width: 100px; text-align: center; } .text115{ width: 115px; text-align: center; } .text150{ width: 150px; text-align: center; } .text175{ width: 175px; text-align: center; } .text200{ width: 200px; text-align: center; } /* Sheet Text Widths */ /* Sheet Props */ /* Sheet Divs */ /* Section 1 */ /* Section 1 Divs */ div.section1{ border: 5px solid purple; display: grid; width:850px; justify-items: center; margin: 0 auto; } div.header1{ display: grid; grid-template-columns: 200px 100px 25px 50px 25px 90px 90px 90px 90px; grid-auto-rows: 20px; justify-items: center; } div.bio1{ display: grid; grid-template-columns: 200px 100px 25px 50px 25px 90px 90px 90px 90px; height: 25px; justify-items: center; } div.header2{ display: grid; grid-template-columns: 100px 70px 50px 10px 60px 100px 60px 10px 100px 70px 50px; } div.bio2{ display: grid; grid-template-columns: 220px 10px 220px 10px 220px; } div.bio2a1{ display: grid; grid-template-columns: 25px 50px 25px 10px 50px 10px 50px; } div.bio2a2{ display: grid; grid-template-columns: 60px 25px 50px 25px 60px; } div.bio2b{ display: grid; grid-template-columns: 200px; } div.header3{ display: grid; grid-template-columns: 90px 175px 100px 50px 50px 70px 180px; justify-items: center; } div.bio3{ display: grid; grid-template-columns: 90px 175px 100px 50px 50px 70px 90px 90px; justify-items: center; } /* Section 1 Divs End*/ /* Section 1 Bars*/ /* HP Bars*/ div.sheet-toxbar { width: 216px; height: 21px; border: 2px solid black; color: black; font-size: 16px; font-weight: bold; text-align: center; } input.sheet-toxbar[value="0"] ~ div.sheet-toxbar { background: #dd7e6b; } input.sheet-toxbar[value="0"] ~ div.sheet-toxbar::before { content: "0 HP +1 EXHAUSTION"; } input.sheet-toxbar[value="1"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #dd7e6b 5%, #dd7e6b 100%); } input.sheet-toxbar[value="1"] ~ div.sheet-toxbar::before { content:"1% HP Remaining"; } input.sheet-toxbar[value="2"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 2%, #dd7e6b 6%, #dd7e6b 100%); } input.sheet-toxbar[value="2"] ~ div.sheet-toxbar::before { content:"2% HP Remaining"; } input.sheet-toxbar[value="3"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 3%, #dd7e6b 7%, #dd7e6b 100%); } input.sheet-toxbar[value="3"] ~ div.sheet-toxbar::before { content:"3% HP Remaining"; } input.sheet-toxbar[value="4"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 4%, #dd7e6b 8%, #dd7e6b 100%); } input.sheet-toxbar[value="4"] ~ div.sheet-toxbar::before { content:"4% HP Remaining"; } input.sheet-toxbar[value="5"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 5%, #dd7e6b 9%, #dd7e6b 100%); } input.sheet-toxbar[value="5"] ~ div.sheet-toxbar::before { content:"5% HP Remaining"; } input.sheet-toxbar[value="6"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 6%, #dd7e6b 10%, #dd7e6b 100%); } input.sheet-toxbar[value="6"] ~ div.sheet-toxbar::before { content:"6% HP Remaining"; } input.sheet-toxbar[value="7"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 7%, #dd7e6b 11%, #dd7e6b 100%); } input.sheet-toxbar[value="7"] ~ div.sheet-toxbar::before { content:"7% HP Remaining"; } input.sheet-toxbar[value="8"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 8%, #dd7e6b 12%, #dd7e6b 100%); } input.sheet-toxbar[value="8"] ~ div.sheet-toxbar::before { content:"8% HP Remaining"; } input.sheet-toxbar[value="9"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 9%, #dd7e6b 13%, #dd7e6b 100%); } input.sheet-toxbar[value="9"] ~ div.sheet-toxbar::before { content:"9% HP Remaining"; } input.sheet-toxbar[value="10"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 10%, #dd7e6b 14%, #dd7e6b 100%); } input.sheet-toxbar[value="10"] ~ div.sheet-toxbar::before { content:"10% HP Remaining"; } input.sheet-toxbar[value="11"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 11%, #dd7e6b 15%, #dd7e6b 100%); } input.sheet-toxbar[value="11"] ~ div.sheet-toxbar::before { content:"11% HP Remaining"; } input.sheet-toxbar[value="12"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 12%, #dd7e6b 16%, #dd7e6b 100%); } input.sheet-toxbar[value="12"] ~ div.sheet-toxbar::before { content:"12% HP Remaining"; } input.sheet-toxbar[value="13"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 13%, #dd7e6b 17%, #dd7e6b 100%); } input.sheet-toxbar[value="13"] ~ div.sheet-toxbar::before { content:"13% HP Remaining"; } input.sheet-toxbar[value="14"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 14%, #dd7e6b 18%, #dd7e6b 100%); } input.sheet-toxbar[value="14"] ~ div.sheet-toxbar::before { content:"14% HP Remaining"; } input.sheet-toxbar[value="15"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 15%, #dd7e6b 19%, #dd7e6b 100%); } input.sheet-toxbar[value="15"] ~ div.sheet-toxbar::before { content:"15% HP Remaining"; } input.sheet-toxbar[value="16"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 16%, #dd7e6b 20%, #dd7e6b 100%); } input.sheet-toxbar[value="16"] ~ div.sheet-toxbar::before { content:"16% HP Remaining"; } input.sheet-toxbar[value="17"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 17%, #dd7e6b 21%, #dd7e6b 100%); } input.sheet-toxbar[value="17"] ~ div.sheet-toxbar::before { content:"17% HP Remaining"; } input.sheet-toxbar[value="18"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 18%, #dd7e6b 22%, #dd7e6b 100%); } input.sheet-toxbar[value="18"] ~ div.sheet-toxbar::before { content:"18% HP Remaining"; } input.sheet-toxbar[value="19"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 19%, #dd7e6b 23%, #dd7e6b 100%); } input.sheet-toxbar[value="19"] ~ div.sheet-toxbar::before { content:"19% HP Remaining"; } input.sheet-toxbar[value="20"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 20%, #dd7e6b 24%, #dd7e6b 100%); } input.sheet-toxbar[value="20"] ~ div.sheet-toxbar::before { content:"20% HP Remaining"; } input.sheet-toxbar[value="21"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 21%, #dd7e6b 25%, #dd7e6b 100%); } input.sheet-toxbar[value="21"] ~ div.sheet-toxbar::before { content:"21% HP Remaining"; } input.sheet-toxbar[value="22"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 22%, #dd7e6b 26%, #dd7e6b 100%); } input.sheet-toxbar[value="22"] ~ div.sheet-toxbar::before { content:"22% HP Remaining"; } input.sheet-toxbar[value="23"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 23%, #dd7e6b 27%, #dd7e6b 100%); } input.sheet-toxbar[value="23"] ~ div.sheet-toxbar::before { content:"23% HP Remaining"; } input.sheet-toxbar[value="24"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 24%, #dd7e6b 28%, #dd7e6b 100%); } input.sheet-toxbar[value="24"] ~ div.sheet-toxbar::before { content:"24% HP Remaining"; } input.sheet-toxbar[value="25"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 25%, #dd7e6b 29%, #dd7e6b 100%); } input.sheet-toxbar[value="25"] ~ div.sheet-toxbar::before { content:"25% HP Remaining"; } input.sheet-toxbar[value="26"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 26%, #dd7e6b 30%, #dd7e6b 100%); } input.sheet-toxbar[value="26"] ~ div.sheet-toxbar::before { content:"26% HP Remaining"; } input.sheet-toxbar[value="27"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 27%, #dd7e6b 31%, #dd7e6b 100%); } input.sheet-toxbar[value="27"] ~ div.sheet-toxbar::before { content:"27% HP Remaining"; } input.sheet-toxbar[value="28"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 28%, #dd7e6b 32%, #dd7e6b 100%); } input.sheet-toxbar[value="28"] ~ div.sheet-toxbar::before { content:"28% HP Remaining"; } input.sheet-toxbar[value="29"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 29%, #dd7e6b 33%, #dd7e6b 100%); } input.sheet-toxbar[value="29"] ~ div.sheet-toxbar::before { content:"29% HP Remaining"; } input.sheet-toxbar[value="30"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 30%, #dd7e6b 34%, #dd7e6b 100%); } input.sheet-toxbar[value="30"] ~ div.sheet-toxbar::before { content:"30% HP Remaining"; } input.sheet-toxbar[value="31"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 31%, #dd7e6b 35%, #dd7e6b 100%); } input.sheet-toxbar[value="31"] ~ div.sheet-toxbar::before { content:"31% HP Remaining"; } input.sheet-toxbar[value="32"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 32%, #dd7e6b 36%, #dd7e6b 100%); } input.sheet-toxbar[value="32"] ~ div.sheet-toxbar::before { content:"32% HP Remaining"; } input.sheet-toxbar[value="33"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 33%, #dd7e6b 37%, #dd7e6b 100%); } input.sheet-toxbar[value="33"] ~ div.sheet-toxbar::before { content:"33% HP Remaining"; } input.sheet-toxbar[value="34"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 34%, #dd7e6b 38%, #dd7e6b 100%); } input.sheet-toxbar[value="34"] ~ div.sheet-toxbar::before { content:"34% HP Remaining"; } input.sheet-toxbar[value="35"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 35%, #dd7e6b 39%, #dd7e6b 100%); } input.sheet-toxbar[value="35"] ~ div.sheet-toxbar::before { content:"35% HP Remaining"; } input.sheet-toxbar[value="36"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 36%, #dd7e6b 40%, #dd7e6b 100%); } input.sheet-toxbar[value="36"] ~ div.sheet-toxbar::before { content:"36% HP Remaining"; } input.sheet-toxbar[value="37"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 37%, #dd7e6b 41%, #dd7e6b 100%); } input.sheet-toxbar[value="37"] ~ div.sheet-toxbar::before { content:"37% HP Remaining"; } input.sheet-toxbar[value="38"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 38%, #dd7e6b 42%, #dd7e6b 100%); } input.sheet-toxbar[value="38"] ~ div.sheet-toxbar::before { content:"38% HP Remaining"; } input.sheet-toxbar[value="39"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 39%, #dd7e6b 43%, #dd7e6b 100%); } input.sheet-toxbar[value="39"] ~ div.sheet-toxbar::before { content:"39% HP Remaining"; } input.sheet-toxbar[value="40"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 40%, #dd7e6b 44%, #dd7e6b 100%); } input.sheet-toxbar[value="40"] ~ div.sheet-toxbar::before { content:"40% HP Remaining"; } input.sheet-toxbar[value="41"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 41%, #dd7e6b 45%, #dd7e6b 100%); } input.sheet-toxbar[value="41"] ~ div.sheet-toxbar::before { content:"41% HP Remaining"; } input.sheet-toxbar[value="42"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 42%, #dd7e6b 46%, #dd7e6b 100%); } input.sheet-toxbar[value="42"] ~ div.sheet-toxbar::before { content:"42% HP Remaining"; } input.sheet-toxbar[value="43"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 43%, #dd7e6b 47%, #dd7e6b 100%); } input.sheet-toxbar[value="43"] ~ div.sheet-toxbar::before { content:"43% HP Remaining"; } input.sheet-toxbar[value="44"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 44%, #dd7e6b 48%, #dd7e6b 100%); } input.sheet-toxbar[value="44"] ~ div.sheet-toxbar::before { content:"44% HP Remaining"; } input.sheet-toxbar[value="45"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 45%, #dd7e6b 49%, #dd7e6b 100%); } input.sheet-toxbar[value="45"] ~ div.sheet-toxbar::before { content:"45% HP Remaining"; } input.sheet-toxbar[value="46"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 46%, #dd7e6b 50%, #dd7e6b 100%); } input.sheet-toxbar[value="46"] ~ div.sheet-toxbar::before { content:"46% HP Remaining"; } input.sheet-toxbar[value="47"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 47%, #dd7e6b 51%, #dd7e6b 100%); } input.sheet-toxbar[value="47"] ~ div.sheet-toxbar::before { content:"47% HP Remaining"; } input.sheet-toxbar[value="48"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 48%, #dd7e6b 52%, #dd7e6b 100%); } input.sheet-toxbar[value="48"] ~ div.sheet-toxbar::before { content:"48% HP Remaining"; } input.sheet-toxbar[value="49"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 49%, #dd7e6b 53%, #dd7e6b 100%); } input.sheet-toxbar[value="49"] ~ div.sheet-toxbar::before { content:"49% HP Remaining"; } input.sheet-toxbar[value="50"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 50%, #dd7e6b 54%, #dd7e6b 100%); } input.sheet-toxbar[value="50"] ~ div.sheet-toxbar::before { content:"50% HP Remaining"; } input.sheet-toxbar[value="51"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 51%, #dd7e6b 55%, #dd7e6b 100%); } input.sheet-toxbar[value="51"] ~ div.sheet-toxbar::before { content:"51% HP Remaining"; } input.sheet-toxbar[value="52"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 52%, #dd7e6b 56%, #dd7e6b 100%); } input.sheet-toxbar[value="52"] ~ div.sheet-toxbar::before { content:"52% HP Remaining"; } input.sheet-toxbar[value="53"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 53%, #dd7e6b 57%, #dd7e6b 100%); } input.sheet-toxbar[value="53"] ~ div.sheet-toxbar::before { content:"53% HP Remaining"; } input.sheet-toxbar[value="54"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 54%, #dd7e6b 58%, #dd7e6b 100%); } input.sheet-toxbar[value="54"] ~ div.sheet-toxbar::before { content:"54% HP Remaining"; } input.sheet-toxbar[value="55"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 55%, #dd7e6b 59%, #dd7e6b 100%); } input.sheet-toxbar[value="55"] ~ div.sheet-toxbar::before { content:"55% HP Remaining"; } input.sheet-toxbar[value="56"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 56%, #dd7e6b 60%, #dd7e6b 100%); } input.sheet-toxbar[value="56"] ~ div.sheet-toxbar::before { content:"56% HP Remaining"; } input.sheet-toxbar[value="57"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 57%, #dd7e6b 61%, #dd7e6b 100%); } input.sheet-toxbar[value="57"] ~ div.sheet-toxbar::before { content:"57% HP Remaining"; } input.sheet-toxbar[value="58"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 58%, #dd7e6b 62%, #dd7e6b 100%); } input.sheet-toxbar[value="58"] ~ div.sheet-toxbar::before { content:"58% HP Remaining"; } input.sheet-toxbar[value="59"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 59%, #dd7e6b 63%, #dd7e6b 100%); } input.sheet-toxbar[value="59"] ~ div.sheet-toxbar::before { content:"59% HP Remaining"; } input.sheet-toxbar[value="60"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 60%, #dd7e6b 64%, #dd7e6b 100%); } input.sheet-toxbar[value="60"] ~ div.sheet-toxbar::before { content:"60% HP Remaining"; } input.sheet-toxbar[value="61"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 61%, #dd7e6b 65%, #dd7e6b 100%); } input.sheet-toxbar[value="61"] ~ div.sheet-toxbar::before { content:"61% HP Remaining"; } input.sheet-toxbar[value="62"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 62%, #dd7e6b 66%, #dd7e6b 100%); } input.sheet-toxbar[value="62"] ~ div.sheet-toxbar::before { content:"62% HP Remaining"; } input.sheet-toxbar[value="63"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 63%, #dd7e6b 67%, #dd7e6b 100%); } input.sheet-toxbar[value="63"] ~ div.sheet-toxbar::before { content:"63% HP Remaining"; } input.sheet-toxbar[value="64"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 64%, #dd7e6b 68%, #dd7e6b 100%); } input.sheet-toxbar[value="64"] ~ div.sheet-toxbar::before { content:"64% HP Remaining"; } input.sheet-toxbar[value="65"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 65%, #dd7e6b 69%, #dd7e6b 100%); } input.sheet-toxbar[value="65"] ~ div.sheet-toxbar::before { content:"65% HP Remaining"; } input.sheet-toxbar[value="66"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 66%, #dd7e6b 70%, #dd7e6b 100%); } input.sheet-toxbar[value="66"] ~ div.sheet-toxbar::before { content:"66% HP Remaining"; } input.sheet-toxbar[value="67"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 67%, #dd7e6b 71%, #dd7e6b 100%); } input.sheet-toxbar[value="67"] ~ div.sheet-toxbar::before { content:"67% HP Remaining"; } input.sheet-toxbar[value="68"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 68%, #dd7e6b 72%, #dd7e6b 100%); } input.sheet-toxbar[value="68"] ~ div.sheet-toxbar::before { content:"68% HP Remaining"; } input.sheet-toxbar[value="69"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 69%, #dd7e6b 73%, #dd7e6b 100%); } input.sheet-toxbar[value="69"] ~ div.sheet-toxbar::before { content:"69% HP Remaining"; } input.sheet-toxbar[value="70"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 70%, #dd7e6b 74%, #dd7e6b 100%); } input.sheet-toxbar[value="70"] ~ div.sheet-toxbar::before { content:"70% HP Remaining"; } input.sheet-toxbar[value="71"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 71%, #dd7e6b 75%, #dd7e6b 100%); } input.sheet-toxbar[value="71"] ~ div.sheet-toxbar::before { content:"71% HP Remaining"; } input.sheet-toxbar[value="72"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 72%, #dd7e6b 76%, #dd7e6b 100%); } input.sheet-toxbar[value="72"] ~ div.sheet-toxbar::before { content:"72% HP Remaining"; } input.sheet-toxbar[value="73"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 73%, #dd7e6b 77%, #dd7e6b 100%); } input.sheet-toxbar[value="73"] ~ div.sheet-toxbar::before { content:"73% HP Remaining"; } input.sheet-toxbar[value="74"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 74%, #dd7e6b 78%, #dd7e6b 100%); } input.sheet-toxbar[value="74"] ~ div.sheet-toxbar::before { content:"74% HP Remaining"; } input.sheet-toxbar[value="75"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 75%, #dd7e6b 79%, #dd7e6b 100%); } input.sheet-toxbar[value="75"] ~ div.sheet-toxbar::before { content:"75% HP Remaining"; } input.sheet-toxbar[value="76"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 76%, #dd7e6b 80%, #dd7e6b 100%); } input.sheet-toxbar[value="76"] ~ div.sheet-toxbar::before { content:"76% HP Remaining"; } input.sheet-toxbar[value="77"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 77%, #dd7e6b 81%, #dd7e6b 100%); } input.sheet-toxbar[value="77"] ~ div.sheet-toxbar::before { content:"77% HP Remaining"; } input.sheet-toxbar[value="78"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 78%, #dd7e6b 82%, #dd7e6b 100%); } input.sheet-toxbar[value="78"] ~ div.sheet-toxbar::before { content:"78% HP Remaining"; } input.sheet-toxbar[value="79"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 79%, #dd7e6b 83%, #dd7e6b 100%); } input.sheet-toxbar[value="79"] ~ div.sheet-toxbar::before { content:"79% HP Remaining"; } input.sheet-toxbar[value="80"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 80%, #dd7e6b 84%, #dd7e6b 100%); } input.sheet-toxbar[value="80"] ~ div.sheet-toxbar::before { content:"80% HP Remaining"; } input.sheet-toxbar[value="81"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 81%, #dd7e6b 85%, #dd7e6b 100%); } input.sheet-toxbar[value="81"] ~ div.sheet-toxbar::before { content:"81% HP Remaining"; } input.sheet-toxbar[value="82"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 82%, #dd7e6b 86%, #dd7e6b 100%); } input.sheet-toxbar[value="82"] ~ div.sheet-toxbar::before { content:"82% HP Remaining"; } input.sheet-toxbar[value="83"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 83%, #dd7e6b 87%, #dd7e6b 100%); } input.sheet-toxbar[value="83"] ~ div.sheet-toxbar::before { content:"83% HP Remaining"; } input.sheet-toxbar[value="84"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 84%, #dd7e6b 88%, #dd7e6b 100%); } input.sheet-toxbar[value="84"] ~ div.sheet-toxbar::before { content:"84% HP Remaining"; } input.sheet-toxbar[value="85"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 85%, #dd7e6b 89%, #dd7e6b 100%); } input.sheet-toxbar[value="85"] ~ div.sheet-toxbar::before { content:"85% HP Remaining"; } input.sheet-toxbar[value="86"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 86%, #dd7e6b 90%, #dd7e6b 100%); } input.sheet-toxbar[value="86"] ~ div.sheet-toxbar::before { content:"86% HP Remaining"; } input.sheet-toxbar[value="87"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 87%, #dd7e6b 91%, #dd7e6b 100%); } input.sheet-toxbar[value="87"] ~ div.sheet-toxbar::before { content:"87% HP Remaining"; } input.sheet-toxbar[value="88"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 88%, #dd7e6b 92%, #dd7e6b 100%); } input.sheet-toxbar[value="88"] ~ div.sheet-toxbar::before { content:"88% HP Remaining"; } input.sheet-toxbar[value="89"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 89%, #dd7e6b 93%, #dd7e6b 100%); } input.sheet-toxbar[value="89"] ~ div.sheet-toxbar::before { content:"89% HP Remaining"; } input.sheet-toxbar[value="90"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 90%, #dd7e6b 94%, #dd7e6b 100%); } input.sheet-toxbar[value="90"] ~ div.sheet-toxbar::before { content:"90% HP Remaining"; } input.sheet-toxbar[value="91"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 91%, #dd7e6b 95%, #dd7e6b 100%); } input.sheet-toxbar[value="91"] ~ div.sheet-toxbar::before { content:"91% HP Remaining"; } input.sheet-toxbar[value="92"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 92%, #dd7e6b 96%, #dd7e6b 100%); } input.sheet-toxbar[value="92"] ~ div.sheet-toxbar::before { content:"92% HP Remaining"; } input.sheet-toxbar[value="93"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 93%, #dd7e6b 97%, #dd7e6b 100%); } input.sheet-toxbar[value="93"] ~ div.sheet-toxbar::before { content:"93% HP Remaining"; } input.sheet-toxbar[value="94"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 94%, #dd7e6b 98%, #dd7e6b 100%); } input.sheet-toxbar[value="94"] ~ div.sheet-toxbar::before { content:"94% HP Remaining"; } input.sheet-toxbar[value="95"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 95%, #dd7e6b 99%, #dd7e6b 100%); } input.sheet-toxbar[value="95"] ~ div.sheet-toxbar::before { content:"95% HP Remaining"; } input.sheet-toxbar[value="96"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 96%, #dd7e6b 100%); } input.sheet-toxbar[value="96"] ~ div.sheet-toxbar::before { content:"96% HP Remaining"; } input.sheet-toxbar[value="97"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 97%, #dd7e6b 100%); } input.sheet-toxbar[value="97"] ~ div.sheet-toxbar::before { content:"97% HP Remaining"; } input.sheet-toxbar[value="98"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 98%, #dd7e6b 100%); } input.sheet-toxbar[value="98"] ~ div.sheet-toxbar::before { content:"98% HP Remaining"; } input.sheet-toxbar[value="99"] ~ div.sheet-toxbar { background: linear-gradient(to right, #adfc03 1%, #adfc03 99%, #dd7e6b 100%); } input.sheet-toxbar[value="99"] ~ div.sheet-toxbar::before { content:"99% HP Remaining"; } input.sheet-toxbar[value="100"] ~ div.sheet-toxbar { background: #adfc03; } input.sheet-toxbar[value="100"] ~ div.sheet-toxbar::before { content:"Full Health"; } input.sheet-toxbar[value="101"] ~ div.sheet-toxbar { background: #adfc03;; } input.sheet-toxbar[value="101"] ~ div.sheet-toxbar::before { content:"Above Max HP"; } /* HP Bars End*/ /* Exhaustion Bars */ div.sheet-exhaustion_bar { width: 216px; height: 21px; border: 2px solid black; color: black; font-size: 16px; font-weight: bold; text-align: center; } input.sheet-exhaustion_bar[value="0"] ~ div.sheet-exhaustion_bar { background: #adfc03; } input.sheet-exhaustion_bar[value="0"] ~ div.sheet-exhaustion_bar::before { content: "Healthy and Fit"; } input.sheet-exhaustion_bar[value="1"] ~ div.sheet-exhaustion_bar { background: linear-gradient(to right, #dd7e6b 1%, #adfc03 20%, #adfc03 100%); } input.sheet-exhaustion_bar[value="1"] ~ div.sheet-exhaustion_bar::before { content:"1 Exhaustion"; } input.sheet-exhaustion_bar[value="2"] ~ div.sheet-exhaustion_bar { background: linear-gradient(to right, #dd7e6b 1%, #dd7e6b 10%, #adfc03 30%, #adfc03 100%); } input.sheet-exhaustion_bar[value="2"] ~ div.sheet-exhaustion_bar::before { content:"2 Exhaustion"; } input.sheet-exhaustion_bar[value="3"] ~ div.sheet-exhaustion_bar { background: linear-gradient(to right, #dd7e6b 1%, #dd7e6b 20%, #adfc03 40%, #adfc03 100%); } input.sheet-exhaustion_bar[value="3"] ~ div.sheet-exhaustion_bar::before { content:"3 Exhaustion"; } input.sheet-exhaustion_bar[value="4"] ~ div.sheet-exhaustion_bar { background: linear-gradient(to right, #dd7e6b 1%, #dd7e6b 30%, #adfc03 50%, #adfc03 100%); } input.sheet-exhaustion_bar[value="4"] ~ div.sheet-exhaustion_bar::before { content:"4 Exhaustion"; } input.sheet-exhaustion_bar[value="5"] ~ div.sheet-exhaustion_bar { background: linear-gradient(to right, #dd7e6b 1%, #dd7e6b 40%, #adfc03 60%, #adfc03 100%); } input.sheet-exhaustion_bar[value="5"] ~ div.sheet-exhaustion_bar::before { content:"5 Exhaustion"; } input.sheet-exhaustion_bar[value="6"] ~ div.sheet-exhaustion_bar { background: linear-gradient(to right, #dd7e6b 1%, #dd7e6b 50%, #adfc03 70%, #adfc03 100%); } input.sheet-exhaustion_bar[value="6"] ~ div.sheet-exhaustion_bar::before { content:"6 Exhaustion"; } input.sheet-exhaustion_bar[value="7"] ~ div.sheet-exhaustion_bar { background: linear-gradient(to right, #dd7e6b 1%, #dd7e6b 60%, #adfc03 80%, #adfc03 100%); } input.sheet-exhaustion_bar[value="7"] ~ div.sheet-exhaustion_bar::before { content:"7 Exhaustion"; } input.sheet-exhaustion_bar[value="8"] ~ div.sheet-exhaustion_bar { background: linear-gradient(to right, #dd7e6b 1%, #dd7e6b 70%, #adfc03 90%, #adfc03 100%); } input.sheet-exhaustion_bar[value="8"] ~ div.sheet-exhaustion_bar::before { content:"8 Exhaustion"; } input.sheet-exhaustion_bar[value="9"] ~ div.sheet-exhaustion_bar { background: linear-gradient(to right, #dd7e6b 1%, #dd7e6b 80%, #adfc03 100%); } input.sheet-exhaustion_bar[value="9"] ~ div.sheet-exhaustion_bar::before { content:"9 Exhaustion"; } input.sheet-exhaustion_bar[value="10"] ~ div.sheet-exhaustion_bar { background: linear-gradient(to right, #dd7e6b 1%, #dd7e6b 25%, #dd7e6b 100%); } input.sheet-exhaustion_bar[value="10"] ~ div.sheet-exhaustion_bar::before { content:"Death"; } /* Exhaustion Bars End*/ /* Sanity Bar */ div.sheet-sanity_bar { width: 216px; height: 21px; border: 2px solid black; color: black; font-size: 16px; font-weight: bold; text-align: center; } input.sheet-sanity_bar[value="0"] ~ div.sheet-sanity_bar { background: #b546ce; } input.sheet-sanity_bar[value="0"] ~ div.sheet-sanity_bar::before { content: "TAKE MENTAL INJURY"; } input.sheet-sanity_bar[value="1"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #b546ce 5%, #b546ce 100%); } input.sheet-sanity_bar[value="1"] ~ div.sheet-sanity_bar::before { content:"1% Sanity Remaining"; } input.sheet-sanity_bar[value="2"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 2%, #b546ce 6%, #b546ce 100%); } input.sheet-sanity_bar[value="2"] ~ div.sheet-sanity_bar::before { content:"2% Sanity Remaining"; } input.sheet-sanity_bar[value="3"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 3%, #b546ce 7%, #b546ce 100%); } input.sheet-sanity_bar[value="3"] ~ div.sheet-sanity_bar::before { content:"3% Sanity Remaining"; } input.sheet-sanity_bar[value="4"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 4%, #b546ce 8%, #b546ce 100%); } input.sheet-sanity_bar[value="4"] ~ div.sheet-sanity_bar::before { content:"4% Sanity Remaining"; } input.sheet-sanity_bar[value="5"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 5%, #b546ce 9%, #b546ce 100%); } input.sheet-sanity_bar[value="5"] ~ div.sheet-sanity_bar::before { content:"5% Sanity Remaining"; } input.sheet-sanity_bar[value="6"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 6%, #b546ce 10%, #b546ce 100%); } input.sheet-sanity_bar[value="6"] ~ div.sheet-sanity_bar::before { content:"6% Sanity Remaining"; } input.sheet-sanity_bar[value="7"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 7%, #b546ce 11%, #b546ce 100%); } input.sheet-sanity_bar[value="7"] ~ div.sheet-sanity_bar::before { content:"7% Sanity Remaining"; } input.sheet-sanity_bar[value="8"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 8%, #b546ce 12%, #b546ce 100%); } input.sheet-sanity_bar[value="8"] ~ div.sheet-sanity_bar::before { content:"8% Sanity Remaining"; } input.sheet-sanity_bar[value="9"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 9%, #b546ce 13%, #b546ce 100%); } input.sheet-sanity_bar[value="9"] ~ div.sheet-sanity_bar::before { content:"9% Sanity Remaining"; } input.sheet-sanity_bar[value="10"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 10%, #b546ce 14%, #b546ce 100%); } input.sheet-sanity_bar[value="10"] ~ div.sheet-sanity_bar::before { content:"10% Sanity Remaining"; } input.sheet-sanity_bar[value="11"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 11%, #b546ce 15%, #b546ce 100%); } input.sheet-sanity_bar[value="11"] ~ div.sheet-sanity_bar::before { content:"11% Sanity Remaining"; } input.sheet-sanity_bar[value="12"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 12%, #b546ce 16%, #b546ce 100%); } input.sheet-sanity_bar[value="12"] ~ div.sheet-sanity_bar::before { content:"12% Sanity Remaining"; } input.sheet-sanity_bar[value="13"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 13%, #b546ce 17%, #b546ce 100%); } input.sheet-sanity_bar[value="13"] ~ div.sheet-sanity_bar::before { content:"13% Sanity Remaining"; } input.sheet-sanity_bar[value="14"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 14%, #b546ce 18%, #b546ce 100%); } input.sheet-sanity_bar[value="14"] ~ div.sheet-sanity_bar::before { content:"14% Sanity Remaining"; } input.sheet-sanity_bar[value="15"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 15%, #b546ce 19%, #b546ce 100%); } input.sheet-sanity_bar[value="15"] ~ div.sheet-sanity_bar::before { content:"15% Sanity Remaining"; } input.sheet-sanity_bar[value="16"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 16%, #b546ce 20%, #b546ce 100%); } input.sheet-sanity_bar[value="16"] ~ div.sheet-sanity_bar::before { content:"16% Sanity Remaining"; } input.sheet-sanity_bar[value="17"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 17%, #b546ce 21%, #b546ce 100%); } input.sheet-sanity_bar[value="17"] ~ div.sheet-sanity_bar::before { content:"17% Sanity Remaining"; } input.sheet-sanity_bar[value="18"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 18%, #b546ce 22%, #b546ce 100%); } input.sheet-sanity_bar[value="18"] ~ div.sheet-sanity_bar::before { content:"18% Sanity Remaining"; } input.sheet-sanity_bar[value="19"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 19%, #b546ce 23%, #b546ce 100%); } input.sheet-sanity_bar[value="19"] ~ div.sheet-sanity_bar::before { content:"19% Sanity Remaining"; } input.sheet-sanity_bar[value="20"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 20%, #b546ce 24%, #b546ce 100%); } input.sheet-sanity_bar[value="20"] ~ div.sheet-sanity_bar::before { content:"20% Sanity Remaining"; } input.sheet-sanity_bar[value="21"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 21%, #b546ce 25%, #b546ce 100%); } input.sheet-sanity_bar[value="21"] ~ div.sheet-sanity_bar::before { content:"21% Sanity Remaining"; } input.sheet-sanity_bar[value="22"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 22%, #b546ce 26%, #b546ce 100%); } input.sheet-sanity_bar[value="22"] ~ div.sheet-sanity_bar::before { content:"22% Sanity Remaining"; } input.sheet-sanity_bar[value="23"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 23%, #b546ce 27%, #b546ce 100%); } input.sheet-sanity_bar[value="23"] ~ div.sheet-sanity_bar::before { content:"23% Sanity Remaining"; } input.sheet-sanity_bar[value="24"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 24%, #b546ce 28%, #b546ce 100%); } input.sheet-sanity_bar[value="24"] ~ div.sheet-sanity_bar::before { content:"24% Sanity Remaining"; } input.sheet-sanity_bar[value="25"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 25%, #b546ce 29%, #b546ce 100%); } input.sheet-sanity_bar[value="25"] ~ div.sheet-sanity_bar::before { content:"25% Sanity Remaining"; } input.sheet-sanity_bar[value="26"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 26%, #b546ce 30%, #b546ce 100%); } input.sheet-sanity_bar[value="26"] ~ div.sheet-sanity_bar::before { content:"26% Sanity Remaining"; } input.sheet-sanity_bar[value="27"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 27%, #b546ce 31%, #b546ce 100%); } input.sheet-sanity_bar[value="27"] ~ div.sheet-sanity_bar::before { content:"27% Sanity Remaining"; } input.sheet-sanity_bar[value="28"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 28%, #b546ce 32%, #b546ce 100%); } input.sheet-sanity_bar[value="28"] ~ div.sheet-sanity_bar::before { content:"28% Sanity Remaining"; } input.sheet-sanity_bar[value="29"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 29%, #b546ce 33%, #b546ce 100%); } input.sheet-sanity_bar[value="29"] ~ div.sheet-sanity_bar::before { content:"29% Sanity Remaining"; } input.sheet-sanity_bar[value="30"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 30%, #b546ce 34%, #b546ce 100%); } input.sheet-sanity_bar[value="30"] ~ div.sheet-sanity_bar::before { content:"30% Sanity Remaining"; } input.sheet-sanity_bar[value="31"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 31%, #b546ce 35%, #b546ce 100%); } input.sheet-sanity_bar[value="31"] ~ div.sheet-sanity_bar::before { content:"31% Sanity Remaining"; } input.sheet-sanity_bar[value="32"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 32%, #b546ce 36%, #b546ce 100%); } input.sheet-sanity_bar[value="32"] ~ div.sheet-sanity_bar::before { content:"32% Sanity Remaining"; } input.sheet-sanity_bar[value="33"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 33%, #b546ce 37%, #b546ce 100%); } input.sheet-sanity_bar[value="33"] ~ div.sheet-sanity_bar::before { content:"33% Sanity Remaining"; } input.sheet-sanity_bar[value="34"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 34%, #b546ce 38%, #b546ce 100%); } input.sheet-sanity_bar[value="34"] ~ div.sheet-sanity_bar::before { content:"34% Sanity Remaining"; } input.sheet-sanity_bar[value="35"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 35%, #b546ce 39%, #b546ce 100%); } input.sheet-sanity_bar[value="35"] ~ div.sheet-sanity_bar::before { content:"35% Sanity Remaining"; } input.sheet-sanity_bar[value="36"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 36%, #b546ce 40%, #b546ce 100%); } input.sheet-sanity_bar[value="36"] ~ div.sheet-sanity_bar::before { content:"36% Sanity Remaining"; } input.sheet-sanity_bar[value="37"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 37%, #b546ce 41%, #b546ce 100%); } input.sheet-sanity_bar[value="37"] ~ div.sheet-sanity_bar::before { content:"37% Sanity Remaining"; } input.sheet-sanity_bar[value="38"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 38%, #b546ce 42%, #b546ce 100%); } input.sheet-sanity_bar[value="38"] ~ div.sheet-sanity_bar::before { content:"38% Sanity Remaining"; } input.sheet-sanity_bar[value="39"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 39%, #b546ce 43%, #b546ce 100%); } input.sheet-sanity_bar[value="39"] ~ div.sheet-sanity_bar::before { content:"39% Sanity Remaining"; } input.sheet-sanity_bar[value="40"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 40%, #b546ce 44%, #b546ce 100%); } input.sheet-sanity_bar[value="40"] ~ div.sheet-sanity_bar::before { content:"40% Sanity Remaining"; } input.sheet-sanity_bar[value="41"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 41%, #b546ce 45%, #b546ce 100%); } input.sheet-sanity_bar[value="41"] ~ div.sheet-sanity_bar::before { content:"41% Sanity Remaining"; } input.sheet-sanity_bar[value="42"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 42%, #b546ce 46%, #b546ce 100%); } input.sheet-sanity_bar[value="42"] ~ div.sheet-sanity_bar::before { content:"42% Sanity Remaining"; } input.sheet-sanity_bar[value="43"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 43%, #b546ce 47%, #b546ce 100%); } input.sheet-sanity_bar[value="43"] ~ div.sheet-sanity_bar::before { content:"43% Sanity Remaining"; } input.sheet-sanity_bar[value="44"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 44%, #b546ce 48%, #b546ce 100%); } input.sheet-sanity_bar[value="44"] ~ div.sheet-sanity_bar::before { content:"44% Sanity Remaining"; } input.sheet-sanity_bar[value="45"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 45%, #b546ce 49%, #b546ce 100%); } input.sheet-sanity_bar[value="45"] ~ div.sheet-sanity_bar::before { content:"45% Sanity Remaining"; } input.sheet-sanity_bar[value="46"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 46%, #b546ce 50%, #b546ce 100%); } input.sheet-sanity_bar[value="46"] ~ div.sheet-sanity_bar::before { content:"46% Sanity Remaining"; } input.sheet-sanity_bar[value="47"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 47%, #b546ce 51%, #b546ce 100%); } input.sheet-sanity_bar[value="47"] ~ div.sheet-sanity_bar::before { content:"47% Sanity Remaining"; } input.sheet-sanity_bar[value="48"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 48%, #b546ce 52%, #b546ce 100%); } input.sheet-sanity_bar[value="48"] ~ div.sheet-sanity_bar::before { content:"48% Sanity Remaining"; } input.sheet-sanity_bar[value="49"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 49%, #b546ce 53%, #b546ce 100%); } input.sheet-sanity_bar[value="49"] ~ div.sheet-sanity_bar::before { content:"49% Sanity Remaining"; } input.sheet-sanity_bar[value="50"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 50%, #b546ce 54%, #b546ce 100%); } input.sheet-sanity_bar[value="50"] ~ div.sheet-sanity_bar::before { content:"50% Sanity Remaining"; } input.sheet-sanity_bar[value="51"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 51%, #b546ce 55%, #b546ce 100%); } input.sheet-sanity_bar[value="51"] ~ div.sheet-sanity_bar::before { content:"51% Sanity Remaining"; } input.sheet-sanity_bar[value="52"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 52%, #b546ce 56%, #b546ce 100%); } input.sheet-sanity_bar[value="52"] ~ div.sheet-sanity_bar::before { content:"52% Sanity Remaining"; } input.sheet-sanity_bar[value="53"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 53%, #b546ce 57%, #b546ce 100%); } input.sheet-sanity_bar[value="53"] ~ div.sheet-sanity_bar::before { content:"53% Sanity Remaining"; } input.sheet-sanity_bar[value="54"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 54%, #b546ce 58%, #b546ce 100%); } input.sheet-sanity_bar[value="54"] ~ div.sheet-sanity_bar::before { content:"54% Sanity Remaining"; } input.sheet-sanity_bar[value="55"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 55%, #b546ce 59%, #b546ce 100%); } input.sheet-sanity_bar[value="55"] ~ div.sheet-sanity_bar::before { content:"55% Sanity Remaining"; } input.sheet-sanity_bar[value="56"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 56%, #b546ce 60%, #b546ce 100%); } input.sheet-sanity_bar[value="56"] ~ div.sheet-sanity_bar::before { content:"56% Sanity Remaining"; } input.sheet-sanity_bar[value="57"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 57%, #b546ce 61%, #b546ce 100%); } input.sheet-sanity_bar[value="57"] ~ div.sheet-sanity_bar::before { content:"57% Sanity Remaining"; } input.sheet-sanity_bar[value="58"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 58%, #b546ce 62%, #b546ce 100%); } input.sheet-sanity_bar[value="58"] ~ div.sheet-sanity_bar::before { content:"58% Sanity Remaining"; } input.sheet-sanity_bar[value="59"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 59%, #b546ce 63%, #b546ce 100%); } input.sheet-sanity_bar[value="59"] ~ div.sheet-sanity_bar::before { content:"59% Sanity Remaining"; } input.sheet-sanity_bar[value="60"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 60%, #b546ce 64%, #b546ce 100%); } input.sheet-sanity_bar[value="60"] ~ div.sheet-sanity_bar::before { content:"60% Sanity Remaining"; } input.sheet-sanity_bar[value="61"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 61%, #b546ce 65%, #b546ce 100%); } input.sheet-sanity_bar[value="61"] ~ div.sheet-sanity_bar::before { content:"61% Sanity Remaining"; } input.sheet-sanity_bar[value="62"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 62%, #b546ce 66%, #b546ce 100%); } input.sheet-sanity_bar[value="62"] ~ div.sheet-sanity_bar::before { content:"62% Sanity Remaining"; } input.sheet-sanity_bar[value="63"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 63%, #b546ce 67%, #b546ce 100%); } input.sheet-sanity_bar[value="63"] ~ div.sheet-sanity_bar::before { content:"63% Sanity Remaining"; } input.sheet-sanity_bar[value="64"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 64%, #b546ce 68%, #b546ce 100%); } input.sheet-sanity_bar[value="64"] ~ div.sheet-sanity_bar::before { content:"64% Sanity Remaining"; } input.sheet-sanity_bar[value="65"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 65%, #b546ce 69%, #b546ce 100%); } input.sheet-sanity_bar[value="65"] ~ div.sheet-sanity_bar::before { content:"65% Sanity Remaining"; } input.sheet-sanity_bar[value="66"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 66%, #b546ce 70%, #b546ce 100%); } input.sheet-sanity_bar[value="66"] ~ div.sheet-sanity_bar::before { content:"66% Sanity Remaining"; } input.sheet-sanity_bar[value="67"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 67%, #b546ce 71%, #b546ce 100%); } input.sheet-sanity_bar[value="67"] ~ div.sheet-sanity_bar::before { content:"67% Sanity Remaining"; } input.sheet-sanity_bar[value="68"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 68%, #b546ce 72%, #b546ce 100%); } input.sheet-sanity_bar[value="68"] ~ div.sheet-sanity_bar::before { content:"68% Sanity Remaining"; } input.sheet-sanity_bar[value="69"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 69%, #b546ce 73%, #b546ce 100%); } input.sheet-sanity_bar[value="69"] ~ div.sheet-sanity_bar::before { content:"69% Sanity Remaining"; } input.sheet-sanity_bar[value="70"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 70%, #b546ce 74%, #b546ce 100%); } input.sheet-sanity_bar[value="70"] ~ div.sheet-sanity_bar::before { content:"70% Sanity Remaining"; } input.sheet-sanity_bar[value="71"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 71%, #b546ce 75%, #b546ce 100%); } input.sheet-sanity_bar[value="71"] ~ div.sheet-sanity_bar::before { content:"71% Sanity Remaining"; } input.sheet-sanity_bar[value="72"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 72%, #b546ce 76%, #b546ce 100%); } input.sheet-sanity_bar[value="72"] ~ div.sheet-sanity_bar::before { content:"72% Sanity Remaining"; } input.sheet-sanity_bar[value="73"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 73%, #b546ce 77%, #b546ce 100%); } input.sheet-sanity_bar[value="73"] ~ div.sheet-sanity_bar::before { content:"73% Sanity Remaining"; } input.sheet-sanity_bar[value="74"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 74%, #b546ce 78%, #b546ce 100%); } input.sheet-sanity_bar[value="74"] ~ div.sheet-sanity_bar::before { content:"74% Sanity Remaining"; } input.sheet-sanity_bar[value="75"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 75%, #b546ce 79%, #b546ce 100%); } input.sheet-sanity_bar[value="75"] ~ div.sheet-sanity_bar::before { content:"75% Sanity Remaining"; } input.sheet-sanity_bar[value="76"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 76%, #b546ce 80%, #b546ce 100%); } input.sheet-sanity_bar[value="76"] ~ div.sheet-sanity_bar::before { content:"76% Sanity Remaining"; } input.sheet-sanity_bar[value="77"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 77%, #b546ce 81%, #b546ce 100%); } input.sheet-sanity_bar[value="77"] ~ div.sheet-sanity_bar::before { content:"77% Sanity Remaining"; } input.sheet-sanity_bar[value="78"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 78%, #b546ce 82%, #b546ce 100%); } input.sheet-sanity_bar[value="78"] ~ div.sheet-sanity_bar::before { content:"78% Sanity Remaining"; } input.sheet-sanity_bar[value="79"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 79%, #b546ce 83%, #b546ce 100%); } input.sheet-sanity_bar[value="79"] ~ div.sheet-sanity_bar::before { content:"79% Sanity Remaining"; } input.sheet-sanity_bar[value="80"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 80%, #b546ce 84%, #b546ce 100%); } input.sheet-sanity_bar[value="80"] ~ div.sheet-sanity_bar::before { content:"80% Sanity Remaining"; } input.sheet-sanity_bar[value="81"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 81%, #b546ce 85%, #b546ce 100%); } input.sheet-sanity_bar[value="81"] ~ div.sheet-sanity_bar::before { content:"81% Sanity Remaining"; } input.sheet-sanity_bar[value="82"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 82%, #b546ce 86%, #b546ce 100%); } input.sheet-sanity_bar[value="82"] ~ div.sheet-sanity_bar::before { content:"82% Sanity Remaining"; } input.sheet-sanity_bar[value="83"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 83%, #b546ce 87%, #b546ce 100%); } input.sheet-sanity_bar[value="83"] ~ div.sheet-sanity_bar::before { content:"83% Sanity Remaining"; } input.sheet-sanity_bar[value="84"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 84%, #b546ce 88%, #b546ce 100%); } input.sheet-sanity_bar[value="84"] ~ div.sheet-sanity_bar::before { content:"84% Sanity Remaining"; } input.sheet-sanity_bar[value="85"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 85%, #b546ce 89%, #b546ce 100%); } input.sheet-sanity_bar[value="85"] ~ div.sheet-sanity_bar::before { content:"85% Sanity Remaining"; } input.sheet-sanity_bar[value="86"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 86%, #b546ce 90%, #b546ce 100%); } input.sheet-sanity_bar[value="86"] ~ div.sheet-sanity_bar::before { content:"86% Sanity Remaining"; } input.sheet-sanity_bar[value="87"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 87%, #b546ce 91%, #b546ce 100%); } input.sheet-sanity_bar[value="87"] ~ div.sheet-sanity_bar::before { content:"87% Sanity Remaining"; } input.sheet-sanity_bar[value="88"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 88%, #b546ce 92%, #b546ce 100%); } input.sheet-sanity_bar[value="88"] ~ div.sheet-sanity_bar::before { content:"88% Sanity Remaining"; } input.sheet-sanity_bar[value="89"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 89%, #b546ce 93%, #b546ce 100%); } input.sheet-sanity_bar[value="89"] ~ div.sheet-sanity_bar::before { content:"89% Sanity Remaining"; } input.sheet-sanity_bar[value="90"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 90%, #b546ce 94%, #b546ce 100%); } input.sheet-sanity_bar[value="90"] ~ div.sheet-sanity_bar::before { content:"90% Sanity Remaining"; } input.sheet-sanity_bar[value="91"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 91%, #b546ce 95%, #b546ce 100%); } input.sheet-sanity_bar[value="91"] ~ div.sheet-sanity_bar::before { content:"91% Sanity Remaining"; } input.sheet-sanity_bar[value="92"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 92%, #b546ce 96%, #b546ce 100%); } input.sheet-sanity_bar[value="92"] ~ div.sheet-sanity_bar::before { content:"92% Sanity Remaining"; } input.sheet-sanity_bar[value="93"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 93%, #b546ce 97%, #b546ce 100%); } input.sheet-sanity_bar[value="93"] ~ div.sheet-sanity_bar::before { content:"93% Sanity Remaining"; } input.sheet-sanity_bar[value="94"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 94%, #b546ce 98%, #b546ce 100%); } input.sheet-sanity_bar[value="94"] ~ div.sheet-sanity_bar::before { content:"94% Sanity Remaining"; } input.sheet-sanity_bar[value="95"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 95%, #b546ce 99%, #b546ce 100%); } input.sheet-sanity_bar[value="95"] ~ div.sheet-sanity_bar::before { content:"95% Sanity Remaining"; } input.sheet-sanity_bar[value="96"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 96%, #b546ce 100%); } input.sheet-sanity_bar[value="96"] ~ div.sheet-sanity_bar::before { content:"96% Sanity Remaining"; } input.sheet-sanity_bar[value="97"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 97%, #b546ce 100%); } input.sheet-sanity_bar[value="97"] ~ div.sheet-sanity_bar::before { content:"97% Sanity Remaining"; } input.sheet-sanity_bar[value="98"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 98%, #b546ce 100%); } input.sheet-sanity_bar[value="98"] ~ div.sheet-sanity_bar::before { content:"98% Sanity Remaining"; } input.sheet-sanity_bar[value="99"] ~ div.sheet-sanity_bar { background: linear-gradient(to right, #adfc03 1%, #adfc03 99%, #b546ce 100%); } input.sheet-sanity_bar[value="99"] ~ div.sheet-sanity_bar::before { content:"99% Sanity Remaining"; } input.sheet-sanity_bar[value="100"] ~ div.sheet-sanity_bar { background: #adfc03; } input.sheet-sanity_bar[value="100"] ~ div.sheet-sanity_bar::before { content:"Full Sanity"; } input.sheet-sanity_bar[value="101"] ~ div.sheet-sanity_bar { background: #adfc03;; } input.sheet-sanity_bar[value="101"] ~ div.sheet-sanity_bar::before { content:"Above Max Sanity"; } /* Sanity Bar End */ /* Section 1 Bars End */ /* Section 1 End */ /*-- Test area --*/ div.teststats{ display: grid; grid-template-columns: 115px 50px 50px 20px 115px 50px 50px; width:450px; text-align:center; justify-items: center; } div.testskillline{ display: grid; grid-template-columns: 150px 50px 10px 150px 50px 10px 150px 50px; width:620px; text-align:center; justify-items: center; } div.testline{ display: grid; text-align:center; justify-items: center; } div.testability{ display: grid; grid-template-columns: 200px 25px; width:225px; text-align:center; justify-items: center; }
1717102352
Stephen C.
Pro
Sheet Author
Try using parseInt() in that function, like you do in some of the others.