From ff2e6d6fde63a058287c4c6afb838c4e621c0e4c Mon Sep 17 00:00:00 2001 From: kopareigns <kopareigns@gmail.com> Date: Sat, 27 Oct 2018 16:14:13 -0400 Subject: [PATCH] Jones backup --- devNotes/twine JS.txt | 17 +- src/SecExp/secBarracks.tw | 20 +- src/SecExp/securityHQ.tw | 20 +- src/SecExp/weaponsManufacturing.tw | 20 +- src/events/intro/introSummary.tw | 10 +- src/init/storyInit.tw | 8 + src/js/assayJS.tw | 2 +- src/js/economyJS.tw | 15 +- src/npc/acquisition.tw | 4 + src/pregmod/manageEconomy.tw | 149 +++++++++++--- src/uncategorized/BackwardsCompatibility.tw | 27 +++ src/uncategorized/arcmgmt.tw | 17 +- src/uncategorized/buySlaves.tw | 77 +++---- src/uncategorized/nextWeek.tw | 126 ++++++++++++ src/uncategorized/persBusiness.tw | 216 +++++++++++++++----- src/uncategorized/remFluctuations.tw | 74 ++++--- src/uncategorized/storyCaption.tw | 16 +- 17 files changed, 623 insertions(+), 195 deletions(-) diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index ddcc63526ad..bb39bdf5f77 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -2531,9 +2531,18 @@ window.getSlaveCost = function(s) { return cost; }; -window.menialSlaveCost = function() { - var df = State.variables.menialDemandFactor; - return random(998,1001) + Math.trunc(Math.sign(df) * Math.sqrt(1 - Math.exp(-1*Math.pow(df/500, 2)*(4/Math.PI + 0.140012 * Math.pow(df/500, 2))/(1 + 0.140012 * Math.pow(df/500, 2))))*150); /* https://en.wikipedia.org/wiki/Error_function */ +// Supply and Demand for slaves (linear, simple) +// PC buying slaves reduces supply, selling slaves reduces demand. + +window.menialSlaveCost = function(q) { + if(!q) { + q = 0; + } + var demand = State.variables.menialDemandFactor; + var supply = State.variables.menialSupplyFactor; + var baseCost = 1000; + var random = State.variables.slaveCostRandom; + return (Math.trunc(baseCost + demand / 400 - supply / 400 + q / 400) + random); }; window.getSlaveStatisticData = function(s, facility) { @@ -9037,7 +9046,7 @@ window.MenialPopCap = function MenialPopCap () { } let overMenialCap = V.helots + V.fuckdolls + V.menialBioreactors - popCap; if (overMenialCap > 0) { - let price = menialSlaveCost(); + let price = menialSlaveCost(-overMenialCap); if (V.helots > 0) { if (V.helots > overMenialCap) { V.cash += overMenialCap * price; diff --git a/src/SecExp/secBarracks.tw b/src/SecExp/secBarracks.tw index 4c8c2d7efb0..eb1900244cb 100644 --- a/src/SecExp/secBarracks.tw +++ b/src/SecExp/secBarracks.tw @@ -168,20 +168,22 @@ Your current maximum number of units is <<print $maxUnits>> (<<print commaNum($s You are free to organize your menial slaves into fighting units. Currently you have <<print commaNum($helots)>> slaves available, while <<print commaNum($slavesEmployedManpower)>> are already employed as soldiers. During all your battles you lost a total of <<print commaNum($slavesTotalCasualties)>>. <<silently>><<= MenialPopCap()>><</silently>> <<set _menialPrice = menialSlaveCost()>> +<<set _bulkMax = $PopCap-$helots-$fuckdolls-$menialBioreactors>> <<if $cash > _menialPrice>> -<<if $PopCap > $helots+$fuckdolls+$menialBioreactors>> +<<if _bulkMax > 0>> <br> - [[Buy|secBarracks][$helots+=1,$menialDemandFactor+=1,$cash-=_menialPrice]] - <<if $cash > (_menialPrice+200)*10>> - [[(x10)|secBarracks][$helots+=10,$menialDemandFactor+=10,$cash-=(_menialPrice+200)*10]] + [[Buy|secBarracks][$helots+=1,$menialSupplyFactor-=1,$cash-=_menialPrice]] + <<if $cash > (menialSlaveCost(10))*10>> + [[(x10)|secBarracks][$helots+=10,$menialSupplyFactor-=10,$cash-=(menialSlaveCost(10))*10]] <</if>> - <<if $cash > (_menialPrice+200)*100>> - [[(x100)|secBarracks][$helots+=100,$menialDemandFactor+=100,$cash-=(_menialPrice+200)*100]] + <<if $cash > (menialSlaveCost(100))*100>> + [[(x100)|secBarracks][$helots+=100,$menialSupplyFactor-=100,$cash-=(menialSlaveCost(100))*100]] <</if>> - <<if $cash > (_menialPrice+200)*2>> - [[(max)|secBarracks][$helots+=Math.trunc($cash/(_menialPrice+200)),$menialDemandFactor+=Math.trunc($cash/(_menialPrice+200)),$cash-=Math.trunc($cash/(_menialPrice+200))*(_menialPrice+200)]] + <<if $cash > (_menialPrice+1)*2>> + <<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>> + [[(max)|secBarracks][$helots+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$cash-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))]] <</if>> - //Bulk purchases will cost <<print cashFormat(200)>> over market price.// + //Bulk transactions may require offering a premium.// <</if>> <</if>> <br> diff --git a/src/SecExp/securityHQ.tw b/src/SecExp/securityHQ.tw index 6b9fe9aa084..fddf8c26bc8 100644 --- a/src/SecExp/securityHQ.tw +++ b/src/SecExp/securityHQ.tw @@ -23,20 +23,22 @@ You have <span id="secHel"> <<print commaNum($secHelots)>> </span> slaves workin <</if>> <<silently>><<= MenialPopCap()>><</silently>> <<set _menialPrice = menialSlaveCost()>> +<<set _bulkMax = $PopCap-$helots-$fuckdolls-$menialBioreactors>> <<if $cash > _menialPrice>> -<<if $PopCap > $helots+$fuckdolls+$menialBioreactors || $helots+$fuckdolls+$menialBioreactors == 0>> +<<if _bulkMax > 0 || $helots+$fuckdolls+$menialBioreactors == 0>> <br> - [[Buy|securityHQ][$helots+=1,$menialDemandFactor+=1,$cash-=_menialPrice]] - <<if $cash > (_menialPrice+200)*10>> - [[(x10)|securityHQ][$helots+=10,$menialDemandFactor+=10,$cash-=(_menialPrice+200)*10]] + [[Buy|securityHQ][$helots+=1,$menialSupplyFactor-=1,$cash-=_menialPrice]] + <<if $cash > (menialSlaveCost(10))*10>> + [[(x10)|securityHQ][$helots+=10,$menialSupplyFactor-=10,$cash-=(menialSlaveCost(10))*10]] <</if>> - <<if $cash > (_menialPrice+200)*100>> - [[(x100)|securityHQ][$helots+=100,$menialDemandFactor+=100,$cash-=(_menialPrice+200)*100]] + <<if $cash > (menialSlaveCost(100))*100>> + [[(x100)|securityHQ][$helots+=100,$menialSupplyFactor-=100,$cash-=(menialSlaveCost(100))*100]] <</if>> - <<if $cash > (_menialPrice+200)*2>> - [[(max)|securityHQ][$helots+=Math.trunc($cash/(_menialPrice+200)),$menialDemandFactor+=Math.trunc($cash/(_menialPrice+200)),$cash-=Math.trunc($cash/(_menialPrice+200))*(_menialPrice+200)]] + <<if $cash > (_menialPrice+1)*2>> + <<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>> + [[(max)|securityHQ][$helots+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$cash-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))]] <</if>> - //Bulk purchases will cost <<print cashFormat(200)>> over market price.// + //Bulk transactions may require offering a premium.// <</if>> <</if>> <<if $helots > 0>> diff --git a/src/SecExp/weaponsManufacturing.tw b/src/SecExp/weaponsManufacturing.tw index 862845fc31b..b0d8d4b7476 100644 --- a/src/SecExp/weaponsManufacturing.tw +++ b/src/SecExp/weaponsManufacturing.tw @@ -34,20 +34,22 @@ You own <<print commaNum($helots)>> free menial slaves. This manufacturing compl <br> <<silently>><<= MenialPopCap()>><</silently>> <<set _menialPrice = menialSlaveCost()>> +<<set _bulkMax = $PopCap-$helots-$fuckdolls-$menialBioreactors>> <<if $cash > _menialPrice>> -<<if $PopCap > $helots+$fuckdolls+$menialBioreactors || $helots+$fuckdolls+$menialBioreactors == 0>> +<<if _bulkMax > 0 || $helots+$fuckdolls+$menialBioreactors == 0>> <br> - [[Buy|weaponsManufacturing][$helots+=1,$menialDemandFactor+=1,$cash-=_menialPrice]] - <<if $cash > (_menialPrice+200)*10>> - [[(x10)|weaponsManufacturing][$helots+=10,$menialDemandFactor+=10,$cash-=(_menialPrice+200)*10]] + [[Buy|weaponsManufacturing][$helots+=1,$menialSupplyFactor-=1,$cash-=_menialPrice]] + <<if $cash > (menialSlaveCost(10))*10>> + [[(x10)|weaponsManufacturing][$helots+=10,$menialSupplyFactor-=10,$cash-=(menialSlaveCost(10))*10]] <</if>> - <<if $cash > (_menialPrice+200)*100>> - [[(x100)|weaponsManufacturing][$helots+=100,$menialDemandFactor+=100,$cash-=(_menialPrice+200)*100]] + <<if $cash > (menialSlaveCost(100))*100>> + [[(x100)|weaponsManufacturing][$helots+=100,$menialSupplyFactor-=100,$cash-=(menialSlaveCost(100))*100]] <</if>> - <<if $cash > (_menialPrice+200)*2>> - [[(max)|weaponsManufacturing][$helots+=Math.trunc($cash/(_menialPrice+200)),$menialDemandFactor+=Math.trunc($cash/(_menialPrice+200)),$cash-=Math.trunc($cash/(_menialPrice+200))*(_menialPrice+200)]] + <<if $cash > (_menialPrice+1)*2>> + <<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>> + [[(max)|weaponsManufacturing][$helots+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$cash-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))]] <</if>> - //Bulk purchases will cost <<print cashFormat(200)>> over market price.// + //Bulk transactions may require offering a premium.// <</if>> <</if>> diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw index d126bea3a37..e5953451b27 100644 --- a/src/events/intro/introSummary.tw +++ b/src/events/intro/introSummary.tw @@ -79,7 +79,15 @@ __''World Settings''__ <<set $modCost = Math.trunc(5000/$economy)>> <<set $surgeryCost = Math.trunc(30000/$economy)>> -<br><br> +/* Setup for supply and demand for slaves */ +<<set $menialSupplyFactor = 0>> +<<set $demandTimer = 0>> +<<set $supplyTimer = 0>> +<<set $elapsedDemandTimer = 0>> +<<set $elapsedSupplyTimer = 0>> +<<set $slaveCostRandom = 0>> + +<br> <<if ndef $customVariety>> You are using standardized slave trading channels. [[Customize the slave trade|Customize Slave Trade][$customVariety = 1, $customWA = 0]] diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index ec145bb34d5..82fd355cbc7 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -1093,6 +1093,14 @@ DairyRestraintsSetting($dairyRestraintsSetting) <<set $internationalVariety = 0>> <<set $slaveCostFactor = 0.95>> <<set $menialDemandFactor = 0>> +<<set $menialSupplyFactor = 0>> +<<set $demandTimer = 0>> +<<set $supplyTimer = 0>> +<<set $elapsedDemandTimer = 0>> +<<set $elapsedSupplyTimer = 0>> +<<set $slaveCostRandom = 0>> +<<set $deltaDemand = 0>> +<<set $deltaSupply = 0>> <<set $minimumSlaveCost = 2500>> <<set $facilityCost = 100>> <<set $enduringRep = 1000>> diff --git a/src/js/assayJS.tw b/src/js/assayJS.tw index 069743d710f..55e22e927c7 100644 --- a/src/js/assayJS.tw +++ b/src/js/assayJS.tw @@ -1948,7 +1948,7 @@ window.MenialPopCap = function MenialPopCap () { } let overMenialCap = V.helots + V.fuckdolls + V.menialBioreactors - popCap; if (overMenialCap > 0) { - let price = menialSlaveCost(); + let price = menialSlaveCost(-overMenialCap); if (V.helots > 0) { if (V.helots > overMenialCap) { V.cash += overMenialCap * price; diff --git a/src/js/economyJS.tw b/src/js/economyJS.tw index c32a09b91da..00b644d4b24 100644 --- a/src/js/economyJS.tw +++ b/src/js/economyJS.tw @@ -627,9 +627,18 @@ window.getSlaveCost = function(s) { return cost; }; -window.menialSlaveCost = function() { - var df = State.variables.menialDemandFactor; - return random(998,1001) + Math.trunc(Math.sign(df) * Math.sqrt(1 - Math.exp(-1*Math.pow(df/500, 2)*(4/Math.PI + 0.140012 * Math.pow(df/500, 2))/(1 + 0.140012 * Math.pow(df/500, 2))))*150); /* https://en.wikipedia.org/wiki/Error_function */ +// Supply and Demand for slaves (linear, simple) +// PC buying slaves reduces supply, selling slaves reduces demand. + +window.menialSlaveCost = function(q) { + if(!q) { + q = 0; + } + var demand = State.variables.menialDemandFactor; + var supply = State.variables.menialSupplyFactor; + var baseCost = 1000; + var random = State.variables.slaveCostRandom; + return (Math.trunc(baseCost + demand / 400 - supply / 400 + q / 400) + random); }; window.getSlaveStatisticData = function(s, facility) { diff --git a/src/npc/acquisition.tw b/src/npc/acquisition.tw index c716220f582..47b88b611ed 100644 --- a/src/npc/acquisition.tw +++ b/src/npc/acquisition.tw @@ -698,12 +698,16 @@ The previous owner seems to have left in something of a hurry. <<if $terrain == "urban">> <<set $minimumSlaveCost = 2000>> <<set $slaveCostFactor = 0.85>> + <<set $menialSupplyFactor = 30000>> + <<set $menialDemandFactor = -30000>> <<elseif $terrain == "marine">> <<set $minimumSlaveCost = 2500>> <<set $slaveCostFactor = 1>> <<else>> <<set $minimumSlaveCost = 3000>> <<set $slaveCostFactor = 1.15>> + <<set $menialDemandFactor = 30000>> + <<set $menialSupplyFactor = -30000>> <</if>> <<script>>Save.autosave.save("Week Start Autosave")<</script>> <<goto "Main">> diff --git a/src/pregmod/manageEconomy.tw b/src/pregmod/manageEconomy.tw index 6538032e554..b7a5ccb3f86 100644 --- a/src/pregmod/manageEconomy.tw +++ b/src/pregmod/manageEconomy.tw @@ -1,46 +1,129 @@ :: Manage Economy [nobr] +<<if $difficultySwitch == 1>> + <span id="economy"> + @@.yellowgreen;Global Economy@@ + | <<print $economy>> + </span> + <<if ($cheatMode) && ($cheatModeM)>> + <<set _Teconomy = $economy>> + <<textbox "$economy" $economy>> + <<link "Apply">> + <<set $economy = Math.trunc(Number($economy)) || _Teconomy, $cheater = 1>> + <<replace "#economy">> + @@.yellowgreen;Global Economy@@ + | <<print $economy>> + <</replace>> + <</link>> + <</if>> + <br> + + <span id="localEcon"> + @@.yellowgreen;Local Economy@@ + | <<print $localEcon>> + </span> + <<if ($cheatMode) && ($cheatModeM)>> + <<set _TlocalEcon = $localEcon>> + <<textbox "$localEcon" $localEcon>> + <<link "Apply">> + <<set $localEcon = Math.trunc(Number($localEcon)) || _TlocalEcon, $cheater = 1>> + <<replace "#localEcon">> + @@.yellowgreen;Local Economy@@ + | <<print $localEcon>> + <</replace>> + <</link>> + <</if>> + + <br><br> //The Local Economy score effects some prices in your ecology. The lower the score, the higher the prices. The base score is ''100''.// + <br> The current score is + <<if $localEcon > 100>> + <<set _econPercent = Math.trunc(1000-100000/$localEcon)/10>> + reducing prices by ''<<print _econPercent>> %.'' + <<elseif $localEcon == 100>> + equal to the base score. There are no price modifications. + <<else>> + <<set _econPercent = Math.trunc(100000/$localEcon-1000)/10>> + increasing prices by ''<<print _econPercent>> %.'' + <</if>> +<br><br> +<</if>> -<span id="economy"> - @@.yellowgreen;Global Economy@@ -| <<print $economy>> -</span> +Slave demand is +<<if $menialDemandFactor <= -35000>> + ''extremely low'' +<<elseif $menialDemandFactor <= -20000>> + ''very low'' +<<elseif $menialDemandFactor <= 0>> + ''weak'' +<<elseif $menialDemandFactor >= 35000>> + ''extremely high'' +<<elseif $menialDemandFactor >= 20000>> + ''very high'' +<<else>> + ''strong'' +<</if>> +<<if $deltaDemand > 0>> + and ''improving'' +<<elseif $deltaDemand < 0>> + and ''decreasing'' +<</if>> +<<if $deltaDemand != 0>> + <<if $demandTimer - $elapsedDemandTimer < 3>> + but it might change soon + <</if>> +<</if>> <<if ($cheatMode) && ($cheatModeM)>> - <<set _Teconomy = $economy>> - <<textbox "$economy" $economy>> + <span id="menialDemandFactor"> + @@.yellowgreen;Slave Demand@@ + | <<print $menialDemandFactor>> + </span> + <<set _TmenialDemandFactor = $menialDemandFactor>> + <<textbox "$menialDemandFactor" $menialDemandFactor>> <<link "Apply">> - <<set $economy = Math.trunc(Number($economy)) || _Teconomy, $cheater = 1>> - <<replace "#economy">> - @@.yellowgreen;Global Economy@@ - | <<print $economy>> + <<set $menialDemandFactor = Math.clamp(Math.trunc(Number($menialDemandFactor)),-50000,50000) || _TmenialDemandFactor, $cheater = 1>> + <<replace "#menialDemandFactor">> + @@.yellowgreen; Slave Demand@@ + | <<print $menialDemandFactor>> <</replace>> <</link>> <</if>> <br> - -<span id="localEcon"> - @@.yellowgreen;Local Economy@@ -| <<print $localEcon>> -</span> +Slave supply is +<<if $menialSupplyFactor <= -35000>> + ''extremely low'' +<<elseif $menialSupplyFactor <= -20000>> + ''very low'' +<<elseif $menialSupplyFactor <= 0>> + ''weak'' +<<elseif $menialSupplyFactor >= 35000>> + ''extremely high'' +<<elseif $menialSupplyFactor >= 20000>> + ''very high'' +<<else>> + ''strong'' +<</if>> +<<if $deltaSupply > 0>> + and ''improving'' +<<elseif $deltaSupply < 0>> + and ''decreasing'' +<</if>> +<<if $deltaSupply != 0>> + <<if $supplyTimer - $elapsedDemandTimer < 3>> + but it might change soon + <</if>> +<</if>> <<if ($cheatMode) && ($cheatModeM)>> - <<set _TlocalEcon = $localEcon>> - <<textbox "$localEcon" $localEcon>> + <span id="menialSupplyFactor"> + @@.yellowgreen;Slave Supply@@ + | <<print $menialSupplyFactor>> + </span> + <<set _TmenialSupplyFactor = $menialSupplyFactor>> + <<textbox "$menialSupplyFactor" $menialSupplyFactor>> <<link "Apply">> - <<set $localEcon = Math.trunc(Number($localEcon)) || _TlocalEcon, $cheater = 1>> - <<replace "#localEcon">> - @@.yellowgreen;Local Economy@@ - | <<print $localEcon>> + <<set $menialSupplyFactor = Math.clamp(Math.trunc(Number($menialSupplyFactor)),-50000,50000) || _TmenialSupplyFactor, $cheater = 1>> + <<replace "#menialSupplyFactor">> + @@.yellowgreen; Slave Supply@@ + | <<print $menialSupplyFactor>> <</replace>> <</link>> <</if>> - -<br><br> //The Local Economy score effects some prices in your ecology. The lower the score, the higher the prices. The base score is ''100''.// -<br> The current score is -<<if $localEcon > 100>> - <<set _econPercent = Math.trunc(1000-100000/$localEcon)/10>> - reducing prices by ''<<print _econPercent>> %.'' -<<elseif $localEcon == 100>> - equal to the base score. There are no price modifications. -<<else>> - <<set _econPercent = Math.trunc(100000/$localEcon-1000)/10>> - increasing prices by ''<<print _econPercent>> %.'' -<</if>> +<br> diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 5e43ca888dd..d8ab279353a 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -3457,3 +3457,30 @@ Done! <<if ndef $difficultySwitch>> <<set $difficultySwitch = 0>> <</if>> + +<<if ndef $menialSupplyFactor>> + /* (1 - slaveCostFactor) * price elasticity * base price * 0.5 */ + <<set $menialSupplyFactor = (1 - $slaveCostFactor) * 400 * 1000 * 0.5>> + <<set $menialDemandFactor = (1 - $slaveCostFactor) * -400 * 1000 * 0.5>> +<</if>> +<<if ndef $slaveCostRandom>> + <<set $slaveCostRandom = 0>> +<</if>> +<<if ndef $demandTimer>> + <<set $demandTimer = 0>> +<</if>> +<<if ndef $elapsedDemandTimer>> + <<set $elapsedDemandTimer = 0>> +<</if>> +<<if ndef $supplyTimer>> + <<set $supplyTimer = 0>> +<</if>> +<<if ndef $elapsedSupplyTimer>> + <<set $elapsedSupplyTImer>> +<</if>> +<<if ndef $deltaSupply>> + <<set $deltaSupply = 0>> +<</if>> +<<if ndef $deltaDemand>> + <<set $deltaDemand = 0>> +<</if>> diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw index b3df7f157cc..cd5c8b0f5d0 100644 --- a/src/uncategorized/arcmgmt.tw +++ b/src/uncategorized/arcmgmt.tw @@ -778,6 +778,7 @@ The Hippolyta Academy have a <<if $HA.schoolProsperity > 4>>very prosperous<<els <</if>> <</if>> +<br> <<if $marketAssistantLimit != 0>> <<silently>> <<= MenialPopCap()>> <</silently>> @@ -785,17 +786,19 @@ The Hippolyta Academy have a <<if $HA.schoolProsperity > 4>>very prosperous<<els <br> Your ''business assistant'' manages the menial slave market. <<if _menialSlaveValue <= 900+$marketAssistantAggressiveness>>/* BUY */ - <<if $helots+$fuckdolls+$menialBioreactors >= $PopCap>> + <<set _bulkMax = $PopCap-$helots-$fuckdolls-$menialBioreactors>> + <<if _bulkMax <= 0>> There is no room in the parts of your arcology you own for more menial slaves. <<else>> <<if $cash > $marketAssistantLimit+_menialSlaveValue>> + <<set _menialBulkPremium = Math.trunc(1+Math.clamp(($cash-$marketAssistantLimit)/_menialSlaveValue,0,_bulkMax)/400)>> <<if $assistant == 0>>It<<else>>She<</if>> acquires more chattel, since it's a buyers' market. <<if ($arcologies[0].FSPastoralist != "unset") && ($arcologies[0].FSPaternalist == "unset")>> - <<set $menialBioreactors += Math.trunc(($cash-$marketAssistantLimit)/(_menialSlaveValue)), $menialDemandFactor += Math.trunc(($cash-$marketAssistantLimit)/(_menialSlaveValue)), $cash -= Math.trunc(($cash-$marketAssistantLimit)/(_menialSlaveValue))*(_menialSlaveValue)>> + <<set $menialBioreactors += Math.trunc(Math.clamp(($cash-$marketAssistantLimit)/(_menialSlaveValue+_menialBulkPremium-100),0,_bulkMax)), $menialSupplyFactor -= Math.trunc(Math.clamp(($cash-$marketAssistantLimit)/(_menialSlaveValue+_menialBulkPremium-100),0,_bulkMax)), $cash -= Math.trunc(Math.clamp(($cash-$marketAssistantLimit)/(_menialSlaveValue+_menialBulkPremium-100),0,_bulkMax))*(_menialSlaveValue+_menialBulkPremium-100)>> <<elseif ($arcologies[0].FSDegradationist != "unset")>> - <<set $fuckdolls += Math.trunc(($cash-$marketAssistantLimit)/((_menialSlaveValue+100)*2)), $menialDemandFactor += Math.trunc(($cash-$marketAssistantLimit)/((_menialSlaveValue+100)*2)), $cash -= Math.trunc(($cash-$marketAssistantLimit)/((_menialSlaveValue+100)*2))*((_menialSlaveValue+100)*2)>> + <<set $fuckdolls += Math.trunc(Math.clamp(($cash-$marketAssistantLimit)/((_menialSlaveValue+_menialBulkPremium)*2),0,_bulkMax)), $menialSupplyFactor -= Math.trunc(Math.clamp(($cash-$marketAssistantLimit)/((_menialSlaveValue+_menialBulkPremium)*2),0,_bulkMax)), $cash -= Math.trunc(Math.clamp(($cash-$marketAssistantLimit)/((_menialSlaveValue+_menialBulkPremium)*2),0,_bulkMax))*((_menialSlaveValue+_menialBulkPremium)*2)>> <<else>> - <<set $helots += Math.trunc(($cash-$marketAssistantLimit)/(_menialSlaveValue+100)), $menialDemandFactor += Math.trunc(($cash-$marketAssistantLimit)/(_menialSlaveValue+100)), $cash -= Math.trunc(($cash-$marketAssistantLimit)/(_menialSlaveValue+100))*(_menialSlaveValue+100)>> + <<set $helots += Math.trunc(Math.clamp(($cash-$marketAssistantLimit)/(_menialSlaveValue+100),0,_bulkMax)), $menialSupplyFactor -= Math.trunc(Math.clamp(($cash-$marketAssistantLimit)/(_menialSlaveValue+_menialBulkPremium),0,_bulkMax)), $cash -= Math.trunc(Math.clamp(($cash-$marketAssistantLimit)/(_menialSlaveValue+_menialBulkPremium),0,_bulkMax)*(_menialSlaveValue+_menialBulkPremium))>> <</if>> <</if>> <</if>> @@ -804,13 +807,13 @@ Your ''business assistant'' manages the menial slave market. <<if $assistant == 0>>It<<else>>She<</if>> liquidates your chattel holdings, since it's a sellers' market. <</if>> <<if $helots > 0>> - <<set $cash += $helots*(_menialSlaveValue), $menialDemandFactor -= $helots, $helots = 0>> + <<set $cash += $helots*(menialSlaveCost(-$helots)), $menialDemandFactor -= $helots, $helots = 0>> <</if>> <<if $fuckdolls > 0>> - <<set $cash += $fuckdolls*(_menialSlaveValue*2), $menialDemandFactor -= $fuckdolls, $fuckdolls = 0>> + <<set $cash += $fuckdolls*(menialSlaveCost(-$fuckdolls)*2), $menialDemandFactor -= $fuckdolls, $fuckdolls = 0>> <</if>> <<if $menialBioreactors > 0>> - <<set $cash += $menialBioreactors*(_menialSlaveValue-100), $menialDemandFactor -= $menialBioreactors, $menialBioreactors = 0>> + <<set $cash += $menialBioreactors*(menialSlaveCost(-$menialBioreactors)-100), $menialDemandFactor -= $menialBioreactors, $menialBioreactors = 0>> <</if>> <<else>> Prices are average, so <<if $assistant == 0>>it<<else>>she<</if>> does not make any significant moves. diff --git a/src/uncategorized/buySlaves.tw b/src/uncategorized/buySlaves.tw index ff23ddc1a0e..1ab8229880d 100644 --- a/src/uncategorized/buySlaves.tw +++ b/src/uncategorized/buySlaves.tw @@ -302,6 +302,7 @@ __Menial Slaves__ The parts of your arcology you own can house a total of $PopCap menial slaves. <<set _menialPrice = menialSlaveCost()>> +<<set _bulkMax = $PopCap-$helots-$fuckdolls-$menialBioreactors>> <br> <<if $helots > 1>> @@ -313,30 +314,31 @@ The parts of your arcology you own can house a total of $PopCap menial slaves. <</if>> The market price of menials is <<print cashFormat(_menialPrice)>>. <<set _optionsBreak = 0>> -<<if $PopCap > $helots+$fuckdolls+$menialBioreactors>> - [[Buy|Buy Slaves][$helots+=1,$menialDemandFactor+=1,$cash-=_menialPrice]] - <<if $cash > (_menialPrice+200)*10>> - [[(x10)|Buy Slaves][$helots+=10,$menialDemandFactor+=10,$cash-=(_menialPrice+200)*10]] +<<if _bulkMax > 0>> + [[Buy|Buy Slaves][$helots+=1,$menialSupplyFactor-=1,$cash-=_menialPrice]] + <<if $cash > (menialSlaveCost(10))*10>> + [[(x10)|Buy Slaves][$helots+=10,$menialSupplyFactor-=10,$cash-=(menialSlaveCost(10))*10]] <</if>> - <<if $cash > (_menialPrice+200)*100>> - [[(x100)|Buy Slaves][$helots+=100,$menialDemandFactor+=100,$cash-=(_menialPrice+200)*100]] + <<if $cash > (menialSlaveCost(100))*100>> + [[(x100)|Buy Slaves][$helots+=100,$menialSupplyFactor-=100,$cash-=(menialSlaveCost(100))*100]] <</if>> - <<if $cash > (_menialPrice+200)*2>> - [[(max)|Buy Slaves][$helots+=Math.trunc($cash/(_menialPrice+200)),$menialDemandFactor+=Math.trunc($cash/(_menialPrice+200)),$cash-=Math.trunc($cash/(_menialPrice+200))*(_menialPrice+200)]] + <<if $cash > (_menialPrice+1)*2>> + <<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>> + [[(max)|Buy Slaves][$helots+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$cash-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))]] <</if>> - //Bulk purchases will cost <<print cashFormat(200)>> over market price.// + //Bulk transactions may require offering a premium.// <<set _optionsBreak = 1>> <</if>> <<if $helots >= 1>> <<if _optionsBreak>>|<</if>> [[Sell|Buy Slaves][$helots-=1,$menialDemandFactor-=1,$cash+=_menialPrice]] <<if $helots >= 10>> - [[(x10)|Buy Slaves][$helots-=10,$menialDemandFactor-=10,$cash+=_menialPrice*10]] + [[(x10)|Buy Slaves][$helots-=10,$menialDemandFactor-=10,$cash+=(menialSlaveCost(-10))*10]] <<if $helots >= 100>> - [[(x100)|Buy Slaves][$helots-=100,$menialDemandFactor-=100,$cash+=_menialPrice*100]] + [[(x100)|Buy Slaves][$helots-=100,$menialDemandFactor-=100,$cash+=(menialSlaveCost(-100))*100]] <</if>> <</if>> -[[(all)|Buy Slaves][$cash+=$helots*(_menialPrice),$menialDemandFactor-=$helots,$helots = 0]] +[[(all)|Buy Slaves][$cash+=$helots*(menialSlaveCost(-$helots)),$menialDemandFactor-=$helots,$helots = 0]] <<if $arcologies[0].FSPaternalist == "unset">> <<if $arcadeUpgradeFuckdolls == 1>> <<set _fconvertCost = 1000>> @@ -377,32 +379,34 @@ The market price of menials is <<print cashFormat(_menialPrice)>>. <<if ($fuckdolls > 0) || ($arcologies[0].FSPaternalist == "unset")>> The market price of standard fuckdolls is <<print cashFormat(_menialPrice*2)>>. <<set _optionsBreak = 0>> -<<if $PopCap > $helots+$fuckdolls+$menialBioreactors>> +<<if _bulkMax > 0>> <<if $arcologies[0].FSPaternalist == "unset">> - [[Buy|Buy Slaves][$fuckdolls+=1,$menialDemandFactor+=1,$cash-=(_menialPrice*2+200)]] - <<if $cash > (_menialPrice*2+200)*10>> - [[(x10)|Buy Slaves][$fuckdolls+=10,$menialDemandFactor+=10,$cash-=(_menialPrice*2+200)*20]] + [[Buy|Buy Slaves][$fuckdolls+=1,$menialSupplyFactor-=1,$cash-=(_menialPrice*2)]] + <<if $cash > (menialSlaveCost(10)*2)*10>> + [[(x10)|Buy Slaves][$fuckdolls+=10,$menialSupplyFactor-=10,$cash-=(menialSlaveCost(10)*2)*20]] <</if>> - <<if $cash > (_menialPrice*2+200)*100>> - [[(x100)|Buy Slaves][$fuckdolls+=100,$menialDemandFactor+=100,$cash-=(_menialPrice*2+200)*100]] + <<if $cash > (menialSlaveCost(100)*2)*100>> + [[(x100)|Buy Slaves][$fuckdolls+=100,$menialSupplyFactor-=100,$cash-=(menialSlaveCost(100)*2)*100]] <</if>> - <<if $cash > (_menialPrice*2+200)*2>> - [[(max)|Buy Slaves][$fuckdolls+=Math.trunc($cash/(_menialPrice*2+200)),$menialDemandFactor+=Math.trunc($cash/(_menialPrice*2+200)),$cash-=Math.trunc($cash/(_menialPrice*2+200))*(_menialPrice*2+200)]] + <<if $cash > ((_menialPrice+1)*4)>> + <<set _fuckdollBulkPremium = Math.trunc(1 + Math.clamp($cash/(_menialPrice*2),0,_bulkMax)/400)>> + [[(max)|Buy Slaves][$fuckdolls+=Math.trunc(Math.clamp($cash/(_menialPrice*2+_fuckdollBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice*2+_fuckdollBulkPremium),0,_bulkMax)),$cash-=Math.trunc(Math.clamp($cash/(_menialPrice*2+_fuckdollBulkPremium),0,_bulkMax)*(_menialPrice*2+_fuckdollBulkPremium))]] <</if>> - //Bulk purchases will cost <<print cashFormat(200)>> over market price.// + //Bulk transactions may require offering a premium.// <<set _optionsBreak = 1>> <</if>> <</if>> <<if $fuckdolls >= 1>> + <br> <<if _optionsBreak>>|<</if>> [[Sell|Buy Slaves][$fuckdolls-=1,$menialDemandFactor-=1,$cash+=_menialPrice*2]] <<if $fuckdolls >= 10>> - [[(x10)|Buy Slaves][$fuckdolls-=10,$menialDemandFactor-=10,$cash+=_menialPrice*20]] + [[(x10)|Buy Slaves][$fuckdolls-=10,$menialDemandFactor-=10,$cash+=menialSlaveCost(-10)*20]] <<if $fuckdolls >= 100>> - [[(x100)|Buy Slaves][$fuckdolls-=100,$menialDemandFactor-=100,$cash+=_menialPrice*200]] + [[(x100)|Buy Slaves][$fuckdolls-=100,$menialDemandFactor-=100,$cash+=menialSlaveCost(-100)*200]] <</if>> <</if>> -[[(all)|Buy Slaves][$cash+=$fuckdolls*(_menialPrice*2),$menialDemandFactor-=$fuckdolls,$fuckdolls = 0]] +[[(all)|Buy Slaves][$cash+=$fuckdolls*(menialSlaveCost(-$fuckdolls)*2),$menialDemandFactor-=$fuckdolls,$fuckdolls = 0]] <</if>> <</if>> @@ -416,19 +420,20 @@ The market price of standard fuckdolls is <<print cashFormat(_menialPrice*2)>>. <<if ($menialBioreactors > 0) || ($arcologies[0].FSPaternalist == "unset")>> The market price of standard bioreactors is <<print cashFormat((_menialPrice-100))>>. <<set _optionsBreak = 0>> -<<if $PopCap > $helots+$fuckdolls+$menialBioreactors>> +<<if _bulkMax > 0>> <<if $arcologies[0].FSPaternalist == "unset">> - [[Buy|Buy Slaves][$menialBioreactors+=1,$menialDemandFactor+=1,$cash-=(_menialPrice+100)]] - <<if $cash > (_menialPrice+100)*10>> - [[(x10)|Buy Slaves][$menialBioreactors+=10,$menialDemandFactor+=10,$cash-=(_menialPrice+100)*10]] + [[Buy|Buy Slaves][$menialBioreactors+=1,$menialSupplyFactor-=1,$cash-=(_menialPrice+100)]] + <<if $cash > (menialSlaveCost(10)-100)*10>> + [[(x10)|Buy Slaves][$menialBioreactors+=10,$menialSupplyFactor-=10,$cash-=(menialSlaveCost(10)-100)*10]] <</if>> - <<if $cash > (_menialPrice+100)*100>> - [[(x100)|Buy Slaves][$menialBioreactors+=100,$menialDemandFactor+=100,$cash-=(_menialPrice+100)*100]] + <<if $cash > (menialSlaveCost(100)-100)*100>> + [[(x100)|Buy Slaves][$menialBioreactors+=100,$menialSupplyFactor-=100,$cash-=(menialSlaveCost(100)-100)*100]] <</if>> - <<if $cash > (_menialPrice+100)*2>> - [[(max)|Buy Slaves][$menialBioreactors+=Math.trunc($cash/(_menialPrice+100)),$menialDemandFactor+=Math.trunc($cash/(_menialPrice+100)),$cash-=Math.trunc($cash/(_menialPrice+100))*(_menialPrice+100)]] + <<if $cash > (_menialPrice-99)*2>> + <<set _bioreactorBulkPremium = Math.trunc(1+ Math.clamp($cash/(_menialPrice-99),0,_bulkMax)/400)>> + [[(max)|Buy Slaves][$menialBioreactors+=Math.trunc(Math.clamp($cash/(_menialPrice-99+_bioreactorBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice-99+_bioreactorBulkPremium),0,_bulkMax)),$cash-=Math.trunc(Math.clamp($cash/(_menialPrice-99+_bioreactorBulkPremium),0,_bulkMax)*(_menialPrice-99+_bioreactorBulkPremium))]] <</if>> - //Bulk purchases will cost <<print cashFormat(200)>> over market price.// + //Bulk transactions may require offering a premium.// <<set _optionsBreak = 1>> <</if>> <</if>> @@ -436,11 +441,11 @@ The market price of standard bioreactors is <<print cashFormat((_menialPrice-100 <<if _optionsBreak>>|<</if>> [[Sell|Buy Slaves][$menialBioreactors-=1,$menialDemandFactor-=1,$cash+=(_menialPrice-100)]] <<if $menialBioreactors >= 10>> - [[(x10)|Buy Slaves][$menialBioreactors-=10,$menialDemandFactor-=10,$cash+=(_menialPrice-100)*10]] + [[(x10)|Buy Slaves][$menialBioreactors-=10,$menialDemandFactor-=10,$cash+=(menialSlaveCost(-10)-100)*10]] <<if $menialBioreactors >= 100>> - [[(x100)|Buy Slaves][$menialBioreactors-=100,$menialDemandFactor-=100,$cash+=(_menialPrice-100)*100]] + [[(x100)|Buy Slaves][$menialBioreactors-=100,$menialDemandFactor-=100,$cash+=(menialSlaveCost(-100)-100)*100]] <</if>> <</if>> -[[(all)|Buy Slaves][$cash+=$menialBioreactors*(_menialPrice-100),$menialDemandFactor-=$menialBioreactors,$menialBioreactors = 0]] +[[(all)|Buy Slaves][$cash+=$menialBioreactors*(menialSlaveCost(-$menialBioreactors)-100),$menialDemandFactor-=$menialBioreactors,$menialBioreactors = 0]] <</if>> <</if>> diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw index e9a301d8ad1..689267c0f8e 100644 --- a/src/uncategorized/nextWeek.tw +++ b/src/uncategorized/nextWeek.tw @@ -77,6 +77,132 @@ <<set $surgeryCost = Math.trunc(30000/$localEcon)>> <</if>> +/*Adding random changes to slave demand and supply*/ +/*Without events triggering and a relatively average supply/demand situation, the best case scenario is an increase/decrease in the price of slaves of 10 in one week. Chance of these conditions happening are 1/25. For demand or supply to go from average to their maximum will take 25 weeks if rolling highest growth each time a roll is made and all other luck is average. Because of the properties of the market and how it develops the likely prices one will encounter are distributed in a bellshaped fashion, centered around 1000. Minimum possible price is 750, maximum 1250. At +/- 35000 chances of supply or demand getting even more extreme are reduced.*/ +<<set _demandSlaveVar = random(-10,10)*10>> +<<set _supplySlaveVar = random(-10,10)*10>> +<<set _randomSlaveCost = random(-3,3)>> +<<set $slaveCostRandom = _randomSlaveCost>> +<<if $menialDemandFactor <= -50000>> + <<set _demandDelta = random(1,3)>> + <<set $deltaDemand = _demandDelta * 1000>> + <<set _timerDemand = random(7,12)>> + <<set $demandTimer = _timerDemand>> + <<set $elapsedDemandTimer = 1>> + <<set $menialDemandFactor += $deltaDemand + _demandSlaveVar>> +<<elseif $menialDemandFactor >= 50000>> + <<set _demandDelta = random(-3,-1)>> + <<set $deltaDemand = _demandDelta * 1000>> + <<set _timerDemand = random(7,12)>> + <<set $demandTimer = _timerDemand>> + <<set $elapsedDemandTimer = 1>> + <<set $menialDemandFactor += $deltaDemand + _demandSlaveVar>> +<<elseif $demandTimer - $elapsedDemandTimer <= 0>> + <<set _timerDemand = random(7,12)>> + <<set $demandTimer = _timerDemand>> + <<set $elapsedDemandTimer = 1>> + <<if $menialDemandFactor > 35000>> + <<set _demandDelta = random(-3,1)>> + <<elseif $menialDemandFactor < -35000>> + <<set _demandDelta = random(-1,3)>> + <<else>> + <<set _demandDelta = random(-2,2)>> + <</if>> + <<set $deltaDemand = _demandDelta * 1000>> + <<set $menialDemandFactor += $deltaDemand + _demandSlaveVar>> +<<else>> + <<set $elapsedDemandTimer += 1>> + <<set $menialDemandFactor += $deltaDemand + _demandSlaveVar>> + <<set $menialDemandFactor = Math.clamp($menialDemandFactor,-50000,50000)>> +<</if>> + +<<if $menialSupplyFactor <= -50000>> + <<set _supplyDelta = random(1,3)>> + <<set $deltaSupply = _supplyDelta * 1000>> + <<set _timerSupply = random(7,12)>> + <<set $supplyTimer = _timerSupply>> + <<set $elapsedSupplyTimer = 1>> + <<set $menialSupplyFactor += $deltaSupply + _demandSlaveVar>> +<<elseif $menialSupplyFactor >= 50000>> + <<set _supplyDelta = random(-3,-1)>> + <<set $deltaSupply = _supplyDelta * 1000>> + <<set _timerSupply = random(7,12)>> + <<set $supplyTimer = _timerSupply>> + <<set $elapsedSupplyTimer = 1>> + <<set $menialSupplyFactor += $deltaSupply + _demandSlaveVar>> +<<elseif $supplyTimer - $elapsedSupplyTimer <= 0>> + <<set _timerSupply = random(7,12)>> + <<set $supplyTimer = _timerSupply>> + <<set $elapsedSupplyTimer = 1>> + <<if $menialSupplyFactor > 35000>> + <<set _supplyDelta = random(-3,1)>> + <<elseif $menialSupplyFactor < -35000>> + <<set _supplyDelta = random(-1,3)>> + <<else>> + <<set _supplyDelta = random(-2,2)>> + <</if>> + <<set $deltaSupply = _supplyDelta * 1000>> + <<set $menialSupplyFactor += $deltaSupply + _supplySlaveVar>> +<<else>> + <<set $elapsedSupplyTimer += 1>> + <<set $menialSupplyFactor += $deltaSupply + _supplySlaveVar>> + <<set $menialSupplyFactor = Math.clamp($menialSupplyFactor,-50000,50000)>> +/*Adding random changes to the economy*/ +<<if $difficultySwitch == 1>> + <<set _globalEconSeed = random(1,100)>> + <<if _globalEconSeed > 98>> + <<set $economy += 2>> + <<elseif _globalEconSeed > 85>> + <<set $economy += 1>> + <<elseif _globalEconSeed <= 2>> + <<set $economy -= 2>> + <<elseif _globalEconSeed <= 25 + $econRate * 10>> + <<set $economy -= 1>> + <</if>> + <<if $economy < 20>> + <<set $economy = 20>> + <</if>> + <<set _localEconSeed = random(1,100)>> + <<if $localEcon <= ($globalEcon + $econAdvantage)>> + <<if _localEconSeed > 95>> + <<set $localEcon += 2>> + <<elseif _localEconSeed > 50>> + <<set $localEcon += 1>> + <<elseif _localEconSeed <= 1>> + <<set $localEcon -= 2>> + <<elseif _localEconSeed <= 10>> + <<set $localEcon -= 1>> + <</if>> + <<elseif $localEcon <= ($globalEcon + $econAdvantage + 5)>> + <<if _localEconSeed > 98>> + <<set $localEcon += 2>> + <<elseif _localEconSeed > 66>> + <<set $localEcon += 1>> + <<elseif _localEconSeed <= 2>> + <<set $localEcon -= 2>> + <<elseif _localEconSeed <= 33>> + <<set $localEcon -= 1>> + <</if>> + <<elseif _localEconSeed > 99>> + <<set $localEcon += 2>> + <<elseif _localEconSeed > 90>> + <<set $localEcon += 1>> + <<elseif _localEconSeed <= 5>> + <<set $localEcon -= 2>> + <<elseif _localEconSeed <= 50>> + <<set $localEcon -= 1>> + <</if>> + <<if $localEcon < 20>> + <<set $localEcon = 20>> + <</if>> + + <<set $foodCost = Math.trunc(2500/$localEcon)>> + <<set $drugsCost = Math.trunc(10000/$localEcon)>> + <<set $rulesCost = Math.trunc(10000/$localEcon)>> + <<set $modCost = Math.trunc(5000/$localEcon)>> + <<set $surgeryCost = Math.trunc(30000/$localEcon)>> +<</if>> + <<set $averageTrust = 0, $averageDevotion = 0, _slavesContributing = 0, _OldHG = -1, _NewHG = -1, _SL = $slaves.length>> <<if $studio == 1>> <<set $pornStars = 0, $pornStarFuckdolls = 0, $pornStarRapees = 0, $pornStarPreggos = 0, diff --git a/src/uncategorized/persBusiness.tw b/src/uncategorized/persBusiness.tw index 09e9ce0facd..64c4585f73c 100644 --- a/src/uncategorized/persBusiness.tw +++ b/src/uncategorized/persBusiness.tw @@ -855,62 +855,184 @@ Routine upkeep of your demesne costs @@.yellow;<<print cashFormat($costs)>>.@@ <</if>> <br> -<br> - -<<set _slaveMarketValue = random(1,100)>> -<<if $arcologies[0].FSRomanRevivalist > random(1,150)>> - <<if $slaveCostFactor > 0.8>> - @@.yellow;Your Roman Revivalism is having an effect on the slave market and has driven local prices down@@ by convincing slave traders that this is a staunchly pro-slavery area.<br> - <<set $slaveCostFactor -= 0.05>> +/*Adding random changes to slave demand and supply*/ +/*Without events triggering and a relatively average supply/demand situation, the best case scenario is an increase/decrease in the price of slaves of 10 in one week. Chance of these conditions happening are 1/25. For demand or supply to go from average to their maximum will take 25 weeks if rolling highest growth each time a roll is made and all other luck is average. Because of the properties of the market and how it develops the likely prices one will encounter are distributed in a bellshaped fashion, centered around 1000. Minimum possible price is 750, maximum 1250. At +/- 35000 chances of supply or demand getting even more extreme are reduced.*/ +<<set _demandSlaveVar = random(-10,10)*10>> +<<set _supplySlaveVar = random(-10,10)*10>> +<<set _randomSlaveCost = random(-3,3)>> +<<set $slaveCostRandom = _randomSlaveCost>> +<<if $menialDemandFactor <= -50000>> + <<set _demandDelta = random(1,3)>> + <<set $deltaDemand = _demandDelta * 1000>> + <<set _timerDemand = random(7,12)>> + <<set $demandTimer = _timerDemand>> + <<set $elapsedDemandTimer = 1>> + <<set $menialDemandFactor += $deltaDemand + _demandSlaveVar>> +<<elseif $menialDemandFactor >= 50000>> + <<set _demandDelta = random(-3,-1)>> + <<set $deltaDemand = _demandDelta * 1000>> + <<set _timerDemand = random(7,12)>> + <<set $demandTimer = _timerDemand>> + <<set $elapsedDemandTimer = 1>> + <<set $menialDemandFactor += $deltaDemand + _demandSlaveVar>> +<<elseif $demandTimer - $elapsedDemandTimer <= 0>> + <<set _timerDemand = random(7,12)>> + <<set $demandTimer = _timerDemand>> + <<set $elapsedDemandTimer = 1>> + <<if $menialDemandFactor > 35000>> + <<set _demandDelta = random(-3,1)>> + <<elseif $menialDemandFactor < -35000>> + <<set _demandDelta = random(-1,3)>> <<else>> - @@.yellow;Your Roman Revivalism is having an effect on the slave market and is holding local prices down@@ by convincing slave traders that this is a staunchly pro-slavery area.<br> + <<set _demandDelta = random(-2,2)>> <</if>> -<<elseif ($slaveCostFactor > 1.15)>> - @@.yellow;Natural market forces drive the very high price of slaves down.@@<br> - <<set $slaveCostFactor -= 0.1>> -<<elseif ($slaveCostFactor < 0.85)>> - @@.yellow;Natural market forces drive the very low price of slaves up.@@<br> - <<set $slaveCostFactor += 0.1>> -<<elseif (_slaveMarketValue > 30)>> - <<if ($slaveCostFactor > 1)>> - @@.yellow;Natural market forces drive the high price of slaves slowly down.@@<br> - <<set $slaveCostFactor -= 0.05>> - <<elseif ($slaveCostFactor < 1)>> - @@.yellow;Natural market forces drive the low price of slaves slowly up.@@<br> - <<set $slaveCostFactor += 0.05>> + <<set $deltaDemand = _demandDelta * 1000>> + <<set $menialDemandFactor += $deltaDemand + _demandSlaveVar>> + <<if $menialDemandFactor <= -35000>> + <br>@@.yellowgreen;Demand for slaves is approaching a ''historic low'', forecasts predict@@ + <<if $deltaDemand > 0>> + @@.yellowgreen;the market will turn and ''demand will rise''.@@ + <<elseif $deltaDemand < 0>> + @@.yellowgreen;''demand will continue to weaken'', but warn the bottom is in sight.@@ + <<else>> + @@.yellowgreen;the current demand will ''remain stable'' for the coming months.@@ + <</if>> + <<elseif $menialDemandFactor <= 20000>> + <br>@@.yellowgreen;Demand for slaves is ''very low'', forecasts predict@@ + <<if $deltaDemand > 0>> + @@.yellowgreen;the market will turn and ''demand will rise''.@@ + <<elseif $deltaDemand < 0>> + @@.yellowgreen;''demand will continue to weaken''.@@ + <<else>> + @@.yellowgreen;the current demand will ''remain stable'' for the coming months.@@ + <</if>> + <<elseif $menialDemandFactor >= 35000>> + <br>@@.yellowgreen;Demand for slaves is approaching a ''historic high'', forecasts predict@@ + <<if $deltaDemand > 0>> + @@.yellowgreen;''demand will continue to rise'', but warn the peak is in sight.@@ + <<elseif $deltaDemand < 0>> + @@.yellowgreen;the market will turn and ''demand will weaken''.@@ + <<else>> + @@.yellowgreen;the current demand will ''remain stable'' for the coming months.@@ + <</if>> + <<elseif $menialDemandFactor >= 20000>> + <br>@@.yellowgreen;Demand for slaves is ''very high'', forecasts predict@@ + <<if $deltaDemand > 0>> + @@.yellowgreen;''demand will continue to rise''.@@ + <<elseif $deltaDemand < 0>> + @@.yellowgreen;the market will turn and ''demand will weaken''.@@ + <<else>> + @@.yellowgreen;the current demand will ''remain stable'' for the coming months.@@ + <</if>> <<else>> - <<if _slaveMarketValue > 80>> - @@.yellow;The price of slaves has naturally risen slightly.@@<br> - <<set $slaveCostFactor += 0.05>> - <<elseif _slaveMarketValue > 60>> - @@.yellow;The price of slaves has naturally fallen slightly.@@<br> - <<set $slaveCostFactor -= 0.05>> + <br>@@.yellowgreen;Demand for slaves is ''average'', forecasts predict@@ + <<if $deltaDemand > 0>> + @@.yellowgreen;the market will see ''rising demand''.@@ + <<elseif $deltaDemand < 0>> + @@.yellowgreen;the market will see ''weakening demand''.@@ + <<else>> + @@.yellowgreen;''no change'' for the coming months.@@ <</if>> <</if>> +<<else>> + <<set $elapsedDemandTimer += 1>> + <<set $menialDemandFactor += $deltaDemand + _demandSlaveVar>> + <<set $menialDemandFactor = Math.clamp($menialDemandFactor,-50000,50000)>> <</if>> - -<<if Math.abs($menialDemandFactor) > 100>> - <<if ($menialDemandFactor > 1000)>> - <<set $menialDemandFactor -= random(500, 1000)>> - <<elseif ($menialDemandFactor > 500)>> - <<set $menialDemandFactor -= random(250, 500)>> - <<elseif ($menialDemandFactor > 250)>> - <<set $menialDemandFactor -= random(100, 250)>> - <<elseif ($menialDemandFactor < -1000)>> - <<set $menialDemandFactor += random(500, 1000)>> - <<elseif ($menialDemandFactor < -500)>> - <<set $menialDemandFactor += random(250, 500)>> - <<elseif ($menialDemandFactor < -250)>> - <<set $menialDemandFactor += random(100, 250)>> +<<if $menialSupplyFactor <= -50000>> + <<set _supplyDelta = random(1,3)>> + <<set $deltaSupply = _supplyDelta * 1000>> + <<set _timerSupply = random(7,12)>> + <<set $supplyTimer = _timerSupply>> + <<set $elapsedSupplyTimer = 1>> + <<set $menialSupplyFactor += $deltaSupply + _demandSlaveVar>> +<<elseif $menialSupplyFactor >= 50000>> + <<set _supplyDelta = random(-3,-1)>> + <<set $deltaSupply = _supplyDelta * 1000>> + <<set _timerSupply = random(7,12)>> + <<set $supplyTimer = _timerSupply>> + <<set $elapsedSupplyTimer = 1>> + <<set $menialSupplyFactor += $deltaSupply + _demandSlaveVar>> +<<elseif $supplyTimer - $elapsedSupplyTimer <= 0>> + <<set _timerSupply = random(7,12)>> + <<set $supplyTimer = _timerSupply>> + <<set $elapsedSupplyTimer = 1>> + <<if $menialSupplyFactor > 35000>> + <<set _supplyDelta = random(-3,1)>> + <<elseif $menialSupplyFactor < -35000>> + <<set _supplyDelta = random(-1,3)>> + <<else>> + <<set _supplyDelta = random(-2,2)>> + <</if>> + <<set $deltaSupply = _supplyDelta * 1000>> + <<set $menialSupplyFactor += $deltaSupply + _supplySlaveVar>> + <<if $menialSupplyFactor <= -35000>> + <br>@@.yellowgreen;Supply of slaves is approaching a ''historic low'', forecasts predict@@ + <<if $deltaSupply > 0>> + @@.yellowgreen;the market will turn and ''supply will rise''.@@ + <<elseif $deltaSupply < 0>> + @@.yellowgreen;''supply will continue to weaken'', but warn the bottom is in sight.@@ + <<else>> + @@.yellowgreen;the current supply will ''remain stable'' for the coming months.@@ + <</if>> + <<elseif $menialSupplyFactor <= 20000>> + <br>@@.yellowgreen;Supply for slaves is ''very low'', forecasts predict@@ + <<if $deltaSupply > 0>> + @@.yellowgreen;the market will turn and ''supply will rise''.@@ + <<elseif $deltaSupply < 0>> + @@.yellowgreen;''supply will continue to weaken''.@@ + <<else>> + @@.yellowgreen;the current supply will ''remain stable'' for the coming months.@@ + <</if>> + <<elseif $menialSupplyFactor >= 35000>> + <br>@@.yellowgreen;Supply for slaves is approaching a ''historic high'', forecasts predict@@ + <<if $deltaSupply > 0>> + @@.yellowgreen;''supply will continue to rise'', but warn the peak is in sight.@@ + <<elseif $deltaSupply < 0>> + @@.yellowgreen;the market will turn and ''supply will weaken''.@@ + <<else>> + @@.yellowgreen;the current supply will ''remain stable'' for the coming months.@@ + <</if>> + <<elseif $menialSupplyFactor >= 20000>> + <br>@@.yellowgreen;Supply for slaves is ''very high'', forecasts predict@@ + <<if $deltaSupply > 0>> + @@.yellowgreen;''supply will continue to rise''.@@ + <<elseif $deltaSupply < 0>> + @@.yellowgreen;the market will turn and ''supply will weaken''.@@ + <<else>> + @@.yellowgreen;the current supply will ''remain stable'' for the coming months.@@ + <</if>> <<else>> - <<set $menialDemandFactor += random(-100, 100)>> + <br>@@.yellowgreen;Supply for slaves is ''average'', forecasts predict@@ + <<if $deltaSupply > 0>> + @@.yellowgreen;the market will see ''rising supply''.@@ + <<elseif $deltaSupply < 0>> + @@.yellowgreen;the market will see ''weakening supply''.@@ + <<else>> + @@.yellowgreen;''no change'' for the coming months.@@ + <</if>> <</if>> -<<elseif random(1,100) > 95>> - <<set $menialDemandFactor += random(-1500, 1500)>> -<<elseif random(1,100) > 75>> - <<set $menialDemandFactor += random(-500, 500)>> <<else>> - <<set $menialDemandFactor += random(-250, 250)>> + <<set $elapsedSupplyTimer += 1>> + <<set $menialSupplyFactor += $deltaSupply + _supplySlaveVar>> + <<set $menialSupplyFactor = Math.clamp($menialSupplyFactor,-50000,50000)>> +<</if>> + +<br> + +/* Menial and regular slave markets are part of the same market, e.a. if (menial)slave supply goes up, all slave prices fall. +The RomanFS may need further tweaking (it probably got weaker). Could increase the slave supply cap if this FS is chosen to fix. */ + +<<set $slaveCostFactor = menialSlaveCost()/1000>> +<<if $arcologies[0].FSRomanRevivalist > random(1,150)>> + <<if $slaveCostFactor > 0.8>> + @@.yellow;Your Roman Revivalism is having an effect on the slave market and has driven local prices down@@ by convincing slave traders that this is a staunchly pro-slavery area.<br> + <<set $menialSupplyFactor += 2000>> + <<else>> + @@.yellow;Your Roman Revivalism is having an effect on the slave market and is holding local prices down@@ by convincing slave traders that this is a staunchly pro-slavery area.<br> + <</if>> <</if>> + + <<if $SF.Toggle && $SF.Active >= 1>> <<include "SF_Report">> <</if>> diff --git a/src/uncategorized/remFluctuations.tw b/src/uncategorized/remFluctuations.tw index 02a1aa8e246..31516ca38ed 100644 --- a/src/uncategorized/remFluctuations.tw +++ b/src/uncategorized/remFluctuations.tw @@ -78,40 +78,66 @@ Your <<if $marketAssistantAnnounced>>market<<else>>personal<</if>> assistant's s <</if>> <br><br> +/* The events reducing slave prices are all supply sided. Without events reducing demand this is a little unbalanced. A minor issue */ + <<if $REM == "revel">> - Something is happening in one of the Free Cities' richest arcologies. It's not clear what, exactly, it is, since its owner is making skillful use of the arcology's advanced surveillance and media systems to keep its internal affairs quite secret. The truth will get out eventually, and it's probably not going to do much for old world opinions of the Free Cities. After all, cheap slaves go into that arcology at a prodigious rate, and they don't seem to ever come out again. The unexpected demand for slaves, any slaves, has produced a temporary tightening of the entire slave market. Projections suggest price increases of up to twenty percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ - <<set $slaveCostFactor += 0.1>> + Something is happening in one of the Free Cities' richest arcologies. It's not clear what, exactly, it is, since its owner is making skillful use of the arcology's advanced surveillance and media systems to keep its internal affairs quite secret. The truth will get out eventually, and it's probably not going to do much for old world opinions of the Free Cities. After all, cheap slaves go into that arcology at a prodigious rate, and they don't seem to ever come out again. The unexpected demand for slaves, any slaves, has produced a temporary tightening of the entire slave market. Projections suggest price increases of up to five percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ + <<set $menialDemandFactor += 12000>> + <<set $menialDemandFactor = Math.clam($menialDemandFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <<elseif $REM == "tainted drugs">> - The Free Cities are anarcho-capitalist paradises - or 'paradises,' depending on one's station and assets. You can't complain personally, as one of the Free Cities' richest citizens, master of your own arcology and owner of sexual slaves. Unfortunately quite a few slaves in the markets are in a position to complain today, as are their owners. Many slave markets use long-lasting stimulants to pep their wares up for auction; dull-eyed slaves earn low bids. Corner-cutting at one of the major suppliers of these stimulants led to a number of slaves being prepared for auction being damaged today. Relatively few were permanently lost, but slaves are going to be a little scarce for a while, which will drive up the going rate. Projections suggest increases of up to twenty percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ - <<set $slaveCostFactor += 0.1>> + The Free Cities are anarcho-capitalist paradises - or 'paradises,' depending on one's station and assets. You can't complain personally, as one of the Free Cities' richest citizens, master of your own arcology and owner of sexual slaves. Unfortunately quite a few slaves in the markets are in a position to complain today, as are their owners. Many slave markets use long-lasting stimulants to pep their wares up for auction; dull-eyed slaves earn low bids. Corner-cutting at one of the major suppliers of these stimulants led to a number of slaves being prepared for auction being damaged today. Relatively few were permanently lost, but slaves are going to be a little scarce for a while, which will drive up the going rate. Projections suggest increases of up to five percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ + <<set $menialSupplyFactor -= 12000>> + <<set $menialSupplyFactor = Math.clam($menialSupplyFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <<elseif $REM == "antislavery terrorism">> - Antislavery activism in the old world has grown to match the spread of slavery in the Free Cities. Unfortunately for the activists, they are confronted with a fundamental problem: the independence of the Free Cities. There is very little they can do without resorting to violence, and so, predictably, they often do. A major slave induction center in one of the more open Free Cities has just suffered a suicide bombing. The actual damage was slight, but a wave of increased import security is sweeping the Free Cities in reaction to the incident. Slave prices will be driven up by the cost of checking imported merchandise for explosive devices until the market adjusts. Projections suggest price increases of up to twenty percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ - <<set $slaveCostFactor += 0.1>> + Antislavery activism in the old world has grown to match the spread of slavery in the Free Cities. Unfortunately for the activists, they are confronted with a fundamental problem: the independence of the Free Cities. There is very little they can do without resorting to violence, and so, predictably, they often do. A major slave induction center in one of the more open Free Cities has just suffered a suicide bombing. The actual damage was slight, but a wave of increased import security is sweeping the Free Cities in reaction to the incident. Slave prices will be driven up by the cost of checking imported merchandise for explosive devices until the market adjusts. Projections suggest price increases of up to five percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ + <<set $menialSupplyFactor -= 12000>> + <<set $menialSupplyFactor = Math.clam($menialSupplyFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <<elseif $REM == "new free city">> - New Free Cities arise unpredictably. They require either carving out a slice of the old world, emancipating it from whichever inattentive or corrupt country previously owned the land, or reclaiming new land from barren or uninhabitable areas, efforts which are often kept secret. The unpredictable happened today; the world has a new Free City. As usual, immigration rights are being offered cheaply to deserving persons. Many of the remaining rich and talented of the old world are staking claims in the new city, and they'll be buying slaves when they get to their new home. It's a sellers' market out there; projections show the price of slaves rising as much as thirty percent in the short term. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ - <<set $slaveCostFactor += 0.15>> + New Free Cities arise unpredictably. They require either carving out a slice of the old world, emancipating it from whichever inattentive or corrupt country previously owned the land, or reclaiming new land from barren or uninhabitable areas, efforts which are often kept secret. The unpredictable happened today; the world has a new Free City. As usual, immigration rights are being offered cheaply to deserving persons. Many of the remaining rich and talented of the old world are staking claims in the new city, and they'll be buying slaves when they get to their new home. It's a sellers' market out there; projections show the price of slaves rising as much as ten percent in the short term. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ + <<set $menialDemandFactor += 20000>> + <<set $menialDemandFactor = Math.clam($menialDemandFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <<elseif $REM == "speculation">> - The Free Cities are almost totally unregulated. Prices and interest rates can spike and plummet with speeds not seen since the South Seas Bubble, and for the most silly or corrupt of reasons. Today, it's the latter. A massive attempt to rig the slave market was uncovered this morning. Ultimately, the culprits were caught and much of the damage reversed, but confidence in the marketplace has been shaken. Many great slave vendors are holding onto their stock until they're sure the water's calm again. It's a sellers' market out there; projections show the price of slaves rising as much as thirty percent in the short term. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ - <<set $slaveCostFactor += 0.15>> + The Free Cities are almost totally unregulated. Prices and interest rates can spike and plummet with speeds not seen since the South Seas Bubble, and for the most silly or corrupt of reasons. Today, it's the latter. A massive attempt to rig the slave market was uncovered this morning. Ultimately, the culprits were caught and much of the damage reversed, but confidence in the marketplace has been shaken. Many great slave vendors are holding onto their stock until they're sure the water's calm again. It's a sellers' market out there; projections show the price of slaves rising as much as ten percent in the short term. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ + <<set $menialSupplyFactor -= 20000>> + <<set $menialSupplyFactor = Math.clam($menialSupplyFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <<elseif $REM == "medical breakthrough">> - There has been a breakthrough in gene therapy. More accurately, there was a breakthrough in gene therapy several years ago - you already knew all about it, and some of the more advanced slave medical upgrades available to you use the technology. However, it's finally gotten out of the prototype stage, and is becoming available to the Free Cities middle class, citizens with one or two slaves. The average citizen is more able today than he was yesterday to turn his chattel housekeeper into the girl he's always dreamed of. Aspirational stuff like this always causes a major price shock. It's a sellers' market out there; projections show the price of slaves rising as much as thirty percent in the short term. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ - <<set $slaveCostFactor += 0.15>> + There has been a breakthrough in gene therapy. More accurately, there was a breakthrough in gene therapy several years ago - you already knew all about it, and some of the more advanced slave medical upgrades available to you use the technology. However, it's finally gotten out of the prototype stage, and is becoming available to the Free Cities middle class, citizens with one or two slaves. The average citizen is more able today than he was yesterday to turn his chattel housekeeper into the girl he's always dreamed of. Aspirational stuff like this always causes a major price shock. It's a sellers' market out there; projections show the price of slaves rising as much as ten percent in the short term. There will be no immediate impact on you or your slaves, but the coming weeks will be a great time to sell stock, and a bad time to buy. @@.yellow;The market price of slaves has increased.@@ + <<set $menialDemandFactor += 20000>> + <<set $menialDemandFactor = Math.clam($menialDemandFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <<elseif $REM == "bankruptcy">> - The economy of the Free Cities is a rough-and-tumble place. The absence of old world regulations and institutions, and the often gold-rush atmosphere of the new cities, lead to fortunes being made and lost overnight. Last night, one of the Free Cities' greatest fortunes was lost. A great slave trading house unexpectedly went bankrupt, and its huge stable of slaves are being sold at fire-sale prices. The unforeseen sell off is driving down the market price of slaves all across the Free Cities. Projections show a short-term price drop of up to twenty percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ - <<set $slaveCostFactor -= 0.1>> + The economy of the Free Cities is a rough-and-tumble place. The absence of old world regulations and institutions, and the often gold-rush atmosphere of the new cities, lead to fortunes being made and lost overnight. Last night, one of the Free Cities' greatest fortunes was lost. A great slave trading house unexpectedly went bankrupt, and its huge stable of slaves are being sold at fire-sale prices. The unforeseen sell off is driving down the market price of slaves all across the Free Cities. Projections show a short-term price drop of up to five percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ + <<set $menialSupplyFactor += 12000>> + <<set $menialSupplyFactor = Math.clam($menialSupplyFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <<elseif $REM == "refugee boat">> - Periodic refugee crises sweep the old world, and sometimes the human flotsam shaken loose from its moorings in the old world is brought up on the shores of the Free Cities. This week, that was no metaphor. A floating Free City has been inundated by refugees in boats. Naturally, the boats have been discarded and the refugees enslaved. It is unclear whether they somehow did not know that this was their inevitable fate, or their lot in the old world was so desperate that they were willing to accept it. Projections show a short-term slave price drop of up to twenty percent as the market digests the influx. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ - <<set $slaveCostFactor -= 0.1>> + Periodic refugee crises sweep the old world, and sometimes the human flotsam shaken loose from its moorings in the old world is brought up on the shores of the Free Cities. This week, that was no metaphor. A floating Free City has been inundated by refugees in boats. Naturally, the boats have been discarded and the refugees enslaved. It is unclear whether they somehow did not know that this was their inevitable fate, or their lot in the old world was so desperate that they were willing to accept it. Projections show a short-term slave price drop of up to five percent as the market digests the influx. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ + <<set $menialSupplyFactor += 12000>> + <<set $menialSupplyFactor = Math.clam($menialSupplyFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <<elseif $REM == "arcology change">> - All across the Free Cities, arcology owners are experimenting with new society models and new ways of enforcing them. A nearby arcology has just undergone a major internal struggle as its owner forced through a radical program of changes and harsh measures to enforce them. All but a handful of its inhabitants have been enslaved and placed under the control of a chosen few. With harems of hundreds and little experience or infrastructure to manage them, the new overlords are selling off stock to raise funds to make the transition. Projections show a short-term price drop of up to twenty percent as they flood the market with mediocre slaves. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ - <<set $slaveCostFactor -= 0.1>> + All across the Free Cities, arcology owners are experimenting with new society models and new ways of enforcing them. A nearby arcology has just undergone a major internal struggle as its owner forced through a radical program of changes and harsh measures to enforce them. All but a handful of its inhabitants have been enslaved and placed under the control of a chosen few. With harems of hundreds and little experience or infrastructure to manage them, the new overlords are selling off stock to raise funds to make the transition. Projections show a short-term price drop of up to five percent as they flood the market with mediocre slaves. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ + <<set $menialSupplyFactor += 12000>> + <<set $menialSupplyFactor = Math.clam($menialSupplyFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <<elseif $REM == "war">> - The old world outside the Free Cities took another step towards its final decline today. A relatively prosperous third world city fell to a regional warlord, and it seems the remaining great powers lack either the money or the will to do anything about it. The victors seem to be following the standard procedure for modern conquerors. Anything valuable, they steal. Among the population, they recruit the willing, shoot the unwilling, and enslave everyone else. The slave markets are going to be glutted with new stock soon. Projections show a short-term price drop of up to thirty percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ - <<set $slaveCostFactor -= 0.15>> + The old world outside the Free Cities took another step towards its final decline today. A relatively prosperous third world city fell to a regional warlord, and it seems the remaining great powers lack either the money or the will to do anything about it. The victors seem to be following the standard procedure for modern conquerors. Anything valuable, they steal. Among the population, they recruit the willing, shoot the unwilling, and enslave everyone else. The slave markets are going to be glutted with new stock soon. Projections show a short-term price drop of up to ten percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ + <<set $menialSupplyFactor += 20000>> + <<set $menialSupplyFactor = Math.clam($menialSupplyFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <<elseif $REM == "empty prisons">> - A small, impoverished old world country defaulted on its currency today. Its beleaguered government is taking every available step to raise funds. Among other things, it has sold every inmate in its prisons who would fetch a price worth the trouble of sale into Free Cities slavery. Though most of the influx is going to be of abominably low quality, the sudden addition of so much new meat is going to have a big impact on the slave economy. Projections show a short-term price drop of up to thirty percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ - <<set $slaveCostFactor -= 0.15>> + A small, impoverished old world country defaulted on its currency today. Its beleaguered government is taking every available step to raise funds. Among other things, it has sold every inmate in its prisons who would fetch a price worth the trouble of sale into Free Cities slavery. Though most of the influx is going to be of abominably low quality, the sudden addition of so much new meat is going to have a big impact on the slave economy. Projections show a short-term price drop of up to ten percent. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ + <<set $menialSupplyFactor += 20000>> + <<set $menialSupplyFactor = Math.clam($menialSupplyFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <<elseif $REM == "unemployment">> - A leading old world nation has just suffered a major economic downturn. Old world nations suffer economic downturns all the time, of course, but to those with interests in the slave market, news like this can be very important. Slave market shocks from catastrophes get all the headlines, but a change that affects millions will often be more impactful. As unemployment in the old world rises, the number of people faced with the choice between starvation and voluntary enslavement rises. Social safety nets just aren't what they used to be. Projections show a short-term slave price drop of up to thirty percent due to the sharp increase in desperate people immigrating to the Free Cities for enslavement. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ - <<set $slaveCostFactor -= 0.15>> + A leading old world nation has just suffered a major economic downturn. Old world nations suffer economic downturns all the time, of course, but to those with interests in the slave market, news like this can be very important. Slave market shocks from catastrophes get all the headlines, but a change that affects millions will often be more impactful. As unemployment in the old world rises, the number of people faced with the choice between starvation and voluntary enslavement rises. Social safety nets just aren't what they used to be. Projections show a short-term slave price drop of up to ten percent due to the sharp increase in desperate people immigrating to the Free Cities for enslavement. There will be no immediate impact on you or your slaves, but the coming weeks will be a fine time to buy new stock, and a terrible time to sell. @@.yellow;The market price of slaves has dropped.@@ + <<set $menialSupplyFactor += 20000>> + <<set $menialSupplyFactor = Math.clam($menialSupplyFactor,-50000,50000)>> + <<set $slaveCostFactor = menialSlaveCost()/1000>> <</if>> diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw index b33fffa9024..dc63b759efc 100644 --- a/src/uncategorized/storyCaption.tw +++ b/src/uncategorized/storyCaption.tw @@ -525,9 +525,7 @@ <<else>> <br><span id="manageArcology"><<link "Manage Arcology">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Arcology">><</link>></span> @@.cyan;[C]@@ <br><span id="managePenthouse"><<link "Manage Penthouse">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Penthouse">><</link>></span> @@.cyan;[P]@@ - <<if $difficultySwitch == 1>> - <br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> @@.cyan;[N]@@ - <</if>> + <br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> <br><span id="managePerson"><<link "Manage Personal Affairs">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Personal Affairs">><</link>></span> @@.cyan;[X]@@ <<if $secExp == 1>> <<if $propHub == 1>> @@ -569,9 +567,7 @@ <<elseif _Pass == "Manage Arcology">> <br> <br><span id="managePenthouse"><<link "Manage Penthouse">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Penthouse">><</link>></span> @@.cyan;[P]@@ - <<if $difficultySwitch == 1>> - <br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> @@.cyan;[N]@@ - <</if>> + <br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> <br><span id="managePerson"><<link "Manage Personal Affairs">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Personal Affairs">><</link>></span> @@.cyan;[X]@@ <<if $secExp == 1>> <<if $propHub == 1>> @@ -609,9 +605,7 @@ <<elseif _Pass == "Manage Penthouse">> <br> <br><span id="manageArcology"><<link [[Manage Arcology|Manage Arcology]]>><</link>></span> @@.cyan;[C]@@ - <<if $difficultySwitch == 1>> - <br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> @@.cyan;[N]@@ - <</if>> + <br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> <br><span id="managePerson"><<link [[Manage Personal Affairs|Manage Personal Affairs]]>><</link>></span> @@.cyan;[X]@@ <br> <br><<link [[Wardrobe]]>><</link>> @@ -660,9 +654,7 @@ <br> <br><span id="manageArcology"><<link [[Manage Arcology|Manage Arcology]]>><</link>></span> @@.cyan;[C]@@ <br><span id="managePenthouse"><<link [[Manage Penthouse|Manage Penthouse]]>><</link>></span> @@.cyan;[X]@@ - <<if $difficultySwitch == 1>> - <br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> @@.cyan;[N]@@ - <</if>> + <br><span id="manageEconomy"><<link "Manage Economy">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Economy">><</link>></span> <br> <br><<link [[Wardrobe]]>><</link>> <br><<if $dispensary>>[[Pharmaceutical Fabricator|Dispensary]]<</if>> -- GitLab