From 5e23a6f99eaec5e5f6c2f6b54bcf48d7de01cb75 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Mon, 23 Nov 2020 21:32:24 -0500 Subject: [PATCH] newSlave polish --- src/npc/acquisition.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/npc/acquisition.js b/src/npc/acquisition.js index 67f0e13379d..4e9b00f08b3 100644 --- a/src/npc/acquisition.js +++ b/src/npc/acquisition.js @@ -35,7 +35,14 @@ App.Intro.acquisition = function() { if (valueOwed - valueGiven <= 5000) { break; } - generateFSslave(V.targetArcology.fs); + const slave = generateFSslave(V.targetArcology.fs); + const slaveCostValue = slaveCost(slave); + if (["AztecRevivalist", "ChineseRevivalist", "NeoImperialist", "Eugenics", "SlaveProfessionalism"].includes(V.targetArcology.fs)) { + valueGiven += slaveCostValue * 4; + } else { + valueGiven += slaveCostValue; + } + newSlave(slave); } const {He, his, girl} = getPronouns(getSlave(random(V.slaves.length))); switch (V.targetArcology.fs) { @@ -1098,12 +1105,6 @@ App.Intro.acquisition = function() { } slave.origin = "You acquired $him along with the arcology."; slave.career = "a slave"; - let slaveCostValue = slaveCost(slave); - if (["AztecRevivalist", "ChineseRevivalist", "NeoImperialist", "Eugenics", "SlaveProfessionalism"].includes(V.targetArcology.fs)) { - valueGiven += slaveCostValue * 4; - } else { - valueGiven += slaveCostValue; - } - newSlave(slave); + return slave; } }; -- GitLab