Skip to content
Snippets Groups Projects
Commit 5d380def authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'fixes' into 'pregmod-master'

Fix

See merge request pregmodfan/fc-pregmod!2142
parents e5c03d4a a70772af
No related branches found
No related tags found
No related merge requests found
......@@ -159,175 +159,173 @@ You hold <<print commaNum($personalShares)>> shares valued at @@.yellowgreen;<<p
<br>Sell personal shares:
<<if $personalShares-1000 > $publicShares>>
<<link "<<print commaNum(1000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@">>
<<set $personalShares -= 1000>>
<<set $publicShares += 1000>>
<<set $cash += 1000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99,$PC.trading >= 100 ? 99 : 98)))/100>>
<<replace "#CorpAction">>
<br> <<print "You sold <<print commaNum(1000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>> for @@.yellowgreen;<<print cashFormat(Math.ceil(1000*$sharePrice))>>@@" driving the share price down slightly.">>
<</replace>>
<</link>>
<</if>>
<<link "<<print commaNum(1000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@">>
<<set $personalShares -= 1000>>
<<set $publicShares += 1000>>
<<set $cash += 1000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99,$PC.trading >= 100 ? 99 : 98)))/100>>
<<replace "#CorpAction">>
<br> <<print "You sold <<print commaNum(1000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>> for @@.yellowgreen;<<print cashFormat(Math.ceil(1000*$sharePrice))>>@@" driving the share price down slightly.">>
<</replace>>
<</link>>
<<if $personalShares-5000 > $publicShares>>
| <<link "<<print commaNum(5000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@">>
<<set $personalShares -= 5000>>
<<set $publicShares += 5000>>
<<set $cash += 5000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99,$PC.trading >= 100 ? 99 : 98)))/100>>
<<replace "#CorpAction">>
<br> <<print "You sold <<print commaNum(5000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>> for @@.yellowgreen;<<print cashFormat(Math.ceil(1000*$sharePrice))>>@@" driving the share price down slightly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(5000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@">>
<<set $personalShares -= 5000>>
<<set $publicShares += 5000>>
<<set $cash += 5000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99,$PC.trading >= 100 ? 99 : 98)))/100>>
<<replace "#CorpAction">>
<br> <<print "You sold <<print commaNum(5000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>> for @@.yellowgreen;<<print cashFormat(Math.ceil(1000*$sharePrice))>>@@" driving the share price down slightly.">>
<</replace>>
<</link>>
<</if>>
<<if $personalShares-10000 > $publicShares>>
| <<link "<<print commaNum(10000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@">> <<set $personalShares -= 10000>>
<<set $publicShares += 10000>>
<<set $cash += 10000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99,$PC.trading >= 100 ? 99 : 98)))/100>>
<<replace "#CorpAction">>
<br> <<print "You sold <<print commaNum(10000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>> for @@.yellowgreen;<<print cashFormat(Math.ceil(10000*$sharePrice))>>@@" driving the share price down slightly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(10000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@">> <<set $personalShares -= 10000>>
<<set $publicShares += 10000>>
<<set $cash += 10000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99,$PC.trading >= 100 ? 99 : 98)))/100>>
<<replace "#CorpAction">>
<br> <<print "You sold <<print commaNum(10000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>> for @@.yellowgreen;<<print cashFormat(Math.ceil(10000*$sharePrice))>>@@" driving the share price down slightly.">>
<</replace>>
<</link>>
<</if>>
<<if $personalShares-15000 > $publicShares>>
| <<link "<<print commaNum(15000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@">>
<<set $personalShares -= 15000>>
<<set $publicShares += 15000>>
<<set $cash += 15000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99,$PC.trading >= 100 ? 99 : 98)))/100>>
<<replace "#CorpAction">>
<br> <<print "You sold <<print commaNum(15000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@ driving the share price down somewhat.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(15000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@">>
<<set $personalShares -= 15000>>
<<set $publicShares += 15000>>
<<set $cash += 15000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99,$PC.trading >= 100 ? 99 : 98)))/100>>
<<replace "#CorpAction">>
<br> <<print "You sold <<print commaNum(15000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@ driving the share price down somewhat.">>
<</replace>>
<</link>>
<</if>>
<<if $personalShares-20000 > $publicShares>>
| <<link "<<print commaNum(20000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@">>
<<set $personalShares -= 20000>>
<<set $publicShares += 20000>>
<<set $cash += 20000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99,$PC.trading >= 100 ? 99 : 98)))/100>>
<<replace "#CorpAction">>
<br> <<print "You sold <<print commaNum(20000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@ driving the share price down significantly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(20000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@">>
<<set $personalShares -= 20000>>
<<set $publicShares += 20000>>
<<set $cash += 20000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99,$PC.trading >= 100 ? 99 : 98)))/100>>
<<replace "#CorpAction">>
<br> <<print "You sold <<print commaNum(20000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@ driving the share price down significantly.">>
<</replace>>
<</link>>
<</if>>
<<else>>
//You cannot give up majority control.//
<</if>>
<br>Issue new public shares:
<<if $personalShares-1000 > $publicShares>>
<<link "<<print commaNum(1000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@">>
<<set $publicShares += 1000>>
<<set $corpCash += 1000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation issued <<print commaNum(1000)>> new shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>> for @@.yellowgreen;<<print cashFormat(Math.ceil(1000*$sharePrice))>>@@" driving the share price down slightly.">>
<</replace>>
<</link>>
<</if>>
<br>Issue new public shares:
<<if $personalShares-1000 > $publicShares>>
<<link "<<print commaNum(1000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@">>
<<set $publicShares += 1000>>
<<set $corpCash += 1000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation issued <<print commaNum(1000)>> new shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>> for @@.yellowgreen;<<print cashFormat(Math.ceil(1000*$sharePrice))>>@@" driving the share price down slightly.">>
<</replace>>
<</link>>
<<if $personalShares-5000 > $publicShares>>
| <<link "<<print commaNum(5000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@">>
<<set $publicShares += 5000>>
<<set $corpCash += 5000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation issued <<print commaNum(5000)>> new shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>> for @@.yellowgreen;<<print cashFormat(Math.ceil(1000*$sharePrice))>>@@" driving the share price down slightly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(5000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@">>
<<set $publicShares += 5000>>
<<set $corpCash += 5000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation issued <<print commaNum(5000)>> new shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>> for @@.yellowgreen;<<print cashFormat(Math.ceil(1000*$sharePrice))>>@@" driving the share price down slightly.">>
<</replace>>
<</link>>
<</if>>
<<if $personalShares-10000 > $publicShares>>
| <<link "<<print commaNum(10000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@">>
<<set $publicShares += 10000>>
<<set $corpCash += 10000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation issued <<print commaNum(10000)>> new sharesfor @@.yellowgreen;<<print cashFormat(Math.ceil(1000*$sharePrice))>>@@ driving the share price down slightly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(10000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@">>
<<set $publicShares += 10000>>
<<set $corpCash += 10000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation issued <<print commaNum(10000)>> new sharesfor @@.yellowgreen;<<print cashFormat(Math.ceil(1000*$sharePrice))>>@@ driving the share price down slightly.">>
<</replace>>
<</link>>
<</if>>
<<if $personalShares-15000 > $publicShares>>
| <<link "<<print commaNum(15000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@">>
<<set $publicShares += 15000>>
<<set $corpCash += 15000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*random(96,98)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation issued <<print commaNum(15000)>> new shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@ driving the share price down somewhat.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(15000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@">>
<<set $publicShares += 15000>>
<<set $corpCash += 15000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*random(96,98)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation issued <<print commaNum(15000)>> new shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@ driving the share price down somewhat.">>
<</replace>>
<</link>>
<</if>>
<<if $personalShares-20000 > $publicShares>>
| <<link "<<print commaNum(20000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@">> <<set $publicShares += 15000>>
<<set $corpCash += 20000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation issued <<print commaNum(20000)>> new shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@ driving the share price down significantly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(20000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@">> <<set $publicShares += 15000>>
<<set $corpCash += 20000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation issued <<print commaNum(20000)>> new shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@ driving the share price down significantly.">>
<</replace>>
<</link>>
<</if>>
<<else>>
//You cannot give up majority control.//
<</if>>/* closes actions that reduce private ownership percentage */
<</if>>
<</if>>/* closes actions that reduce private ownership percentage */
<<if _PublicOwnershipPercentage <= 5>><br>//You cannot make the corporation privately held.//
<<else>> /* actions that reduce public ownership percentage */
<br>Purchase shares from corporation:
<<if $cash > 1000*$sharePrice>>
<<if $cash > 1000*$sharePrice>>
<<link "<<print commaNum(1000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@">>
<<set $personalShares += 1000>>
<<set $cash -= 1000*$sharePrice>>
<<set $corpCash += 1000*Math.floor($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "You purchased <<print commaNum(1000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@, from the corporation driving the share price down slightly.">>
<</replace>>
<</link>>
<</if>>
<<link "<<print commaNum(1000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@">>
<<set $personalShares += 1000>>
<<set $cash -= 1000*$sharePrice>>
<<set $corpCash += 1000*Math.floor($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "You purchased <<print commaNum(1000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@, from the corporation driving the share price down slightly.">>
<</replace>>
<</link>>
<<if $cash > 5000*$sharePrice>>
| <<link "<<print commaNum(5000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@">>
<<set $personalShares += 5000>>
<<set $cash -= 5000*$sharePrice>>
<<set $corpCash += 5000*Math.floor($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "You purchased <<print commaNum(5000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@, from the corporation driving the share price down slightly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(5000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@">>
<<set $personalShares += 5000>>
<<set $cash -= 5000*$sharePrice>>
<<set $corpCash += 5000*Math.floor($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "You purchased <<print commaNum(5000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@, from the corporation driving the share price down slightly.">>
<</replace>>
<</link>>
<</if>>
<<if $cash > 10000*$sharePrice>>
| <<link "<<print commaNum(10000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@">>
<<set $personalShares += 10000>>
<<set $cash -= 10000*$sharePrice>>
<<set $corpCash += 10000*Math.floor($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "You purchased <<print commaNum(10000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@, from the corporation driving the share price down slightly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(10000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@">>
<<set $personalShares += 10000>>
<<set $cash -= 10000*$sharePrice>>
<<set $corpCash += 10000*Math.floor($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "You purchased <<print commaNum(10000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@, from the corporation driving the share price down slightly.">>
<</replace>>
<</link>>
<</if>>
<<if $cash > 15000*$sharePrice>>
| <<link "<<print commaNum(15000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@">>
<<set $personalShares += 15000>>
<<set $cash -= 15000*$sharePrice>>
<<set $corpCash += 15000*Math.floor($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "You purchased <<print commaNum(15000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@, from the corporation driving the share price down somewhat.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(15000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@">>
<<set $personalShares += 15000>>
<<set $cash -= 15000*$sharePrice>>
<<set $corpCash += 15000*Math.floor($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "You purchased <<print commaNum(15000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@, from the corporation driving the share price down somewhat.">>
<</replace>>
<</link>>
<</if>>
<<if $cash > 20000*$sharePrice>>
| <<link "<<print commaNum(20000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@">>
<<set $personalShares += 20000>>
<<set $cash -= 20000*$sharePrice>>
<<set $corpCash += 20000*Math.floor($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "You purchased <<print commaNum(20000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@, from the corporation driving the share price down significantly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(20000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@">>
<<set $personalShares += 20000>>
<<set $cash -= 20000*$sharePrice>>
<<set $corpCash += 20000*Math.floor($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(98,99)))/100>>
<<replace "#CorpAction">>
<br> <<print "You purchased <<print commaNum(20000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@, from the corporation driving the share price down significantly.">>
<</replace>>
<</link>>
<</if>>
<<else>>
//You are unable to purchase <<print commaNum(1000)>> shares at the current share price, valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@.//
......@@ -335,56 +333,54 @@ You hold <<print commaNum($personalShares)>> shares valued at @@.yellowgreen;<<p
<br>Buy publicly held shares:
<<if $cash > 1000*$sharePrice && $publicShares > 1000>>
<<if $publicShares > 1000 && $cash >= 1000*$sharePrice>>
<<link "<<print commaNum(1000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@">>
<<set $personalShares += 1000>>
<<set $publicShares -= 1000>>
<<set $cash -= 1000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102,$PC.trading >= 100 ? 101 : 102)))/100>>
<<replace "#CorpAction">>
<br> <<print "You bought <<print commaNum(1000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
<</if>>
<<link "<<print commaNum(1000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@">>
<<set $personalShares += 1000>>
<<set $publicShares -= 1000>>
<<set $cash -= 1000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102,$PC.trading >= 100 ? 101 : 102)))/100>>
<<replace "#CorpAction">>
<br> <<print "You bought <<print commaNum(1000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
<<if $publicShares > 5000 && $cash >= 5000*$sharePrice>>
| <<link "<<print commaNum(5000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@">> <<set $personalShares += 1000>>
<<set $publicShares -= 5000>>
<<set $cash -= 5000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102,$PC.trading >= 100 ? 101 : 102)))/100>>
<<replace "#CorpAction">>
<br> <<print "You bought <<print commaNum(5000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(5000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@">> <<set $personalShares += 1000>>
<<set $publicShares -= 5000>>
<<set $cash -= 5000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102,$PC.trading >= 100 ? 101 : 102)))/100>>
<<replace "#CorpAction">>
<br> <<print "You bought <<print commaNum(5000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
<</if>>
<<if $publicShares > 10000 && $cash >= 10000*$sharePrice>>
| <<link "<<print commaNum(10000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@">> <<set $personalShares += 10000>>
<<set $publicShares -= 10000>>
<<set $cash -= 10000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102,$PC.trading >= 100 ? 101 : 102)))/100>>
<<replace "#CorpAction">>
<br> <<print "You bought <<print commaNum(10000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(10000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@">> <<set $personalShares += 10000>>
<<set $publicShares -= 10000>>
<<set $cash -= 10000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102,$PC.trading >= 100 ? 101 : 102)))/100>>
<<replace "#CorpAction">>
<br> <<print "You bought <<print commaNum(10000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
<</if>>
<<if $publicShares > 15000 && $cash >= 15000*$sharePrice>>
| <<link "<<print commaNum(15000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@">> <<set $personalShares += 15000>>
<<set $publicShares -= 15000>>
<<set $cash -= 15000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102,$PC.trading >= 100 ? 101 : 102)))/100>>
<<replace "#CorpAction">>
<br> <<print "You bought <<print commaNum(15000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@, driving the share price up somewhat.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(15000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@">> <<set $personalShares += 15000>>
<<set $publicShares -= 15000>>
<<set $cash -= 15000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102,$PC.trading >= 100 ? 101 : 102)))/100>>
<<replace "#CorpAction">>
<br> <<print "You bought <<print commaNum(15000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@, driving the share price up somewhat.">>
<</replace>>
<</link>>
<</if>>
<<if $publicShares > 20000 && $cash >= 20000*$sharePrice>>
| <<link "<<print commaNum(20000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@">> <<set $personalShares += 20000>>
<<set $publicShares -= 20000>>
<<set $cash -= 20000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102,$PC.trading >= 100 ? 101 : 102)))/100>>
<<replace "#CorpAction">>
<br> <<print "You bought <<print commaNum(20000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@, driving the share price up significantly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(20000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@">> <<set $personalShares += 20000>>
<<set $publicShares -= 20000>>
<<set $cash -= 20000*$sharePrice>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102,$PC.trading >= 100 ? 101 : 102)))/100>>
<<replace "#CorpAction">>
<br> <<print "You bought <<print commaNum(20000)>> shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@, driving the share price up significantly.">>
<</replace>>
<</link>>
<</if>>
<<elseif $publicShares > 1000>>
//You are unable to purchase <<print commaNum(1000)>> shares at the current share price, valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@.//
......@@ -394,55 +390,53 @@ You hold <<print commaNum($personalShares)>> shares valued at @@.yellowgreen;<<p
<br>Direct the corporation to buy back publicly held shares:
<<if $corpCash > 1000*$sharePrice && $publicShares > 1000>>
<<if $publicShares > 1000 && $corpCash >= 1000*$sharePrice>>
<<link "<<print commaNum(1000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@">>
<<set $publicShares -= 1000>>
<<set $corpCash -= 1000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation bought back <<print commaNum(1000)>> public shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
<</if>>
<<link "<<print commaNum(1000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@">>
<<set $publicShares -= 1000>>
<<set $corpCash -= 1000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation bought back <<print commaNum(1000)>> public shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
<<if $publicShares > 5000 && $corpCash >= 5000*$sharePrice>>
| <<link "<<print commaNum(5000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@">>
<<set $publicShares -= 5000>>
<<set $corpCash -= 5000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation bought back <<print commaNum(5000)>> public shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(5000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@">>
<<set $publicShares -= 5000>>
<<set $corpCash -= 5000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation bought back <<print commaNum(5000)>> public shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*5000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
<</if>>
<<if $publicShares > 10000 && $corpCash >= 10000*$sharePrice>>
| <<link "<<print commaNum(10000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@">>
<<set $publicShares -= 10000>>
<<set $corpCash -= 10000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation bought back <<print commaNum(10000)>> public shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(10000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@">>
<<set $publicShares -= 10000>>
<<set $corpCash -= 10000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation bought back <<print commaNum(10000)>> public shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*10000))>>@@, driving the share price up slightly.">>
<</replace>>
<</link>>
<</if>>
<<if $publicShares > 15000 && $corpCash >= 15000*$sharePrice>>
| <<link "<<print commaNum(15000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@">>
<<set $publicShares -= 15000>>
<<set $corpCash -= 15000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation bought back <<print commaNum(15000)>> public shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@, driving the share price up somewhat.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(15000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@">>
<<set $publicShares -= 15000>>
<<set $corpCash -= 15000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation bought back <<print commaNum(15000)>> public shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*15000))>>@@, driving the share price up somewhat.">>
<</replace>>
<</link>>
<</if>>
<<if $publicShares > 20000 && $corpCash >= 20000*$sharePrice>>
| <<link "<<print commaNum(20000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@">>
<<set $publicShares -= 20000>>
<<set $corpCash -= 20000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation bought back <<print commaNum(20000)>> public shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@, driving the share price up significantly.">>
<</replace>>
<</link>>
| <<link "<<print commaNum(20000)>> valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@">>
<<set $publicShares -= 20000>>
<<set $corpCash -= 20000*Math.ceil($sharePrice)>>
<<set $sharePrice = (Math.trunc($sharePrice*either(101,102)))/100>>
<<replace "#CorpAction">>
<br> <<print "The corporation bought back <<print commaNum(20000)>> public shares valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*20000))>>@@, driving the share price up significantly.">>
<</replace>>
<</link>>
<</if>>
<<elseif $publicShares > 1000>>
//The corporation is unable to purchase <<print commaNum(1000)>> shares at the current share price, valued at @@.yellowgreen;<<print cashFormat(Math.ceil($sharePrice*1000))>>@@.//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment