diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js index 829f261ef3ba828e902d8b9f4e9aab5fef5c2803..836582692e5d19745caa70aaa3425c1300763b9c 100644 --- a/src/js/slaveCostJS.js +++ b/src/js/slaveCostJS.js @@ -1,7 +1,6 @@ -/* eslint-disable no-undef */ window.Beauty = (function() { "use strict"; - let V, arcology, beauty; + let V; let arcology; let beauty; /** @param {App.Entity.SlaveState} slave */ function Beauty(slave) { @@ -83,7 +82,6 @@ window.Beauty = (function() { if (slave.vagina > 3) { beauty -= 10 + (slave.vagina*2); /*-20*/ } - } /** @param {App.Entity.SlaveState} slave */ @@ -669,7 +667,7 @@ window.Beauty = (function() { if (arcology.FSPhysicalIdealist !== "unset") { if (arcology.FSPhysicalIdealistLaw === 1) { if (Math.abs(slave.weight) <= 30 && slave.health >= 20 && slave.muscles >= 20 && slave.muscles <= 50) { - beauty += (slave.muscles + (Math.min(slave.health,300)/5))*(arcology.FSPhysicalIdealist/100); + beauty += (slave.muscles + (Math.min(slave.health, 300)/5))*(arcology.FSPhysicalIdealist/100); } else { beauty -= 30; } @@ -1082,9 +1080,9 @@ window.Beauty = (function() { } } if (arcology.FSChattelReligionist > 40 && arcology.FSBodyPurist === "unset") { - let tats = ["anusTat", "armsTat", "backTat", "boobsTat", "buttTat", "dickTat", "legsTat", "lipsTat", "shouldersTat", "stampTat", "vaginaTat"]; + const tats = ["anusTat", "armsTat", "backTat", "boobsTat", "buttTat", "dickTat", "legsTat", "lipsTat", "shouldersTat", "stampTat", "vaginaTat"]; let sacrilegeCount = 0; - for (let index in tats) { + for (const index in tats) { if (slave[index] === "sacrilege") { sacrilegeCount++; } @@ -1316,7 +1314,7 @@ window.FResult = (function() { "use strict"; // we can't initialize our global variables on load, because SugarCube.State isn't initialized // instead, declare them and initialize on run time - let V, result, incest_bonus; + let V; let result; let incest_bonus; /** @param {App.Entity.SlaveState} slave */ function FResult(slave) { V = State.variables; @@ -1556,7 +1554,7 @@ window.FResult = (function() { function calcNotFuckdoll(slave) { if (V.familyTesting === 1 && totalRelatives(slave) > 0) calcWorksWithRelatives(slave); - else if(!V.familyTesting && slave.relation !==0) + else if (!V.familyTesting && slave.relation !==0) calcWorksWithRelativesVanilla(slave); if (slave.relationship > 0) calcWorksWithRelationship(slave); if (slave.rivalry !== 0) calcWorksWithRival(slave); @@ -1596,7 +1594,7 @@ window.FResult = (function() { /** @param {App.Entity.SlaveState} slave */ function calcAmputation(slave) { - switch(slave.amp) { + switch (slave.amp) { case 0: case -2: case -5: @@ -1621,7 +1619,7 @@ window.FResult = (function() { window.slaveCost = (function() { "use strict"; - let V, arcology, multiplier, cost; + let V; let arcology; let multiplier; let cost; /** @param {App.Entity.SlaveState} slave */ function slaveCost(slave, isStartingSlave) { @@ -1969,7 +1967,7 @@ window.slaveCost = (function() { /** @param {App.Entity.SlaveState} slave */ function calcMiscCost(slave) { - let totalInt = Math.clamp(slave.intelligence + slave.intelligenceImplant,-130,130); /* make absolutely certain we do not use +-131 in the next line */ + const totalInt = Math.clamp(slave.intelligence + slave.intelligenceImplant, -130, 130); /* make absolutely certain we do not use +-131 in the next line */ multiplier += Math.floor((Math.asin(totalInt/131))*50)/50; if (slave.pubertyXY === 0 && slave.physicalAge >= V.potencyAge && slave.genes === "XY" && arcology.FSGenderRadicalist === "unset") { multiplier += 0.5;