Skip to content
Snippets Groups Projects
Commit 48a695d3 authored by svornost's avatar svornost
Browse files

Further simplify hero slave purchasing, eliminate $specialSlave and $heroSlaveID globals.

parent d1d22be1
No related branches found
No related tags found
No related merge requests found
......@@ -101,7 +101,7 @@ App.Markets.specialSlave = function() {
V.nextButton = "Continue";
V.nextLink = "AS Dump";
V.returnTo = "Main";
V.specialSlave = 1;
V.heroSlavesPurchased.push(selectedID);
cashX(forceNeg(slaveCost), "slaveTransfer", slave);
V.activeSlave = slave;
},
......
......@@ -107,7 +107,6 @@ App.Utils.getHeroSlave = function(heroSlave) {
// WombInit(heroSlave);
const newSlave = BaseSlave();
deepAssign(newSlave, heroSlave);
V.heroSlaveID = heroSlave.ID;
newSlave.ID = generateSlaveID();
repairLimbs(newSlave);
generatePuberty(newSlave);
......@@ -139,7 +138,7 @@ App.Utils.getHeroSlave = function(heroSlave) {
if (newSlave.override_Skin !== 1) {
newSlave.skin = getGeneticSkinColor(newSlave);
}
setHealth(newSlave, newSlave.health.condition, 0, 0, 0, newSlave.health.tired)
setHealth(newSlave, newSlave.health.condition, 0, 0, 0, newSlave.health.tired);
SetBellySize(newSlave);
......
......@@ -88,12 +88,6 @@
<</if>>
<</if>>
<<if $specialSlave == 1>>
<<run $heroSlavesPurchased.push($heroSlaveID)>>
<<unset $heroSlaveID>>
<<set $specialSlave = 0>>
<</if>>
<p>
The legalities completed, <span class='slave-name'><<= SlaveFullName($activeSlave)>></span> <<if !hasAnyLegs($activeSlave)>><<if isAmputee($activeSlave)>>lies<<else>>rests<</if>> helplessly on your desk,<<elseif !canStand($activeSlave)>>kneels before your desk,<<else>>stands before your desk,<</if>>
<<if $activeSlave.devotion < -50>>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment