diff --git a/src/SpecialForce/WeeklyChoices.tw b/src/SpecialForce/WeeklyChoices.tw index 145a1303228fd6fc338af933fb7b4afd9cda6636..50cd63a6ee42519e8e63fcaf750396fb8049ba0f 100644 --- a/src/SpecialForce/WeeklyChoices.tw +++ b/src/SpecialForce/WeeklyChoices.tw @@ -205,7 +205,7 @@ <<set $SF.Colonel.Fun = 1,$SF.Colonel.Talk = 1,$SF.Colonel.Status += 3, $SF.FS.Tension -= _colonelTalkTensionRuction>> <br>Where should this fun take place? <<link "Go back" "Firebase">> - <<set $SF.Colonel.Fun = 0, $SF.Colonel.Talk = 0,$SF.Colonel.Status -= , $SF.FS.Tension += _colonelTalkTensionRuction3>> + <<set $SF.Colonel.Fun = 0, $SF.Colonel.Talk = 0,$SF.Colonel.Status -= 3, $SF.FS.Tension += _colonelTalkTensionRuction>> <</link>> <br><<link "In private">> <<replace "#result4">> diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 416b5dc490ee26b9d6bc207dd80a553adadc81e0..88852eb0445e99c94f22b0bf9511c30e71b7da05 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -1294,12 +1294,14 @@ window.corpValue = function() { // Corporation Share Price // A positive q means adding shares to the market, negative means removing them -window.corpSharePrice = function(q = 0) { +window.corpSharePrice = function(q = 0, personalShares = null, publicShares = null) { const V = State.variables; if (V.corpIncorporated === 0) { return 0; } - return Math.trunc(1000 * (corpValue() / (V.personalShares + V.publicShares + q))); + personalShares = personalShares || V.personalShares; + publicShares = publicShares || V.publicShares; + return Math.trunc(1000 * (corpValue() / (personalShares + publicShares + q))); }; // Corporation Division Slave room diff --git a/src/pregmod/fSlaveSlaveVagConsummate.tw b/src/pregmod/fSlaveSlaveVagConsummate.tw index aa741a4e22ba9f629d7ac91cbf122764035c1e11..2fb51a9ea3f40eeb558682c2a7bfc8456907d4ce 100644 --- a/src/pregmod/fSlaveSlaveVagConsummate.tw +++ b/src/pregmod/fSlaveSlaveVagConsummate.tw @@ -125,14 +125,14 @@ Next, you see to $activeSlave.slaveName. <</if>> <<elseif ($activeSlave.relationshipTarget == $slaverapistx.ID) && ($activeSlave.relationship > 2)>> and seems calm and inviting to $his - <<if $slave.relationship == 3>> - sex friend - <<elseif $slave.relationship == 4>> - lover + <<if $activeSlave.relationship == 3>> + sex friend's + <<elseif $activeSlave.relationship == 4>> + lover's <<else>> - slave wife + slave wife's <</if>> - 's <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</if>> that will be penetrating $him. + <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</if>> that will be penetrating $him. <<if _incestMood == "Top">> <<set _incestMood = "Both">> <<else>> diff --git a/src/pregmod/manageCorporation.tw b/src/pregmod/manageCorporation.tw index 0d38e39f5178e52eed764f68c162f2078c21b3a1..63e129768e646c3ba3cbadf353540aa792f22dbd 100644 --- a/src/pregmod/manageCorporation.tw +++ b/src/pregmod/manageCorporation.tw @@ -1377,38 +1377,28 @@ __Dividend__ __Shares__ <br>You own <<print num($personalShares)>> shares while another <<print num($publicShares)>> shares are traded publicly. The going rate on the market for 1000 shares is currently @@.yellowgreen;<<print cashFormat(corpSharePrice())>>.@@ -<br>The corporation can buyback 1000 shares for @@.red;<<print cashFormat(corpSharePrice(-1000))>>@@ or issue 1000 shares and net @@.yellowgreen;<<print cashFormat(corpSharePrice(1000))>>.@@ +<br>The corporation can buyback 1000 shares for @@.red;<<print cashFormat(corpSharePrice(-1000))>>@@ or issue 1000 shares and net @@.yellowgreen;<<print cashFormat(corpSharePrice(1000))>>.@@ The corporation will prefer to round shares to the nearest 1000 and will issue or buy shares toward that goal first. <<if $corpCash > corpSharePrice(-1000)>> <<if $publicShares <= $personalShares - 2000 && $publicShares > 0>> /*It won't buy back player shares if the corporation is entirely owned by the player*/ - <br>The corporation can buyback some of your shares. [[Buyback 1000|Manage Corporation][cashX(corpSharePrice(-1000), "stocksTraded"), $corpCash -= corpSharePrice(-1000), $personalShares -= 1000]] + <<set _persExtraShares = $personalShares % 1000 || 1000>> + <br>The corporation can buyback some of your shares. + <<= "[[Buyback "+ _persExtraShares + "|Manage Corporation][cashX(corpSharePrice(-"+_persExtraShares+"), 'stocksTraded'), $corpCash -= corpSharePrice(-"+_persExtraShares+"), $personalShares -= "+_persExtraShares+"]]">> <<elseif $publicShares >= 1000>> - <br>The corporation can buyback some of the public shares. [[Buyback 1000|Manage Corporation][$corpCash -= corpSharePrice(-1000), $publicShares -= 1000]] + <<set _pubExtraShares = $publicShares % 1000 || 1000>> + <br>The corporation can buyback some of the public shares. + <<= "[[Buyback "+ _pubExtraShares + "|Manage Corporation][$corpCash -= corpSharePrice(-"+_pubExtraShares+"), $publicShares -= "+_pubExtraShares+"]]">> <</if>> <</if>> -/* Splitting shares when they're unwieldy */ -<<set _splitFeeInitial = 10000>> -<<set _singleSplitInitial = 0.01>> -<<set _splitFeeValue = _splitFeeInitial - Math.floor((_splitFeeInitial * ($PC.trading / 100.0) / 2.0) / 1000) * 1000>> -<<set _singleSplitValue = _singleSplitInitial>> -<<set _singleSplitTotal = _singleSplitValue * $publicShares * $personalShares + _splitFeeValue>> - <br>The corporation can perform a 2-for-1 Stock Split for @@.red;<<= cashFormat(_singleSplitValue) >>@@ per share and a market fee of @@.red;<<= cashFormat(_splitFeeValue)>>@@ for a total of @@.red;<<= cashFormat(_singleSplitTotal)>>@@. -<<if _splitFeeValue < _splitFeeInitial>> - //You negotiated lower fees due to your @@.springgreen;business acumen@@.// -<</if>> -<<if $corpSpecTimer > 0>> -//The corporation has restructured too recently.// -<<elseif $corpCash > _singleSplitTotal>> -[[Split Shares|Manage Corporation][$corpCash -= _singleSplitTotal, $publicShares *= 2, $personalShares *= 2, $corpSpecTimer=1]] -<<else>> -//The corporation cannot afford the fees.// -<</if>> - -<<if $cash > corpSharePrice(1000)>> - <br>The corporation can issue 1000 shares to you. [[Issue 1000|Manage Corporation][cashX(forceNeg(corpSharePrice(1000)), "stocksTraded"), $corpCash += corpSharePrice(1000), $personalShares += 1000]] +<<set _persLeftoverShares = 1000 - ($personalShares % 1000)>> +<<if $cash > corpSharePrice(_persLeftoverShares)>> + <br>The corporation can issue <<=_persLeftoverShares>> shares to you. + <<= "[[Issue " + _persLeftoverShares + "|Manage Corporation][cashX(forceNeg(corpSharePrice("+_persLeftoverShares+")), 'stocksTraded'), $corpCash += corpSharePrice("+_persLeftoverShares+"), $personalShares += "+_persLeftoverShares+"]]">> <</if>> +<<set _pubLeftoverShares = 1000 - ($publicShares % 1000)>> <<if $publicShares <= $personalShares - 2000>> - <br>The corporation can issue 1000 shares onto the stock market. [[Issue 1000|Manage Corporation][$corpCash += corpSharePrice(1000), $publicShares += 1000]] + <br>The corporation can issue <<=_pubLeftoverShares>> shares onto the stock market. + <<= "[[Issue " + _pubLeftoverShares + "|Manage Corporation][$corpCash += corpSharePrice("+_pubLeftoverShares+"), $publicShares += "+_pubLeftoverShares+"]]">> <</if>> <<if $publicShares <= $personalShares - 3000>> <br>You can sell some of your shares on the stock market. [[Sell 1000|Manage Corporation][cashX(corpSharePrice(), "stocksTraded"), $personalShares -= 1000, $publicShares += 1000]] @@ -1416,7 +1406,76 @@ __Shares__ <<if $cash > corpSharePrice() && $publicShares >= 1000>> <br>You can buy some shares from the stock market [[Buy 1000|Manage Corporation][cashX(forceNeg(corpSharePrice()), "stocksTraded"), $personalShares += 1000, $publicShares -= 1000]] <</if>> +<br>__Stock Split__ +/* Splitting shares when they're unwieldy */ +<<set _splitFeeInitial = 10000>> +<<set _splitFeeValue = _splitFeeInitial - Math.floor((_splitFeeInitial * ($PC.trading / 100.0) / 2.0) / 1000) * 1000>> +<<set _splitStockConstants = [ +{ + 'newStocks': 3, + 'oldStocks': 2, + 'weeks': 1, + 'cost': 7.5 +}, +{ + 'newStocks': 2, + 'weeks': 1, + 'cost': 10 +}, +{ + 'newStocks': 3, + 'weeks': 2, + 'cost': 12.5 +}, +{ + 'newStocks': 4, + 'weeks': 3, + 'cost': 15 +}, +{ + 'oldStocks': 4, + 'weeks': 1, + 'cost': 15 +}, +{ + 'oldStocks': 10, + 'weeks': 2, + 'cost': 25 +}, +]>> + + <br>The corporation can perform a stock split to increase the number of stocks while maintaining the same owned value. This requires paying a market fee of @@.red;<<= cashFormat(_splitFeeValue)>>@@ plus a per-share fee depending on the type of split being done. + <<if _splitFeeValue < _splitFeeInitial>> + //You negotiated lower fees due to your @@.springgreen;business acumen@@.// + <</if>> +<<if $corpSpecTimer > 0>> + <br>//The corporation has restructured too recently.// +<</if>> +<ul> +<<for _stockType range _splitStockConstants>> + <<set _splitInitial = _stockType['cost']>> + <<set _splitValue = _splitInitial>> + <<set _splitDenom = _stockType['oldStocks'] || 1>> + <<set _splitNumerator = _stockType['newStocks'] || 1>> + <<set _splitMultiplier = _splitNumerator / _splitDenom>> + <<set _splitTotal = _splitValue * ($publicShares + $personalShares) + _splitFeeValue>> + <<set _splitWeek = _stockType['weeks']>> + <li><<= _splitNumerator >>-for-<<= _splitDenom>> <<if _splitDenom > _splitNumerator>>inverse<</if>> stock split at @@.red;<<= cashFormat(_splitValue) >>@@ per share. + Including market fees, this will cost the corporation a total of @@.red;<<= cashFormat(_splitTotal)>>@@, + leaving the going rate for stock at @@.yellowgreen;<<= cashFormat(Math.floor(corpSharePrice(0, $personalShares * _splitMultiplier, $publicShares * _splitMultiplier))) >>@@ per 1000 shares. + <<if $corpSpecTimer == 0>> + <<if $publicShares % _splitDenom != 0 || $personalShares % _splitDenom != 0>> + //The number of shares cannot be evenly split// + <<elseif $corpCash > _splitTotal>> + <<= "[[Split Shares|Manage Corporation][$corpCash -= " + _splitTotal + ", $publicShares *= " + _splitMultiplier + ", $personalShares *= " + _splitMultiplier + ", $corpSpecTimer="+_splitWeek+"]]" >> + <<else>> + //The corporation cannot afford the fees.// + <</if>> + <</if>> + </li> +<</for>> +</ul> <br><br> __Slave specialization__ @@ -1494,7 +1553,7 @@ __Slave specialization__ <br>Slave assets are made to be [[Petite|Manage Corporation][$corpSpecInjection = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Tasteful|Manage Corporation][$corpSpecInjection = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Huge|Manage Corporation][$corpSpecInjection = 3, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// <</if>> <<if ndef $corpSpecCosmetics && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $surgicalUpgradeCosmetics, it is a general improvement specialization*/ - <br>Straightforward cosmetic procedures are [[Applied|Manage Corporation][$corpSpecCosmetics = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <br>Straightforward cosmetic procedures are [[Applied|Manage Corporation][$corpSpecCosmetics = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Not Applied|Manage Corporation][$corpSpecCosmetics = 0, $corpSpecTimer = 2]] <</if>> <<if ndef $corpSpecEducation && $corpDivTrain > 0>> /*This used to be $trainingUpgradeEducation, it is the training specialization*/ <br>Slaves are given [[No Education|Manage Corporation][$corpSpecEducation == 0, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Basic Education|Manage Corporation][$corpSpecEducation = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// @@ -2008,6 +2067,14 @@ __Slave specialization__ <<if $corpSpecTimer == 0>> <<link "No Focus">><<unset $corpSpecCosmetics>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> + <<elseif $corpSpecCosmetics == 0>> + <br>The corporation doesn't apply cosmetic procedures. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0>> + [[Applied|Manage Corporation][$corpSpecCosmetics = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecCosmetics>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> <</if>> <<if $corpSpecImplants == 1>> <br>The corporation applies tasteful implants to all slaves. @@ -2024,9 +2091,12 @@ __Slave specialization__ <</if>> <<elseif $corpSpecImplants == 0>> <br>The corporation keeps their slaves entirely implant free. - <<if $corpSpecTimer == 0 && $corpSpecToken > 0>> - [[Tasteful Implants|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecImplants>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0>> + [[Tasteful Implants|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecImplants>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> <</if>> <<if ndef $corpSpecPussy && ndef $corpSpecDick && ndef $corpSpecBalls && $corpSpecGenitalia == 1>> <<set ndef $corpSpecGenitalia, diff --git a/src/uncategorized/neighborInteract.tw b/src/uncategorized/neighborInteract.tw index 7376a62617d12f12433a3803298cc3a79afa6e40..2f1c6932d9fa276d65bed3e6620697dfb4fb4037 100644 --- a/src/uncategorized/neighborInteract.tw +++ b/src/uncategorized/neighborInteract.tw @@ -196,9 +196,9 @@ You have <<print $arcologies.length-1>> neighbors. <br><br> <<set $arcologies[_currentNeighbor].prosperity = Math.clamp($arcologies[_currentNeighbor].prosperity, 1, 300)>> <br>You own $arcologies[_currentNeighbor].PCminority% of <<link "$arcologies[_currentNeighbor].name">> - <<replace "#Security">> + <<replace "#Security">> <<set $activeArcologyIdx = _currentNeighbor>> <br>[[Back to the main diplomacy page|Neighbor Interact]] - <<set $i = _currentNeighbor>> <<include "Neighbor Description">><br> + <<set $i = _currentNeighbor>> <<include "Neighbor Description">> <br> <<set _ownershipCost = 500*Math.trunc($arcologies[_currentNeighbor].prosperity*(1+($arcologies[_currentNeighbor].demandFactor/100)))>> <br>A 1% interest in this arcology is worth <<print cashFormat(_ownershipCost)>>. @@ -274,11 +274,10 @@ You have <<print $arcologies.length-1>> neighbors. <br><br> <<if $arcologies[_currentNeighbor].government == "your trustees" || $arcologies[_currentNeighbor].government == "your agent">> <br><br> <<if $arcologies[_currentNeighbor].government == "your trustees">> - <<set $activeArcologyIdx = _currentNeighbor>> [[Appoint an agent|Agent Select]] <<set $him = "them">> <<else>> <<setLocalPronouns _Agent>> - Your agent @@.deeppink;<<= SlaveFullName(_Agent)>>@@ is running this arcology. [["Recall and reenslave " + $him|Agent Retrieve][$activeArcologyIdx = _currentNeighbor]] + Your agent @@.deeppink;<<= SlaveFullName(_Agent)>>@@ is running this arcology. [["Recall and reenslave " + $him|Agent Retrieve][]] <</if>> <span id="rename"> | <<link "Instruct $him to rename the arcology">><<replace #rename>> | <<textbox "$arcologies[$activeArcologyIdx].name" $arcologies[$activeArcologyIdx].name>> [[Confirm name|Neighbor Interact]]<</replace>><</link>></span> <<if $arcologies[_currentNeighbor].government === "your agent">> diff --git a/src/uncategorized/randomNonindividualEvent.tw b/src/uncategorized/randomNonindividualEvent.tw index 96a8a461526de70c3700ff879bf40d5e471ab9bb..08989c29c3f706daa84b7e2ae5ee0a0146928c17 100644 --- a/src/uncategorized/randomNonindividualEvent.tw +++ b/src/uncategorized/randomNonindividualEvent.tw @@ -706,11 +706,11 @@ <</if>> <</if>> - + <<if $arcologyUpgrade.drones == 1>> <<set _recruitEvents.push("RE malefactor")>> <<set $malefactor = ["addict", "whore"]>> - <<if $seeIncest != 0>> + <<if $seeDicks != 100>> <<set $malefactor.push("businesswoman")>> <<set $malefactor.push("liberator")>> <<if $seePreg != 0>> diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw index 7e840e45d79d3b7f4115c6f1e9620649df4d8bc3..2d0839f183b4726728f97624c663f3f4312c593c 100644 --- a/src/uncategorized/saLongTermEffects.tw +++ b/src/uncategorized/saLongTermEffects.tw @@ -3530,29 +3530,29 @@ <<if $slaves[$i].ovaries == 1 || $slaves[$i].mpreg == 1>> <<if $slaves[$i].balls > 0 && $slaves[$i].ballType != "sterile">> <<if $slaves[$i].hormoneBalance > 20>> - <<set $slaves[$i].hormoneBalance -= 1>> + <<set $slaves[$i].hormoneBalance -= Math.ceil(($slaves[$i].hormoneBalance - 20)/25)>> <<elseif $slaves[$i].hormoneBalance < 20>> - <<set $slaves[$i].hormoneBalance += 1>> + <<set $slaves[$i].hormoneBalance += Math.ceil((20 - $slaves[$i].hormoneBalance)/25)>> <</if>> <<else>> <<if $slaves[$i].hormoneBalance > 60>> - <<set $slaves[$i].hormoneBalance -= 1>> + <<set $slaves[$i].hormoneBalance -= Math.ceil(($slaves[$i].hormoneBalance - 60)/25)>> <<elseif $slaves[$i].hormoneBalance < 60>> - <<set $slaves[$i].hormoneBalance += 1>> + <<set $slaves[$i].hormoneBalance += Math.ceil((60 - $slaves[$i].hormoneBalance)/25)>> <</if>> <</if>> <<else>> <<if $slaves[$i].balls > 0 && $slaves[$i].ballType != "sterile">> <<if $slaves[$i].hormoneBalance > -20>> - <<set $slaves[$i].hormoneBalance -= 1>> + <<set $slaves[$i].hormoneBalance -= Math.ceil(($slaves[$i].hormoneBalance + 20)/25)>> <<elseif $slaves[$i].hormoneBalance < -20>> - <<set $slaves[$i].hormoneBalance += 1>> + <<set $slaves[$i].hormoneBalance += Math.ceil((-20 - $slaves[$i].hormoneBalance)/25)>> <</if>> <<else>> <<if $slaves[$i].hormoneBalance > 20>> - <<set $slaves[$i].hormoneBalance -= 1>> + <<set $slaves[$i].hormoneBalance -= Math.ceil(($slaves[$i].hormoneBalance - 20)/25)>> <<elseif $slaves[$i].hormoneBalance < 20>> - <<set $slaves[$i].hormoneBalance += 1>> + <<set $slaves[$i].hormoneBalance += Math.ceil((20 - $slaves[$i].hormoneBalance)/25)>> <</if>> <</if>> <</if>> @@ -3560,29 +3560,29 @@ <<if $slaves[$i].ovaries == 1 || $slaves[$i].mpreg == 1>> <<if $slaves[$i].balls > 0 && $slaves[$i].ballType != "sterile">> <<if $slaves[$i].hormoneBalance > 20>> - <<set $slaves[$i].hormoneBalance -= 1>> + <<set $slaves[$i].hormoneBalance -= Math.ceil(($slaves[$i].hormoneBalance - 20)/25)>> <<elseif $slaves[$i].hormoneBalance < 20>> - <<set $slaves[$i].hormoneBalance += 1>> + <<set $slaves[$i].hormoneBalance += Math.ceil((20 - $slaves[$i].hormoneBalance)/25)>> <</if>> <<else>> <<if $slaves[$i].hormoneBalance > 40>> - <<set $slaves[$i].hormoneBalance -= 1>> + <<set $slaves[$i].hormoneBalance -= Math.ceil(($slaves[$i].hormoneBalance - 40)/25)>> <<elseif $slaves[$i].hormoneBalance < 40>> - <<set $slaves[$i].hormoneBalance += 1>> + <<set $slaves[$i].hormoneBalance += Math.ceil((40 - $slaves[$i].hormoneBalance)/25)>> <</if>> <</if>> <<else>> <<if $slaves[$i].balls > 0 && $slaves[$i].ballType != "sterile">> <<if $slaves[$i].hormoneBalance > -40>> - <<set $slaves[$i].hormoneBalance -= 1>> + <<set $slaves[$i].hormoneBalance -= Math.ceil(($slaves[$i].hormoneBalance + 40)/25)>> <<elseif $slaves[$i].hormoneBalance < -40>> - <<set $slaves[$i].hormoneBalance += 1>> + <<set $slaves[$i].hormoneBalance += Math.ceil((-40 - $slaves[$i].hormoneBalance)/25)>> <</if>> <<else>> <<if $slaves[$i].hormoneBalance > 20>> - <<set $slaves[$i].hormoneBalance -= 1>> + <<set $slaves[$i].hormoneBalance -= Math.ceil(($slaves[$i].hormoneBalance - 20)/25)>> <<elseif $slaves[$i].hormoneBalance < 20>> - <<set $slaves[$i].hormoneBalance += 1>> + <<set $slaves[$i].hormoneBalance += Math.ceil((20 - $slaves[$i].hormoneBalance)/25)>> <</if>> <</if>> <</if>>