diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 133a49e073bfeff5404b2118dcc925607eaaed2c..045b9036fdcc868f2cb49177d5ce798c0dbe88b1 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -852,7 +852,6 @@ App.Data.resetOnNGPlus = { shelterAbuse: 0, shelterSlaveGeneratedWeek: 0, - specialSlavesPriceOverride: 0, pregAccessibility: 0, dickAccessibility: 0, ballsAccessibility: 0, diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js index ea3215bfe7a5f958e4068b85ae806f3a5127d5a2..7f08fa751772f9e18d6985f7cb9e5130a473490a 100644 --- a/src/js/slaveCostJS.js +++ b/src/js/slaveCostJS.js @@ -2281,11 +2281,12 @@ globalThis.FResultTooltip = function(slave, forSale = 0) { * @param {App.Entity.SlaveState} slave * @param {boolean} [isStartingSlave=false] is the slave a "starting slave" * @param {boolean} [followLaws=false] Apply cost variations from enacted Slave Market Regulations + * @param {boolean} [isSpecial=false] is this slave a special/hero slave * @returns {number} */ -globalThis.slaveCost = function(slave, isStartingSlave = false, followLaws = false) { +globalThis.slaveCost = function(slave, isStartingSlave = false, followLaws = false, isSpecial = false) { const milked = App.SlaveAssignment.getMilked(slave, true); - const beauty = slaveCostBeauty(slave, isStartingSlave, followLaws); + const beauty = slaveCostBeauty(slave, isStartingSlave, followLaws, isSpecial); if ((milked * 52) > beauty && !isStartingSlave) { // Arbitrarily, let's say their milk worth is what they would make in a year. Blocking starting slave for now because milk makes so much money, the estimation makes game start impossible. return milked * 52; } else { @@ -2304,15 +2305,16 @@ globalThis.slaveCostBeauty = (function() { * @param {App.Entity.SlaveState} slave * @param {boolean} isStartingSlave is the slave a "starting slave" * @param {boolean} followLaws Apply cost variations from enacted Slave Market Regulations + * @param {boolean} isSpecial is this slave a special/hero slave * @returns {number} */ - function slaveCost(slave, isStartingSlave, followLaws) { + function slaveCost(slave, isStartingSlave, followLaws, isSpecial) { arcology = V.arcologies[0]; multiplier = V.slaveCostFactor; cost = Beauty(slave) * FResult(slave, 1); calcGenitalsCost(slave); - calcDevotionTrustCost(slave); + calcDevotionTrustCost(slave, isSpecial); calcPreferencesCost(slave); calcPregCost(slave); if (slave.prestige + slave.porn.prestige > 0) { @@ -2373,9 +2375,10 @@ globalThis.slaveCostBeauty = (function() { /** * @param {App.Entity.SlaveState} slave + * @param {boolean} isSpecial */ - function calcDevotionTrustCost(slave) { - if (V.specialSlavesPriceOverride === 1) { + function calcDevotionTrustCost(slave, isSpecial) { + if (isSpecial === true) { if (slave.devotion > 50) { multiplier += slave.devotion / 200; } @@ -2811,9 +2814,7 @@ globalThis.startingSlaveCost = function(slave) { * @returns {number} */ globalThis.heroSlaveCost = function(slave, costFloor) { - V.specialSlavesPriceOverride = 1; // TODO: this probably shouldn't be a global - let cost = (10 * Math.trunc((slaveCost(slave) / 10) * 2)); - V.specialSlavesPriceOverride = 0; + let cost = (10 * Math.trunc((slaveCost(slave, false, false, true) / 10) * 2)); if (cost < costFloor) { cost += jsRandom(Math.trunc(costFloor / 2000), Math.trunc((costFloor * 3) / 2000)) * 1000; }