diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw index ab2983e786b526d4f2da5b611445b6080ee47b31..6c150bb181290136658157d2c56d05f88017ecd1 100644 --- a/src/uncategorized/arcmgmt.tw +++ b/src/uncategorized/arcmgmt.tw @@ -657,31 +657,59 @@ $lowerClass -= _enslaved>> /*Demand for owning slaves*/ _SCD = Math.trunc(($upperClass * ($slaveDemandU + _slaveDemandU)) + ($topClass * ($slaveDemandT + _slaveDemandT)))>> /*More slaves than there is work*/ -<<if $NPCSlaves > _LSCD / $slaveProductivity>> - <<set $menialDemandFactor -= $NPCSlaves - Math.trunc(_LSCD / ($slaveProductivity + _slaveProductivity)), +<<if $NPCSlaves > (_LSCD / ($slaveProductivity + _slaveProductivity)) - $helots + _SCD>> + <<set _NPCSlavesSold = $NPCSlaves - Math.trunc(_LSCD / ($slaveProductivity + _slaveProductivity) - $helots + _SCD), + $menialDemandFactor -= _NPCSlavesSold, $NPCSlaves = Math.trunc(_LSCD / ($slaveProductivity + _slaveProductivity))>> + <<if _NPCSlavesSold > 1>> + <br>@@.red;<<print _NPCSlavesSold>> Slaves@@ were sold by your inhabitants. There was no work for them. + <<elseif _NPCSlavesSold > 0>> + <br>@@.red;One slave was sold by your inhabitants. There was no work for it. + <</if>> /*More slaves than they know what to do with*/ <<elseif $NPCSlaves > _SCD * 1.6>> - <<set $menialDemandFactor -= $NPCSlaves - Math.trunc(_SCD * 1.6), + <<set _NPCSlavesSold = $NPCSlaves - Math.trunc(_SCD * 1.6), + $menialDemandFactor -= _NPCSlavesSold, $NPCSlaves = Math.trunc(_SCD * 1.6)>> + <<if _NPCSlavesSold > 1>> + <br>@@.red;<<print _NPCSlavesSold>> Slaves@@ were sold by your inhabitants. They've got more than enough of them already. + <<elseif _NPCSlavesSold > 0>> + <br>@@.red;One slave@@ was sold by your inhabitants. They've got more than enough of them already. + <</if>> /*Cutting back on slaves*/ <<elseif $NPCSlaves > _SCD * 1.4>> <<if $slaveCostFactor > 0.95>> - <<set $menialDemandFactor -= Math.trunc(($NPCSlaves - _SCD) * 0.4), - $NPCSlaves -= Math.trunc(($NPCSlaves - _SCD) * 0.4)>> + <<set _NPCSlavesSold = Math.trunc(($NPCSlaves - _SCD) * 0.4), + $menialDemandFactor -= _NPCSlavesSold, + $NPCSlaves -= _NPCSlavesSold>> + <<if _NPCSlavesSold > 1>> + <br>@@.red;<<print _NPCSlavesSold>> Slaves were sold by your inhabitants. They've got more than enough of them already. + <<elseif _NPCSlavesSold > 0>> + <br>@@.red;One slave was sold by your inhabitants. They've got more than enough of them already. + </if> <</if>> /*Selling excess slaves for profit*/ <<elseif $NPCSlaves > _SCD * 1.2>> <<if $slaveCostFactor > 1.1>> - <<set $menialDemandFactor -= Math.trunc(($NPCSlaves - _SCD) * 0.4), - $NPCSlaves -= Math.trunc(($NPCSlaves - _SCD) * 0.4)>> + <<set _NPCSlavesSold = Math.trunc(($NPCSlaves - _SCD) * 0.4), + $menialDemandFactor -= _NPCSlavesSold, + $NPCSlaves -= _NPCSlavesSold>> + <<if _NPCSlavesSold > 1>> + <br>@@.red;<<print _NPCSlavesSold>> Slaves were sold by your inhabitants. They saw an opportunity for profit. + <<elseif _NPCSlavesSold > 0>> + <br>@@.red;One slave was sold by your inhabitants. They saw an opportunity for profit. + </if> <</if>> <</if>> /*Buying slaves because they are really cheap*/ <<if $slaveCostFactor < 0.8>> <<if $NPCSlaves < _SCD * 1.5>> - <<set $menialSupplyFactor -= Math.trunc(_SCD * 0.05), - $NPCSlaves += Math.trunc(_SCD * 0.05)>> + <<set _NPCSlavesBought = Math.trunc(_SCD * 0.05), + $menialSupplyFactor -= _NPCSlavesBought, + $NPCSlaves += _NPCSlavesBought>> + <<if _NPCSlavesBought > 1>> + <br>@@.green;<<print _NPCSlavesBought>> Slaves were bought by your inhabitants. They were too cheap to pass up on. + <</if>> /*there's no way this ever ends up needing a 1 slave version*/ <</if>> <</if>> @@ -935,13 +963,18 @@ This week, rents from $arcologies[0].name came to @@.yellowgreen;<<print cashFor <<set _earnings = 0>> You own <<if $helots > 0>> - <<set _earnings += $helots*10>> - <<if $Sweatshops > 0>> - <<if $Sweatshops*500 <= $helots>> - <<set _earnings += $Sweatshops*7000>> - <<set _earnings += ($helots-$Sweatshops*500)*10>> - <<else>> - <<set _earnings += $helots*10>> + <<if $helots > Math.trunc((_LSCD / ($slaveProductivity + _slaveProductivity) - _SCD)>> + <<set _earnings += Math.trunc((_LSCD / ($slaveProductivity + _slaveProductivity) - _SCD) * 10>> + <br>@@.red;more menial slaves than there was work@@, consider selling some. You own + <<else>> + <<set _earnings += $helots*10>> + <<if $Sweatshops > 0>> + <<if $Sweatshops*500 <= $helots>> + <<set _earnings += $Sweatshops*7000>> + <<set _earnings += ($helots-$Sweatshops*500)*10>> + <<else>> + <<set _earnings += $helots*10>> + <</if>> <</if>> <</if>> <<if $helots > 1>> <<print commaNum($helots)>> menial slaves<<if ($menialBioreactors > 0) && ($fuckdolls == 0)>> and<<else>>,<</if>><<else>>one menial slave<<if ($menialBioreactors > 0) && ($fuckdolls == 0)>> and<<else>>,<</if>><</if>>