Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pregmodfan
fc-pregmod
Commits
0d149bb1
Commit
0d149bb1
authored
6 years ago
by
Jones
Browse files
Options
Downloads
Patches
Plain Diff
Descriptions for NPCSlaves sold or bought and a tweak in case there's more slaves than work.
parent
a068e7e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3037
NPCSlaves selling and buying descriptions
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/uncategorized/arcmgmt.tw
+49
-16
49 additions, 16 deletions
src/uncategorized/arcmgmt.tw
with
49 additions
and
16 deletions
src/uncategorized/arcmgmt.tw
+
49
−
16
View file @
0d149bb1
...
...
@@ -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>>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment