From 2cb0de6bb5d958ac34d9bf94c4405b94a19c365d Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Thu, 10 Sep 2020 02:39:09 -0400 Subject: [PATCH] remove the active from removeActiveSlave --- src/Mods/DinnerParty/dinnerPartyExecution.tw | 2 +- .../{removeActiveSlave.js => removeSlave.js} | 68 ++++++++++--------- src/pregmod/killSlave.tw | 2 +- src/pregmod/seBurst.tw | 2 +- src/pregmod/seDeath.tw | 2 +- src/pregmod/widgets/seBirthWidgets.tw | 2 +- src/societies/aztec/slaveSacrifice.tw | 2 +- src/uncategorized/arcadeReport.tw | 2 +- src/uncategorized/dairyReport.tw | 2 +- src/uncategorized/pBioreactorPerfected.tw | 2 +- src/uncategorized/pBombing.tw | 2 +- src/uncategorized/pMercenaryRomeo.tw | 4 +- src/uncategorized/pUndergroundRailroad.tw | 6 +- src/uncategorized/pePitFight.tw | 2 +- src/uncategorized/reRebels.tw | 14 ++-- src/uncategorized/resFailure.tw | 18 ++--- src/uncategorized/scheduledEvent.tw | 4 +- src/uncategorized/seBirth.tw | 2 +- src/uncategorized/seLethalPit.tw | 4 +- src/uncategorized/seRetirement.tw | 4 +- src/uncategorized/slaveSold.tw | 2 +- src/uncategorized/surgeryDegradation.tw | 2 +- 22 files changed, 77 insertions(+), 73 deletions(-) rename src/js/{removeActiveSlave.js => removeSlave.js} (83%) diff --git a/src/Mods/DinnerParty/dinnerPartyExecution.tw b/src/Mods/DinnerParty/dinnerPartyExecution.tw index ca9fecf951f..19ed5ce4758 100644 --- a/src/Mods/DinnerParty/dinnerPartyExecution.tw +++ b/src/Mods/DinnerParty/dinnerPartyExecution.tw @@ -541,7 +541,7 @@ <<set $shelterAbuse += 1>> <</if>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> /* generate enemies <<if _generateEnemies == 1>> diff --git a/src/js/removeActiveSlave.js b/src/js/removeSlave.js similarity index 83% rename from src/js/removeActiveSlave.js rename to src/js/removeSlave.js index 8b48b96ba89..3301d616801 100644 --- a/src/js/removeActiveSlave.js +++ b/src/js/removeSlave.js @@ -1,7 +1,12 @@ -globalThis.removeActiveSlave = function() { +/** + * Removes slave from the game + * @param {App.Entity.SlaveState} slave + */ + +globalThis.removeSlave = function(slave) { "use strict"; - const AS_ID = V.activeSlave.ID; + const AS_ID = slave.ID; let LENGTH = V.slaves.length; const INDEX = V.slaveIndices[AS_ID]; let missing = false; @@ -20,12 +25,12 @@ globalThis.removeActiveSlave = function() { missing = true; } if (V.PC.sisters > 0) { - if (areSisters(V.PC, V.activeSlave) > 0) { + if (areSisters(V.PC, slave) > 0) { V.PC.sisters--; } } if (V.PC.daughters > 0) { - if (V.activeSlave.father === -1 || V.activeSlave.mother === -1) { + if (slave.father === -1 || slave.mother === -1) { V.PC.daughters--; } } @@ -61,7 +66,7 @@ globalThis.removeActiveSlave = function() { if (slave.pregSource === V.missingParentID) { missing = true; } - if (V.activeSlave.daughters > 0) { + if (slave.daughters > 0) { if (slave.mother === AS_ID) { slave.mother = V.missingParentID; } @@ -70,24 +75,24 @@ globalThis.removeActiveSlave = function() { } missing = true; } - if (V.activeSlave.mother > 0 || V.activeSlave.father > 0) { - if (V.activeSlave.mother === slave.ID || V.activeSlave.father === slave.ID) { + if (slave.mother > 0 || slave.father > 0) { + if (slave.mother === slave.ID || slave.father === slave.ID) { slave.daughters--; } } - if (V.activeSlave.sisters > 0) { - if (areSisters(V.activeSlave, slave) > 0) { + if (slave.sisters > 0) { + if (areSisters(slave, slave) > 0) { slave.sisters--; } } if (slave.cumSource === AS_ID || slave.milkSource === AS_ID) { deflate(slave); } - if (slave.ID === V.activeSlave.relationshipTarget) { + if (slave.ID === slave.relationshipTarget) { slave.relationship = 0; slave.relationshipTarget = 0; } - if (slave.ID === V.activeSlave.rivalryTarget) { + if (slave.ID === slave.rivalryTarget) { slave.rivalry = 0; slave.rivalryTarget = 0; } @@ -96,8 +101,8 @@ globalThis.removeActiveSlave = function() { slave.origBodyOwnerID = 0; } */ - if (slave.ID === V.activeSlave.subTarget || V.activeSlave.subTarget === slave.ID) { - V.activeSlave.subTarget = 0; slave.subTarget = 0; + if (slave.ID === slave.subTarget || slave.subTarget === slave.ID) { + slave.subTarget = 0; slave.subTarget = 0; } }); @@ -123,7 +128,7 @@ globalThis.removeActiveSlave = function() { } /* Remove from facility array or leadership role, if needed */ - removeJob(V.activeSlave, V.activeSlave.assignment); + removeJob(slave, slave.assignment); if (V.traitor !== 0) { missing = true; /* no exceptions, fetus system relies on this */ @@ -171,18 +176,18 @@ globalThis.removeActiveSlave = function() { if (_geneIndex !== -1) { let keep = false; if (V.traitor !== 0) { - if (isImpregnatedBy(V.traitor, V.activeSlave) || V.traitor.ID === AS_ID) { + if (isImpregnatedBy(V.traitor, slave) || V.traitor.ID === AS_ID) { /* did we impregnate the traitor, or are we the traitor? */ keep = true; } } if (V.boomerangSlave !== 0) { - if (isImpregnatedBy(V.boomerangSlave, V.activeSlave) || V.boomerangSlave.ID === AS_ID) { + if (isImpregnatedBy(V.boomerangSlave, slave) || V.boomerangSlave.ID === AS_ID) { /* did we impregnate the boomerang, or are we the boomerang? */ keep = true; } } - if (isImpregnatedBy(V.PC, V.activeSlave)) { + if (isImpregnatedBy(V.PC, slave)) { /* did we impregnate the PC */ keep = true; } @@ -190,7 +195,7 @@ globalThis.removeActiveSlave = function() { /* avoid going through this loop if possible */ keep = V.slaves.some(slave => { /* have we impregnated a slave that is not ourselves? */ - return (slave.ID !== AS_ID && isImpregnatedBy(slave, V.activeSlave)); + return (slave.ID !== AS_ID && isImpregnatedBy(slave, slave)); }); } if (!keep) { @@ -198,33 +203,33 @@ globalThis.removeActiveSlave = function() { } } Object.values(V.missingTable).forEach(s => { - if (s.mother === V.activeSlave.ID || s.father === V.activeSlave.ID) { + if (s.mother === slave.ID || s.father === slave.ID) { missing = true; } }); if (missing) { V.missingTable[V.missingParentID] = { - slaveName: V.activeSlave.slaveName, - slaveSurname: V.activeSlave.slaveSurname, - fullName: SlaveFullName(V.activeSlave), - dick: V.activeSlave.dick, - vagina: V.activeSlave.vagina, + slaveName: slave.slaveName, + slaveSurname: slave.slaveSurname, + fullName: SlaveFullName(slave), + dick: slave.dick, + vagina: slave.vagina, ID: V.missingParentID, - mother: V.activeSlave.mother, - father: V.activeSlave.father, - inbreedingCoeff: V.activeSlave.inbreedingCoeff + mother: slave.mother, + father: slave.father, + inbreedingCoeff: slave.inbreedingCoeff }; - if (V.traitor.ID === V.activeSlave.ID) { + if (V.traitor.ID === slave.ID) { /* To link developing fetuses to their parent */ V.traitor.missingParentTag = V.missingParentID; - } else if (V.boomerangSlave.ID === V.activeSlave.ID) { + } else if (V.boomerangSlave.ID === slave.ID) { V.boomerangSlave.missingParentTag = V.missingParentID; } Object.values(V.missingTable).forEach(s => { - if (s.mother === V.activeSlave.ID) { + if (s.mother === slave.ID) { s.mother = V.missingParentID; } - if (s.father === V.activeSlave.ID) { + if (s.father === slave.ID) { s.father = V.missingParentID; } }); @@ -237,7 +242,6 @@ globalThis.removeActiveSlave = function() { removeSlave(INDEX); LENGTH--; - V.activeSlave = 0; V.JobIDMap = makeJobIdMap(); /* need to call this once more to update count of resting slaves*/ } }; diff --git a/src/pregmod/killSlave.tw b/src/pregmod/killSlave.tw index 9711d44f9be..3ae2580a929 100644 --- a/src/pregmod/killSlave.tw +++ b/src/pregmod/killSlave.tw @@ -206,7 +206,7 @@ you <<if canHear($activeSlave)>>quietly <</if>>reach behind your desk and pull o <</if>> <</if>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $nextLink = "Main", $killChoice = -1>> <</replace>><</link>> <br><<link "Have mercy on $him">><<set $killChoice = 1>> diff --git a/src/pregmod/seBurst.tw b/src/pregmod/seBurst.tw index 59470a1ef98..2a008733a10 100644 --- a/src/pregmod/seBurst.tw +++ b/src/pregmod/seBurst.tw @@ -317,7 +317,7 @@ <</if>> <<set $activeSlave = $slaves[_b]>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <br><br><hr style="margin:0"><br> <</if>> diff --git a/src/pregmod/seDeath.tw b/src/pregmod/seDeath.tw index 51cd278c447..35de69d6c93 100644 --- a/src/pregmod/seDeath.tw +++ b/src/pregmod/seDeath.tw @@ -30,7 +30,7 @@ <</if>> <<for _slave range _killedSlaves>> <<set $activeSlave = _slave>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <</for>> <<unset _killedSlaves>> diff --git a/src/pregmod/widgets/seBirthWidgets.tw b/src/pregmod/widgets/seBirthWidgets.tw index 01c5c8f9f3c..baa7b736318 100644 --- a/src/pregmod/widgets/seBirthWidgets.tw +++ b/src/pregmod/widgets/seBirthWidgets.tw @@ -1285,7 +1285,7 @@ All in all, But $his offspring <<if _curBabies > 1>>are<<else>>is<</if>> healthy, so $his legacy will carry on. <</if>> <<set $activeSlave = $slaves[$i]>> - <<= removeActiveSlave()>> + <<= removeSlave($activeSlave)>> <<set $slaveDead = 1>> <</if>> diff --git a/src/societies/aztec/slaveSacrifice.tw b/src/societies/aztec/slaveSacrifice.tw index 8be13f3ef49..d814772c408 100644 --- a/src/societies/aztec/slaveSacrifice.tw +++ b/src/societies/aztec/slaveSacrifice.tw @@ -374,7 +374,7 @@ <<set $arcologies[0].FSAztecRevivalist += 1>> <</if>> <<set $slavesSacrificedThisWeek = ($slavesSacrificedThisWeek || 0) + 1>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <</if>> <<set $sacrificeType = 0>> diff --git a/src/uncategorized/arcadeReport.tw b/src/uncategorized/arcadeReport.tw index d96e85f6980..33bfd5a7b11 100644 --- a/src/uncategorized/arcadeReport.tw +++ b/src/uncategorized/arcadeReport.tw @@ -261,7 +261,7 @@ <<if $activeSlave != 0>> <<setLocalPronouns $activeSlave>> <br> $activeSlave.slaveName is low-quality merchandise, so $he has been converted into a Fuckdoll. - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<if $activeSlave == 0>> /% if not zero then technically there was an error INVALID SLAVE %/ <<set $fuckdolls++, _SL-->> <</if>> diff --git a/src/uncategorized/dairyReport.tw b/src/uncategorized/dairyReport.tw index 1823e3be5cc..f2f3d2151ef 100644 --- a/src/uncategorized/dairyReport.tw +++ b/src/uncategorized/dairyReport.tw @@ -1191,7 +1191,7 @@ _dairyNameCaps produced <<print _milkWeek+_outputMilk>> liters of milk<<if _cumW <<print $retirementAge-_slave.physicalAge>> year period before its biological components must be replaced. <<set $activeSlave = _slave>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<break>> <</if>> <</for>> diff --git a/src/uncategorized/pBioreactorPerfected.tw b/src/uncategorized/pBioreactorPerfected.tw index 68a0cc81104..f51eab3ffc8 100644 --- a/src/uncategorized/pBioreactorPerfected.tw +++ b/src/uncategorized/pBioreactorPerfected.tw @@ -184,7 +184,7 @@ You stop and consider the cow, from $his titanic breasts to $his <<if ($activeSl <<set $bioreactorsXY += _bioreactorsXY>> <<set $bioreactorsHerm += _bioreactorsHerm>> <<set $bioreactorsBarren += _bioreactorsBarren>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $createBioreactors = 1>> <</replace>> <</link>> diff --git a/src/uncategorized/pBombing.tw b/src/uncategorized/pBombing.tw index 326c587dd7b..d0670d66dc0 100644 --- a/src/uncategorized/pBombing.tw +++ b/src/uncategorized/pBombing.tw @@ -71,7 +71,7 @@ The implant is small, and went off too far ahead to do anything more than stun. _S.Bodyguard.slaveName hurriedly <<if (_S.Bodyguard.muscles+_S.Bodyguard.height-100)/25 > 5>>gets $his light machine gun firing. The weapon's high rate of fire tears through the first enemy but rapidly pulls $his aim off target.<<elseif (_S.Bodyguard.muscles+_S.Bodyguard.height-100)/25 > 4>>brings up $his battle rifle. $He hits the nearest assailant with $his first round and then fires again, but the weapon's powerful recoil sends it over $his target.<<elseif (_S.Bodyguard.muscles+_S.Bodyguard.height-100)/25 > 3>>brings up $his submachine gun. $He points it at the nearest assailant and pulls the trigger; the weapon's high rate of fire tears through the enemy but rapidly pulls $his aim off target.<<else>>draws $his machine pistol. $He points it one-handed at the nearest assailant and pulls the trigger; the weapon's high rate of fire tears through the enemy but rapidly pulls $his aim off target.<</if>> By the time $he pulls the muzzle back down the others are on $him. $His sword is very sharp, but so are $his assailants' weapons, and everyone is unskilled. As often happens with bladed fights between unarmored novices, everyone dies, and so fast that you cannot intervene. _S.Bodyguard.slaveName expires gasping in agony over multiple deep wounds to $his abdomen, but still manages to lock eyes with you as $he does. There is some @@.red;minor property damage@@ to repair, but no lasting harm. <<run cashX(-1000, "event", _S.Bodyguard), healthDamage(_S.Bodyguard, 1000)>> <<set $activeSlave = _S.Bodyguard>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <</if>> /* closes if _S.Bodyguard */ <<elseif $personalArms > 0>> diff --git a/src/uncategorized/pMercenaryRomeo.tw b/src/uncategorized/pMercenaryRomeo.tw index f0e7363898e..3a3b8d82684 100644 --- a/src/uncategorized/pMercenaryRomeo.tw +++ b/src/uncategorized/pMercenaryRomeo.tw @@ -94,7 +94,7 @@ proffered by an attentive slave _girlU, he seems almost bashful. <</if>> $he gives the nearest camera a little nod and silently mouths the words "Thank you, <<= WrittenMaster($activeSlave)>>." Soon the romantic story of The Mercenary and the Slave $Girl is being told in bars and brothels across the Free City, with you naturally playing @@.green;a supporting role.@@ <<run cashX(_slaveCost, "slaveTransfer")>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <</if>> <</replace>> <</link>> @@ -121,7 +121,7 @@ proffered by an attentive slave _girlU, he seems almost bashful. <<run repX(15000, "event")>> <<set _poster = "a poster for the movie that was made about the love between one of your mercenaries and " + $activeSlave.slaveName>> <<set $trinkets.push(_poster)>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <</if>> <</replace>> <</link>> diff --git a/src/uncategorized/pUndergroundRailroad.tw b/src/uncategorized/pUndergroundRailroad.tw index 9dc6a6247b3..d6bb48fbbfb 100644 --- a/src/uncategorized/pUndergroundRailroad.tw +++ b/src/uncategorized/pUndergroundRailroad.tw @@ -186,7 +186,7 @@ This is disturbing, to say the least. After close investigation, it appears some <<set $traitorStats.traitorBody = $slaves[_myBody].ID>> <</if>> <</if>> - <<= removeActiveSlave()>> + <<= removeSlave($activeSlave)>> <</replace>> <</link>> <br><<link "Tell $him to ignore the Daughters in the future">> @@ -316,7 +316,7 @@ This is disturbing, to say the least. After close investigation, it appears some <<set $traitorStats.traitorBody = $slaves[_myBody].ID>> <</if>> <</if>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <</replace>> <</link>> <br><<link "Tell $him to ignore the Daughters in the future">> @@ -354,7 +354,7 @@ This is disturbing, to say the least. After close investigation, it appears some You announce that a treasonous slave will be publicly executed. Treason is understood in the Free Cities to be activity that tends to undermine slavery, and public interest is considerable when $activeSlave.slaveName is dragged out into a public atrium and <<if $arcologies[0].FSAztecRevivalist !== "unset">>has $his heart cut out of $his living body<<elseif $arcologies[0].FSEdoRevivalist !== "unset">>is boiled alive<<elseif $arcologies[0].FSRomanRevivalist !== "unset">>is crucified and left hanging until $he perishes<<else>>is summarily hanged<</if>>. The populace understands the necessity of the punishment, though they are @@.red;disturbed@@ that such a thing could happen in your penthouse of all places. The surviving slaves are @@.gold;terrified@@ at the display, but at least you can be sure they will remember the price of failing you. <<run repX(-500, "event", $activeSlave)>> <<run $slaves.forEach(function(s) { s.trust -= 10 + random(10); })>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <</replace>> <</link>> <</if>> diff --git a/src/uncategorized/pePitFight.tw b/src/uncategorized/pePitFight.tw index cf39af04ca2..06edb8be7e5 100644 --- a/src/uncategorized/pePitFight.tw +++ b/src/uncategorized/pePitFight.tw @@ -215,7 +215,7 @@ The umpire announces gravely that the fight is to the death and rings a bell. <</if>> <<if $activeSlave.health.health < -90>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $nextLink = "Random Nonindividual Event">> <<UpdateNextButton>> <</if>> diff --git a/src/uncategorized/reRebels.tw b/src/uncategorized/reRebels.tw index 7a375259f60..4f61c3adb59 100644 --- a/src/uncategorized/reRebels.tw +++ b/src/uncategorized/reRebels.tw @@ -63,18 +63,18 @@ You have a rebel problem. <<= App.UI.slaveDescriptionDialog($slaves[_i])>> and < You start with $slaves[_i].slaveName and no sooner than you turn to $slaves[_j].slaveName do you hear the telltale clatter of the spoon hitting the floor. With a simple kick, the unfortunately loose $slaves[_i].slaveName is left struggling in the air. $slaves[_j].slaveName <<if canSee($slaves[_j])>>watches<<elseif canHear($slaves[_j])>>listens<<else>>stares blankly<</if>> in horror as the life drains from _his2 former accomplice. @@.gold;_He2 promises to never cross you again.@@ <<set $slaves[_j].trust -= 20>> <<set $activeSlave = $slaves[_i]>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<elseif $slaves[_j].vagina > 3>> You start with $slaves[_i].slaveName before moving to $slaves[_j].slaveName as $he holds $his life between $his netherlips. Setting the spoon inside $slaves[_j].slaveName, you prepare to kick the stools out from under them; but the telltale clatter of the spoon hitting the floor saves you the trouble. With a simple kick, the unfortunately loose $slaves[_j].slaveName is left struggling in the air. $slaves[_i].slaveName <<if canSee($slaves[_i])>>watches<<elseif canHear($slaves[_i])>>listens<<else>>stares blankly<</if>> in horror as the life drains from $his former accomplice. @@.gold;$He promises to never cross you again.@@ <<set $slaves[_i].trust -= 20>> <<set $activeSlave = $slaves[_j]>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<elseif random(1,100) == 69>> You start with $slaves[_i].slaveName before moving to $slaves[_j].slaveName as $he holds $his life between $his netherlips. Once both spoons are inserted, you sit back and watch them squirm at the cold metal in their most sensitive recesses. They are both desperate to survive and clamp down as hard as they can, but it can't go on forever as the sounds of a spoon clattering to the floor fills the room. Both slaves freeze as they realize the other has lost their grip on the silverware, uncertain of what comes next. You answer the question by knocking the stools out from under them, allowing them both to hang. They came into this together and they are going out together. <<set $activeSlave = $slaves[_i]>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $activeSlave = $slaves[_j]>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<elseif $slaves[_i].vagina == $slaves[_j].vagina && random(1,100) > 50>> You start with $slaves[_i].slaveName before moving to $slaves[_j].slaveName as $he holds $his life between $his netherlips. Once both spoons are inserted, you sit back and watch them squirm at the cold metal in their most sensitive recesses. They are both <<if $slaves[_i].vagina == 1>>quite tight, so it's no surprise when they put up a good show.<<else>>not the tightest slaves, so it's a surprise they manage to hold on as long as they do<</if>>. But it can't go on forever as the sound of the spoon clattering to the floor fills the room. <<if random(1,100) <= 50>> @@ -86,7 +86,7 @@ You have a rebel problem. <<= App.UI.slaveDescriptionDialog($slaves[_i])>> and < <<set $slaves[_j].trust -= -20, $slaves[_j].behavioralFlaw = "odd">> <<set $activeSlave = $slaves[_i]>> <</if>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<elseif $slaves[_j].vagina > $slaves[_i].vagina && random(1,100) > 50>> You start with $slaves[_i].slaveName before moving to $slaves[_j].slaveName as $he holds $his life between $his netherlips. Once both spoons are inserted, you sit back and watch them squirm at the cold metal in their most sensitive recesses. $slaves[_i].slaveName is the clear favorite in this game, but the looser $slaves[_j].slaveName refuses to give in, using _his2 experience to clamp down as hard as _he2 can. But it can't go on forever as the sound of the spoon clattering to the floor fills the room. <<if random(1,100) <= 90>> @@ -98,12 +98,12 @@ You have a rebel problem. <<= App.UI.slaveDescriptionDialog($slaves[_i])>> and < <<set $slaves[_j].trust -= -20, $slaves[_j].behavioralFlaw = "odd">> <<set $activeSlave = $slaves[_i]>> <</if>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<else>> You start with $slaves[_i].slaveName before moving to $slaves[_j].slaveName as $he holds $his life between $his netherlips. Once both spoons are inserted, you sit back and watch them squirm at the cold metal in their most sensitive recesses. In a show of underhandedness, $slaves[_j].slaveName kicks $slaves[_i].slaveName, knocking $him off balance and sending $him hanging. $slaves[_j].slaveName <<if canSee($slaves[_j])>>watches<<elseif canHear($slaves[_j])>>listens<<else>>stares blankly<</if>> as the life drains from _his2 accomplice, @@.gold;horrified at what _he2 just did.@@ The ordeal @@.red;leaves _him2 behaving strangely.@@ <<set $slaves[_j].trust = -100, $slaves[_j].behavioralFlaw = "odd">> <<set $activeSlave = $slaves[_i]>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <</if>> <</replace>> <</link>> diff --git a/src/uncategorized/resFailure.tw b/src/uncategorized/resFailure.tw index f3f3b0ea954..26c93389ce3 100644 --- a/src/uncategorized/resFailure.tw +++ b/src/uncategorized/resFailure.tw @@ -925,63 +925,63 @@ The failure of a prominent organization within your arcology has @@.red;affected <<if ($slaves[$i].origin == "$He was given to you by a failed branch campus of the Slavegirl School right after $his majority.") || ($slaves[$i].origin == "$He was given to you by a failed branch campus of the Slavegirl School after $he was retrained as a slave $girl.")>> <<set _slaveCost = slaveCost($slaves[$i])>> <<run cashX(_slaveCost, "slaveTransfer")>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "GRI">> <<if $slaves[$i].origin == "$He was given to you by a failed subsidiary lab of the Growth Research Institute right after $his use as a test subject ended.">> <<set _slaveCost = slaveCost($slaves[$i])>> <<run cashX(_slaveCost, "slaveTransfer")>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "SCP">> <<if $slaves[$i].origin == "$He was given to you by a failed branch campus of St. Claver Preparatory after $he served as a plastic surgeon's passing final exam.">> <<set _slaveCost = slaveCost($slaves[$i])>> <<run cashX(_slaveCost, "slaveTransfer")>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "LDE">> <<if $slaves[$i].origin == "$He was given to you by a failed branch campus of the innovative École des Enculées right after $his graduation.">> <<set _slaveCost = slaveCost($slaves[$i])>> <<run cashX(_slaveCost, "slaveTransfer")>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "TGA">> <<if $slaves[$i].origin == "$He was given to you by a failed branch campus of the intense Gymnasium-Academy right after $his majority.">> <<set _slaveCost = slaveCost($slaves[$i])>> <<run cashX(_slaveCost, "slaveTransfer")>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "HA">> <<if $slaves[$i].origin == "$He was given to you by a failed branch campus of the Hippolyta Academy right after $his majority.">> <<set _slaveCost = slaveCost($slaves[$i])>> <<run cashX(_slaveCost, "slaveTransfer")>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "TCR">> <<if $slaves[$i].origin == "$He is a prized dairy cow given to you by a failed local pasture of The Cattle Ranch.">> <<set _slaveCost = slaveCost($slaves[$i])>> <<run cashX(_slaveCost, "slaveTransfer")>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $i -= 1>> <</if>> <<elseif $RESFailure == "NUL">> <<if $slaves[$i].origin == "$He was given to you by a failed branch campus of Nueva Universidad de Libertad right after $his graduation.">> <<set _slaveCost = slaveCost($slaves[$i])>> <<run cashX(_slaveCost, "slaveTransfer")>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $i -= 1>> <</if>> <<else>> <<if ($slaves[$i].origin == "$He was the leader of your arcology's Futanari Sisters until you engineered $his community's failure and enslavement.") || ($slaves[$i].origin == "$He was a Futanari Sister until you engineered $his early enslavement.")>> <<set _slaveCost = slaveCost($slaves[$i])>> <<run cashX(_slaveCost, "slaveTransfer")>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $i -= 1>> <</if>> <</if>> diff --git a/src/uncategorized/scheduledEvent.tw b/src/uncategorized/scheduledEvent.tw index b1dfb9abd6f..4145afe0c88 100644 --- a/src/uncategorized/scheduledEvent.tw +++ b/src/uncategorized/scheduledEvent.tw @@ -2,7 +2,7 @@ <<if $expired == 1>> <<set $activeSlave = getSlave($expiree), $expiree = 0>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set _expireSlave = $slaves.find((s) => s.indenture === 0)>> <<if def _expireSlave>> <<set $expiree = _expireSlave.ID>> @@ -12,7 +12,7 @@ <<if $retired == 1>> <<set $activeSlave = getSlave($retiree), $retiree = 0>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set _retireSlave = $slaves.find((s) => retirementReady(s))>> <<if def _retireSlave>> <<set $retiree = _retireSlave.ID>> diff --git a/src/uncategorized/seBirth.tw b/src/uncategorized/seBirth.tw index a2abfd74212..ba3e478deca 100644 --- a/src/uncategorized/seBirth.tw +++ b/src/uncategorized/seBirth.tw @@ -43,7 +43,7 @@ I need to break single passage to several widgets, as it's been overcomplicated <<seBirthCritical>> <<else>> <<set $activeSlave = $slaves[$i]>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $slaveDead = 0>> <</if>> <br><br><hr style="margin:0"><br> diff --git a/src/uncategorized/seLethalPit.tw b/src/uncategorized/seLethalPit.tw index 2ba327c1459..fe242003b3e 100644 --- a/src/uncategorized/seLethalPit.tw +++ b/src/uncategorized/seLethalPit.tw @@ -816,11 +816,11 @@ In any case, <<if $pitAnimal == 0>>both of the slaves have<<else>>the slave and <</if>> <<if $pitAnimal == 0>> <<set $activeSlave = getSlave(_loser.ID)>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <</if>> <<else>> <<set $activeSlave = getSlave(_loser.ID)>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <</if>> <<set $pitFightsTotal++>> diff --git a/src/uncategorized/seRetirement.tw b/src/uncategorized/seRetirement.tw index 875f0676192..30a6df02f76 100644 --- a/src/uncategorized/seRetirement.tw +++ b/src/uncategorized/seRetirement.tw @@ -230,7 +230,7 @@ <<replace "#result">> $He doesn't get far before $he <<if canHear(_clonedSlave)>>hears a desperate pursuit behind $him<<else>>feels a gentle tap on $his shoulder<</if>>. It's $his <<if _clonedSlave.relationship >= 5>>_wife2<<else>>lover<</if>>, $slaves[_sr].slaveName, <<if canHear(_clonedSlave)>>hurrying to catch<<else>>finally catching<</if>> up. Watching on the monitors, you see _clonedSlave.slaveName's mixed pleasure and pain at seeing _him2 again so soon, followed by a tearful explanation and an embrace so heartfelt that the pair of ex-slaves collapse to the floor together, sobbing. <<set $activeSlave = $slaves[_sr]>> - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <br><br> <<if $arcologies[0].FSPaternalist != "unset">> Of course, your paternalistic arcology thinks this @@.green;almost too romantic,@@ and there are jesting suggestions that outcomes this adorable ought to be illegal. The pair becomes celebrated citizens immediately. @@ -397,5 +397,5 @@ <<else>> /* manually retired */ <<set $nextLink = "Main">> <<set $activeSlave = getSlave($retiree), $retiree = 0, $retired = 0>> - <<= removeActiveSlave()>> + <<= removeSlave($activeSlave)>> <</if>> diff --git a/src/uncategorized/slaveSold.tw b/src/uncategorized/slaveSold.tw index 7bd87ebfaa4..da1f6ac1659 100644 --- a/src/uncategorized/slaveSold.tw +++ b/src/uncategorized/slaveSold.tw @@ -1170,4 +1170,4 @@ <<set $shelterAbuse += 1>> <</if>> -<<= removeActiveSlave() >> +<<= removeSlave($activeSlave) >> diff --git a/src/uncategorized/surgeryDegradation.tw b/src/uncategorized/surgeryDegradation.tw index 1e77499eb1e..965574ed72f 100644 --- a/src/uncategorized/surgeryDegradation.tw +++ b/src/uncategorized/surgeryDegradation.tw @@ -32,7 +32,7 @@ <<if (getSlave($AS).health.condition < random(-100,-80)) && !["body hair removal", "braces", "chem castrate", "eyebrow removal", "hair removal", "insemination", "removeBraces"].includes($surgeryType)>> <<= getSlave($AS).slaveName>> @@.red;has died from complications of surgery.@@ - <<= removeActiveSlave() >> + <<= removeSlave($activeSlave) >> <<set $nextLink = "Main">> <<elseif $surgeryType == "breastShapePreservation" && ((getSlave($AS).health.condition-(getSlave($AS).boobs/1000)) < random(-100,-80))>> <<= getSlave($AS).slaveName>>'s mesh implantation @@.red;has gone wrong, resulting in a mastectomy!@@ -- GitLab