From a35cda88a0826d685f9d87e64d0fd83a7e0990f8 Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Mon, 22 Jan 2018 19:30:02 -0500 Subject: [PATCH] anon's tweaks --- devNotes/VersionChangeLog-Premod+LoliMod.txt | 3 + src/gui/Encyclopedia/encyclopedia.tw | 3 +- src/uncategorized/SFMBarracks.tw | 16 +- src/uncategorized/corporationDevelopments.tw | 190 +++++++++---------- 4 files changed, 107 insertions(+), 105 deletions(-) diff --git a/devNotes/VersionChangeLog-Premod+LoliMod.txt b/devNotes/VersionChangeLog-Premod+LoliMod.txt index 1155dfb7207..5f655444fbf 100644 --- a/devNotes/VersionChangeLog-Premod+LoliMod.txt +++ b/devNotes/VersionChangeLog-Premod+LoliMod.txt @@ -4,6 +4,9 @@ 1/22/18 + 289 + -anon's continued tweaking + 288 -SFanon's fixes to SFMBarracks -phase 4 work diff --git a/src/gui/Encyclopedia/encyclopedia.tw b/src/gui/Encyclopedia/encyclopedia.tw index 9f2c48bfbc3..52033790d71 100644 --- a/src/gui/Encyclopedia/encyclopedia.tw +++ b/src/gui/Encyclopedia/encyclopedia.tw @@ -2610,6 +2610,7 @@ __I do not give credit without explicit permission to do so.__ If you have contr <br>''anon'' for making slaves seed their own fields. <br>''Ansopedi'' for slave career skills. <br>''Emuis'' for various compiler tweaks +<br>''anon'' for continued tweaks to various economy formulas. <br>''Bane70'' optimized huge swaths of code with notable professionalism. <br>''Circle Tritagonist'' provided several new collars and outfits. <br>''Qotsafan'' submitted bugfixes. @@ -2623,7 +2624,7 @@ __I do not give credit without explicit permission to do so.__ If you have contr <br>''NovX'' created a vector art system. <br>''Mauve'' contributed vector collars and pubic hair. <br>''Rodziel'' contributed the cybernetics mod. -<br>''prndev'' wrote the Free Range Dairy Assignment scene. +<br>''prndev'' wrote the Free Range Dairy Assignment scene. Also did tons of vector art work. <br>''freecitiesbandit'' wrote a number of recruitment, future society, mercenary and random events, provided tailed buttplugs, new eyes and tattoos, and contributed the code for the mercenary raiders policy. <br>''DrNoOne'' wrote the bulk slave purchase and persistent summary code. <br>''Mauve'' provided vector art for chastity belts and limp dicks. diff --git a/src/uncategorized/SFMBarracks.tw b/src/uncategorized/SFMBarracks.tw index 321d7a3973a..1f34770737a 100644 --- a/src/uncategorized/SFMBarracks.tw +++ b/src/uncategorized/SFMBarracks.tw @@ -153,17 +153,17 @@ <<if $PC.warfare < 10>> <br>Your complete lack of skill at warfare ensures that <<if $Bodyguard != 0>>in addition to $Bodyguard.slaveName, <</if>>you need; two full squads of $securityForceName on foot, a squadron of fighters, a small convoy of $securityForceName's ground vehicles. <<elseif $PC.warfare >= 100 && $PC.career == "mercenary">> - <br>Your mastery of wet work and prior experience in a PMC satisfies The Colonel that you only need; one soldier and a single vehicle<<if $Bodyguard != 0>> plus $Bodyguard.slaveName<</if>>. Being able to see and interact with the arcology owner even more directly if they so wish boosts the mood of your citizen's while also giving them an increased opportunity to try gaining favour with you. + <br>Your mastery of wet work and prior experience in a PMC satisfies The Colonel that you only need one soldier and a single vehicle<<if $Bodyguard != 0>> plus $Bodyguard.slaveName<</if>>. Being able to see and interact with the arcology owner even more directly if they so wish boosts the mood of your citizen's while also giving them an increased opportunity to try gaining favour with you. <<set $rep += 10, $cash += $EnvCash2>> <<elseif $PC.warfare >= 100>> - <br>Your mastery of wet work satisfies The Colonel that you only need; two soldiers and a single vehicle<<if $Bodyguard != 0>> plus $Bodyguard.slaveName<</if>>. Being able to see and interact with the arcology owner directly if they so wish boosts the mood of your citizens while also giving them the opportunity to try gaining favour with you. + <br>Your mastery of wet work satisfies The Colonel that you only need two soldiers and a single vehicle<<if $Bodyguard != 0>> plus $Bodyguard.slaveName<</if>>. Being able to see and interact with the arcology owner directly if they so wish boosts the mood of your citizens while also giving them the opportunity to try gaining favor with you. <<set $rep += 5, $cash += $EnvCash3>> <<elseif $PC.warfare >= 60>> <br>Your expertise in warfare means that <<if $Bodyguard != 0>>in addition to $Bodyguard.slaveName <</if>>you need; two full squads of $securityForceName on foot, a squadron of fighters and a large convoy of $securityForceName's ground vehicles. <<elseif $PC.warfare >= 30>> - <br>As you have some skill at warfare, you only need<<if $Bodyguard != 0>> in addition to $Bodyguard.slaveName<</if>>; two full squads of $securityForceName on foot, a squadron of fighters, a small convoy of $securityForceName's ground vehicles. + <br>As you have some skill in warfare, you only need<<if $Bodyguard != 0>> in addition to $Bodyguard.slaveName<</if>>; two full squads of $securityForceName on foot, a squadron of fighters, a small convoy of $securityForceName's ground vehicles. <<elseif $PC.warfare >= 10>> - <br>Your F.N.G. tier skills at warfare ensures that <<if $Bodyguard != 0>>in addition to $Bodyguard.slaveName, <</if>>you need; two full squads of $securityForceName on foot, a squadron of fighters, a small convoy of $securityForceName's ground vehicles. + <br>Your F.N.G. tier skill in warfare ensures that <<if $Bodyguard != 0>>in addition to $Bodyguard.slaveName, <</if>>you need; two full squads of $securityForceName on foot, a squadron of fighters, a small convoy of $securityForceName's ground vehicles. <</if>> <<if $arcologies[0].FSPaternalist != "unset">> Stopping at a paternalist shop, you help The Colonel select some luxurious and relaxing treatments for her main slave. @@ -175,7 +175,7 @@ <<set $arcologies[0].prosperity++>> <</if>> <<elseif $PC.slaving >= 60>> - Your expertness of slavery allows you to be more useful. + Your expertise in slavery allows you to be more useful. <<elseif $PC.slaving >= 30>> Possing some skill you are slightly helpful. <<elseif $PC.slaving >= 10>> @@ -189,17 +189,17 @@ Your total lack of medical skill causes the death of the citizen. <<set $arcologies[0].prosperity -= .25>> <<elseif $PC.medicine >= 100 && $PC.career == "medicine">> - Your expertness of medicine ensures that the citizen is probably the best they have ever been. They are so grateful that they are more than happy to try and compensate your time. Word quickly spreads of the kindly medically trained arcology owner who took the time to heal a citizen, providing confidence to the rest of the citizens. + Your expertise in medicine ensures that the citizen is probably the best they have ever been. They are so grateful that they are more than happy to try and compensate your time. Word quickly spreads of the kindly medically trained arcology owner who took the time to heal a citizen, providing confidence to the rest of the citizens. <<set $rep += 10, $cash += $EnvCash4>> <<elseif $PC.medicine >= 100>> - Your expertness of medicine ensures that the citizen is probably the best they have ever been. Word quickly spreads of the kindly arcology owner who took the time to heal a citizen. + Your expertise in medicine ensures that the citizen is probably the best they have ever been. Word quickly spreads of the kindly arcology owner who took the time to heal a citizen. <<set $rep += 5>> <<elseif $PC.medicine >= 60>> Your mastery of medicine ensures that the citizen's condition is noticeably better. <<elseif $PC.medicine >= 30>> Your moderate skill in medicine ensures that the citizen's condition ever so slightly improves. <<elseif $PC.medicine >= 10>> - Your basic skill in medicine ensures that the citizen's condition remains the same. + Your basic skill in medicine is sufficient only to stabilize the citizen. <</if>> <</replace>> <</link>> diff --git a/src/uncategorized/corporationDevelopments.tw b/src/uncategorized/corporationDevelopments.tw index 1f595d83f5d..3cfab5e41e5 100644 --- a/src/uncategorized/corporationDevelopments.tw +++ b/src/uncategorized/corporationDevelopments.tw @@ -15,107 +15,105 @@ <<set _roll = random(1,100)>> <<set $corpPeopleEnslaved += 1>> -<<set $corpValue = ($generalAssets*$generalAssetPrice)+($slaveAssets*$slaveAssetPrice)+($entrapmentAssets*$entrapmentAssetPrice)+($captureAssets*$captureAssetPrice)+($trainingAssets*$trainingAssetPrice)+($surgicalAssets*$surgicalAssetPrice)+($drugAssets*$drugAssetPrice)>> -<<set $corpProfit = Math.trunc(Math.log($corpValue)*random(7,15)*10000)>> -<<set $corpCash += $corpProfit>> -Your corporation made a profit of <<print cashFormat($corpProfit)>> last week. +<<set $corpValue = $corpCash + ($generalAssets*$generalAssetPrice)+($slaveAssets*$slaveAssetPrice)+($entrapmentAssets*$entrapmentAssetPrice)+($captureAssets*$captureAssetPrice)+($trainingAssets*$trainingAssetPrice)+($surgicalAssets*$surgicalAssetPrice)+($drugAssets*$drugAssetPrice)>> +<<set $corpProfit = Math.trunc( 6666666 / (1 + Math.exp(-0.8 * (Math.log($corpValue) - 22))) ) - random(666, 6666)>> /* formula caps at 6666666, reaches 6.5 million at corpValue of 10 to the 12th power */ +<<set $corpCash = Math.trunc($corpCash + $corpProfit)>> +Your corporation was valued at <<print cashFormat($corpValue)>> and made a profit of <<print cashFormat($corpProfit)>> last week. <<if $mercenariesHelpCorp > 0>> The $mercenariesTitle assist it with difficult enslavement targets. Otherwise, it - <<set $slaveAssets += $mercenaries*1000>> + <<set $slaveAssets += $mercenaries*random(66,666)>> <<set $corpPeopleEnslaved += $mercenaries>> <<else>> It <</if>> -<<if _roll > 80>> +<<if _roll > 90>> was an outstanding week for corporate enslavement; - <<set $slaveAssets += Math.trunc(Math.log($captureAssets+$entrapmentAssets)*90000)>> - <<set $corpPeopleEnslaved += Math.trunc(Math.log($captureAssets+$entrapmentAssets)*90)>> + <<set $slaveAssets += Math.ceil(900*Math.log($captureAssets+$entrapmentAssets)/Math.log(10))>> + <<set $corpPeopleEnslaved += Math.ceil(Math.log($captureAssets+$entrapmentAssets)/Math.log(10)*5)>> <<elseif _roll > 60>> was a great week for enslavement; - <<set $slaveAssets += Math.trunc(Math.log($captureAssets+$entrapmentAssets)*70000)>> - <<set $corpPeopleEnslaved += Math.trunc(Math.log($captureAssets+$entrapmentAssets)*70)>> + <<set $slaveAssets += Math.ceil(800*Math.log($captureAssets+$entrapmentAssets)/Math.log(10))>> + <<set $corpPeopleEnslaved += Math.ceil(Math.log($captureAssets+$entrapmentAssets)/Math.log(10)*4)>> <<elseif _roll > 40>> was a good week for enslavement; - <<set $slaveAssets += Math.trunc(Math.log($captureAssets+$entrapmentAssets)*50000)>> - <<set $corpPeopleEnslaved += Math.trunc(Math.log($captureAssets+$entrapmentAssets)*50)>> + <<set $slaveAssets += Math.ceil(700*Math.log($captureAssets+$entrapmentAssets)/Math.log(10))>> + <<set $corpPeopleEnslaved += Math.ceil(Math.log($captureAssets+$entrapmentAssets)/Math.log(10)*3)>> <<elseif _roll > 20>> was a mediocre week for enslavement; - <<set $slaveAssets += Math.trunc(Math.log($captureAssets+$entrapmentAssets)*30000)>> - <<set $corpPeopleEnslaved += Math.trunc(Math.log($captureAssets+$entrapmentAssets)*30)>> + <<set $slaveAssets += Math.ceil(600*Math.log($captureAssets+$entrapmentAssets)/Math.log(10))>> + <<set $corpPeopleEnslaved += Math.ceil(Math.log($captureAssets+$entrapmentAssets)/Math.log(10)*2)>> <<else>> was a bad week for enslavement; - <<set $slaveAssets += Math.trunc(Math.log($captureAssets+$entrapmentAssets)*10000)>> - <<set $corpPeopleEnslaved += Math.trunc(Math.log($captureAssets+$entrapmentAssets)*10)>> + <<set $slaveAssets += Math.ceil(500*Math.log($captureAssets+$entrapmentAssets)/Math.log(10))>> + <<set $corpPeopleEnslaved += Math.ceil(Math.log($captureAssets+$entrapmentAssets)/Math.log(10))>> <</if>> in total, the corporation has enslaved <<print commaNum($corpPeopleEnslaved)>> people. <<if $slaveAssets < ($trainingAssets+$surgicalAssets+$drugAssets)>> The corporation has enough training and medical assets to rapidly improve its human holdings. - <<set $slaveAssets = Math.trunc($slaveAssets*1.1)>> + <<set $slaveAssets += Math.ceil(Math.log($slaveAssets)*300)>> <<elseif $slaveAssets < ($trainingAssets+$surgicalAssets+$drugAssets)*2>> The corporation uses its training and medical assets to improve its human holdings. - <<set $slaveAssets = Math.trunc($slaveAssets*1.05)>> + <<set $slaveAssets += Math.ceil(Math.log($slaveAssets)*100)>> <<else>> The corporation has only enough training and medical assets to maintain the value of its human holdings. <</if>> +<<set $trainingAssets = Math.ceil($trainingAssets * random(90,95)/100), $surgicalAssets = Math.ceil($surgicalAssets * random(90,95)/100), $drugAssets = Math.ceil($drugAssets * random(90,95)/100)>> <<if $corpMarket>> -<<if $rep > 5000>> - <<set $slaveAssets = $slaveAssets+Math.trunc(0.1*$slaveAssets*(($rep-5000)/15000))>> - Since the corporation has its flagship slave market in $arcologies[0].name, your - <<if $rep > 19000>> - worldwide renown greatly - <<elseif $rep > 15000>> - widespread reputation significantly - <<elseif $rep > 10000>> - good reputation moderately - <<else>> - decent reputation slightly + <<if $rep > 5000>> + <<set $slaveAssets += Math.ceil(Math.log($slaveAssets)/Math.log(10)*(($rep-5000)/15000))>> + Since the corporation has its flagship slave market in $arcologies[0].name, your + <<if $rep > 19000>> + worldwide renown greatly + <<elseif $rep > 15000>> + widespread reputation significantly + <<elseif $rep > 10000>> + good reputation moderately + <<else>> + decent reputation slightly + <</if>> + enhances the value of its slaves. <</if>> - enhances the value of its slaves. -<</if>> <</if>> -<<if $corpProfit*0.6 > ($personalShares+$publicShares)*3>> - Since it is incredibly profitable, a massive dividend of <<print cashFormat(Math.trunc(($corpProfit*0.6)/($personalShares+$publicShares)))>> was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat(Math.trunc(($corpProfit*0.6)/($personalShares+$publicShares))*$personalShares)>>.@@ - <<set $cash += Math.trunc(($corpProfit*0.6)/($personalShares+$publicShares))*$personalShares>> - <<set $corpCash -= Math.trunc(($corpProfit*0.6)/($personalShares+$publicShares))*$personalShares>> -<<elseif $corpProfit > ($personalShares+$publicShares)*2.4>> - Since it is extremely profitable, a huge dividend of ¤2/share was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat($personalShares*2)>>.@@ - <<set $cash += $personalShares*2>> - <<set $corpCash -= ($personalShares+$publicShares)*2>> -<<elseif $corpProfit > ($personalShares+$publicShares)*1.5>> - Since it is highly profitable, a large dividend of ¤1/share was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat($personalShares)>>.@@ - <<set $cash += $personalShares>> - <<set $corpCash -= ($personalShares+$publicShares)>> -<<elseif $corpProfit > ($personalShares+$publicShares)*0.8>> - Since it is very profitable, a moderate dividend of ¤0.5/share was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat($personalShares*0.5)>>.@@ - <<set $cash += Math.trunc($personalShares*0.5)>> - <<set $corpCash -= Math.trunc(($personalShares+$publicShares)*0.5)>> -<<elseif $corpProfit > ($personalShares+$publicShares)*0.4>> - Since it is moderately profitable, a reasonable dividend of ¤0.2/share was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat($personalShares*0.2)>>.@@ - <<set $cash += Math.trunc($personalShares*0.2)>> - <<set $corpCash -= Math.trunc(($personalShares+$publicShares)*0.2)>> -<<elseif $corpProfit > ($personalShares+$publicShares)*0.2>> - Since it is acceptably profitable, a small dividend of ¤0.1/share was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat($personalShares*0.1)>>.@@ - <<set $cash += Math.trunc($personalShares*0.1)>> - <<set $corpCash -= Math.trunc(($personalShares+$publicShares)*0.1)>> +<<if $corpProfit > ($personalShares+$publicShares)*30>> + Since it is incredibly profitable, a massive dividend of ¤3/share was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat($personalShares*3)>>@@. + <<set $cash += $personalShares*3, $corpCash -= ($personalShares+$publicShares)*3>> +<<elseif $corpProfit > ($personalShares+$publicShares)*20>> + Since it is extremely profitable, a huge dividend of ¤2/share was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat($personalShares*2)>>@@. + <<set $cash += $personalShares*2, $corpCash -= ($personalShares+$publicShares)*2>> +<<elseif $corpProfit > ($personalShares+$publicShares)*10>> + Since it is highly profitable, a large dividend of ¤1/share was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat($personalShares)>>@@. + <<set $cash += $personalShares, $corpCash -= ($personalShares+$publicShares)>> +<<elseif $corpProfit > ($personalShares+$publicShares)*5>> + Since it is very profitable, a moderate dividend of ¤0.5/share was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat($personalShares*0.5)>>@@. + <<set $cash += Math.trunc($personalShares*0.5), $corpCash -= Math.trunc(($personalShares+$publicShares)*0.5)>> +<<elseif $corpProfit > ($personalShares+$publicShares)*2>> + Since it is moderately profitable, a reasonable dividend of ¤0.2/share was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat($personalShares*0.2)>>@@. + <<set $cash += Math.trunc($personalShares*0.2), $corpCash -= Math.trunc(($personalShares+$publicShares)*0.2)>> +<<elseif $corpProfit > ($personalShares+$publicShares)>> + Since it is acceptably profitable, a small dividend of ¤0.1/share was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat($personalShares*0.1)>>@@. + <<set $cash += Math.trunc($personalShares*0.1), $corpCash -= Math.trunc(($personalShares+$publicShares)*0.1)>> +<<else>> + Since it is barely profitable, a tiny dividend was paid out to stockholders; you received @@.yellowgreen;<<print cashFormat(1+Math.ceil(($corpProfit*0.01*$personalShares)/($personalShares+$publicShares)))>>@@. + <<set $cash += 1+Math.ceil(($corpProfit*0.01*$personalShares)/($personalShares+$publicShares)), $corpCash -= Math.trunc($corpProfit*0.01)>> <</if>> <<set _roll = random(1,100)>> -<<if $corpValue > ($personalShares+$publicShares)*$sharePrice*1.1>> +<<if $sharePrice*($personalShares+$publicShares) < $corpValue*0.01>> /* market cap is less than 1% of assets */ The market consensus is that your corporation is undervalued, driving share prices sharply up. - <<set $sharePrice = (Math.trunc($sharePrice*random(115,125)))/100>> -<<elseif random(1,100) < $rep/30000>> + <<set $sharePrice = Math.ceil($sharePrice*random(102,104))/100>> /* 2-4% rise */ +<<elseif random(1,100) < $rep/2000>> /* up to 10% chance */ Share prices in your corporation are driven up by your reputation. - <<set $sharePrice = (Math.trunc($sharePrice*random(random(105,110),115)))/100>> -<<elseif _roll > 80>> - Market volatility drives share prices up. - <<set $sharePrice = (Math.trunc($sharePrice*random(random(105,110),115)))/100>> -<<elseif _roll < 20>> + <<set $sharePrice = Math.ceil($sharePrice*either(101,103))/100>> /* 1-3% rise */ +<<elseif _roll < 20>> /* 20% chance */ Market volatility drives share prices down. - <<set $sharePrice = (Math.trunc($sharePrice*random(85,random(90,95))))/100>> -<<elseif $corpValue < ($personalShares+$publicShares)*$sharePrice*0.9>> + <<set $sharePrice = Math.ceil($sharePrice*random(97,99))/100>> /* 1-3% drop */ +<<elseif _roll > 80>> /* 20% chance */ + Market volatility drives share prices up. + <<set $sharePrice = Math.ceil($sharePrice*either(101,102))/100>> /* 1-2% rise */ +<<elseif $sharePrice*($personalShares+$publicShares) > $corpValue*0.05>> /* market cap is more than 5% of assets */ The market consensus is that your corporation is overvalued, driving share prices sharply down. - <<set $sharePrice = (Math.trunc($sharePrice*random(85,random(90,95))))/100>> + <<set $sharePrice = Math.ceil($sharePrice*random(95,97))/100>> /* 3-5% drop */ <</if>> Shares in your corporation are trading at <<print cashFormat($sharePrice)>>: @@ -123,12 +121,12 @@ Shares in your corporation are trading at <<print cashFormat($sharePrice)>>: <<if $oldSharePrice == $sharePrice>> no different from last week. <<elseif $oldSharePrice > $sharePrice>> - down <<print cashFormat(Math.trunc(($oldSharePrice-$sharePrice)*100)/100)>> since last week. + down <<print cashFormat(Math.ceil(($oldSharePrice-$sharePrice)*100)/100)>> since last week. <<else>> - up <<print cashFormat(Math.trunc(($sharePrice - $oldSharePrice)*100)/100)>> since last week. + up <<print cashFormat(Math.ceil(($sharePrice - $oldSharePrice)*100)/100)>> since last week. <</if>> -<<set $oldSharePrice = Math.trunc($sharePrice)>> +<<set $oldSharePrice = Math.ceil($sharePrice)>> You hold <<print commaNum($personalShares)>> shares personally while <<print commaNum($publicShares)>> are publicly held. <span id="CorpAction"> @@ -137,30 +135,30 @@ You hold <<print commaNum($personalShares)>> shares personally while <<print com <<if $cash > 1000*$sharePrice>> <br>Purchase shares from corporation: <<if $cash > 1000*$sharePrice>> - <<link "1000">><<set $personalShares += 1000>><<set $cash -= 1000*$sharePrice>><<set $corpCash += 1000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(105,110)))/100>><<replace "#CorpAction">><br><<print "You purchased 1000 shares from the corporation, driving the share price up slightly.">><</replace>><</link>><</if>> + <<link "1000">><<set $personalShares += 1000>><<set $cash -= 1000*$sharePrice>><<set $corpCash += 1000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>><<replace "#CorpAction">><br><<print "You purchased 1000 shares from the corporation, driving the share price up slightly.">><</replace>><</link>><</if>> <<if $cash > 5000*$sharePrice>> - | <<link "5000">><<set $personalShares += 5000>><<set $cash -= 5000*$sharePrice>><<set $corpCash += 5000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(105,110)))/100>><<replace "#CorpAction">><br><<print "You purchased 5000 shares from the corporation, driving the share price up slightly.">><</replace>><</link>><</if>> + | <<link "5000">><<set $personalShares += 5000>><<set $cash -= 5000*$sharePrice>><<set $corpCash += 5000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>><<replace "#CorpAction">><br><<print "You purchased 5000 shares from the corporation, driving the share price up slightly.">><</replace>><</link>><</if>> <<if $cash > 10000*$sharePrice>> - | <<link "10000">><<set $personalShares += 10000>><<set $cash -= 10000*$sharePrice>><<set $corpCash += 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(105,110)))/100>><<replace "#CorpAction">><br><<print "You purchased 10000 shares from the corporation, driving the share price up slightly.">><</replace>><</link>><</if>> + | <<link "10000">><<set $personalShares += 10000>><<set $cash -= 10000*$sharePrice>><<set $corpCash += 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*either(101,103)))/100>><<replace "#CorpAction">><br><<print "You purchased 10000 shares from the corporation, driving the share price up slightly.">><</replace>><</link>><</if>> <<if $cash > 15000*$sharePrice>> - | <<link "15000">><<set $personalShares += 15000>><<set $cash -= 15000*$sharePrice>><<set $corpCash += 15000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(105,110)))/100>><<replace "#CorpAction">><br><<print "You purchased 15000 shares from the corporation, driving the share price up slightly.">><</replace>><</link>><</if>> + | <<link "15000">><<set $personalShares += 15000>><<set $cash -= 15000*$sharePrice>><<set $corpCash += 15000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*either(103,104)))/100>><<replace "#CorpAction">><br><<print "You purchased 15000 shares from the corporation, driving the share price up somewhat.">><</replace>><</link>><</if>> <<if $cash > 20000*$sharePrice>> - | <<link "20000">><<set $personalShares += 20000>><<set $cash -= 20000*$sharePrice>><<set $corpCash += 20000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(105,110)))/100>><<replace "#CorpAction">><br><<print "You purchased 20000 shares from the corporation, driving the share price up massively.">><</replace>><</link>><</if>> + | <<link "20000">><<set $personalShares += 20000>><<set $cash -= 20000*$sharePrice>><<set $corpCash += 20000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(104,106)))/100>><<replace "#CorpAction">><br><<print "You purchased 20000 shares from the corporation, driving the share price up significantly.">><</replace>><</link>><</if>> <<else>> You are unable to purchase 1000 shares at the current share price. <</if>> <br>Issue new shares: <<if $personalShares-1000 > $publicShares>> - <<link "1000">><<set $publicShares += 1000>><<set $corpCash += 1000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(90,95)))/100>><<replace "#CorpAction">><br><<print "The corporation issued 1000 new shares, driving the share price down slightly.">><</replace>><</link>><</if>> + <<link "1000">><<set $publicShares += 1000>><<set $corpCash += 1000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>><<replace "#CorpAction">><br><<print "The corporation issued 1000 new shares, driving the share price down slightly.">><</replace>><</link>><</if>> <<if $personalShares-5000 > $publicShares>> - | <<link "5000">><<set $publicShares += 5000>><<set $corpCash += 5000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(90,95)))/100>><<replace "#CorpAction">><br><<print "The corporation issued 5000 new shares, driving the share price down slightly.">><</replace>><</link>><</if>> + | <<link "5000">><<set $publicShares += 5000>><<set $corpCash += 5000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>><<replace "#CorpAction">><br><<print "The corporation issued 5000 new shares, driving the share price down slightly.">><</replace>><</link>><</if>> <<if $personalShares-10000 > $publicShares>> - | <<link "10000">><<set $publicShares += 10000>><<set $corpCash += 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(90,95)))/100>><<replace "#CorpAction">><br><<print "The corporation issued 10000 new shares, driving the share price down slightly.">><</replace>><</link>><</if>> + | <<link "10000">><<set $publicShares += 10000>><<set $corpCash += 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(97,99)))/100>><<replace "#CorpAction">><br><<print "The corporation issued 10000 new shares, driving the share price down slightly.">><</replace>><</link>><</if>> <<if $personalShares-15000 > $publicShares>> - | <<link "15000">><<set $publicShares += 15000>><<set $corpCash += 15000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(90,95)))/100>><<replace "#CorpAction">><br><<print "The corporation issued 15000 new shares, driving the share price down slightly.">><</replace>><</link>><</if>> + | <<link "15000">><<set $publicShares += 15000>><<set $corpCash += 15000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(96,98)))/100>><<replace "#CorpAction">><br><<print "The corporation issued 15000 new shares, driving the share price down somewhat.">><</replace>><</link>><</if>> <<if $personalShares-20000 > $publicShares>> - | <<link "20000">><<set $publicShares += 20000>><<set $corpCash += 20000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(90,95)))/100>><<replace "#CorpAction">><br><<print "The corporation issued 20000 new shares, driving the share price down massively.">><</replace>><</link>><</if>> + | <<link "20000">><<set $publicShares += 20000>><<set $corpCash += 20000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(94,96)))/100>><<replace "#CorpAction">><br><<print "The corporation issued 20000 new shares, driving the share price down significantly.">><</replace>><</link>><</if>> <<set _PublicOwnershipPercentage = (Math.trunc($publicShares/$personalShares))*100>> <<set _PrivateOwnershipPercentage = (Math.trunc($personalShares/$publicShares))*100>> @@ -168,29 +166,29 @@ You are unable to purchase 1000 shares at the current share price. <br>Sell personal shares: <<if _PrivateOwnershipPercentage < 51>>//You cannot give up majority control.//<</if>> <<if _PrivateOwnershipPercentage > 51 && $personalShares-1000 > $publicShares>> - <<link "1000">><<set $personalShares -= 1000>><<set $publicShares += 1000>><<set $cash += 1000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(90,95)))/100>><<replace "#CorpAction">><br><<print "You sold 1000 shares, driving the share price down slightly.">><</replace>><</link>><</if>> + <<link "1000">><<set $personalShares -= 1000>><<set $publicShares += 1000>><<set $cash += 1000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>><<replace "#CorpAction">><br><<print "You sold 1000 shares, driving the share price down slightly.">><</replace>><</link>><</if>> <<if $personalShares-5000 > $publicShares>> - | <<link "5000">><<set $personalShares -= 5000>><<set $publicShares += 5000>><<set $cash += 5000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(90,95)))/100>><<replace "#CorpAction">><br><<print "You sold 5000 shares, driving the share price down slightly.">><</replace>><</link>><</if>> + | <<link "5000">><<set $personalShares -= 5000>><<set $publicShares += 5000>><<set $cash += 5000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>><<replace "#CorpAction">><br><<print "You sold 5000 shares, driving the share price down slightly.">><</replace>><</link>><</if>> <<if $personalShares-10000 > $publicShares>> - | <<link "10000">><<set $personalShares -= 10000>><<set $publicShares += 10000>><<set $cash += 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(90,95)))/100>><<replace "#CorpAction">><br><<print "You sold 10000 shares, driving the share price down slightly.">><</replace>><</link>><</if>> + | <<link "10000">><<set $personalShares -= 10000>><<set $publicShares += 10000>><<set $cash += 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(97,99)))/100>><<replace "#CorpAction">><br><<print "You sold 10000 shares, driving the share price down slightly.">><</replace>><</link>><</if>> <<if $personalShares-15000 > $publicShares>> - | <<link "15000">><<set $personalShares -= 15000>><<set $publicShares += 15000>><<set $cash += 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(90,95)))/100>><<replace "#CorpAction">><br><<print "You sold 15000 shares, driving the share price down slightly.">><</replace>><</link>><</if>> + | <<link "15000">><<set $personalShares -= 15000>><<set $publicShares += 15000>><<set $cash += 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(96,98)))/100>><<replace "#CorpAction">><br><<print "You sold 15000 shares, driving the share price down somewhat.">><</replace>><</link>><</if>> <<if $personalShares-20000 > $publicShares>> - | <<link "20000">><<set $personalShares -= 20000>><<set $publicShares += 20000>><<set $cash += 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(90,95)))/100>><<replace "#CorpAction">><br><<print "You sold 20000 shares, driving the share price down massively.">><</replace>><</link>><</if>> + | <<link "20000">><<set $personalShares -= 20000>><<set $publicShares += 20000>><<set $cash += 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(94,96)))/100>><<replace "#CorpAction">><br><<print "You sold 20000 shares, driving the share price down significantly.">><</replace>><</link>><</if>> <<if $cash > 1000*$sharePrice>> <br>Buy publicly held shares: <<if _PublicOwnershipPercentage <= 5>>//You cannot make the corporation privately held.//<</if>> <<if _PublicOwnershipPercentage < 49 && $publicShares > 1000 && $cash >= 1000*$sharePrice>> - <<link "1000">><<set $personalShares += 1000>><<set $publicShares -= 1000>><<set $cash -= 1000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(105,110)))/100>><<replace "#CorpAction">><br><<print "You bought 1000 shares, driving the share price up slightly.">><</replace>><</link>><</if>> + <<link "1000">><<set $personalShares += 1000>><<set $publicShares -= 1000>><<set $cash -= 1000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>><<replace "#CorpAction">><br><<print "You bought 1000 shares, driving the share price up slightly.">><</replace>><</link>><</if>> <<if $publicShares >= 5000 && $cash >= 5000*$sharePrice>> - | <<link "5000">><<set $personalShares += 5000>><<set $publicShares -= 5000>><<set $cash -= 5000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(105,110)))/100>><<replace "#CorpAction">><br><<print "You bought 5000 shares, driving the share price up slightly.">><</replace>><</link>><</if>> + | <<link "5000">><<set $personalShares += 5000>><<set $publicShares -= 5000>><<set $cash -= 5000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>><<replace "#CorpAction">><br><<print "You bought 5000 shares, driving the share price up slightly.">><</replace>><</link>><</if>> <<if $publicShares >= 10000 && $cash >= 10000*$sharePrice>> - | <<link "10000">><<set $personalShares += 10000>><<set $publicShares -= 10000>><<set $cash -= 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(105,110)))/100>><<replace "#CorpAction">><br><<print "You bought 10000 shares, driving the share price up slightly.">><</replace>><</link>><</if>> + | <<link "10000">><<set $personalShares += 10000>><<set $publicShares -= 10000>><<set $cash -= 10000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(97,99)))/100>><<replace "#CorpAction">><br><<print "You bought 10000 shares, driving the share price up slightly.">><</replace>><</link>><</if>> <<if $publicShares >= 15000 && $cash >= 15000*$sharePrice>> - | <<link "15000">><<set $personalShares += 15000>><<set $publicShares -= 15000>><<set $cash -= 15000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(105,110)))/100>><<replace "#CorpAction">><br><<print "You bought 15000 shares, driving the share price up slightly.">><</replace>><</link>><</if>> + | <<link "15000">><<set $personalShares += 15000>><<set $publicShares -= 15000>><<set $cash -= 15000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(96,98)))/100>><<replace "#CorpAction">><br><<print "You bought 15000 shares, driving the share price up somewhat.">><</replace>><</link>><</if>> <<if $publicShares >= 20000 && $cash >= 20000*$sharePrice>> - | <<link "20000">><<set $personalShares += 20000>><<set $publicShares -= 20000>><<set $cash -= 20000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(105,110)))/100>><<replace "#CorpAction">><br><<print "You bought 20000 shares, driving the share price up massively.">><</replace>><</link>><</if>> + | <<link "20000">><<set $personalShares += 20000>><<set $publicShares -= 20000>><<set $cash -= 20000*$sharePrice>><<set $sharePrice = (Math.trunc($sharePrice*random(94,96)))/100>><<replace "#CorpAction">><br><<print "You bought 20000 shares, driving the share price up significantly.">><</replace>><</link>><</if>> <<else>> You are unable to purchase 1000 shares at the current share price. <</if>> @@ -303,7 +301,7 @@ You are unable to purchase 1000 shares at the current share price. <</if>> <</link>> <<else>> - <span id="generalAssetsDisp"><<print cashFormat($generalAssetPrice*$generalAssets)>> (<<print commaNum($generalAssets/500)>> unit<<if $generalAssets/500 > 1>>s<</if>>)</span> in general assets. + <span id="generalAssetsDisp"><<print cashFormat($generalAssetPrice*$generalAssets)>> (<<print commaNum($generalAssets/500)>> unit<<if $generalAssets/500 != 1>>s<</if>>)</span> in general assets. Prices are <<if $generalAssetPrice > 10>> @@.yellowgreen;<<print cashFormat($generalAssetPrice*500)>>ea@@. @@ -395,7 +393,7 @@ You are unable to purchase 1000 shares at the current share price. <</if>> <</link>> <<else>> - <span id="slaveAssetsDisp"><<print cashFormat($slaveAssetPrice*$slaveAssets)>> (<<print commaNum(Math.floor($slaveAssets/500))>> unit<<if Math.floor($slaveAssets/500) > 1>>s<</if>>)</span> in slaves. + <span id="slaveAssetsDisp"><<print cashFormat($slaveAssetPrice*$slaveAssets)>> (<<print commaNum(Math.floor($slaveAssets/500))>> unit<<if Math.floor($slaveAssets/500) != 1>>s<</if>>)</span> in slaves. Prices are <<if $slaveAssetPrice > 10>> @@.yellowgreen;<<print cashFormat($slaveAssetPrice*500)>>ea@@ @@ -507,7 +505,7 @@ You are unable to purchase 1000 shares at the current share price. <</if>> <</link>> <<else>> - <span id="entrapmentAssetsDisp"><<print cashFormat($entrapmentAssetPrice*$entrapmentAssets)>> (<<print commaNum(Math.floor($entrapmentAssets/500))>> unit<<if Math.floor($entrapmentAssets/500) > 1>>s<</if>>)</span> in legal enslavement assets. + <span id="entrapmentAssetsDisp"><<print cashFormat($entrapmentAssetPrice*$entrapmentAssets)>> (<<print commaNum(Math.floor($entrapmentAssets/500))>> unit<<if Math.floor($entrapmentAssets/500) != 1>>s<</if>>)</span> in legal enslavement assets. Prices are <<if $entrapmentAssetPrice > 10>> @@.yellowgreen;<<print cashFormat($entrapmentAssetPrice*500)>>ea@@ @@ -619,7 +617,7 @@ You are unable to purchase 1000 shares at the current share price. <</if>> <</link>> <<else>> - <span id="captureAssetsDisp"><<print cashFormat($captureAssetPrice*$captureAssets)>> (<<print commaNum(Math.floor($captureAssets/500))>> unit<<if Math.floor($captureAssets/500) > 1>>s<</if>>)</span> in conflict zone enslavement assets. + <span id="captureAssetsDisp"><<print cashFormat($captureAssetPrice*$captureAssets)>> (<<print commaNum(Math.floor($captureAssets/500))>> unit<<if Math.floor($captureAssets/500) != 1>>s<</if>>)</span> in conflict zone enslavement assets. Prices are <<if $captureAssetPrice > 10>> @@.yellowgreen;<<print cashFormat($captureAssetPrice*500)>>ea@@ @@ -731,7 +729,7 @@ You are unable to purchase 1000 shares at the current share price. <</if>> <</link>> <<else>> - <span id="trainingAssetsDisp"><<print cashFormat($trainingAssetPrice*$trainingAssets)>> (<<print commaNum(Math.floor($trainingAssets/500))>> unit<<if Math.floor($trainingAssets/500) > 1>>s<</if>>)</span> of slave training assets. + <span id="trainingAssetsDisp"><<print cashFormat($trainingAssetPrice*$trainingAssets)>> (<<print commaNum(Math.floor($trainingAssets/500))>> unit<<if Math.floor($trainingAssets/500) != 1>>s<</if>>)</span> of slave training assets. Prices are <<if $trainingAssetPrice > 10>> @@.yellowgreen;<<print cashFormat($trainingAssetPrice*500)>>ea@@ @@ -843,7 +841,7 @@ You are unable to purchase 1000 shares at the current share price. <</if>> <</link>> <<else>> - <span id="surgicalAssetsDisp"><<print cashFormat($surgicalAssetPrice*$surgicalAssets)>> (<<print commaNum(Math.floor($surgicalAssets/500))>> unit<<if Math.floor($surgicalAssets/500) > 1>>s<</if>>)</span> in surgical assets. + <span id="surgicalAssetsDisp"><<print cashFormat($surgicalAssetPrice*$surgicalAssets)>> (<<print commaNum(Math.floor($surgicalAssets/500))>> unit<<if Math.floor($surgicalAssets/500) != 1>>s<</if>>)</span> in surgical assets. Prices are <<if $surgicalAssetPrice > 10>> @@.yellowgreen;<<print cashFormat($surgicalAssetPrice*500)>>ea@@ @@ -955,7 +953,7 @@ You are unable to purchase 1000 shares at the current share price. <</if>> <</link>> <<else>> - <span id="drugAssetsDisp"><<print cashFormat($drugAssetPrice*$drugAssets)>> (<<print commaNum(Math.floor($drugAssets/500))>> unit<<if Math.floor($drugAssets/500) > 1>>s<</if>>)</span> in pharmaceutical assets. + <span id="drugAssetsDisp"><<print cashFormat($drugAssetPrice*$drugAssets)>> (<<print commaNum(Math.floor($drugAssets/500))>> unit<<if Math.floor($drugAssets/500) != 1>>s<</if>>)</span> in pharmaceutical assets. Prices are <<if $drugAssetPrice > 10>> @@.yellowgreen;<<print cashFormat($drugAssetPrice*500)>>ea@@ -- GitLab