code
stringlengths
0
56.1M
repo_name
stringclasses
515 values
path
stringlengths
2
147
language
stringclasses
447 values
license
stringclasses
7 values
size
int64
0
56.8M
:: Corporation Developments [nobr] /*Main Corporation Pass*/ <<if App.Corporate.cash < 0>> <<set App.Corporate.cash = Math.trunc(App.Corporate.cash * 1.02)>> /*2% weekly interest rate on negative cash*/ <</if>> <h1>Corporation Management</h1> <h2>Operational Results</h2> /*Divisions doing their thing*/ <<set _weekLedger = App.Corporate.endWeek()>> <<for _d range _weekLedger.divisionLedgers>> <<set _div = _d.division>> /* Reporting on number of slaves being processed or completed processing */ <br><<= _div.name>>: The division <<= _div.message_endWeek_Slaves(_d) >> <<if _d.market.originalBuy != null>> <br> <<if _d.market.buy == 0>> It couldn't purchase <<= numberWithPlural(_d.market.originalBuy, "slave") >> to replenish its stock from the market because it couldn't afford to purchase price. <<else>> It needed to replenish its slave stock of <<= numberWithPlural(_d.market.originalBuy, "slave")>>, but couldn't afford to buy all of them. It bought <<= numberWithPlural(_d.market.buy, _div.nounSlaveFromMarket)>> for <<= cashFormatColor(_d.market.finalPurchase, true) >>. <</if>> <<elseif _d.market.buy > 0>> <br>It replenished its slave stock and bought <<= numberWithPlural(_d.market.buy, _div.nounSlaveFromMarket) >> from the market for <<= cashFormatColor(_d.market.finalPurchase, true) >>. <</if>> <<if _d.transfer.total > 0>> <<for _nextDivLedger range _d.transfer.divisions>> <<set _nextDiv = _nextDivLedger.division>> <<set _slavesToNext = _nextDivLedger.fill>> It moved <<= numberWithPlural(_slavesToNext, "slave")>> to the <<= _nextDiv.name>> Division. <</for>> <</if>> <<if _div.toMarket>> <<if _div.heldSlaves == 0>> <<if _d.market.sell > 0>> It immediately sold <<= numberWithPlural(_d.market.sell, _div.nounFinishedSlave) >> to the market and made <<= cashFormatColor(_d.market.finalSale)>>. <</if>> <<else>> It holds @@.green;<<= numberWithPlural(_div.heldSlaves, _div.nounFinishedSlave)>>@@ at the end of the <<if _d.market.sell > 0>> week, but it ran out of storage space and had to sell @@.red;<<= numberWithPlural(_d.market.sell, "slave")>>@@ and made <<= cashFormatColor(_d.market.finalSale)>>. <<else>> week. <</if>> <</if>> <</if>> <<if _d.revenue.value > 0>> It earned <<= cashFormatColor(_d.revenue.value)>> in revenue. <</if>> <</for>> /*Aggregate Corporation Results*/ <<includeDOM App.Corporate.writeLedger(App.Corporate.ledger.current, $week)>> /*Division Expansion Tokens*/ <<if _weekLedger.canExpandNow>> <div class="majorText">Your corporation is ready to start an additional division!</div> <</if>> /*Specializations tokens*/ <<if _weekLedger.canSpecializeNow>> <div class="majorText">Your corporation is ready to specialize its slaves further!</div> <</if>> /*Calculating cash set aside for dividend*/ <h2>Dividend</h2> <div> <<if App.Corporate.dividendRatio > 0>> The corporation is currently reserving <<= Math.floor(App.Corporate.dividendRatio * 100)>>% of its profit to be paid out as dividends. <<else>> The corporation is currently not reserving a portion of its profit to be paid out as dividends. <</if>> <<if App.Corporate.payoutCash>> It is putting aside unused cash reserves to be paid out as dividends. <</if>> </div> <div> <<if App.Corporate.dividend > 0>> <<if _weekLedger.hasDividend>> It reserved <<print cashFormatColor(_weekLedger.dividend)>> this week. <</if>> A total of <<print cashFormatColor(App.Corporate.dividend)>> has been put aside for its shareholders. <</if>> </div> <<if _weekLedger.hasPayout>> <div>This week the dividends were paid out, you received <<print cashFormatColor(_weekLedger.payout)>>.</div> <</if>> /*Bankrupted the Corporation*/ <<if App.Corporate.value < 0>> <<run App.Corporation.Dissolve()>> <br>@@.red;Your corporation went bankrupt.@@ <</if>> /*This needs to be at the very end of the financials*/ <<run App.Corporate.ledger.swap()>>
MonsterMate/fc
src/Corporation/corporationDevelopments.tw
tw
mit
3,931
:: Manage Corporation [nobr jump-to-safe jump-from-safe] <<set $nextButton = "Back", $nextLink = "Main", $encyclopedia = "The Corporation">> <<set _sepObj = { 'need': false, text: '|' }>> <<if !App.Corporate.founded >> <h1>Incorporation</h1> <br>//Please consider that the market price of slaves has quite the impact on the profitability of your corporation.// <br>//Focus on acquisition when prices are high, exploitation if prices are low. Slave improvement is a safe choice either way.// <br>//Also note the option for a 8 - 7 share split instead of the vanilla 2 - 1, this makes the initial investment cheaper but leaves you with relatively less shares.// <br><br> <<set _divisionsByFoundingCost = App.Corporate.divisionList.concat().sort( function(a,b) { return a.founding.startingPrice - b.founding.startingPrice; })>> <<set _optionsText = ["to found a slave corporation", "for most options", "for many options", "for some options", "for the final option"]>> /*Picking a starting division*/ <<if $vanillaShareSplit == 1>> <<set _corpPerShares = 2000>> <<set _corpPubShares = 1000>> <<else>> <<set _corpPerShares = 8000>> <<set _corpPubShares = 7000>> <</if>> <<for _index, _div range _divisionsByFoundingCost>> <<set _divCost = App.Corporate.foundingCostToPlayer(_div, _corpPerShares, _corpPubShares)>> <<if $cash >= _divCost>> <<if _index == 0>> You can lay the groundwork for a slave corporation and choose to start out with: <</if>> <div> <<= "[[" + _div.name + "|Manage Corporation]" + "[App.Corporate.create( '"+ _div.id + "'" +", " + _corpPerShares +", " + _corpPubShares +")]]">> (<<=cashFormat(_divCost)>>): Focuses on <<= _div.focusDescription >>. </div> <<else>> <br>You lack the funds <<= _optionsText[App.Utils.mapIndexBetweenLists(_index, _divisionsByFoundingCost, _optionsText)] >>. You need at least @@.yellowgreen;<<print cashFormat(_divCost)>>@@ <<if _index != 0>> <<if _index < _divisionsByFoundingCost.length - 1>> for the next option and at most @@.yellowgreen;<<print cashFormat(App.Corporate.foundingCostToPlayer(_divisionsByFoundingCost[_divisionsByFoundingCost.length - 1], _corpPerShares, _corpPubShares))>>@@. <<else>> for it. <</if>> <</if>> <<break>> <</if>> <</for>> <<if $vanillaShareSplit == 1>> <br>[[8-7 Share Split|Manage Corporation][$vanillaShareSplit = 0]] <<else>> <br>[[2-1 Share Split|Manage Corporation][$vanillaShareSplit = 1]] <</if>> <<else>> /*When the corporation exists*/ <h1>Corporation Overview</h1> <<if App.Corporate.foundedDate>> <div class="founding">Founded on <<= asDateString(App.Corporate.foundedDate)>></div> <</if>> <<includeDOM App.Corporate.writeLedger(App.Corporate.ledger.old, $week-1)>> <h1>Division Management</h1> <<for _div range App.Corporate.divisionList.filter(x => x.founded)>> <h2><<= _div.name>> Division</h2> <<if _div.foundedDate != 0>> <div class="founding">Founded on <<= asDateString(_div.foundedDate)>></div> <</if>> This division focuses on <<= _div.focusDescription >>. <br><<= _div.messageSlaveCount() >> <<set _divMaint = _div.getDisplayMaintenanceCost()>> <br>It costs @@.red;<<= cashFormat(Math.trunc(_divMaint.cost))>>@@ to run. On average that is @@.red;<<= cashFormat(Math.trunc(_divMaint.perUnit)) >>@@ per slave. <br><<= _div.messageSlaveOutput() >> <<set _divSentenceStart = ["Currently the division", "It also"]>> <h3>Direct Control</h3> <<if _div.fromMarket>> <div> <<= _divSentenceStart.shift() >> is <<= _div.slaveAction.present >> @@.green;<<= numberWithPlural(_div.activeSlaves, "slave") >>@@. <<if _div.activeSlaves < _div.developmentCount>> <<set _fillSlaveCount = _div.availableRoom>> <br>There is room to <<= _div.slaveAction.future >> <<= numberWithPluralOne(_fillSlaveCount, "more slave")>>. <<set _buySlaveArray = [ { 'name': 'Buy Slave', 'count':1 }, { 'name': 'Buy x10' , 'count':10} ]>> <<if !_buySlaveArray.some(function(x) { return x.count == _fillSlaveCount })>> <<run _buySlaveArray.push({ 'name': 'Fill' , 'count':_fillSlaveCount})>> <</if>> <<set _singleSlaveCost = App.Corporate.slaveMarketPurchaseValue(_div, 1)>> <<if $corp.Cash > _singleSlaveCost>> <div> The corporation can purchase slaves directly from the market for about <<=cashFormatColor(_singleSlaveCost)>> </div> <div> <<set _sepObj.need = false>> <<for _slaveNum range _buySlaveArray.filter(num => _div.availableRoom >= num.count)>> <<set _slaveSetCost = App.Corporate.slaveMarketPurchaseValue(_div, _slaveNum.count)>> <<if $corp.Cash < _slaveSetCost>> <<continue>> <</if>> <<= Separator(_sepObj) >> <<= "[[" + _slaveNum.name + "|Manage Corporation]" + "[App.Corporate.buySlaves('"+_div.id+"', "+_slaveNum.count+")]" + "]">> <</for>> </div> <<else>> <div>//The corporation cannot afford to purchase any slaves from the market.// It requires about @@.yellowgreen;<<= cashFormat(_singleSlaveCost)>>@@ to buy a <<= asSingular(_div.slaveAction.market)>>.</div> <</if>> <<else>> <br>There is //no room// to <<= _div.slaveAction.future>> more slaves. <</if>> </div> <</if>> <<if _div.toMarket>> <<set _finishedSlaveNoun = _div.nounFinishedSlave>> <<if _div.heldSlaves > 0>> <div> <<= _divSentenceStart.shift() >> holds @@.green;<<= numberWithPlural(_div.heldSlaves, _finishedSlaveNoun) >>@@. <<for _nextDiv range _div.relatedDivisions .to .filter(div => div.availableRoom > 0 && !App.Corporate.ownsIntermediaryDivision(_div, div))>> <div> The <<= _nextDiv.name >> Division can accept up to @@.green;<<= numberWithPlural(_nextDiv.availableRoom, "slave") >>@@. <<set _sendSlaveArray = [ {'name': 'Send Slave', 'count':1 }, {'name': 'Send x10' , 'count':10 } ]>> <<if _div.heldSlaves >= _nextDiv.availableRoom>> <<run _sendSlaveArray.push({'name':`Fill ${_nextDiv.name} Division`, 'count':_nextDiv.availableRoom})>> <<else>> <<run _sendSlaveArray.push({'name':'Send All', 'count':_div.heldSlaves})>> <</if>> <<set _sepObj.need = false>> <<for _index, _slaveNum range _sendSlaveArray.filter(slaveNum => slaveNum.count <= _nextDiv.availableRoom && slaveNum.count <= _div.heldSlaves)>> <<= Separator(_sepObj)>> <<= "[[" + _slaveNum.name + "|Manage Corporation]" + "[App.Corporate.transferSlaves('"+_div.id+"', '"+_nextDiv.id+"', "+_slaveNum.count+")" + "]]">> <</for>> </div> <</for>> </div> <div>The corporation can sell these slaves to the market. <<set _sellSlaveArray = [ {'name':'Sell Slave', 'count':1 }, {'name':'Sell x10' , 'count':10 }, {'name':'Sell x100' , 'count':100 }, {'name':'Sell All' , 'count':_div.heldSlaves } ]>> <<set _sepObj.need = false>> <<for _index, _slaveNum range _sellSlaveArray.filter(slaveNum => _div.heldSlaves >= slaveNum.count)>> <<= Separator(_sepObj)>> <<= "[[" + _slaveNum.name + "|Manage Corporation]" + "[App.Corporate.sellSlaves('"+_div.id+"',"+_slaveNum.count+")]" + "]">> <</for>> </div> <<else>> <div>The division is not holding any <<= asPlural(_finishedSlaveNoun)>>.</div> <</if>> <</if>> /* Expanding the division*/ <<set _depExpandCost = _div.sizeCost * 1000>> <div>Expanding the division costs <span class="red"><<print cashFormat(_depExpandCost)>>.</span> Downsizing recoups 80% of the investment; slaves will be sold at the going rate.</div> <div> <<set _buyDevArray = [ { 'name': 'Expand Division' , 'count':1}, { 'name': 'Expand x10', 'count':10} ]>> <<set _sepObj.need = false>> <<for _buySet range _buyDevArray.filter(buySet => App.Corporate.cash >= buySet.count * _depExpandCost)>> <<= Separator(_sepObj) >> <<= "[["+_buySet.name+"|Manage Corporation]" + "[App.Corporate.buyDevelopment('" + _div.id + "', " + _buySet.count + ")]" + "]">> <</for>> /* Downsize the division*/ <<set _depDownsizeCost = _depExpandCost * 0.8>> <<set _sellDevArray = [ { 'name': 'Downsize Division', 'count':1 }, { 'name': 'Downsize x10' , 'count':10} ]>> <<for _sellSet range _sellDevArray.filter(divNum => _div.developmentCount > divNum.count)>> <<= Separator(_sepObj) >> <<= "[["+_sellSet.name+"|Manage Corporation]" + "[App.Corporate.sellDevelopment('"+_div.id+"', "+_sellSet.count+")]" + "]">> <</for>> </div> <h3>Rules</h3> <<for _nextDiv range _div.relatedDivisions.to.filter(nextDiv => nextDiv.founded && !App.Corporate.ownsIntermediaryDivision(_div, nextDiv))>> /* TODO: Originally this had a bit of flavor per nextDep. ie, Surgery said "to undergo surgery"*/ <div> <<if _div.getAutoSendToDivision(_nextDiv)>> Auto send slaves to <<= _nextDiv.name >> Division <<= "[[Stop Auto Send|Manage Corporation][App.Corporate.setAutoSendToDivision('"+_div.id+"', '"+_nextDiv.id+"', false)]]">> <<else>> Do not send slaves to <<= _nextDiv.name >> Division <<= "[[Auto Send|Manage Corporation][App.Corporate.setAutoSendToDivision('"+_div.id+"', '"+_nextDiv.id+"', true)]]">> <</if>> </div> <</for>> <<if _div.toMarket>> <div> <<if _div.getAutoSendToMarket()>> Auto sell slaves to the market <<= "[[Stop Auto Sell|Manage Corporation][App.Corporate.setAutoSendToMarket('"+_div.id+"', false)]]" >> <<else>> Do not sell slaves to the market <<= "[[Auto Sell|Manage Corporation][App.Corporate.setAutoSendToMarket('"+_div.id+"', true)]]" >> <</if>> </div> <</if>> <<if _div.fromMarket>> <div> <<if _div.getAutoBuyFromMarket()>> Auto buy slaves from the market <<= "[[Stop Auto Buy|Manage Corporation][App.Corporate.setAutoBuyFromMarket('"+ _div.id +"', false)]]" >> <<else>> Do not buy slaves from the market <<= "[[Auto Buy|Manage Corporation][App.Corporate.setAutoBuyFromMarket('"+ _div.id +"', true)]]" >> <</if>> </div> <</if>> <<if App.Corporate.numDivisions > 1>> /* Cannot dissolve the last division */ <div>Dissolve the division @@.orange;//Think before you click//@@ /* TODO: Add a confirmation button. Probably use replace?*/ <<= "[[Dissolve|Manage Corporation]" + "[App.Corporate.divisions['" + _div.id + "'].dissolve()]" + "]">> </div> <</if>> <</for>> <<if App.Corporate.canExpand>> /*is the corporation large enough to expand into another division?*/ <h1>Found New Division</h1> <div>The corporation can expand by founding a new division related to its current <<= onlyPlural(App.Corporate.divisionList.filter(div => div.founded).length, "division") >>.</div> <<for _div range App.Corporate.divisionList.filter(x => !x.founded && x.relatedDivisions.anyFounded)>> <<set _depCost = _div.foundingCost * 1000>> <div> <<if App.Corporate.cash >= _depCost>> <<= "[[Add " + _div.name + " Division|Manage Corporation]" + "[App.Corporate.divisions['"+_div.id+"'].create(App.Corporate)]]">> (@@.yellowgreen;<<print cashFormat(_depCost)>>@@): A division focusing on <<= _div.focusDescription >>. <<else>> <<= _div.name >> (@@.red;<<print cashFormat(_depCost)>>@@): The corporation cannot afford to start a division focusing on <<= _div.focusDescription >>. <</if>> </div> <</for>> <</if>> <h1>Financials</h1> <h2>Dividend</h2> <div> <<set _dividends = App.Corporate.dividendOptions>> <<set _index = _dividends.findIndex(element => App.Corporate.dividendRatio >= element ) >> <<set _dividend = _dividends[_index] >> <<if _index >= 0>> <<set _nextIndex = _index + 1>> <<set App.Corporate.dividendRatio = _dividend>>/* Normalize */ The corporation is currently reserving <<= Math.trunc(_dividend * 100)>>% of its profit to be paid out as dividends. <<set _sepObj.need = false>> <<if _index > 0>> <<= Separator(_sepObj)>> <<= "[[Increase Ratio|Manage Corporation][App.Corporate.dividendRatio = " + _dividends[_index - 1] + "]]">> <</if>> <<if _nextIndex != _dividends.length>> <<= Separator(_sepObj)>> <<= "[[Reduce Ratio|Manage Corporation][App.Corporate.dividendRatio = " + _dividends[_nextIndex] + "]]">> <<else>> <<= Separator(_sepObj)>> <<= "[[None|Manage Corporation][App.Corporate.dividendRatio = 0]]">> <</if>> <<else>> The corporation is currently not reserving a portion of its profit to be paid out as dividends. <<= "[[Increase Ratio|Manage Corporation][App.Corporate.dividendRatio = "+_dividends[_dividends.length - 1]+"]]" >> <</if>> </div> <div> <<if App.Corporate.payoutCash>> The corporation will payout unused cash reserves over @@.yellowgreen;<<print cashFormat(App.Corporate.payoutAfterCash)>>@@ as dividends [[Stop|Manage Corporation][App.Corporate.payoutCash = false]] <<else>> You can direct the corporation to reserve cash over @@.yellowgreen;<<print cashFormat(App.Corporate.payoutAfterCash)>>@@ to be paid out as dividends as well. [[Payout Cash Reserves|Manage Corporation][App.Corporate.payoutCash = true]] <</if>> </div> <h2>Shares</h2> 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))>>.@@ The corporation will prefer to round shares to the nearest 1000 and will issue or buy shares toward that goal first. <<if $corp.Cash > corpSharePrice(-1000)>> <<if $publicShares <= $personalShares - 2000 && $publicShares > 0>> /*It won't buy back player shares if the corporation is entirely owned by the player*/ <<set _persExtraShares = $personalShares % 1000 || 1000>> <br>The corporation can buyback some of your shares. <<= "[[Buyback "+ _persExtraShares + "|Manage Corporation][cashX(corpSharePrice(-"+_persExtraShares+"), 'stocksTraded'), $corp.Cash -= corpSharePrice(-"+_persExtraShares+"), $personalShares -= "+_persExtraShares+"]]">> <</if>> <<if $publicShares >= 1000>> <<set _pubExtraShares = $publicShares % 1000 || 1000>> <br>The corporation can buyback some of the public shares. <<= "[[Buyback "+ _pubExtraShares + "|Manage Corporation][$corp.Cash -= corpSharePrice(-"+_pubExtraShares+"), $publicShares -= "+_pubExtraShares+"]]">> <</if>> <</if>> <<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'), $corp.Cash += corpSharePrice("+_persLeftoverShares+"), $personalShares += "+_persLeftoverShares+"]]">> <</if>> <<set _pubLeftoverShares = 1000 - ($publicShares % 1000)>> <<if $publicShares <= $personalShares - 2000>> <br>The corporation can issue <<=_pubLeftoverShares>> shares onto the stock market. <<= "[[Issue " + _pubLeftoverShares + "|Manage Corporation][$corp.Cash += 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]] <</if>> <<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>> <h3>Stock Split</h3> /* Splitting shares when they're unwieldy */ <<set _splitFeeInitial = 10000>> <<set _splitFeeValue = _splitFeeInitial - Math.floor((_splitFeeInitial * ($PC.skill.trading / 100.0) / 2.0) / 1000) * 1000>> <<set _splitStockConstants = App.Corporate.stockSplits >> 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 $corp.SpecTimer > 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 $corp.SpecTimer == 0>> <<if $publicShares % _splitDenom != 0 || $personalShares % _splitDenom != 0>> //The number of shares cannot be evenly split// <<elseif $corp.Cash > _splitTotal>> <<= "[[Split Shares|Manage Corporation][$corp.Cash -= " + _splitTotal + ", $publicShares *= " + _splitMultiplier + ", $personalShares *= " + _splitMultiplier + ", $corp.SpecTimer="+_splitWeek+"]]" >> <<else>> //The corporation cannot afford the fees.// <</if>> <</if>> </li> <</for>> </ul> <h2>Slave specialization</h2> <<if $corp.SpecToken > 0>> /*Spending tokens on new specializations*/ <<if $corp.SpecToken > 1>> Your corporation has $corp.SpecToken specializations left. <<else>> Your corporation has one specialization left. <</if>> <<if $corp.SpecTimer > 0>> You have recently changed specializations and the corporation needs <<if $corp.SpecTimer > 1>>$corp.SpecTimer more weeks<<else>>another week<</if>> before it can comply with another directive. <<else>> <br>Choosing to specialize your corporation uses a specialization. The corporation can be directed to focus on the following: <<if $corp.SpecRaces.length == 0 && ($corp.DivExtra > 0 || $corp.DivLegal > 0)>> /*This used to be $captureUpgradeRace, it is a general acquisition specialization*/ <br>Slaves who are not <<if $arcologies[0].FSSubjugationistRace != "amerindian" || $arcologies[0].FSSubjugationist == "unset">>[[Amerindian|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("amerindian", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] | <</if>> <<if $arcologies[0].FSSubjugationistRace != "asian" || $arcologies[0].FSSubjugationist == "unset">>[[Asian|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("asian", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] | <</if>> <<if $arcologies[0].FSSubjugationistRace != "black" || $arcologies[0].FSSubjugationist == "unset">>[[Black|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("black", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] | <</if>> <<if $arcologies[0].FSSubjugationistRace != "indo-aryan" || $arcologies[0].FSSubjugationist == "unset">>[[Indo-aryan|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("indo-aryan", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] | <</if>> <<if $arcologies[0].FSSubjugationistRace != "latina" || $arcologies[0].FSSubjugationist == "unset">>[[Latina|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("latina", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] | <</if>> <<if $arcologies[0].FSSubjugationistRace != "malay" || $arcologies[0].FSSubjugationist == "unset">>[[Malay|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("malay", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] | <</if>> <<if $arcologies[0].FSSubjugationistRace != "middle eastern" || $arcologies[0].FSSubjugationist == "unset">>[[Middle Eastern|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("middle eastern", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] | <</if>> <<if $arcologies[0].FSSubjugationistRace != "mixed race" || $arcologies[0].FSSubjugationist == "unset">>[[Mixed Race|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("mixed race", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] | <</if>> <<if $arcologies[0].FSSubjugationistRace != "pacific islander" || $arcologies[0].FSSubjugationist == "unset">>[[Pacific Islander|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("pacific islander", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] | <</if>> <<if $arcologies[0].FSSubjugationistRace != "semitic" || $arcologies[0].FSSubjugationist == "unset">>[[Semitic|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("semitic", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] | <</if>> <<if $arcologies[0].FSSubjugationistRace != "southern european" || $arcologies[0].FSSubjugationist == "unset">>[[Southern European|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("southern european", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] | <</if>> <<if $arcologies[0].FSSubjugationistRace != "white" || $arcologies[0].FSSubjugationist == "unset">>[[White|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("white", 1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]]<</if>> — //additional races can be excluded. 4 races per token.// <<if $corp.SpecToken >= 3>> <br>Only slaves who are <<if $arcologies[0].FSSupremacistRace != "amerindian" || $arcologies[0].FSSupremacist == "unset">>[[Amerindian|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("amerindian", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]] | <</if>> <<if $arcologies[0].FSSupremacistRace != "asian" || $arcologies[0].FSSupremacist == "unset">>[[Asian|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("asian", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]] | <</if>> <<if $arcologies[0].FSSupremacistRace != "black" || $arcologies[0].FSSupremacist == "unset">>[[Black|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("black", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]] | <</if>> <<if $arcologies[0].FSSupremacistRace != "indo-aryan" || $arcologies[0].FSSupremacist == "unset">>[[Indo-aryan|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("indo-aryan", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]] | <</if>> <<if $arcologies[0].FSSupremacistRace != "latina" || $arcologies[0].FSSupremacist == "unset">>[[Latina|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("latina", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]] | <</if>> <<if $arcologies[0].FSSupremacistRace != "malay" || $arcologies[0].FSSupremacist == "unset">>[[Malay|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("malay", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]] | <</if>> <<if $arcologies[0].FSSupremacistRace != "middle eastern" || $arcologies[0].FSSupremacist == "unset">>[[Middle Eastern|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("middle eastern", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]] | <</if>> <<if $arcologies[0].FSSupremacistRace != "mixed race" || $arcologies[0].FSSupremacist == "unset">>[[Mixed Race|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("mixed race", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]] | <</if>> <<if $arcologies[0].FSSupremacistRace != "pacific islander" || $arcologies[0].FSSupremacist == "unset">>[[Pacific Islander|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("pacific islander", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]] | <</if>> <<if $arcologies[0].FSSupremacistRace != "semitic" || $arcologies[0].FSSupremacist == "unset">>[[Semitic|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("semitic", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]] | <</if>> <<if $arcologies[0].FSSupremacistRace != "southern european" || $arcologies[0].FSSupremacist == "unset">>[[Southern European|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("southern european", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]] | <</if>> <<if $arcologies[0].FSSupremacistRace != "white" || $arcologies[0].FSSupremacist == "unset">>[[White|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("white", 0), $corp.SpecToken -= 3, $corp.SpecTimer = 2]]<</if>> <<else>> <br>Only slaves of a particular race requires 3 tokens. <</if>> <</if>> <<if (ndef $corp.SpecNationality && $corp.DivExtra > 0) && ($arcologies[0].FSEdoRevivalist != "unset" || $arcologies[0].FSChineseRevivalist != "unset")>> <br> <<if $arcologies[0].FSEdoRevivalist != "unset">> Since you are pursuing Edo Revivalism, slaves who are [[Japanese|Manage Corporation][$corp.SpecNationality = "Japanese", $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <<if $arcologies[0].FSChineseRevivalist != "unset">> Since you are pursuing Chinese Revivalism, slaves who are [[Chinese|Manage Corporation][$corp.SpecNationality = "Chinese", $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <</if>> <<if $seeDicks != 0 && ndef $corp.SpecGender && ($corp.DivExtra > 0 || $corp.DivLegal > 0)>> /*This used to be $captureUpgradeGender, it is a general acquisition specialization*/ <br>Train only slaves with [[Pussies|Manage Corporation][$corp.SpecGender = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Dicks|Manage Corporation][$corp.SpecGender = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <<if ndef $corp.SpecHeight && ($corp.DivExtra > 0 || $corp.DivLegal > 0)>> /*This is a general acquisition specialization*/ <br>Slaves that are [[Short|Manage Corporation][$corp.SpecHeight = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Tall|Manage Corporation][$corp.SpecHeight = 4, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] -- //Further specializations possible// <</if>> <<if ndef $corp.SpecVirgin && ($corp.DivExtra > 0 || $corp.DivLegal > 0)>> /*This is a general acquisition specialization*/ <br>Slaves that are [[Virgins|Manage Corporation][$corp.SpecVirgin = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <<if ndef $corp.SpecIntelligence && $corp.DivLegal > 0 >> /*This used to be $entrapmentUpgradeIntelligence, it is a legal enslavement specialization*/ <br>Slaves who are [[Stupid|Manage Corporation][$corp.SpecIntelligence = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Intelligent|Manage Corporation][$corp.SpecIntelligence = 3, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] --//Further specializations possible// <</if>> <<if ndef $corp.SpecAge && $corp.DivExtra > 0>> /*This used to be $captureUpgradeAge, it is the extralegal enslavement specialization*/ <br>Slaves who are [[Younger|Manage Corporation][$corp.SpecAge = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Older|Manage Corporation][$corp.SpecAge = 3, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <<if ndef $corp.SpecWeight && ($corp.DivBreak > 0 || $corp.DivSurgery > 0 || $corp.DivTrain > 0)>> /*This used to be $generalUpgradeWeight, it is a general improvement specialization*/ <br>Managing slaves' diets to achieve [[Thin Slaves|Manage Corporation][$corp.SpecWeight = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Fat nor Thin Slaves|Manage Corporation][$corp.SpecWeight = 3, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Fat Slaves|Manage Corporation][$corp.SpecWeight = 5, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] -- //Further specializations possible// <</if>> <<if ndef $corp.SpecDevotion && ($corp.DivBreak > 0 || $corp.DivSurgery > 0 || $corp.DivTrain > 0)>> /*This used to be $entrapmentUpgradeDevotionOne/Two, it is a general improvement specialization*/ <br>Slaves who are [[Reluctant|Manage Corporation][$corp.SpecDevotion = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Obedient|Manage Corporation][$corp.SpecDevotion = 4, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] -- //Further specializations possible// <</if>> <<if ndef $corp.SpecAccent && ($corp.DivBreak > 0 || $corp.DivSurgery > 0 || $corp.DivTrain > 0)>> /*This used to be $trainingUpgradeAccent, it is a general improvement specialization*/ <br>Slaves are taught to [[Speak the Language|Manage Corporation][$corp.SpecAccent = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Speak without Accent|Manage Corporation][$corp.SpecAccent = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <<if ndef $corp.SpecHormones && ($corp.DivBreak > 0 || $corp.DivSurgery > 0 || $corp.DivTrain > 0)>> /*This used to be $drugUpgradeHormones, it is a general improvement specialization*/ <br>Slaves are given hormones to [[Feminize|Manage Corporation][$corp.SpecHormones = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Masculinize|Manage Corporation][$corp.SpecHormones = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <<if ndef $corp.SpecInjection && ($corp.DivBreak > 0 || $corp.DivSurgery > 0 || $corp.DivTrain > 0)>> /*This used to be $drugUpgradeInjectionOne, it is a general improvement specialization*/ <br>Slave assets are made to be [[Petite|Manage Corporation][$corp.SpecInjection = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Tasteful|Manage Corporation][$corp.SpecInjection = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Huge|Manage Corporation][$corp.SpecInjection = 3, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] -- //Further specializations possible// <</if>> <<if ndef $corp.SpecCosmetics && ($corp.DivBreak > 0 || $corp.DivSurgery > 0 || $corp.DivTrain > 0)>> /*This used to be $surgicalUpgradeCosmetics, it is a general improvement specialization*/ <br>Straightforward cosmetic procedures are [[Applied|Manage Corporation][$corp.SpecCosmetics = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Not Applied|Manage Corporation][$corp.SpecCosmetics = 0, $corp.SpecTimer = 2]] <</if>> <<if ndef $corp.SpecEducation && $corp.DivTrain > 0>> /*This used to be $trainingUpgradeEducation, it is the training specialization*/ <br>Slaves are given [[No Education|Manage Corporation][$corp.SpecEducation = 0, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Basic Education|Manage Corporation][$corp.SpecEducation = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] -- //Further specializations possible// <</if>> <<if ndef $corp.SpecImplants && $corp.DivSurgery > 0>> /*This used to be $surgicalUpgradeImplants, it is the surgery specialization*/ <br>Slave implants are [[Applied|Manage Corporation][$corp.SpecImplants = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Not Applied|Manage Corporation][$corp.SpecImplants = 0, $corp.SpecTimer = 2]] -- //Further specializations possible// <</if>> <<if ndef $corp.SpecGenitalia && $corp.DivSurgeryDev > 100>> /*This used to be $surgicalUpgradeGenitalia, it is the surgery specialization*/ <br>Slaves get their genitalia reconfigured [[Add Pussy|Manage Corporation][$corp.SpecPussy = 1, $corp.SpecGenitalia = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Remove Pussy|Manage Corporation][$corp.SpecPussy = -1, $corp.SpecGenitalia = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Add Dick|Manage Corporation][$corp.SpecDick = 1, $corp.SpecGenitalia = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Remove Dick|Manage Corporation][$corp.SpecDick = -1, $corp.SpecGenitalia = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Add Balls|Manage Corporation][$corp.SpecBalls = 1, $corp.SpecGenitalia = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Remove Balls|Manage Corporation][$corp.SpecBalls = -1, $corp.SpecGenitalia = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] -- //Further specializations possible// <</if>> <<if ndef $corp.SpecTrust && $corp.DivBreak > 0>> /*This used to be $generalUpgradeBreaking, it is the slave breaking specific specialization*/ <br>Breaking slaves with [[Brutality|Manage Corporation][$corp.SpecTrust = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Care|Manage Corporation][$corp.SpecTrust = 4, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] -- //Further specializations possible// <</if>> <<if ndef $corp.SpecAmputee && $corp.DivArcade > 0 && $corp.DivSurgeryDev > 100>> /*This is the arcade specialization*/ <br>Slave limbs are categorically [[Removed|Manage Corporation][$corp.SpecAmputee = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <<if ndef $corp.SpecMuscle && $corp.DivMenial > 0>> /*This used to be $generalUpgradeMuscle, it is the Menial division's specialization*/ <br>Slaves with muscles that are <<if $arcologies[0].FSPhysicalIdealist == "unset">> [[Weak|Manage Corporation][$corp.SpecMuscle = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | <</if>>[[Soft|Manage Corporation][$corp.SpecMuscle = 3, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Toned|Manage Corporation][$corp.SpecMuscle = 4, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] -- //Further specializations possible// <</if>> <<if ndef $corp.SpecMilk && $corp.DivDairy > 0>> /*This is the dairy specialization*/ <br>Slaves are made to be lactating [[Naturally|Manage Corporation][$corp.SpecMilk = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | [[Through Implant|Manage Corporation][$corp.SpecMilk = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <<if ndef $corp.SpecSexEd && $corp.DivWhore > 0>> /*This used to be $trainingUpgradeSexEd, it is the escort division specialization*/ <br>Slaves are sexually [[Clueless|Manage Corporation][$corp.SpecSexEd = 0, $corp.SpecToken -= 0, $corp.SpecTimer = 2]] | [[Competent|Manage Corporation][$corp.SpecSexEd = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] -- //Further specializations possible// <</if>> <</if>> <<else>> <br>Your corporation cannot pick a new specialization at this time. <</if>> <p> <<if $corp.Spec > $corp.SpecToken>> /*Modifying specializations*/ You have chosen the following specializations; <div class="note"> You can choose to specialize further with additional tokens, specialize less, end the specialization or sometimes tweak them for free. </div> <<if $corp.SpecRaces.length == 12>> <<set $corp.SpecRaces = []>> <</if>> <<if $corp.SpecRaces.length > 0>> <div> The corporation enslaves people of the following race(s); </div> <div> <<if $corp.SpecRaces.includes("amerindian")>> Amerindian <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "amerindian")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("amerindian",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("amerindian",1)]] <</if>> <</if>> <</if>> <<else>> <br>==Amerindian== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("amerindian",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("amerindian",0)]] <</if>> <</if>> <</if>> </div> <div> <<if $corp.SpecRaces.includes("asian")>> Asian <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "asian")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("asian",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("asian",1)]] <</if>> <</if>> <</if>> <<else>> ==Asian== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("asian",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("asian",0)]] <</if>> <</if>> <</if>> </div> <div> <<if $corp.SpecRaces.includes("black")>> Black <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "black")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("black",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("black",1)]] <</if>> <</if>> <</if>> <<else>> ==Black== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("black",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("black",0)]] <</if>> <</if>> <</if>> </div> <div> <<if $corp.SpecRaces.includes("indo-aryan")>> Indo-Aryan <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "indo-aryan")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("indo-aryan",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("indo-aryan",1)]] <</if>> <</if>> <</if>> <<else>> ==Indo-Aryan== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("indo-aryan",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("indo-aryan",0)]] <</if>> <</if>> <</if>> </div> <div> <<if $corp.SpecRaces.includes("latina")>> Latina <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "latina")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("latina",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("latina",1)]] <</if>> <</if>> <</if>> <<else>> ==Latina== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("latina",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("latina",0)]] <</if>> <</if>> <</if>> </div> <div> <<if $corp.SpecRaces.includes("malay")>> Malay <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "malay")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("malay",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("malay",1)]] <</if>> <</if>> <</if>> <<else>> ==Malay== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("malay",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("malay",0)]] <</if>> <</if>> <</if>> </div> <div> <<if $corp.SpecRaces.includes("middle eastern")>> Middle Eastern <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "middle eastern")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("middle eastern",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("middle eastern",1)]] <</if>> <</if>> <</if>> <<else>> ==Middle Eastern== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("middle eastern",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("middle eastern",0)]] <</if>> <</if>> <</if>> </div> <div> <<if $corp.SpecRaces.includes("mixed race")>> Mixed Race <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "mixed race")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("mixed race",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("mixed race",1)]] <</if>> <</if>> <</if>> <<else>> ==Mixed Race== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("mixed race",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("mixed race",0)]] <</if>> <</if>> <</if>> </div> <div> <<if $corp.SpecRaces.includes("pacific islander")>> Pacific Islander <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "pacific islander")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("pacific islander",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("pacific islander",1)]] <</if>> <</if>> <</if>> <<else>> ==Pacific Islander== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("pacific islander",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("pacific islander",0)]] <</if>> <</if>> <</if>> </div> <div> <<if $corp.SpecRaces.includes("semitic")>> Semitic <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "semitic")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("semitic",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("semitic",1)]] <</if>> <</if>> <</if>> <<else>> ==Semitic== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("semitic",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("semitic",0)]] <</if>> <</if>> <</if>> </div> <div> <<if $corp.SpecRaces.includes("southern european")>> Southern European <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "southern european")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("southern european",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("southern european",1)]] <</if>> <</if>> <</if>> <<else>> ==Southern European== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("southern european",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("southern european",0)]] <</if>> <</if>> <</if>> </div> <div> <<if $corp.SpecRaces.includes("white")>> White <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace == "white")>> <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("white",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("white",1)]] <</if>> <</if>> <</if>> <<else>> ==White== <<if $corp.SpecTimer == 0>> <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("white",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] <<else>> [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("white",0)]] <</if>> <</if>> <</if>> </div> <</if>> <div> <<if $corp.SpecNationality>> The corporation trains slaves who are $corp.SpecNationality. <<if $corp.SpecTimer == 0>> <<link "No Focus">><<run delete $corp.SpecNationality>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecGender == 1>> The corporation trains slaves with pussies. <<if $corp.SpecTimer == 0>> <<link "No Focus">><<run delete $corp.SpecGender>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecGender == 2>> <br>The corporation trains slaves with dicks. <<if $corp.SpecTimer == 0>> <<link "No Focus">><<run delete $corp.SpecGender>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecHeight == 1>> The corporation is targeting tiny slaves. <<if $corp.SpecTimer == 0>> [[Short Slaves|Manage Corporation][$corp.SpecHeight = 2, $corp.SpecToken += 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecHeight>><<set $corp.SpecToken += 2, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecHeight == 2>> The corporation is targeting short slaves. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0 && ($corp.DivExtraDev + $corp.DivLegalDev) > 50>> [[Tiny Slaves|Manage Corporation][$corp.SpecHeight = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecHeight>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecHeight == 4>> The corporation is targeting tall slaves. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0 && ($corp.DivExtraDev + $corp.DivLegalDev) > 50>> [[Giant Slaves|Manage Corporation][$corp.SpecHeight = 5, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecHeight>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecHeight == 5>> The corporation is targeting giant slaves. <<if $corp.SpecTimer == 0>> [[Tall Slaves|Manage Corporation][$corp.SpecHeight = 4, $corp.SpecToken += 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecHeight>><<set $corp.SpecToken += 2, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecVirgin == 1>> The corporation is ensuring slaves remain virgins. <<if $corp.SpecTimer == 0>> <<link "No Focus">><<run delete $corp.SpecVirgin>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecTrust == 1>> The corporation is breaking slaves with extreme brutality. <<if $corp.SpecTimer == 0>> [[Apply Less Brutality|Manage Corporation][$corp.SpecTrust = 2, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecTrust>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> /*Don't think this deserves the added cost of a token, unlike the 'utmost care' one*/ <<elseif $corp.SpecTrust == 2>> The corporation is breaking slaves with brutality. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0 && $arcologies[0].FSDegradationist > 20 && $corp.DivBreakDev > 50>> [[Apply Extreme Brutality|Manage Corporation][$corp.SpecTrust = 1, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecTrust>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecTrust == 4>> The corporation is breaking slaves with care. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0 && $arcologies[0].FSPaternalist > 20 && $corp.DivBreakDev > 50>> [[Use the Utmost Care|Manage Corporation][$corp.SpecTrust = 5, $corp.SpecToken += 1, $corp.SpecTimer == 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecTrust>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecTrust == 5>> The corporation is breaking slaves with the utmost care. <<if $corp.SpecTimer == 0>> [[Use Less Care|Manage Corporation][$corp.SpecTrust = 4, $corp.SpecToken += 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecTrust>><<set $corp.SpecToken += 2, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecWeight == 1>> The corporation makes slaves follow incredibly strict diets. <<if $corp.SpecTimer == 0>> [[Apply Looser Diet|Manage Corporation][$corp.SpecWeight = 2, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecWeight>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecWeight == 2>> The corporation makes slaves diet. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0 && $arcologies[0].FSHedonisticDecadence == "unset">> [[Apply Strict Diet|Manage Corporation][$corp.SpecWeight = 1, $corp.SpecTimer = 2]] | <</if>> [[Aim for Healthy Weight|Manage Corporation][$corp.SpecWeight = 3, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecWeight>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecWeight == 3>> The corporation is aiming for slaves with a healthy weight. <<if $corp.SpecTimer == 0>> [[Apply Diet|Manage Corporation][$corp.SpecWeight = 2, $corp.SpecTimer = 2]] | [[Plump up Slaves|Manage Corporation][$corp.SpecWeight = 5, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecWeight>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> /*Perhaps 'plump up' is not the right phrase*/ <<elseif $corp.SpecWeight == 5>> The corporation aims for plump slaves. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0 && $arcologies[0].FSPhysicalIdealist == "unset">> [[Fatten Slaves|Manage Corporation][$corp.SpecWeight = 6, $corp.SpecTimer = 2]] | <</if>> [[Aim for Healthy Weight|Manage Corporation][$corp.SpecWeight = 3, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecWeight>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecWeight == 6>> The corporation aims for fat slaves. <<if $corp.SpecTimer == 0>> [[Settle for Plump|Manage Corporation][$corp.SpecWeight = 5, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecWeight>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecMuscle == 1>> The corporation aims to have frail slaves. <<if $corp.SpecTimer == 0>> [[Aim for Weak|Manage Corporation][$corp.SpecMuscle = 2, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecMuscle>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecMuscle == 2>> /*Don't think this deserves the added cost of a token, unlike slaves getting ripped*/ The corporation aims to have weak slaves. <<if $corp.SpecTimer == 0>> <<if $arcologies[0].FSPhysicalIdealist == "unset">> [[Aim for Frail|Manage Corporation][$corp.SpecMuscle = 1, $corp.SpecTimer = 2]] | <</if>> [[Aim for Soft|Manage Corporation][$corp.SpecMuscle = 3, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecWeight>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecMuscle == 3>> The corporation is aiming for slaves with soft muscles. <<if $corp.SpecTimer == 0>> <<if $arcologies[0].FSPhysicalIdealist == "unset">> [[Aim for Weak|Manage Corporation][$corp.SpecMuscle = 2, $corp.SpecTimer = 2]] | <</if>> [[Aim for Toned|Manage Corporation][$corp.SpecMuscle = 4, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecWeight>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecMuscle == 4>> The corporation aims for toned muscles. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0 && ($corp.DivBreakDev + $corp.DivSurgeryDev + $corp.DivTrainDev > 100)>> [[Aim for Ripped|Manage Corporation][$corp.SpecMuscle = 5, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | <</if>> [[Aim for Soft|Manage Corporation][$corp.SpecMuscle = 3, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecWeight>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecMuscle == 5>> The corporation aims for ripped slaves. <<if $corp.SpecTimer == 0>> [[Aim for Toned|Manage Corporation][$corp.SpecMuscle = 4, $corp.SpecToken += 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecWeight>><<set $corp.SpecToken += 2, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecDevotion == 1>> The corporation keeps slaves extremely defiant. <<if $corp.SpecTimer == 0>> [[Less Defiant|Manage Corporation][$corp.SpecDevotion = 2, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecDevotion>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> /*Don't think this deserves the added cost of a token, unlike the 'devoted' one*/ <<elseif $corp.SpecDevotion == 2>> The corporation keeps slaves reluctant. <<if $corp.SpecTimer == 0>> [[Make them Defiant|Manage Corporation][$corp.SpecDevotion = 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecDevotion>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecDevotion == 4>> The corporation is fostering obedience. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0 && $corp.DivTrainDev > 100>> [[Foster Devotion|Manage Corporation][$corp.SpecDevotion = 5, $corp.SpecToken += 1, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecDevotion>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecDevotion == 5>> The corporation is fostering devotion. <<if $corp.SpecTimer == 0>> [[Settle for Obedience|Manage Corporation][$corp.SpecDevotion = 4, $corp.SpecToken += 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecDevotion>><<set $corp.SpecToken += 2, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecIntelligence == 1>> The corporation keeps stupid slaves. <<if $corp.SpecTimer == 0>> <<link "No Focus">><<run delete $corp.SpecIntelligence>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecIntelligence == 3>> The corporation keeps intelligent slaves. <<if $corp.SpecTimer == 0>> <<link "No Focus">><<run delete $corp.SpecIntelligence>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecAge == 1>> The corporation focuses on young slaves. <<if $corp.SpecTimer == 0>> <<link "No Focus">><<run delete $corp.SpecAge>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecAge == 3>> The corporation focuses on older slaves. <<if $corp.SpecTimer == 0>> <<link "No Focus">><<run delete $corp.SpecAge>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecAccent == 1>> The corporation teaches slaves to speak the lingua franca. <<if $corp.SpecTimer == 0>> [[Eliminate Accents|Manage Corporation][$corp.SpecAccent = 2, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecAccent>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecAccent == 2>> The corporation teaches slaves to speak the lingua franca without an accent. <<if $corp.SpecTimer == 0>> [[Just Teach Language|Manage Corporation][$corp.SpecAccent = 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecAccent>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecEducation == 0>> The corporation focuses on uneducated slaves. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0>> [[Basic Education|Manage Corporation][$corp.SpecEducation = 1, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecEducation>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecEducation == 1>> The corporation makes sure all slaves have a basic education. <<if $corp.SpecTimer == 0>> <<if $corp.DivTrainDev > 200 && $corp.SpecToken > 0>> [[Advanced Education|Manage Corporation][$corp.SpecEducation = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | <</if>> [[No Education|Manage Corporation][$corp.SpecEducation = 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecEducation>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecEducation == 2>> The corporation makes sure all slaves have an advanced education. <<if $corp.SpecTimer == 0>> [[Basic Education|Manage Corporation][$corp.SpecEducation = 1, $corp.SpecToken += 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecEducation>><<set $corp.SpecToken += 2, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecCosmetics == 1>> The corporation applies straightforward cosmetic procedures. <<if $corp.SpecTimer == 0>> <<link "No Focus">><<run delete $corp.SpecCosmetics>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecCosmetics == 0>> The corporation doesn't apply cosmetic procedures. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0>> [[Applied|Manage Corporation][$corp.SpecCosmetics = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecCosmetics>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecImplants == 1>> The corporation applies tasteful implants to all slaves. <<if $corp.SpecTimer == 0>> <<if $corp.DivSurgeryDev > 100 && $corp.SpecToken > 0>> [[Absurd Implants|Manage Corporation][$corp.SpecImplants = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecImplants>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecImplants == 2>> The corporation applies absurd implants to all slaves. <<if $corp.SpecTimer == 0>> [[Tasteful Implants|Manage Corporation][$corp.SpecImplants = 1, $corp.SpecToken += 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecImplants>><<set $corp.SpecToken += 2, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecImplants == 0>> The corporation keeps their slaves entirely implant free. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0>> [[Tasteful Implants|Manage Corporation][$corp.SpecImplants = 1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecImplants>><<set $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <<if ndef $corp.SpecPussy && ndef $corp.SpecDick && ndef $corp.SpecBalls && $corp.SpecGenitalia == 1>> <<set ndef $corp.SpecGenitalia, $corp.SpecToken += 1>> <</if>> <<if $corp.SpecGenitalia == 1>> <div> <<if $corp.SpecPussy == 1>> The corporation adds a pussy to all slaves. <<if $corp.SpecTimer == 0>> <<link "Stop">><<run delete $corp.SpecPussy>><<set $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecPussy == -1>> The corporation removes pussies from all slaves. <<if $corp.SpecTimer == 0>> <<link "Stop">><<run delete $corp.SpecPussy>><<set $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<else>> The corporation has no plans for pussies. <<if $corp.SpecTimer == 0>> [[Add Pussy|Manage Corporation][$corp.SpecPussy = 1, $corp.SpecTimer = 2]] | [[Remove Pussy|Manage Corporation][$corp.SpecPussy = -1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <</if>> </div> <div> <<if $corp.SpecDick == 1>> The corporation adds a dick to all slaves. <<if $corp.SpecTimer == 0>> <<link "Stop">><<run delete $corp.SpecDick>><<set $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecDick == -1>> The corporation removes dicks from all slaves. <<if $corp.SpecTimer == 0>> <<link "Stop">><<run delete $corp.SpecDick>><<set $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<else>> The corporation has no plans for dicks. <<if $corp.SpecTimer == 0>> [[Add Dick|Manage Corporation][$corp.SpecDick = 1, $corp.SpecTimer = 2]] | [[Remove Dick|Manage Corporation][$corp.SpecDick = -1, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <</if>> </div> <div> <<if $corp.SpecBalls == 1>> The corporation adds balls to all slaves (penis required). <<if $corp.SpecTimer == 0>> <<link "Stop">><<run delete $corp.SpecBalls>><<set $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecBalls == -1>> The corporation removes balls from all slaves. <<if $corp.SpecTimer == 0>> <<link "Stop">><<run delete $corp.SpecBalls>><<set $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<else>> The corporation has no plans for balls. <<if $corp.SpecTimer == 0>> [[Add Balls|Manage Corporation][$corp.SpecBalls = 1, $corp.SpecTimer = 2]] | [[Remove Balls|Manage Corporation][$corp.SpecBalls = -1, $corp.SpecTimer = 2]] <</if>> <</if>> </div> <</if>> <div> <<if $corp.SpecInjection == 1>> The corporation aims for petite assets. <<if $corp.SpecTimer == 0>> [[Tasteful Size|Manage Corporation][$corp.SpecInjection = 2, $corp.SpecTimer = 2]] | [[Huge Size|Manage Corporation][$corp.SpecInjection = 3, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecInjection>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecInjection == 2>> The corporation aims for tasteful assets. <<if $corp.SpecTimer == 0>> [[Small Size|Manage Corporation][$corp.SpecInjection = 1, $corp.SpecTimer = 2]] | [[Huge Size|Manage Corporation][$corp.SpecInjection = 3, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecInjection>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecInjection == 3>> The corporation aims for huge assets. <<if $corp.SpecTimer == 0>> [[Small Size|Manage Corporation][$corp.SpecInjection = 1, $corp.SpecTimer = 2]] | [[Tasteful Size|Manage Corporation][$corp.SpecInjection = 2, $corp.SpecTimer = 2]] | <<if $corp.DivSurgeryDev > 100 && $corp.SpecToken > 0>> [[Supermassive Size|Manage Corporation][$corp.SpecInjection = 4, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] <</if>> <<if $corp.DivDairyDev > 200 && $corp.SpecToken > 0>> | [[Pastoral Size|Manage Corporation][$corp.SpecInjection = 5, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecInjection>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecInjection == 4>> The corporation aims for supermassive assets. <<if $corp.SpecTimer == 0>> [[Huge Size|Manage Corporation][$corp.SpecInjection = 3, $corp.SpecToken += 1, $corp.SpecTimer = 2]] | <<if $corp.DivDairyDev > 200>> [[Pastoral Size|Manage Corporation][$corp.SpecInjection = 5, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecInjection>><<set $corp.SpecToken += 2, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecInjection == 5>> The corporation aims for pastoral assets. <<if $corp.SpecTimer == 0>> [[Huge Size|Manage Corporation][$corp.SpecInjection = 3, $corp.SpecToken += 1, $corp.SpecTimer = 2]] | <<if $corp.DivSurgeryDev > 50>> [[Supermassive Size|Manage Corporation][$corp.SpecInjection = 4, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecInjection>><<set $corp.SpecToken += 2, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecHormones == 1>> The corporation feminizes slaves with hormones. <<if $corp.SpecTimer == 0>> [[Masculinize|Manage Corporation][$corp.SpecHormones = 2, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecHormones>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecHormones == 2>> The corporation masculinize slaves with hormones. <<if $corp.SpecTimer == 0>> [[Feminize|Manage Corporation][$corp.SpecHormones = 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecHormones>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecAmputee == 1>> The corporation removes all limbs from its slaves. <<if $corp.SpecTimer == 0>> <<link "Stop">><<run delete $corp.SpecAmputee>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecMilk == 1>> The corporation makes sure all slaves are naturally lactating. <<if $corp.SpecTimer == 0>> [[Lactation Implant|Manage Corporation][$corp.SpecMilk = 2, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecMilk>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecMilk == 2>> The corporation equips all slaves with lactation implants. <<if $corp.SpecTimer == 0>> [[Natural Lactation|Manage Corporation][$corp.SpecMilk = 1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecMilk>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <div> <<if $corp.SpecSexEd == 1>> The corporation familiarizes slaves with sexual service. <<if $corp.SpecTimer == 0>> <<if $corp.SpecToken > 0 && $corp.DivWhoreDev > 200>> [[Advanced Training|Manage Corporation][$corp.SpecSexEd = 2, $corp.SpecToken -= 1, $corp.SpecTimer = 2]] | <</if>> <<link "No Focus">><<run delete $corp.SpecSexEd>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecSexEd == 2>> The corporation teaches advanced sexual techniques to its slaves. <<if $corp.SpecTimer == 0>> [[Basic Training|Manage Corporation][$corp.SpecSexEd = 1, $corp.SpecToken +=1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecSexEd>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <<elseif $corp.SpecSexEd == 0>> The corporation teaches no sexual techniques to its slaves. <<if $corp.SpecTimer == 0>> [[Basic Training|Manage Corporation][$corp.SpecSexEd = 1, $corp.SpecToken -=1, $corp.SpecTimer = 2]] | <<link "No Focus">><<run delete $corp.SpecSexEd>><<set $corp.SpecToken += 1, $corp.SpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> <</if>> </div> <</if>> /*End of activated specializations*/ </p> <br><br> @@.orange;//Warning: Think TWICE before you click this!//@@ <<link "Dissolve the corporation">> <<set cashX(Math.min(corpSharePrice() * $personalShares / 1000, 1000000), "stocksTraded")>> <<run App.Corporate.dissolve()>> <<goto "Manage Corporation">> <</link>> @@.orange;//Warning!//@@ <</if>> /*end of incorporated or not check*/
MonsterMate/fc
src/Corporation/manageCorporation.tw
tw
mit
73,835
:: Dinner Party Preparations [nobr] <<set $nextButton = "Cancel The Event", $nextLink = "Main">> Hosting of high society dinner parties will increase your prestige significantly and it is expected for someone of your station. Since there is a lack of animal meat, human meat is served at these events to illustrate the wealth and power of the host. The success of the evening is judged by how well the human offering is prepared. Guests to these events are encouraged to rate the dishes and special dishes are expected. If the host receives 5 stars on all the dishes, they will receive the coveted title "<<if $PC.title == 1>>Master<<else>>Mistress<</if>> of The Culinary Arts". You ask $assistant.name to show you a list of cooking instructions for those dishes. <h1>Cooking Instructions and Recipes:</h1> ''Roast Long Pig'' – Made with the meat of a human roasted on a spit. Young meat is better than old meat. There should be some amount of fat to make the meat juicy, but not too much fat that makes the meat greasy. Muscles affect the texture of the meat. Meat without muscles lacks texture while an excess will be tough and hard to chew. Remember that you can't eat silicone, and virgin meat is highly sought after.<<if $seePreg != 0>> If the human is pregnant, a veal dish can also be made from the fetus.<</if>> <br><br> ''Dicky Roll'' – An erect penis made into a spring roll. For best results, harvest the penis at the moment of ejaculation. The size of the penis and the amount of accumulated ejaculate all affect the quality of the dish. Too big of a dick and too thin of semen can both ruin a dish. <br><br> ''Testy Meat Balls'' – Testicles made into meat balls served with a sauce. Size matters. <br><br> ''Titty Tartare'' – Made from finely chopped breasts, mixed with onions, capers, and seasonings, and served raw. Big breasts make the best quality meat for this dish. To add a hint of creamy taste, make sure the breasts are lactating. Remember that you can't eat silicone. <br><br> ''Camel Toe à l'Orange'' – Pussy grilled like a steak. A big clit and big labia will improve the quality of the dish. <br><br> Your assistant will take care of the invitations and all the arrangements; all you need to do is pick the meat. <br><br> __Select Your Meat:__ <br><br> <<includeDOM App.UI.SlaveList.slaveSelectionList( s => assignmentVisible(s) && s.fuckdoll === 0, App.UI.SlaveList.SlaveInteract.stdInteract, null, (s) => { const p = getPronouns(s); return App.UI.DOM.passageLink(`Make ${p.him} the main course`, "Dinner Party Execution", () => { $activeSlave = s; }) } )>>
MonsterMate/fc
src/Mods/DinnerParty/dinnerPartyPreparations.tw
tw
mit
2,631
/** * @param {string|Node} message * @param {number} week * @param {string} [category] */ App.Reminders.add = function(message, week, category = "manual") { if (message === "" || message === null) { return; } const entry = {message: message, week: week, category: category}; // V.reminders is sorted by week from low to high, we insert at the correct place so it remains sorted. const index = V.reminders.findIndex(e => e.week >= week); if (index === -1) { V.reminders.push(entry); } else { V.reminders.splice(index, 0, entry); } }; /** * @param {Object} [obj] * @param {number} [obj.maxFuture] how far into the future should reminders be displayed. * @param {string} [obj.category] * @param {boolean} [obj.link] show link to managePersonalAffairs.tw * @returns {HTMLSpanElement|DocumentFragment} */ App.Reminders.list = function list({maxFuture = Number.POSITIVE_INFINITY, category = "all", link = false} = {}) { if (V.reminders.length === 0) { return document.createDocumentFragment(); } /** * @param {string} c * @returns {boolean} */ const includedCategory = category === "all" ? () => true : c => c === category; const replace = () => App.UI.DOM.replace("#reminder-list", list({ maxFuture: maxFuture, category: category, link: link })); /** * @param {{}} entry */ function clearEntry(entry) { V.reminders.splice(V.reminders.indexOf(entry), 1); replace(); } // We only want to remove visible entries function clearOverdue() { V.reminders = V.reminders.filter(e => e.week >= V.week || e.week > V.week + maxFuture || !includedCategory(e.category)); replace(); } function clearAll() { V.reminders = V.reminders.filter(e => e.week > V.week + maxFuture || !includedCategory(e.category)); replace(); } let outerSpan = document.createElement("span"); outerSpan.id = "reminder-list"; let overdue = 0, any = false; V.reminders.filter(e => e.week <= V.week + maxFuture && includedCategory(e.category)) .forEach(entry => { any = true; let week; let classes = []; // has to be an array, because makeElement takes no empty strings, but empty arrays. if (entry.week < V.week) { classes = ["red"]; week = `${numberWithPluralOne(-(entry.week - V.week), 'week')} ago`; overdue++; } else if (entry.week === V.week) { classes = ["orange"]; week = "today"; } else { if (entry.week <= V.week + 5) { classes = ["green"]; } week = `in ${numberWithPluralOne(entry.week - V.week, 'week')}`; } const div = document.createElement("div"); div.append(entry.message, " ", App.UI.DOM.makeElement("span", week.toString(), classes), " ", App.UI.DOM.link("Clear", clearEntry, [entry])); outerSpan.append(div); }); if (overdue > 0) { outerSpan.append(App.UI.DOM.makeElement("div", App.UI.DOM.link("Clear Overdue", clearOverdue))); } if (any) { outerSpan.append(App.UI.DOM.makeElement("div", App.UI.DOM.link("Clear all", clearAll))); if (link) { outerSpan.append(App.UI.DOM.makeElement("div", App.UI.DOM.passageLink("Manage Reminders", "Manage Personal Affairs",))); } } return outerSpan; }; /** * @returns {HTMLDivElement} */ App.Reminders.addField = function() { const div = document.createElement("div"); let entry = ""; let week = 0; div.append(App.UI.DOM.makeTextBox("", v => { entry = v; }), " in ", App.UI.DOM.makeTextBox(0, v => { week = v; }, true), " weeks.", " ", App.UI.DOM.passageLink("Add", passage(), () => { App.Reminders.add(entry, V.week + week); })); return div; }; /** * @returns {DocumentFragment} */ App.Reminders.fullDisplay = function() { let fragment = document.createDocumentFragment(); fragment.append(App.UI.DOM.makeElement("h2", "Reminders")); let list = App.Reminders.list(); if (list !== null) { fragment.append(App.UI.DOM.makeElement("p", list, "indent")); } fragment.append(App.UI.DOM.makeElement("h3", "Add new")); fragment.append(App.UI.DOM.makeElement("p", App.Reminders.addField())); return fragment; };
MonsterMate/fc
src/Mods/Reminder/reminder.js
JavaScript
mit
4,020
:: SecExpBackwardCompatibility [nobr] <<run App.SecExp.generalBC()>> /* base stats */ <<fixBrokenStats>> /* recalculation widgets */
MonsterMate/fc
src/Mods/SecExp/SecExpBackwardCompatibility.tw
tw
mit
133
:: attackGenerator [nobr] /* _attackChance value is the chance out of 100 of an attack happening this week */ /* attacks are deactivated if the arcology is in the middle of the ocean, security drones are not around yet, there is not a rebellion this week or the last attack/rebellion happened within 3 weeks */ <<if $terrain == "oceanic" || $arcologyUpgrade.drones != 1 || $SecExp.battles.lastEncounterWeeks <= 3 || $citizenRebellion == 1 || $slaveRebellion == 1 || $SecExp.rebellions.lastEncounterWeeks <= 3>> <<set _attackChance = 0>> <<else>> <<if $week < 30>> <<set _attackChance = 5>> <<elseif $week < 60>> <<set _attackChance = 8>> <<elseif $week < 90>> <<set _attackChance = 12>> <<elseif $week < 120>> <<set _attackChance = 16>> <<else>> <<set _attackChance = 20>> <</if>> <<if $SecExp.battles.victories + $SecExp.battles.losses > 0>> <<set _attackChance = 25>> <</if>> <<if $SecExp.battles.lastEncounterWeeks >= 10>> <<set _attackChance += 5>> <</if>> <</if>> /* battle frequency */ <<set _attackChance *= $SecExp.settings.battle.frequency>> <<if $SecExp.settings.battle.force == 1 && $SecExp.settings.rebellion.force != 1 && $foughtThisWeek == 0>> <<set _attackChance = 100>> <</if>> /* Rolls to see if attack happens this week */ /* raiders are attracted by low security */ /* the old world by "degenerate" future societies */ /* free Cities by high prosperity */ /* freedom fighters by high slave/citizen ratio */ <<if random(1,100) <= _attackChance>> <<set $attackThisWeek = 1>> <<set $SecExp.battles.lastEncounterWeeks = 0>> <<set $leadingTroops = "assistant">> <<set $chosenTactic = either("Bait and Bleed", "Blitzkrieg", "Choke Points", "Defense In Depth", "Guerrilla", "Human Wave", "Interior Lines", "Pincer Maneuver")>> /* _type is the chance out of 100 of an attack of that type happening */ <<set _raider = 25>> <<set _oldWorld = 25>> <<set _freeCity = 25>> <<set _free = 25>> /* old world */ <<if $arcologies[0].FSRomanRevivalist != "unset" || $arcologies[0].FSEdoRevivalist != "unset" || $arcologies[0].FSArabianRevivalist != "unset" || $arcologies[0].FSChineseRevivalist != "unset" || $arcologies[0].FSEgyptianRevivalist != "unset" || $arcologies[0].FSAztecRevivalist != "unset" || $arcologies[0].FSRepopulationFocus != "unset" || $arcologies[0].FSGenderRadicalist != "unset" || $arcologies[0].FSPastoralist != "unset" || $arcologies[0].FSChattelReligionist != "unset" || $arcologies[0].FSNeoImperialist != "unset">> <<set _oldWorld += 15>> <<set _raider -= 5>> <<set _freeCity -= 5>> <<set _free -= 5>> <<elseif ($arcologies[0].FSRomanRevivalist != "unset" || $arcologies[0].FSEdoRevivalist != "unset" || $arcologies[0].FSArabianRevivalist != "unset" || $arcologies[0].FSChineseRevivalist != "unset" || $arcologies[0].FSEgyptianRevivalist != "unset" || $arcologies[0].FSAztecRevivalist != "unset") && ($arcologies[0].FSRepopulationFocus != "unset" || $arcologies[0].FSGenderRadicalist != "unset" || $arcologies[0].FSPastoralist != "unset" || $arcologies[0].FSChattelReligionist != "unset" || $arcologies[0].FSNeoImperialist != "unset")>> <<set _oldWorld += 24>> <<set _raider -= 8>> <<set _freeCity -= 8>> <<set _free -= 8>> <</if>> /* freedom fighter */ <<if $ASlaves > $ACitizens * 2>> <<set _oldWorld -= 8>> <<set _raider -= 8>> <<set _freeCity -= 8>> <<set _free += 24>> <<elseif $ASlaves > $ACitizens * 1.2 || $arcologies[0].FSDegradationist != "unset">> <<set _oldWorld -= 5>> <<set _raider -= 5>> <<set _freeCity -= 5>> <<set _free += 15>> <</if>> /* Free Cities */ <<if $arcologies[0].prosperity >= 10 && $arcologies[0].prosperity < 20>> <<set _oldWorld -= 5>> <<set _raider -= 5>> <<set _freeCity += 15>> <<set _free -= 5>> <<elseif $arcologies[0].prosperity >= 20>> <<set _oldWorld -= 8>> <<set _raider -= 8>> <<set _freeCity += 24>> <<set _free -= 8>> <</if>> /* raiders */ <<if $SecExp.core.security <= 50>> <<set _oldWorld -= 5>> <<set _raider += 15>> <<set _freeCity -= 5>> <<set _free -= 5>> <<elseif $SecExp.core.security <= 25>> <<set _oldWorld -= 8>> <<set _raider += 24>> <<set _freeCity -= 8>> <<set _free -= 8>> <</if>> /* makes the actual roll */ <<set _roll = random(1,100)>> <<if _roll <= _raider>> <<set $attackType = "raiders">> <<elseif _roll <= _raider + _oldWorld>> <<set $attackType = "old world">> <<elseif _roll <= _raider + _oldWorld + _freeCity>> <<set $attackType = "free city">> <<elseif _roll <= _raider + _oldWorld + _freeCity + _free>> <<set $attackType = "freedom fighters">> <</if>> <<else>> <<set $SecExp.battles.lastEncounterWeeks++>> <</if>> /* if an attack happens */ <<if $attackThisWeek == 1>> /* terrain */ <<if $terrain == "urban">> <<set $battleTerrain = either("outskirts", "urban", "wasteland")>> <<elseif $terrain == "rural">> <<set $battleTerrain = either("hills", "outskirts", "rural", "wasteland")>> <<elseif $terrain == "ravine">> <<set $battleTerrain = either("hills", "mountains", "outskirts", "wasteland")>> <<elseif $terrain == "marine">> <<set $battleTerrain = either("coast", "hills", "outskirts", "wasteland")>> <<elseif $terrain == "oceanic">> <<set $battleTerrain = either("coast", "hills", "outskirts", "wasteland")>> <<else>> <<set $battleTerrain = "error">> <</if>> <<set _L=0>> <<if $attackType == "raiders">> <<set $attackTroops = random(40,80),_L=1>> <<elseif $attackType == "free city">> <<set $attackTroops = random(20,40)>> <<elseif $attackType == "old world">> <<set $attackTroops = random(25,50)>> <<elseif $attackType == "freedom fighters">> <<set $attackTroops = random(30,60)>> <</if>> <<if $week < 30>> /*<<set $attackTroops *= Math.trunc(random( (1*(1.01+($week/100))), (2*(1.01+($week/100))) ))>>*/ <<set $attackTroops *= random(1,2)>> <<elseif $week < 60>> /*<<set $attackTroops *= Math.trunc(random( (1*(1.01+($week/200))), (3*(1.01+($week/200))) ))>>*/ <<set $attackTroops *= random(1,3)>> <<elseif $week < 90>> /*<<set $attackTroops *= Math.trunc(random( (2*(1.01+($week/300))), (3*(1.01+($week/300))) ))>>*/ <<set $attackTroops *= random(2,3)>> <<elseif $week < 120>> /*<<set $attackTroops *= Math.trunc(random( (2*(1.01+($week/400))), (4*(1.01+($week/400))) ))>>*/ <<set $attackTroops *= random(2,4)>> <<else>> <<set $attackTroops *= random(3,5)>> <</if>> <<if $week < 60>> <<set $attackEquip = random(0,1)>> <<elseif $week < 90>> <<set $attackEquip = random(0,3-_L)>> /*"raiders" <<set $attackEquip = random(0,2)>>*/ <<elseif $week < 120>> <<set $attackEquip = random(1-_L,3)>> /*"raiders" <<set $attackEquip = random(0,3)>>*/ <<else>> <<set $attackEquip = random(2-_L,4-_L)>> /*"raiders" <<set $attackEquip = random(1,3)>>*/ <</if>> /* major battles have a 50% chance of firing after week 120 */ <<if $SecExp.settings.battle.major.enabled == 1>> <<if ($week >= 120 && $attackType != "none") || ($SecExp.settings.battle.major.force == 1 && $foughtThisWeek == 0)>> <<if random(1,100) >= 50 || $SecExp.settings.battle.major.force == 1>> <<set $majorBattle = 1>> <<if $SF.Toggle && $SF.Active >= 1>> <<set $attackTroops = Math.trunc($attackTroops * random(4,6) * $SecExp.settings.battle.major.mult)>> <<set $attackEquip = either(3,4)>> <<else>> <<set $attackTroops = Math.trunc($attackTroops * random(2,3) * $SecExp.settings.battle.major.mult)>> <<set $attackEquip = either(2,3,4)>> <</if>> <</if>> <</if>> <</if>> <</if>>
MonsterMate/fc
src/Mods/SecExp/attackGenerator.tw
tw
mit
7,485
:: attackHandler [nobr] <<set $nextButton = " ", $nextLink = "attackReport", $encyclopedia = "Battles">> <<if $battleResult == 1 || $battleResult == -1>> /* bribery/surrender check */ <<if $SecExp.settings.showStats == 1>> <<if $battleResult == 1>>Bribery<<else>>Surrender<</if>> chosen <</if>> <<if $battleResult == 1>> <<if $cash >= App.SecExp.battle.bribeCost()>> /* if there's enough cash there's a 10% chance bribery fails. If there isn't there's instead a 50% chance it fails */ <<if $attackType == "freedom fighters" && random(1,100) <= 50 || random(1,100) <= 10>> <<set $battleResult = 0>> <</if>> <<else>> <<if random(1,100) <= 50>> <<set $battleResult = 0>> <</if>> <</if>> <<if $SecExp.settings.showStats == 1>> <br>Bribery <<if $battleResult == 0>>failed<<else>>Successful<</if>>! <br><br>[[proceed|attackReport]] <<else>> <<goto "attackReport">> <</if>> <<else>> <<goto "attackReport">> <</if>> <<else>> /*Init*/ <<if $majorBattle == 0>> <<set _turns = $maxTurns>> <</if>> <<set _attack = 0>> <<set _defense = 0>> <<set _morale = 0>> <<set _hp = 0>> <<set _baseHp = 0>> <<set _enemyAttack = 0>> <<set _enemyDefense = 0>> <<set _enemyMorale = 0>> <<set _enemyHp = 0>> <<set _enemyBaseHp = 0>> <<set _woundChance = 5>> /* leader has a base chance of 5% to get wounded */ <<set _tacChance = 0.5>> /* by default tactics have a 50% chance of succeeding */ <<set _atkMod = 1>> <<set _defMod = 1>> <<set _militiaMod = 1>> <<set _slaveMod = 1>> <<set _mercMod = 1>> <<set _enemyMod = 1>> <<set _SFMod = 1>> <<set _armyMod = 0>> /* major battle */ <<if $majorBattle == 1>> <<set _militiaMod = 1.5>> <<set _slaveMod = 1.5>> <<set _mercMod = 1.5>> <<set _enemyMod = 1.5>> <<set _SFMod = 1.5>> <<set _turns = $maxTurns * 2>> <<if $SF.Toggle && $SF.Active >= 1>> <<if $SF.Squad.Firebase >= 7>> <<set _atkMod += ($SF.Squad.Firebase - 6) * 0.05>> <</if>> <<if $SF.Squad.GunS >= 1>> <<set _defMod += $SF.Squad.GunS * 0.05>> <</if>> <<if $SF.Squad.Satellite >= 5 && $SF.SatLaunched > 0>> <<set _atkMod += ($SF.Squad.Satellite - 5) * 0.05>> <</if>> <<if $SF.Squad.GiantRobot >= 6>> <<set _defMod += ($SF.Squad.GiantRobot - 5) * 0.05>> <</if>> <<if $SF.Squad.MissileSilo >= 1>> <<set _atkMod += $SF.Squad.MissileSilo * 0.05>> <</if>> <</if>> <</if>> /* Leaders */ <<if $leadingTroops == "PC">> <<if $SecExp.core.authority <= 2500 && $SecExp.core.authority > 1000>> <<set _slaveMod -= 0.10>> <<elseif $SecExp.core.authority <= 1000>> <<set _slaveMod -= 0.25>> <<elseif $SecExp.core.authority >= 5000 && $SecExp.core.authority < 15000>> <<set _slaveMod += 0.10>> <<elseif $SecExp.core.authority >= 15000>> <<set _slaveMod += 0.25>> <</if>> <<if $PC.career == "escort" || $PC.career == "servant">> <<set _slaveMod += 0.10>> <<elseif $PC.career == "slaver">> <<set _slaveMod -= 0.10>> <</if>> <<if $rep <= 2500 && $rep > 1000>> <<set _militiaMod -= 0.10>> <<elseif $rep <= 1000>> <<set _militiaMod -= 0.25>> <<elseif $rep >= 5000 && $rep < 15000>> <<set _militiaMod += 0.10>> <<elseif $rep >= 15000>> <<set _militiaMod += 0.25>> <</if>> <<if $PC.career == "celebrity" || $PC.career == "capitalist">> <<set _militiaMod += 0.10>> <<elseif $PC.career == "gang" || $PC.career == "escort">> <<set _militiaMod -= 0.10>> <</if>> <<if $PC.career == "mercenary" || $PC.skill.warfare > 75>> <<set _mercMod += 0.10>> <<set _SFMod += 0.10>> <<elseif $PC.career == "wealth" || $PC.career == "servant">> <<set _mercMod -= 0.10>> <<set _SFMod -= 0.10>> <</if>> <<if $rep >= 15000>> <<set _enemyMod -= 0.10>> <</if>> <<if $PC.skill.warfare <= 25 && $PC.skill.warfare > 10>> <<set _atkMod -= 0.15>> <<set _tacChance -= 0.15>> <<elseif $PC.skill.warfare <= 10>> <<set _atkMod -= 0.20>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.30>> <<elseif $PC.skill.warfare >= 50 && $PC.skill.warfare < 75>> <<set _atkMod += 0.15>> <<set _tacChance += 0.15>> <<elseif $PC.skill.warfare >= 75>> <<set _atkMod += 0.20>> <<set _defMod += 0.10>> <<set _tacChance += 0.30>> <</if>> /* 80% chance of increasing warfare */ <<if $PC.skill.warfare < 100 && random(1,100) <= 80>> <<set $gainedWarfare = 1>> <<= IncreasePCSkills('warfare', 10)>> <<set $PC.skill.warfare = Math.clamp($PC.skill.warfare,-100,100)>> <</if>> /* does the PC get wounded? */ <<if $PC.career == "mercenary" || $PC.career == "gang">> <<set _woundChance -= 3>> <<elseif $PC.skill.warfare >= 75>> <<set _woundChance -= 2>> <</if>> <<if $PC.physicalAge >= 60>> <<set _woundChance += 1>> <</if>> <<if $PC.belly > 5000>> <<set _woundChance += 1>> <</if>> <<if $PC.boobs >= 1000>> <<set _woundChance += 1>> <</if>> <<if $PC.butt >= 4>> <<set _woundChance += 1>> <</if>> <<if $PC.preg >= 30>> <<set _woundChance += 1>> <</if>> <<if $PC.balls >= 20>> <<set _woundChance += 1>> <</if>> <<if $PC.balls >= 9>> <<set _woundChance += 1>> <</if>> <<if random(1,100) <= _woundChance>> <<set $leaderWounded = 1>> <<set _militiaMod -= 0.2>> <<set _slaveMod -= 0.2>> <<set _mercMod -= 0.2>> <<set _SFMod -= 0.2>> <<set _enemyMod += 0.2>> <<run healthDamage($PC, 60)>> <</if>> <<elseif $leadingTroops == "assistant">> <<if $rep < 10000 && $SecExp.core.authority < 10000>> <<set _militiaMod -= 0.15>> <<set _slaveMod -= 0.15>> <<set _mercMod -= 0.15>> <<set _SFMod -= 0.15>> <</if>> <<if $assistant.power == 0>> <<set _atkMod -= 0.10>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.20>> <<elseif $assistant.power == 2>> <<set _atkMod += 0.10>> <<set _defMod += 0.10>> <<set _tacChance += 0.20>> <<elseif $assistant.power >= 3>> <<set _atkMod += 0.15>> <<set _defMod += 0.15>> <<set _tacChance += 0.30>> <</if>> <<elseif $leadingTroops == "bodyguard">> <<if _S.Bodyguard.devotion < -20>> <<set _slaveMod -= 0.15>> <<elseif _S.Bodyguard.devotion > 50>> <<set _slaveMod += 0.15>> <</if>> <<if ($rep < 10000 && $SecExp.core.authority < 10000) || _S.Bodyguard.prestige < 1>> <<set _militiaMod -= 0.15>> <<set _mercMod -= 0.15>> <<set _SFMod -= 0.15>> <<elseif _S.Bodyguard.prestige >= 2>> <<set _militiaMod += 0.10>> <<set _mercMod += 0.10>> <<set _SFMod += 0.10>> <</if>> <<set _BGCareerGivesBonus = setup.bodyguardCareers.includes(_S.Bodyguard.career) || setup.HGCareers.includes(_S.Bodyguard.career) || setup.secExCombatPrestige.includes(_S.Bodyguard.prestigeDesc)>> <<set _BGTotalIntelligence = _S.Bodyguard.intelligence+_S.Bodyguard.intelligenceImplant>> <<if _BGCareerGivesBonus && _BGTotalIntelligence > 95>> <<set _atkMod += 0.25>> <<set _defMod += 0.25>> <<set _tacChance += 0.50>> <<elseif _BGTotalIntelligence > 95>> <<set _atkMod += 0.20>> <<set _defMod += 0.15>> <<set _tacChance += 0.35>> <<elseif _BGCareerGivesBonus && _BGTotalIntelligence > 50>> <<set _atkMod += 0.15>> <<set _defMod += 0.10>> <<set _tacChance += 0.25>> <<elseif _BGTotalIntelligence > 50>> <<set _atkMod += 0.10>> <<set _defMod += 0.10>> <<set _tacChance += 0.20>> <<elseif _BGCareerGivesBonus && _BGTotalIntelligence > 15>> <<set _atkMod += 0.10>> <<set _defMod += 0.05>> <<set _tacChance += 0.15>> <<elseif _BGTotalIntelligence > 15>> <<set _atkMod += 0.5>> <<set _defMod += 0.05>> <<set _tacChance += 0.10>> <<elseif !_BGCareerGivesBonus || _BGTotalIntelligence < -50>> <<set _atkMod -= 0.15>> <<set _defMod -= 0.15>> <<set _tacChance -= 0.30>> <<elseif _BGTotalIntelligence < -50>> <<set _atkMod -= 0.15>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.25>> <<elseif !_BGCareerGivesBonus || _BGTotalIntelligence < -15>> <<set _atkMod -= 0.10>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.20>> <<elseif _BGTotalIntelligence < -15>> <<set _atkMod -= 0.10>> <<set _defMod -= 0.05>> <<set _tacChance -= 0.15>> <</if>> /* does she get wounded? */ <<if _S.Bodyguard.skill.combat == 1>> <<set _woundChance -= 2>> <</if>> <<set _woundChance -= 0.25 * (getLimbCount(_S.Bodyguard, 105))>> <<if _S.Bodyguard.health.condition >= 50>> <<set _woundChance -= 1>> <</if>> <<if _S.Bodyguard.weight > 130>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.muscles < -30>> <<set _woundChance += 1>> <</if>> <<if getBestVision(_S.Bodyguard) === 0>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.heels == 1>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.boobs >= 1400>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.butt >= 6>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.belly >= 10000>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.dick >= 8>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.balls >= 8>> <<set _woundChance += 1>> <</if>> <<if _BGTotalIntelligence < -95>> <<set _woundChance += 1>> <</if>> <<if random(1,100) <= _woundChance>> <<set $leaderWounded = 1>> <<set _militiaMod -= 0.2>> <<set _slaveMod -= 0.2>> <<set _mercMod -= 0.2>> <<set _SFMod -= 0.2>> <<set _enemyMod += 0.2>> <</if>> /* 60% chance of getting combat skill if not already have it */ <<if _S.Bodyguard.skill.combat == 0 && random(1,100) <= 60>> <<set $gainedCombat = 1>> <<set _S.Bodyguard.skill.combat = 1>> <</if>> <<elseif $leadingTroops == "headGirl">> <<if _S.HeadGirl.devotion < -20>> <<set _slaveMod -= 0.15>> <<elseif _S.HeadGirl.devotion > 51>> <<set _slaveMod += 0.15>> <</if>> <<if ($rep < 10000 && $SecExp.core.authority < 10000) || _S.HeadGirl.prestige < 1>> <<set _militiaMod -= 0.15>> <<set _mercMod -= 0.15>> <<set _SFMod -= 0.15>> <<elseif _S.HeadGirl.prestige >= 2>> <<set _militiaMod += 0.10>> <<set _mercMod += 0.10>> <<set _SFMod += 0.10>> <</if>> <<if (setup.bodyguardCareers.includes(_S.HeadGirl.career) || setup.HGCareers.includes(_S.HeadGirl.career) || setup.secExCombatPrestige.includes(_S.HeadGirl.prestigeDesc)) && _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 95>> <<set _atkMod += 0.25>> <<set _defMod += 0.25>> <<set _tacChance += 0.50>> <<elseif _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 95>> <<set _atkMod += 0.20>> <<set _defMod += 0.15>> <<set _tacChance += 0.35>> <<elseif (setup.bodyguardCareers.includes(_S.HeadGirl.career) || setup.HGCareers.includes(_S.HeadGirl.career) || setup.secExCombatPrestige.includes(_S.HeadGirl.prestigeDesc)) && _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 50>> <<set _atkMod += 0.15>> <<set _defMod += 0.10>> <<set _tacChance += 0.25>> <<elseif _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 50>> <<set _atkMod += 0.10>> <<set _defMod += 0.10>> <<set _tacChance += 0.20>> <<elseif (setup.bodyguardCareers.includes(_S.HeadGirl.career) || setup.HGCareers.includes(_S.HeadGirl.career) || setup.secExCombatPrestige.includes(_S.HeadGirl.prestigeDesc)) && _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 15>> <<set _atkMod += 0.10>> <<set _defMod += 0.05>> <<set _tacChance += 0.15>> <<elseif _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 15>> <<set _atkMod += 0.05>> <<set _defMod += 0.05>> <<set _tacChance += 0.10>> <<elseif !(setup.bodyguardCareers.includes(_S.HeadGirl.career) && setup.HGCareers.includes(_S.HeadGirl.career) && setup.secExCombatPrestige.includes(_S.HeadGirl.prestigeDesc)) || _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant < -50>> <<set _atkMod -= 0.15>> <<set _defMod -= 0.15>> <<set _tacChance -= 0.30>> <<elseif _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant < -50>> <<set _atkMod -= 0.15>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.25>> <<elseif !(setup.bodyguardCareers.includes(_S.HeadGirl.career) && setup.HGCareers.includes(_S.HeadGirl.career) && setup.secExCombatPrestige.includes(_S.HeadGirl.prestigeDesc)) || _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant < -15>> <<set _atkMod -= 0.10>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.20>> <<elseif _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant < -15>> <<set _atkMod -= 0.10>> <<set _defMod -= 0.05>> <<set _tacChance -= 0.15>> <</if>> /* does she get wounded? */ <<if _S.HeadGirl.skill.combat == 1>> <<set _woundChance -= 3>> <</if>> <<set _woundChance -= 0.25 * (getLimbCount(_S.HeadGirl, 105))>> <<if _S.HeadGirl.health.condition >= 50>> <<set _woundChance -= 2>> <</if>> <<if _S.HeadGirl.weight > 130>> <<set _woundChance += 1>> <</if>> <<if _S.HeadGirl.muscles < -30>> <<set _woundChance += 1>> <</if>> <<if getBestVision(_S.HeadGirl) === 0>> <<set _woundChance += 1>> <</if>> <<if _S.HeadGirl.heels == 1>> <<set _woundChance += 1>> <</if>> <<if _S.HeadGirl.boobs >= 1400>> <<set _woundChance += 1>> <</if>> <<if _S.HeadGirl.butt >= 6>> <<set _woundChance += 1>> <</if>> <<if _S.HeadGirl.belly >= 10000>> <<set _woundChance += 1>> <</if>> <<if _S.HeadGirl.dick >= 8>> <<set _woundChance += 1>> <</if>> <<if _S.HeadGirl.balls >= 8>> <<set _woundChance += 1>> <</if>> <<if _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant < -95>> <<set _woundChance += 1>> <</if>> <<if random(1,100) <= _woundChance>> <<set $leaderWounded = 1>> <<set _militiaMod -= 0.2>> <<set _slaveMod -= 0.2>> <<set _mercMod -= 0.2>> <<set _SFMod -= 0.2>> <<set _enemyMod += 0.2>> <</if>> /* 60% chance of getting combat skill if not already have it */ <<if _S.HeadGirl.skill.combat == 0 && random(1,100) <= 60>> <<set $gainedCombat = 1>> <<set _S.HeadGirl.skill.combat = 1>> <</if>> <<elseif $leadingTroops == "citizen">> <<if $arcologies[0].FSDegradationist == "unset" && $arcologies[0].FSPaternalist == "unset">> <<set _militiaMod += 0.15>> <<set _slaveMod -= 0.15>> <<elseif $arcologies[0].FSPaternalist != "unset">> <<set _militiaMod += 0.15>> <<set _slaveMod += 0.10>> <<elseif $arcologies[0].FSDegradationist != "unset">> <<set _militiaMod += 0.15>> <<set _slaveMod -= 0.35>> <</if>> <<if $arcologies[0].FSRomanRevivalist != "unset" || $arcologies[0].FSNeoImperialist != "unset">> <<set _mercMod += 0.10>> <<set _SFMod += 0.10>> <<else>> <<set _mercMod -= 0.10>> <<set _SFMod -= 0.10>> <</if>> <<set _atkMod += either(-1,1) * random(10) * 0.1>> <<set _defMod += either(-1,1) * random(10) * 0.1>> <<set _tacChance += either(-1,1) * random(20) * 0.1>> <<elseif $leadingTroops == "mercenary">> <<set _mercMod += 0.10>> <<set _SFMod += 0.10>> <<if $arcologies[0].FSRomanRevivalist != "unset" || $arcologies[0].FSNeoImperialist != "unset">> <<set _militiaMod += 0.10>> <<else>> <<set _militiaMod -= 0.10>> <</if>> <<if $arcologies[0].FSDegradationist != "unset">> <<set _slaveMod -= 0.35>> <</if>> <<set _atkMod += random(15) * 0.1>> <<set _defMod += random(15) * 0.1>> <<set _tacChance += random(30) * 0.1>> <<elseif $leadingTroops == "colonel">> <<set _mercMod += 0.10>> <<set _SFMod += 0.15>> <<if $arcologies[0].FSRomanRevivalist != "unset" || $arcologies[0].FSNeoImperialist != "unset">> <<set _militiaMod += 0.10>> <<else>> <<set _militiaMod -= 0.10>> <</if>> <<if $arcologies[0].FSDegradationist != "unset">> <<set _slaveMod -= 0.35>> <</if>> <<set _atkMod += random(30) * 0.1>> <<set _defMod += random(30) * 0.1>> <<set _tacChance += random(40) * 0.1>> <</if>> /* Terrain and Tactics */ <<if $battleTerrain == "urban">> <<if $chosenTactic == "Bait and Bleed">> <<set _atkMod += 0.15>> <<set _defMod += 0.10>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Guerrilla">> <<set _atkMod += 0.10>> <<set _defMod += 0.15>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Choke Points">> <<set _atkMod += 0.10>> <<set _defMod += 0.15>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Interior Lines">> <<set _atkMod += 0.05>> <<set _defMod += 0.10>> <<set _tacChance += 0.15>> <<elseif $chosenTactic == "Pincer Maneuver">> <<set _atkMod -= 0.05>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.15>> <<elseif $chosenTactic == "Defense In Depth">> <<set _atkMod -= 0.05>> <<set _defMod -= 0.05>> <<set _tacChance -= 0.10>> <<elseif $chosenTactic == "Blitzkrieg">> <<set _atkMod -= 0.15>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.25>> <<elseif $chosenTactic == "Human Wave">> <<set _atkMod -= 0.15>> <<set _defMod -= 0.15>> <<set _tacChance -= 0.30>> <</if>> <<elseif $battleTerrain == "rural">> <<if $chosenTactic == "Bait and Bleed">> <<set _atkMod -= 0.05>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.15>> <<elseif $chosenTactic == "Guerrilla">> <<set _atkMod -= 0.10>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.20>> <<elseif $chosenTactic == "Choke Points">> <<set _atkMod -= 0.10>> <<set _defMod -= 0.15>> <<set _tacChance -= 0.25>> <<elseif $chosenTactic == "Interior Lines">> <<set _atkMod += 0.10>> <<set _defMod += 0.15>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Pincer Maneuver">> <<set _atkMod += 0.15>> <<set _defMod += 0.10>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Defense In Depth">> <<set _atkMod += 0.15>> <<set _defMod += 0.15>> <<set _tacChance += 0.30>> <<elseif $chosenTactic == "Blitzkrieg">> <<set _atkMod += 0.15>> <<set _defMod += 0.10>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Human Wave">> <<set _atkMod += 0.20>> <<set _defMod += 0.05>> <<set _tacChance += 0.25>> <</if>> <<elseif $battleTerrain == "hills">> <<if $chosenTactic == "Bait and Bleed">> <<set _atkMod += 0.05>> <<set _defMod += 0.05>> <<set _tacChance += 0.10>> <<elseif $chosenTactic == "Guerrilla">> <<set _atkMod += 0.05>> <<set _defMod += 0.10>> <<set _tacChance += 0.15>> <<elseif $chosenTactic == "Choke Points">> <<set _atkMod += 0.10>> <<set _defMod += 0.10>> <<set _tacChance += 0.20>> <<elseif $chosenTactic == "Interior Lines">> <<set _atkMod -= 0.05>> <<set _defMod -= 0.05>> <<set _tacChance -= 0.10>> <<elseif $chosenTactic == "Pincer Maneuver">> <<set _atkMod += 0.10>> <<set _defMod += 0.05>> <<set _tacChance += 0.15>> <<elseif $chosenTactic == "Defense In Depth">> <<set _atkMod -= 0.10>> <<set _defMod -= 0.05>> <<set _tacChance -= 0.15>> <<elseif $chosenTactic == "Blitzkrieg">> <<set _atkMod -= 0.10>> <<set _defMod -= 0.15>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Human Wave">> <<set _atkMod -= 0.15>> <<set _defMod -= 0.15>> <<set _tacChance -= 0.30>> <</if>> <<elseif $battleTerrain == "coast">> <<if $chosenTactic == "Bait and Bleed">> <<set _atkMod -= 0.05>> <<set _defMod -= 0.05>> <<set _tacChance -= 0.10>> <<elseif $chosenTactic == "Guerrilla">> <<set _atkMod += 0.05>> <<set _defMod += 0.05>> <<set _tacChance += 0.10>> <<elseif $chosenTactic == "Choke Points">> <<set _atkMod += 0.05>> <<set _defMod += 0.15>> <<set _tacChance += 0.15>> <<elseif $chosenTactic == "Interior Lines">> <<set _atkMod += 0.10>> <<set _defMod += 0.10>> <<set _tacChance += 0.20>> <<elseif $chosenTactic == "Pincer Maneuver">> <<set _atkMod -= 0.10>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.20>> <<elseif $chosenTactic == "Defense In Depth">> <<set _atkMod += 0.10>> <<set _defMod += 0.10>> <<set _tacChance += 0.20>> <<elseif $chosenTactic == "Blitzkrieg">> <<set _atkMod -= 0.05>> <<set _defMod -= 0.05>> <<set _tacChance -= 0.10>> <<elseif $chosenTactic == "Human Wave">> <<set _atkMod += 0.05>> <<set _defMod -= 0.05>> <</if>> <<elseif $battleTerrain == "outskirts">> <<if $chosenTactic == "Bait and Bleed">> <<set _atkMod -= 0.10>> <<set _defMod -= 0.15>> <<set _tacChance -= 0.25>> <<elseif $chosenTactic == "Guerrilla">> <<set _atkMod -= 0.10>> <<set _defMod -= 0.05>> <<set _tacChance -= 0.15>> <<elseif $chosenTactic == "Choke Points">> <<set _atkMod += 0.10>> <<set _defMod += 0.15>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Interior Lines">> <<set _atkMod += 0.15>> <<set _defMod += 0.10>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Pincer Maneuver">> <<set _atkMod += 0.05>> <<set _defMod += 0.10>> <<set _tacChance += 0.15>> <<elseif $chosenTactic == "Defense In Depth">> <<set _atkMod += 0.10>> <<set _defMod += 0.15>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Blitzkrieg">> <<set _atkMod += 0.10>> <<set _defMod -= 0.05>> <<set _tacChance += 0.05>> <<elseif $chosenTactic == "Human Wave">> <<set _atkMod += 0.10>> <<set _defMod -= 0.10>> <</if>> <<elseif $battleTerrain == "mountains">> <<if $chosenTactic == "Bait and Bleed">> <<set _atkMod += 0.10>> <<set _defMod += 0.15>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Guerrilla">> <<set _atkMod += 0.10>> <<set _defMod += 0.15>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Choke Points">> <<set _atkMod += 0.05>> <<set _defMod += 0.20>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Interior Lines">> <<set _atkMod += 0.10>> <<set _defMod += 0.10>> <<set _tacChance += 0.20>> <<elseif $chosenTactic == "Pincer Maneuver">> <<set _atkMod += 0.10>> <<set _defMod -= 0.05>> <<set _tacChance += 0.05>> <<elseif $chosenTactic == "Defense In Depth">> <<set _atkMod += 0.10>> <<set _defMod += 0.10>> <<set _tacChance += 0.20>> <<elseif $chosenTactic == "Blitzkrieg">> <<set _atkMod -= 0.10>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.20>> <<elseif $chosenTactic == "Human Wave">> <<set _atkMod -= 0.10>> <<set _defMod -= 0.10>> <<set _tacChance -= 0.20>> <</if>> <<elseif $battleTerrain == "wasteland">> <<if $chosenTactic == "Bait and Bleed">> <<set _atkMod += 0.05>> <<set _defMod += 0.05>> <<set _tacChance += 0.10>> <<elseif $chosenTactic == "Guerrilla">> <<set _atkMod += 0.10>> <<set _defMod += 0.05>> <<set _tacChance += 0.15>> <<elseif $chosenTactic == "Choke Points">> <<set _atkMod -= 0.10>> <<set _defMod += 0.05>> <<set _tacChance -= 0.05>> <<elseif $chosenTactic == "Interior Lines">> <<set _atkMod += 0.10>> <<set _defMod += 0.15>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Pincer Maneuver">> <<set _atkMod += 0.15>> <<set _defMod += 0.10>> <<set _tacChance += 0.25>> <<elseif $chosenTactic == "Defense In Depth">> <<set _atkMod += 0.05>> <<set _defMod += 0.10>> <<set _tacChance += 0.15>> <<elseif $chosenTactic == "Blitzkrieg">> <<set _atkMod += 0.15>> <<set _defMod += 0.15>> <<set _tacChance += 0.30>> <<elseif $chosenTactic == "Human Wave">> <<set _atkMod += 0.20>> <<set _defMod += 0.05>> <<set _tacChance += 0.25>> <</if>> <</if>> <<if $chosenTactic == "Bait and Bleed">> <<if $attackType == "raiders">> <<set _tacChance -= 0.10>> <<elseif $attackType == "free city">> <<set _tacChance += 0.10>> <<elseif $attackType == "old world">> <<set _tacChance += 0.25>> <<elseif $attackType == "freedom fighters">> <<set _tacChance -= 0.15>> <</if>> <<elseif $chosenTactic == "Guerrilla">> <<if $attackType == "raiders">> <<set _tacChance -= 0.20>> <<elseif $attackType == "free city">> <<set _tacChance += 0.15>> <<elseif $attackType == "old world">> <<set _tacChance += 0.25>> <<elseif $attackType == "freedom fighters">> <<set _tacChance -= 0.25>> <</if>> <<elseif $chosenTactic == "Choke Points">> <<if $attackType == "raiders">> <<set _tacChance += 0.25>> <<elseif $attackType == "free city">> <<set _tacChance -= 0.05>> <<elseif $attackType == "old world">> <<set _tacChance -= 0.10>> <<elseif $attackType == "freedom fighters">> <<set _tacChance += 0.05>> <</if>> <<elseif $chosenTactic == "Interior Lines">> <<if $attackType == "raiders">> <<set _tacChance -= 0.15>> <<elseif $attackType == "free city">> <<set _tacChance += 0.15>> <<elseif $attackType == "old world">> <<set _tacChance += 0.20>> <<elseif $attackType == "freedom fighters">> <<set _tacChance -= 0.10>> <</if>> <<elseif $chosenTactic == "Pincer Maneuver">> <<if $attackType == "raiders">> <<set _tacChance += 0.15>> <<elseif $attackType == "free city">> <<set _tacChance += 0.10>> <<elseif $attackType == "old world">> <<set _tacChance -= 0.10>> <<elseif $attackType == "freedom fighters">> <<set _tacChance += 0.15>> <</if>> <<elseif $chosenTactic == "Defense In Depth">> <<if $attackType == "raiders">> <<set _tacChance -= 0.20>> <<elseif $attackType == "free city">> <<set _tacChance += 0.10>> <<elseif $attackType == "old world">> <<set _tacChance += 0.20>> <<elseif $attackType == "freedom fighters">> <<set _tacChance -= 0.05>> <</if>> <<elseif $chosenTactic == "Blitzkrieg">> <<if $attackType == "raiders">> <<set _tacChance += 0.10>> <<elseif $attackType == "free city">> <<set _tacChance -= 0.20>> <<elseif $attackType == "old world">> <<set _tacChance += 0.25>> <<elseif $attackType == "freedom fighters">> <<set _tacChance -= 0.10>> <</if>> <<elseif $chosenTactic == "Human Wave">> <<if $attackType == "raiders">> <<set _tacChance -= 0.10>> <<elseif $attackType == "free city">> <<set _tacChance += 0.10>> <<elseif $attackType == "old world">> <<set _tacChance -= 0.15>> <<elseif $attackType == "freedom fighters">> <<set _tacChance += 0.10>> <</if>> <</if>> /* Calculates if tactics are successful */ /* minimum chance is 10% */ <<if _tacChance <= 0>> <<set _tacChance = 0.1>> <</if>> <<if random(1,100) <= _tacChance * 100>> <<set _enemyMod -= 0.30>> <<set _militiaMod += 0.20>> <<set _slaveMod += 0.20>> <<set _mercMod += 0.20>> <<set _atkMod += 0.10>> <<set _defMod += 0.10>> <<set $tacticsSuccessful = 1>> <<else>> <<set _enemyMod += 0.20>> <<set _militiaMod -= 0.20>> <<set _slaveMod -= 0.20>> <<set _mercMod -= 0.20>> <<set _atkMod -= 0.10>> <<set _defMod -= 0.10>> <<set $tacticsSuccessful = 0>> <</if>> /* enemy morale mods */ <<if $week < 30>> <<set _enemyMod += 0.15>> <<elseif $week < 60>> <<set _enemyMod += 0.30>> <<elseif $week < 90>> <<set _enemyMod += 0.45>> <<elseif $week < 120>> <<set _enemyMod += 0.60>> <<else>> <<set _enemyMod += 0.75>> <</if>> /* calculates PC army stats */ <<if App.SecExp.battle.deployedUnits('bots')>> <<set _unit = App.SecExp.getUnit("Bots")>> <<set _attack += _unit.attack * _atkMod>> <<set _defense += _unit.defense * _defMod>> <<set _hp += _unit.hp>> <</if>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].isDeployed == 1>> <<set _unit = App.SecExp.getUnit("Militia", _i)>> <<set _attack += _unit.attack * _atkMod>> <<set _defense += _unit.defense * _defMod>> <<set _hp += _unit.hp>> <</if>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].isDeployed == 1>> <<set _unit = App.SecExp.getUnit("Slaves", _i)>> <<set _attack += _unit.attack * _atkMod>> <<set _defense += _unit.defense * _defMod>> <<set _hp += _unit.hp>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].isDeployed == 1>> <<set _unit = App.SecExp.getUnit("Mercs", _i)>> <<set _attack += _unit.attack * _atkMod>> <<set _defense += _unit.defense * _defMod>> <<set _hp += _unit.hp>> <</if>> <</for>> <<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> <<set _unit = App.SecExp.getUnit("SF")>> <<set _attack += _unit.attack>> <<set _defense += _unit.defense>> <<set _hp += _unit.hp>> <</if>> /* morale and baseHp calculation */ /* minimum modifier is -50%, maximum is +50% */ <<if _militiaMod < 0.5>> <<set _militiaMod = 0.5>> <<elseif _militiaMod > 1.5>> <<set _militiaMod = 1.5>> <</if>> <<if _slaveMod < 0.5>> <<set _slaveMod = 0.5>> <<elseif _slaveMod > 1.5>> <<set _slaveMod = 1.5>> <</if>> <<if _mercMod < 0.5>> <<set _mercMod = 0.5>> <<elseif _mercMod > 1.5>> <<set _mercMod = 1.5>> <</if>> <<if _SFMod < 0.5>> <<set _SFMod = 0.5>> <<elseif _SFMod > 1.5>> <<set _SFMod = 1.5>> <</if>> <<set _moraleTroopMod = Math.clamp(App.SecExp.battle.troopCount() / 100,1,5)>> <<set _morale = (App.SecExp.BaseDroneUnit.morale * $secBots.isDeployed + App.SecExp.BaseMilitiaUnit.morale * _militiaMod * App.SecExp.battle.deployedUnits('militia') + App.SecExp.BaseSlaveUnit.morale * _slaveMod * App.SecExp.battle.deployedUnits('slaves') + App.SecExp.BaseMercUnit.morale * _mercMod * App.SecExp.battle.deployedUnits('mercs') + App.SecExp.BaseSpecialForcesUnit.morale * $SFIntervention * _SFMod) / ($secBots.isDeployed + App.SecExp.battle.deployedUnits('militia') + App.SecExp.battle.deployedUnits('slaves') + App.SecExp.battle.deployedUnits('mercs') + $SFIntervention)>> <<if $SecExp.buildings.barracks>> <<set _morale = _morale + _morale * $SecExp.buildings.barracks.luxury * 0.05>> /* barracks bonus */ <</if>> <<set _morale *= _moraleTroopMod>> <<set _baseHp = (App.SecExp.BaseDroneUnit.hp * $secBots.isDeployed + App.SecExp.BaseMilitiaUnit.hp * App.SecExp.battle.deployedUnits('militia') + App.SecExp.BaseSlaveUnit.hp * App.SecExp.battle.deployedUnits('slaves') + App.SecExp.BaseMercUnit.hp * App.SecExp.battle.deployedUnits('mercs') + App.SecExp.BaseSpecialForcesUnit.hp * $SFIntervention) / ($secBots.isDeployed + App.SecExp.battle.deployedUnits('militia') + App.SecExp.battle.deployedUnits('slaves') + App.SecExp.battle.deployedUnits('mercs') + $SFIntervention)>> /* calculates enemy army stats */ <<if $week <= 30>> <<set _armyMod = $attackTroops / 80>> <<elseif $week <= 60>> <<set _armyMod = $attackTroops / 75>> <<elseif $week <= 90>> <<set _armyMod = $attackTroops / 70>> <<elseif $week <= 120>> <<set _armyMod = $attackTroops / 65>> <<else>> <<set _armyMod = $attackTroops / 60>> <</if>> <<set _armyMod = Math.trunc(_armyMod)>> <<if $majorBattle == 1>> <<set _armyMod *= 2>> <</if>> <<if _armyMod <= 0>> <<set _armyMod = 1>> <</if>> <<set _enemyMoraleTroopMod = Math.clamp($attackTroops / 100,1,5)>> <<set _unit = App.SecExp.getEnemyUnit($attackType, $attackTroops, $attackEquip)>> <<set _enemyAttack = _unit.attack * _armyMod>> <<set _enemyDefense = _unit.defense * _armyMod>> <<set _enemyMorale = _unit.morale * _enemyMod * _enemyMoraleTroopMod>> <<set _enemyHp = _unit.hp>> <<set _enemyBaseHp = _unit.hp / $attackTroops>> /* difficulty */ <<set _enemyAttack *= $SecExp.settings.difficulty>> <<set _enemyDefense *= $SecExp.settings.difficulty>> <<set _enemyMorale *= $SecExp.settings.difficulty>> <<set _enemyHp *= $SecExp.settings.difficulty>> <<set _enemyBaseHp *= $SecExp.settings.difficulty>> <<if isNaN(_attack)>> <br>@@.red;Error: attack value reported NaN@@ <</if>> <<if isNaN(_defense)>> <br>@@.red;Error: defense value reported NaN@@ <</if>> <<if isNaN(_hp)>> <br>@@.red;Error: hp value reported NaN@@ <</if>> <<if isNaN(_morale)>> <br>@@.red;Error: morale value reported NaN@@ <</if>> <<if isNaN(_enemyAttack)>> <br>@@.red;Error: enemy attack value reported NaN@@ <</if>> <<if isNaN(_enemyDefense)>> <br>@@.red;Error: enemy defense value reported NaN@@ <</if>> <<if isNaN(_enemyHp)>> <br>@@.red;Error: enemy hp value reported NaN@@ <</if>> <<if isNaN(_enemyMorale)>> <br>@@.red;Error: enemy morale value reported NaN@@ <</if>> <<if $SecExp.settings.showStats == 1>> <<set _atkMod -= 1, _defMod -= 1, _militiaMod -= 1, _mercMod -= 1, _slaveMod -= 1, _SFMod -= 1, _enemyMod -= 1, _moraleTroopMod -= 1, _enemyMoraleTroopMod -= 1, _difficulty = $SecExp.settings.difficulty -1>> <<set _atkMod = Math.round(_atkMod * 100)>> <<set _defMod = Math.round(_defMod * 100)>> <<set _militiaMod = Math.round(_militiaMod * 100)>> <<set _mercMod = Math.round(_mercMod * 100)>> <<set _slaveMod = Math.round(_slaveMod * 100)>> <<set _SFMod = Math.round(_SFMod * 100)>> <<set _enemyMod = Math.round(_enemyMod * 100)>> <<if $SecExp.buildings.barracks>> <<set _barracksBonus = $SecExp.buildings.barracks.luxury * 5>> <</if>> <<set _moraleTroopMod = Math.round(_moraleTroopMod * 100)>> <<set _enemyMoraleTroopMod = Math.round(_enemyMoraleTroopMod * 100)>> <<set _difficulty *= 100>> __Difficulty__:<br> <<if $SecExp.settings.difficulty == 0.5>> Very easy <<elseif $SecExp.settings.difficulty == 0.75>> Easy <<elseif $SecExp.settings.difficulty == 1>> Normal <<elseif $SecExp.settings.difficulty == 1.25>> Hard <<elseif $SecExp.settings.difficulty == 1.5>> Very hard <<else>> Extremly hard <</if>> <br><br>__Army__: <br>troops: <<print num(Math.round(App.SecExp.battle.troopCount()))>> <br>attack: <<print num(Math.round(_attack))>> <br>defense: <<print num(Math.round(_defense))>> <br>hp: <<print num(Math.round(_hp))>> <br>morale: <<print num(Math.round(_morale))>> <br>attack modifier: <<if _atkMod > 0>>+<</if>>_atkMod% <br>defense modifier: <<if _defMod > 0>>+<</if>>_defMod% <br>average base HP: <<print num(Math.round(_baseHp))>> <br>militia morale modifier: <<if _militiaMod > 0>>+<</if>>_militiaMod% <br>slaves morale modifier: <<if _slaveMod > 0>>+<</if>>_slaveMod% <br>mercenaries morale modifier: <<if _mercMod > 0>>+<</if>>_mercMod% <<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> <br>special force morale modifier: <<if _SFMod > 0>>+<</if>>_SFMod% <</if>> <<if $SecExp.buildings.barracks && $SecExp.buildings.barracks.luxury >= 1>> <br>Barracks bonus morale modifier: +<<print _barracksBonus>>% <</if>> <<if _moraleTroopMod>> <br>morale increase due to troop numbers: +<<print _moraleTroopMod>>% <</if>> <br><br>__Tactics__: <br>tactic chance of success: <<print num(Math.round(_tacChance * 100))>>% <br>was tactic chosen successful?: <<if $tacticsSuccessful == 1>> yes <<else>> no<</if>> <br><br>__Enemy__: <br>enemy troops: <<print num(Math.round($attackTroops))>> <br>enemy attack: <<print num(Math.round(_enemyAttack))>> <br>enemy defense: <<print num(Math.round(_enemyDefense))>> <br>enemy Hp: <<print num(Math.round(_enemyHp))>> <br>enemy morale: <<print num(Math.round(_enemyMorale))>> <br>enemy base Hp: <<print num(Math.round(_enemyBaseHp))>> <br>enemy morale modifier: <<if _enemyMod > 0>>+<</if>>_enemyMod% <<if _enemyMoraleTroopMod > 0>> <br>enemy morale increase due to troop numbers: +<<print _enemyMoraleTroopMod>>% <</if>> <br>Difficulty modifier: <<if _difficulty > 0>>+<</if>><<print _difficulty>>% <</if>> /* simulates the combat by pitting attk against def */ <<for _i = 0; _i < _turns; _i++>> <<if $SecExp.settings.showStats == 1>> <br><br>turn: <<print _i + 1>><</if>> /* player army attacks */ <<set _damage = Math.clamp(_attack - _enemyDefense,_attack * 0.1,_attack)>> <<if $SecExp.settings.showStats == 1>> <br>player damage: <<print num(Math.round(_damage))>><</if>> <<set _enemyHp -= _damage>> <<if $SecExp.settings.showStats == 1>> <br>remaining enemy Hp: <<print num(Math.round(_enemyHp))>><</if>> <<set $enemyLosses += _damage / _enemyBaseHp>> <<set _moraleDamage = Math.clamp(_damage / 2 + _damage / _enemyBaseHp,0,_damage*1.5)>> <<set _enemyMorale -= _moraleDamage>> <<if $SecExp.settings.showStats == 1>> <br>remaining enemy morale: <<print num(Math.round(_enemyMorale))>><</if>> <<if _enemyHp <= 0 || _enemyMorale <= 0>> <<if $SecExp.settings.showStats == 1>> <br><br>Victory!<</if>> <<set $battleResult = 3>> <<set $battleTurns = _i>> <<break>> <</if>> /* attacker army attacks */ <<set _damage = _enemyAttack - _defense>> <<if _damage < _enemyAttack * 0.1>> <<set _damage = _enemyAttack * 0.1>> <</if>> <<if $SecExp.settings.showStats == 1>> <br>enemy damage: <<print num(Math.round(_damage))>><</if>> <<set _hp -= _damage>> <<if $SecExp.settings.showStats == 1>> <br>remaining hp: <<print num(Math.round(_hp))>><</if>> <<set $losses += _damage / _baseHp>> <<set _moraleDamage = Math.clamp(_damage / 2 + _damage / _baseHp,0,_damage*1.5)>> <<set _morale -= _moraleDamage>> <<if $SecExp.settings.showStats == 1>> <br>remaining morale: <<print Math.round(_morale)>><</if>> <<if _hp <= 0 || _morale <= 0>> <<if $SecExp.settings.showStats == 1>> <br><br>Defeat!<</if>> <<set $battleResult = -3>> <<set $battleTurns = _i>> <<break>> <</if>> <</for>> <<if $battleResult != 3 && $battleResult != -3>> <<if _morale > _enemyMorale>> <<if $SecExp.settings.showStats == 1>> <br><br>Partial victory!<</if>> <<set $battleResult = 2>> <<elseif _morale < _enemyMorale>> <<if $SecExp.settings.showStats == 1>> <br><br>Partial defeat!<</if>> <<set $battleResult = -2>> <</if>> <</if>> <<if $SecExp.settings.showStats == 1>> <br><br>Losses: <<print num(Math.trunc($losses))>> <br>Enemy losses: <<print num(Math.trunc($enemyLosses))>> <</if>> <<if $battleResult > 3 || $battleResult < -3>> <br><br>@@.red;Error: failed to determine battle result@@ <</if>> <<if $SecExp.settings.showStats == 1>> <<if $majorBattle == 1 && $SecExp.settings.battle.major.gameOver == 1 && $battleResult == -3>> <br><br>[[Proceed|Gameover][$gameover = "major battle defeat"]] <<else>> <br><br>[[Proceed|attackReport]] <</if>> <<else>> <<if $majorBattle == 1 && $SecExp.settings.battle.major.gameOver == 1 && $battleResult == -3>> <<set $gameover = "major battle defeat">> <<goto "Gameover">> <<else>> <<goto "attackReport">> <</if>> <</if>> <</if>> /* closes check for bribery */
MonsterMate/fc
src/Mods/SecExp/attackHandler.tw
tw
mit
38,009
:: attackOptions [nobr] <<if ndef $SecExp.settings.unitDescriptions>> <<set $SecExp.settings.unitDescriptions = 0>> <</if>> <<set $nextButton = " ", $nextLink = "attackOptions", $encyclopedia = "Battles">> <<set _options = new App.UI.OptionsGroup()>> <<run _options.addOption("Unit descriptions are", "unitDescriptions", $SecExp.settings) .addValueList([["Abbreviated", 1], ["Summarized", 0]])>> <<includeDOM _options.render()>> <br> <strong> <<if $majorBattle == 1>>Major<</if>> Attack Imminent</strong> <hr> <<if $majorBattle == 0>> <<if $SecExp.battles.victories + $SecExp.battles.losses > 0>> The ominous message dominates the screens of your office, and <<print $assistant.name>> quickly gathers all information available to prepare for battle. <<if $attackType == "raiders">> <<if App.SecExp.battle.recon() >= 1>> A disorganized horde of raiders is coming to your city. To such jackals your arcology surely looks like an appetizing morsel. Fortunately you knew of their coming, thanks to your recon systems. <<else>> Some of your citizens saw the disorganized horde of raiders coming towards the city and quickly reported it. To such jackals your arcology surely looks like an appetizing morsel. <</if>> <br>Raiders are roaming gangs of bandits, preying on the vulnerable supply lines of Free Cities and old world nations. They are rarely equipped with decent armaments and even more rarely have any formal military training, but they make up for that with high mobility and numbers. <<elseif $attackType == "free city">> <<if App.SecExp.battle.recon() >= 1>> A menacing column of slavers and hired mercenaries is coming to your city. Another free city is ready to use their best tools to hit a dangerous competitor where it hurts. Fortunately you knew of their coming, thanks to your recon systems. <<else>> Some of your citizens saw the menacing column of slavers and hired mercenaries and rushed to your office to bring the grim news. Another free city is ready to use their best tools to bring down a dangerous competitor. <</if>> <br>Free City expeditions are usually composed of mercenaries hired to take down sensible supplies or infrastructure in order to damage the enemies of their contractor. They have on average good equipment and training, together with decent mobility, making them a formidable force. Their biggest weakness however is their relatively low numbers. <<elseif $attackType == "freedom fighters">> <<if App.SecExp.battle.recon() >= 1>> A dangerous looking army of guerrillas is gathering just outside the arcology. Fanatics and idealists armed with dead men's words and hope, set on erasing your fledgling empire. Fortunately you knew of their coming, thanks to your recon systems. <<else>> Some of your citizens saw the dangerous looking army of guerrillas is gathering just outside the arcology. Fanatics and idealists armed with dead men's words and hope, set on erasing your fledgling empire. <</if>> <br>Freedom Fighters are groups of individuals fighting to rid the planet of "evils" such as the Free Cities and their way of life. Lacking the strength to assault one directly they fight guerrilla style slowly starving to death their enemies. They are rarely well equipped, but with good training and mobility they are not a threat that can be taken lightly. <<elseif $attackType == "old world">> <<if App.SecExp.battle.recon() >= 1>> A disciplined yet dusty, scruffy old world army is approaching the confines of your arcology. There's nothing better than a good war to unite the electorate and your arcology is just the perfect target. Fortunately you knew of their coming, thanks to your recon systems. <<else>> Some of your citizens saw the disciplined yet dusty, scruffy old world army is approaching the confines of your arcology. There's nothing better than a good war to unite the electorate and your arcology is just the perfect target. <</if>> <br>Old world expeditions are usually sent to secure resources and trade routes for their nation or, more often, to provide their citizens with a bogeyman to be scared of. They are usually decently equipped and trained, which together with their generous numbers make them a tough nut to crack. However, they often lack in mobility. <</if>> <<else>> Your assistant interrupted your rest to bring the grim news. You quickly rush to your console, where you can see one of the convoys supplying your arcology has been attacked and looted. It seems a group of desperate looking bandits decided it was a good idea to steal from you. Due to their great wealth, Free Cities inevitably become tasty morsels for anyone able to field armed men. Considering the particular needs of arcologies their supply lines tend to be delicate lifelines, often preyed upon by those who stand to gain from the free city downfall. <</if>> <<else>> <<if $SecExp.battles.major > 0>> The ominous message dominates the screens of your office, and <<print $assistant.name>> quickly gathers all information available to prepare for the major battle ahead. <<else>> Your assistant interrupted your rest to bring the grim news. You quickly rush to your console, where you can see the satellite images coming in of the force about to crash against your arcology. It's not the first time your armies fought for the survival of your empire, but this time it seems it will be a fight for life or death. <</if>> <<if $attackType == "raiders">> <<if App.SecExp.battle.recon() >= 1>> A massive, disorganized horde of raiders is coming to your city. It seems a warlord of the wastelands amassed enough men to try and obtain a slice of territory of his own; if he's not defeated there won't be a tomorrow for the arcology. Fortunately you knew of their coming, thanks to your recon systems. <<else>> Some of your citizens saw the massive, disorganized horde of raiders coming towards the city and quickly reported it. It seems a warlord of the wastelands amassed enough men to try and obtain a slice of territory of his own; if he's not defeated there won't be a tomorrow for the arcology. <</if>> <br>Raiders are roaming gangs of bandits, preying on the vulnerable supply lines of Free Cities and old world nations. They are rarely equipped with decent armaments and even more rarely have any formal military training, but they make up for that with high mobility and numbers. <<elseif $attackType == "free city">> <<if App.SecExp.battle.recon() >= 1>> A massive, menacing column of slavers and hired mercenaries is coming to your city. The quantity of money invested in this assault is staggering; it seems you made some very powerful enemies. If they're not defeated your story will end this day. Fortunately you knew of their coming, thanks to your recon systems. <<else>> Some of your citizens saw the massive, menacing column of slavers and hired mercenaries and rushed to your office to bring the grim news. The quantity of money invested in this assault is staggering; it seems you made some very powerful enemies. If they're not defeated your story will end this day. <</if>> <br>Free City expeditions are usually composed of mercenaries hired to take down sensible supplies or infrastructure in order to damage the enemies of their contractor. They have, on average, good equipment and training, together with decent mobility, making them a formidable force. Their biggest weakness, however, is their relatively low numbers. <<elseif $attackType == "freedom fighters">> <<if App.SecExp.battle.recon() >= 1>> A massive, dangerous army of guerrillas is gathering just outside the arcology. A huge ocean of fanatics and idealists armed with dead men's words and hope, set on erasing your fledgling empire once and for all. And this time they won't stop until your body is burnt to a crisp. Fortunately you knew of their coming, thanks to your recon systems. <<else>> Some of your citizens saw the massive, dangerous army of guerrillas is gathering just outside the arcology. A huge ocean of fanatics and idealists armed with dead men's words and hope, set on erasing your fledgling empire once and for all. And this time they won't stop until your body is burnt to a crisp. <</if>> <br>Freedom Fighters are groups of individuals fighting to rid the planet of "evils" such as the Free Cities and their way of life. Lacking the strength to assault one directly, they fight guerrilla style, slowly starving to death their enemies. They are rarely well equipped, but with good training and mobility they are not a threat that can be taken lightly. <<elseif $attackType == "old world">> <<if App.SecExp.battle.recon() >= 1>> A massive, disciplined old world army is approaching the confines of your arcology. It seems one of the nations of the old world is determined to put your arcology to rest once and for all or die trying. Fortunately you knew of their coming, thanks to your recon systems. <<else>> Some of your citizens saw the massive, disciplined old world army is approaching the confines of your arcology. It seems one of the nations of the old world is determined to put your arcology to rest once and for all or die trying. <</if>> <br>Old world expeditions are usually sent to secure resources and trade routes for their nation or, more often, to provide their citizens with a bogeyman to be scared of. They are usually decently equipped and trained, which together with their generous numbers make them a tough nut to crack. However, they often lack in mobility. <</if>> <</if>> <br><br>__Recon__: <<set _estimatedMen = normalRandInt($attackTroops, $attackTroops * (4 - App.SecExp.battle.recon()) * 0.05)>> <<set _expectedEquip = normalRandInt($attackEquip, (4 - App.SecExp.battle.recon()) * 0.25)>> <br>It seems your troops and your adversary will fight <<if $battleTerrain == "rural">> in <strong>the rural land</strong> surrounding the free city. <<elseif $battleTerrain == "urban">> in the old <strong>abandoned city</strong> surrounding the free city. <<elseif $battleTerrain == "hills">> on <strong>the hills</strong> around the free city. <<elseif $battleTerrain == "coast">> along <strong>the coast</strong> just outside the free city. <<elseif $battleTerrain == "outskirts">> right against <strong>the walls of the arcology.</strong> <<elseif $battleTerrain == "mountains">> in <strong>the mountains</strong> overlooking the arcology. <<elseif $battleTerrain == "wasteland">> in <strong>the wastelands</strong> outside the free city territory. <<elseif $battleTerrain == "error">> <br>@@.red;Error: failed to assign terrain.@@ battleTerrain reads "<<print $battleTerrain>>". <<else>> <br>@@.red;Error: failed to read terrain.@@ battleTerrain reads "<<print $battleTerrain>>". <</if>> <<if App.SecExp.battle.recon() == 3>> Your recon capabilities are top notch. The information collected will be most likely correct or very close to be so: <<elseif App.SecExp.battle.recon() == 2>> Your recon capabilities are decent. The information collected will be mostly close to the truth: <<elseif App.SecExp.battle.recon() == 1>> Your recon capabilities are fairly low. The information collected will be quite inaccurate: <<else>> Your recon capabilities are almost non-existent. The information collected will be wild guesses at best: <</if>> approximately <strong><<print _estimatedMen>> men</strong> are coming, they seem to be <<if _expectedEquip <= 0>> <strong>poorly armed</strong>. Old rusty small arms are the norm with just a few barely working civilian vehicles. <<elseif _expectedEquip == 1>> <strong>lightly armed</strong>, mostly with small arms and some repurposed civilian vehicles with scattered machine gun support. There's no sign of heavy vehicles, artillery or aircraft. <<elseif _expectedEquip == 2>> <strong>decently armed</strong> with good quality small arms, machine guns and a few mortars. There appear to be some heavy military vehicles coming as well. <<elseif _expectedEquip == 3>> <strong>well armed</strong> with high quality small arms, snipers, demolitions teams, heavy duty machine guns and mortars. Heavy military vehicles are numerous and a few artillery pieces are accompanying the detachment. <<elseif _expectedEquip >= 4>> <strong>extremely well armed</strong> with excellent small arms and specialized teams with heavy duty infantry support weapons. Heavy presence of armored military vehicles, artillery pieces and even some attack helicopters. <</if>> <hr>__Battle Plan__:<br> <<set _leaderFound = 1>> <<if $leadingTroops === "bodyguard" && $BodyguardID === 0 || $leadingTroops === "headGirl" && $HeadGirlID === 0>> @@.warning;Chosen leader $leadingTroops cannot be found, please select another.@@ <<set _leaderFound = 0>> <</if>> <<switch $leadingTroops>> <<case "PC">> <<set _leader = "Personally">> <<case "assistant">> <<set _leader = "$assistant.name will">> <<case "bodyguard">> <<set _leader = "_S.Bodyguard.slaveName will">> <<case "headGirl">> <<set _leader = "_S.HeadGirl.slaveName will">> <<case "citizen">> <<set _leader = "The citizens' militia commander will">> <<case "mercenary">> <<set _leader = "The mercenary commander will">> <<case "colonel">> <<set _leader = capFirstChar($SF.Lower || "the special force") +"'s Colonel will">> <</switch>> /* leader assignment */ <span id="leader"><strong><<print _leader>></strong></span> lead your troops. <br>&nbsp;&nbsp;&nbsp;&nbsp; <<link "Personally join the battle">> <<set $leadingTroops = "PC">> <<set _leader = "Personally">> <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> | <<link "Let $assistant.name lead the troops">> <<set $leadingTroops = "assistant">> <<set _leader = "$assistant.name will">> <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> <<if $BodyguardID != 0 && $SecExp.edicts.defense.slavesOfficers == 1>> | <<link "Let your bodyguard lead your troops">> <<set $leadingTroops = "bodyguard">> <<set _leader = "_S.Bodyguard.slaveName will">> <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> <</if>> <<if $HeadGirlID != 0 && $SecExp.edicts.defense.slavesOfficers == 1>> | <<link "Let your Head Girl lead your troops">> <<set $leadingTroops = "headGirl">> <<set _leader = "_S.HeadGirl.slaveName will">> <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> <</if>> <<if $SecExp.edicts.defense.militia >= 1>> | <<link "Let the citizens' militia officers lead the troops">> <<set $leadingTroops = "citizen">> <<set _leader = "The citizens' militia commander will">> <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> <</if>> <<if $mercenaries > 0>> | <<link "Let the mercenary officers lead the troops">> <<set $leadingTroops = "mercenary">> <<set _leader = "The mercenary commander will">> <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> <</if>> <<if $SF.Toggle && $SF.Active >= 1 && $SF.MercCon.CanAttend === -2>> | <<link "Let The Colonel lead the troops">> <<set $leadingTroops = "colonel">> <<set _leader = capFirstChar($SF.Lower || "the special force") +"'s Colonel will">> <<replace "#leader">><strong><<print _leader>></strong><</replace>> <</link>> <</if>> <br>For this battle you choose to follow <span id="tactic"><strong><<print $chosenTactic>></strong></span> tactics.<br> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'defensiveTactics')" id="tab defensive tactics">Defensive tactics</button> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'offensiveTactics')" id="tab offensiveTactics">Offensive Tactics</button> <div id="defensiveTactics" class="tab-content"> <div class="content"> <<link "Bait and Bleed">> <<set $chosenTactic = "Bait and Bleed">> <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> <</link>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Combines bait and switch tactics with guerrilla style assaults, with the objective of slowly bleed the enemy.// <br> <<link "Guerrilla">> <<set $chosenTactic = "Guerrilla">> <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> <</link>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves using terrain knowledge and small fast attacks to hinder and weaken the enemy.// <br> <<link "Choke Points">> <<set $chosenTactic = "Choke Points">> <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> <</link>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves using terrain knowledge and strong fortifications in order to stop the enemy on its track.// <br> <<link "Interior Lines">> <<set $chosenTactic = "Interior Lines">> <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> <</link>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves exploiting a defender's shorter logistics lines and redeployment times in order to keep the enemy pressured.// <br> <<link "Pincer Maneuver">> <<set $chosenTactic = "Pincer Maneuver">> <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> <</link>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves letting the enemy push back the center in order to envelop their formation.// <br> <<link "Defense In Depth">> <<set $chosenTactic = "Defense In Depth">> <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> <</link>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves letting the enemy gain terrain to gain tactical superiority by alternating between delaying actions and small counterattacks.// </div> </div> <div id="offensiveTactics" class="tab-content"> <div class="content"> <<link "Blitzkrieg">> <<set $chosenTactic = "Blitzkrieg">> <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> <</link>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves breaking the front of the enemy with a fast armored force concentrated into a small area.// <br> <<link "Human Wave">> <<set $chosenTactic = "Human Wave">> <<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>> <</link>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves assaulting the enemy with large numbers of infantry to overwhelm their lines.// </div> </div> <<if _leaderFound === 1>> <<if App.SecExp.battle.deployedUnits() > 0>> <br>[[Send your orders|attackHandler][$battleResult = 4, $foughtThisWeek = 1]] /* sets $battleResult value outside accepted range (-3, 3) to avoid evaluation problems */ <<else>> <br>You need at least a unit in your roster to proceed to battle. <</if>> <br>[[Surrender|attackReport][$battleResult = -1, $foughtThisWeek = 1]] <br>[[Attempt to bribe|attackHandler][$battleResult = 1, $foughtThisWeek = 1]] //Will cost around <<print cashFormat(Math.round(App.SecExp.battle.bribeCost() * (1 + either(-1,1) * random(2) * 0.1)))>> (estimate).// <<else>> Your leader needs to be present to proceed. <</if>> <<if $SF.Toggle && $SF.Active >= 1 && $majorBattle>> <br> <<set _options = new App.UI.OptionsGroup()>> <<run _options.addOption("The incoming attack's scale warrants deploying the special force.", "SFIntervention") .addValue("Green light", 1).on().addValue("Red light", 0).off() .addComment("Some upgrades will be able to support your troops even if the special force is not deployed in the fight.")>> <<includeDOM _options.render()>> <</if>> <br> <<if $SecExp.battles.lastSelection.length > 0>> <<link "Restore saved roster" "attackOptions">> <<for _i = 0; _i < $SecExp.battles.lastSelection.length; _i++>> <<if $SecExp.battles.lastSelection[_i] == -1>> <<set $secBots.isDeployed = 1>> <<else>> <<for _j = 0; _j < $militiaUnits.length; _j++>> <<if $SecExp.battles.lastSelection[_i] == $militiaUnits[_j].ID>> <<set $militiaUnits[_j].isDeployed = 1>> <<break>> <</if>> <</for>> <<for _j = 0; _j < $slaveUnits.length; _j++>> <<if $SecExp.battles.lastSelection[_i] == $slaveUnits[_j].ID>> <<set $slaveUnits[_j].isDeployed = 1>> <<break>> <</if>> <</for>> <<for _j = 0; _j < $mercUnits.length; _j++>> <<if $SecExp.battles.lastSelection[_i] == $mercUnits[_j].ID>> <<set $mercUnits[_j].isDeployed = 1>> <<break>> <</if>> <</for>> <</if>> <</for>> <<set $saveValid = 1, $leadingTroops = $SecExp.battles.saved.commander, $SFIntervention = $SecExp.battles.saved.sfSupport>> <</link>> <<else>> Restore saved roster <</if>> | <<if $saveValid != 1>> <<link "Save current roster" "attackOptions">> <<if App.SecExp.battle.deployedUnits('bots')>> <<set _tmp = -1>> <<set $SecExp.battles.lastSelection.push(_tmp)>> <</if>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].isDeployed == 1>> <<set $SecExp.battles.lastSelection.push($militiaUnits[_i].ID)>> <</if>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].isDeployed == 1>> <<set $SecExp.battles.lastSelection.push($slaveUnits[_i].ID)>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].isDeployed == 1>> <<set $SecExp.battles.lastSelection.push($mercUnits[_i].ID)>> <</if>> <</for>> <<set $saveValid = 1, $SecExp.battles.saved.commander = $leadingTroops, $SecExp.battles.saved.sfSupport = $SFIntervention>> <</link>> <<else>> Save current roster <</if>> | <<if App.SecExp.battle.deployedUnits() > 0>> <<link "Clear current roster" "attackOptions">> <<set $secBots.isDeployed = 0>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<set $militiaUnits[_i].isDeployed = 0>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<set $slaveUnits[_i].isDeployed = 0>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<set $mercUnits[_i].isDeployed = 0>> <</for>> <<set $saveValid = 0>> <</link>> <<else>> Clear current roster <</if>> | <<if $SecExp.battles.lastSelection.length > 0>> [[Clear saved roster|attackOptions][$SecExp.battles.lastSelection = [], $saveValid = 0]] <<else>> Clear saved roster <</if>> <br> /* troop deployment */ <<if App.SecExp.battle.deployableUnits() > 0>> With your current readiness level you can send an additional <strong><<print App.SecExp.battle.deployableUnits()>></strong> units. <</if>> <<replenishAllUnits>> <<set _mL = $militiaUnits.length>> <<set _sL = $slaveUnits.length>> <<set _meL = $mercUnits.length>> <<run App.UI.tabBar.handlePreSelectedTab($tabChoice.Options)>> <<if App.SecExp.battle.deployableUnits() === 0>> <strong>Unit roster full.</strong> <</if>> <br> <<includeDOM App.SecExp.deployUnitMenu($secBots, "bots")>> <<if $militiaUnits.length > 0>> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'militia')" id="tab militia">Militia: ($militiaUnits.length)</button> <</if>> <<if $slaveUnits.length > 0>> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'slaves')" id="tab slaves">Slaves: ($slaveUnits.length)</button> <</if>> <<if $mercUnits.length > 0>> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'mercs')" id="tab mercs">Mercs: ($mercUnits.length)</button> <</if>> <div id="militia" class="tab-content"> <div class="content"> <<for _i = 0; _i < _mL; _i++>> <<includeDOM App.SecExp.deployUnitMenu($militiaUnits[_i], "militia", _i)>> <</for>> </div> </div> <div id="slaves" class="tab-content"> <div class="content"> <<for _i = 0; _i < _sL; _i++>> <<includeDOM App.SecExp.deployUnitMenu($slaveUnits[_i], "slaves", _i)>> <</for>> </div> </div> <div id="mercs" class="tab-content"> <div class="content"> <<for _i = 0; _i < _meL; _i++>> <<includeDOM App.SecExp.deployUnitMenu($mercUnits[_i], "mercs", _i)>> <</for>> </div> </div>
MonsterMate/fc
src/Mods/SecExp/attackOptions.tw
tw
mit
23,848
:: attackReport [nobr] <<set $nextButton = "Continue", $nextLink = "Scheduled Event", $encyclopedia = "Battles">> /*init*/ <<set _oldRep = $rep>> <<set _oldAuth = $SecExp.core.authority>> <<set $enemyLosses = Math.trunc($enemyLosses)>> <<if $enemyLosses > $attackTroops>> <<set $enemyLosses = $attackTroops>> <</if>> <<set $SecExp.core.totalKills += $enemyLosses>> <<set $losses = Math.trunc($losses)>> <<set _loot = 0>> /* result */ <<if $majorBattle == 0>> <<set _majorBattleMod = 1>> <<else>> <<set _majorBattleMod = 2>> <<set $SecExp.battles.major++>> <</if>> <<if $battleResult == 3>> <strong>Victory!</strong> <<set $SecExp.battles.lossStreak = 0>> <<set $SecExp.battles.victoryStreak += 1>> <<set $SecExp.battles.victories++>> <<elseif $battleResult == -3>> <strong>Defeat!</strong> <<set $SecExp.battles.lossStreak += 1>> <<set $SecExp.battles.victoryStreak = 0>> <<set $SecExp.battles.losses++>> <<elseif $battleResult == 2>> <strong>Partial victory!</strong> <<set $SecExp.battles.victories++>> <<elseif $battleResult == -2>> <strong>Partial defeat!</strong> <<set $SecExp.battles.losses++>> <<elseif $battleResult == -1>> <strong>We surrendered</strong> <<set $SecExp.battles.losses++>> <<elseif $battleResult == 0>> <strong>Failed bribery!</strong> <<set $SecExp.battles.losses++>> <<elseif $battleResult == 1>> <strong>Successful bribery!</strong> <<set $SecExp.battles.victories++>> <</if>> <hr> <<if $attackType == "raiders">> Today, <<= asDateString($week, random(0,7))>>, our arcology was attacked by a band of wild raiders, <<print num(Math.trunc($attackTroops))>> men strong. <<if $battleResult != 1 && $battleResult != 0 && $battleResult != -1>> Our defense forces, <<print num(Math.trunc(App.SecExp.battle.troopCount()))>> strong, clashed with them <<if $battleTerrain == "urban">> in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, <<elseif $battleTerrain == "rural">> in the rural land surrounding the free city, <<elseif $battleTerrain == "hills">> on the hills around the free city, <<elseif $battleTerrain == "coast">> along the coast just outside the free city, <<elseif $battleTerrain == "outskirts">> just against the walls of the arcology, <<elseif $battleTerrain == "mountains">> in the mountains overlooking the arcology, <<elseif $battleTerrain == "wasteland">> in the wastelands outside the free city territory, <</if>> <<if $enemyLosses != $attackTroops>> inflicting <<print num(Math.trunc($enemyLosses))>> casualties, while sustaining <<if $losses > 1>><<print num(Math.trunc($losses))>> casualties<<elseif $losses > 0>>a casualty<<else>>zero<</if>> themselves. <<else>> completely annihilating their troops, while sustaining <<if $losses > 1>><<print num(Math.trunc($losses))>> casualties<<elseif $losses > 0>>a casualty<<else>>zero casualties<</if>>. <</if>> <</if>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men easily stopped the disorganized horde's futile attempt at raiding your arcology<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<elseif $battleTurns <= 7>> The fight was hard, but in the end our men stopped the disorganized horde attempt at raiding your arcology<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<else>> The fight was long and hard, but our men managed to stop the horde raiding party<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <</if>> <<if $SecExp.battles.victoryStreak >= 2>> adding another victory to the growing list of our military's successes. <<elseif $SecExp.battles.lossStreak >= 2>> finally putting an end to a series of unfortunate defeats. <</if>> <<elseif $battleResult == -3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men were easily crushed by the barbaric horde of raiders<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<elseif $battleTurns <= 7>> The fight was hard and in the end the bandits proved too much to handle for our men<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<else>> The fight was long and hard, but despite their bravery the horde proved too much for our men<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <</if>> <<if $SecExp.battles.victoryStreak >= 2>> so interrupting a long series of military successes. <<elseif $SecExp.battles.lossStreak >= 2>> confirming the long list of recent failures our armed forces collected. <</if>> <<elseif $battleResult == 2>> The fight was long and hard, but in the end our men managed to repel the raiders, though not without difficulty. <<elseif $battleResult == -2>> The fight was long and hard. Our men in the end had to yield to the horde raiders, which was fortunately unable to capitalized on their victory. <<elseif $battleResult == -1>> You gave your troops the order to surrender, obediently they stand down. <<elseif $battleResult == 0>> You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. <<elseif $battleResult == 1>> You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. <</if>> <<elseif $attackType == "free city">> Today, <<= asDateString($week, random(0,7))>>, our arcology was attacked by a contingent of mercenaries hired by a competing free city, <<print num(Math.trunc($attackTroops))>> men strong. <<if $battleResult != 1 && $battleResult != 0 && $battleResult != -1>> Our defense forces, <<print num(Math.trunc(App.SecExp.battle.troopCount()))>> strong, clashed with them <<if $battleTerrain == "urban">> in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, <<elseif $battleTerrain == "rural">> in the rural land surrounding the free city, <<elseif $battleTerrain == "hills">> on the hills around the free city, <<elseif $battleTerrain == "coast">> along the coast just outside the free city, <<elseif $battleTerrain == "outskirts">> just against the walls of the arcology, <<elseif $battleTerrain == "mountains">> in the mountains overlooking the arcology, <<elseif $battleTerrain == "wasteland">> in the wastelands outside the free city territory, <</if>> <<if $enemyLosses != $attackTroops>> inflicting <<print $enemyLosses>> casualties, while sustaining <<if $losses > 1>> <<print num(Math.trunc($losses))>> casualties <<elseif $losses > 0>> a casualty <<else>> zero <</if>> themselves. <<else>> completely annihilating their troops, while sustaining <<if $losses > 1>> <<print num(Math.trunc($losses))>> casualties. <<elseif $losses > 0>> a casualty.<<else>> zero casualties.<</if>> <</if>> <</if>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men easily stopped the mercenaries dead in their tracks<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<elseif $battleTurns <= 7>> The fight was hard, but in the end our men stopped the slavers attempt at weakening your arcology<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<else>> The fight was long and hard, but our men managed to stop the free city mercenaries<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <</if>> <<if $SecExp.battles.victoryStreak >= 2>> adding another victory to the growing list of our military's successes. <<elseif $SecExp.battles.lossStreak >= 2>> finally putting an end to a series of unfortunate defeats. <</if>> <<elseif $battleResult == -3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men were easily crushed by the consumed mercenary veterans sent against us<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<elseif $battleTurns <= 7>> The fight was hard and in the end the slavers proved too much to handle for our men<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<else>> The fight was long and hard, but despite their bravery the mercenary slavers proved too much for our men<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <</if>> <<if $SecExp.battles.victoryStreak >= 2>> so interrupting a long series of military successes. <<elseif $SecExp.battles.lossStreak >= 2>> confirming the long list of recent failures our armed forces collected. <</if>> <<elseif $battleResult == 2>> The fight was long and hard, but in the end our men managed to repel the mercenaries, though not without difficulty. <<elseif $battleResult == -2>> The fight was long and hard. Our men in the end had to yield to the slavers, which were fortunately unable to capitalized on their victory. <<elseif $battleResult == -1>> You gave your troops the order to surrender, obediently they stand down. <<elseif $battleResult == 0>> You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. <<elseif $battleResult == 1>> You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. <</if>> <<elseif $attackType == "freedom fighters">> Today, <<= asDateString($week, random(0,7))>>, our arcology was attacked by a group of freedom fighters bent on the destruction of the institution of slavery, <<print num(Math.trunc($attackTroops))>> men strong. <<if $battleResult != 1 && $battleResult != 0 && $battleResult != -1>> Our defense forces, <<print num(Math.trunc(App.SecExp.battle.troopCount()))>> strong, clashed with them <<if $battleTerrain == "urban">> in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, <<elseif $battleTerrain == "rural">> in the rural land surrounding the free city, <<elseif $battleTerrain == "hills">> on the hills around the free city, <<elseif $battleTerrain == "coast">> along the coast just outside the free city, <<elseif $battleTerrain == "outskirts">> just against the walls of the arcology, <<elseif $battleTerrain == "mountains">> in the mountains overlooking the arcology, <<elseif $battleTerrain == "wasteland">> in the wastelands outside the free city territory, <</if>> <<if $enemyLosses != $attackTroops>> inflicting <<print $enemyLosses>> casualties, while sustaining <<if $losses > 1>> <<print num(Math.trunc($losses))>> casualties <<elseif $losses > 0>> a casualty <<else>> zero <</if>> themselves. <<else>> completely annihilating their troops, while sustaining <<if $losses > 1>> <<print num(Math.trunc($losses))>> casualties. <<elseif $losses > 0>> a casualty. <<else>> zero casualties.<</if>> <</if>> <</if>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men easily stopped the freedom fighters dead in their tracks<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<elseif $battleTurns <= 7>> The fight was hard, but in the end our men stopped the fighters attack<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<else>> The fight was long and hard, but our men managed to stop the freedom fighters<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <</if>> <<if $SecExp.battles.victoryStreak >= 2>> adding another victory to the growing list of our military's successes. <<elseif $SecExp.battles.lossStreak >= 2>> finally putting an end to a series of unfortunate defeats. <</if>> <<elseif $battleResult == -3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men were easily crushed by the fanatical fury of the freedom fighters<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<elseif $battleTurns <= 7>> The fight was hard and in the end the freedom fighters proved too much to handle for our men<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<else>> The fight was long and hard, but despite their bravery the freedom fighters fury proved too much for our men<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <</if>> <<if $SecExp.battles.victoryStreak >= 2>> so interrupting a long series of military successes. <<elseif $SecExp.battles.lossStreak >= 2>> confirming the long list of recent failures our armed forces collected. <</if>> <<elseif $battleResult == 2>> The fight was long and hard, but in the end our men managed to repel the freedom fighters, though not without difficulty. <<elseif $battleResult == -2>> The fight was long and hard. Our men in the end had to yield to the freedom fighters, which were fortunately unable to capitalized on their victory. <<elseif $battleResult == -1>> You gave your troops the order to surrender, obediently they stand down. <<elseif $battleResult == 0>> You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. <<elseif $battleResult == 1>> You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. <</if>> <<elseif $attackType == "old world">> Today, <<= asDateString($week, random(0,7))>>, our arcology was attacked by an old world nation boasting a misplaced sense of superiority, <<print num(Math.trunc($attackTroops))>> men strong. <<if $battleResult != 1 && $battleResult != 0 && $battleResult != -1>> Our defense forces, <<print num(Math.trunc(App.SecExp.battle.troopCount()))>> strong, clashed with them <<if $battleTerrain == "urban">> in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, <<elseif $battleTerrain == "rural">> in the rural land surrounding the free city, <<elseif $battleTerrain == "hills">> on the hills around the free city, <<elseif $battleTerrain == "coast">> along the coast just outside the free city, <<elseif $battleTerrain == "outskirts">> just against the walls of the arcology, <<elseif $battleTerrain == "mountains">> in the mountains overlooking the arcology, <<elseif $battleTerrain == "wasteland">> in the wastelands outside the free city territory, <</if>> <<if $enemyLosses != $attackTroops>> inflicting <<print $enemyLosses>> casualties, while sustaining <<if $losses > 1>> <<print num(Math.trunc($losses))>> casualties <<elseif $losses > 0>> a casualty <<else>> zero <</if>> themselves. <<else>> completely annihilating their troops, while sustaining <<if $losses > 1>> <<print num(Math.trunc($losses))>> casualties. <<elseif $losses > 0>> a casualty. <<else>> zero casualties.<</if>> <</if>> <</if>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men easily stopped the old world soldiers dead in their tracks<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<elseif $battleTurns <= 7>> The fight was hard, but in the end our men stopped the soldiers of the old world<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<else>> The fight was long and hard, but our men managed to stop the old world soldiers<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <</if>> <<if $SecExp.battles.victoryStreak >= 2>> adding another victory to the growing list of our military's successes. <<elseif $SecExp.battles.lossStreak >= 2>> finally putting an end to a series of unfortunate defeats. <</if>> <<elseif $battleResult == -3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men were easily crushed by the discipline of the old world armies<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<elseif $battleTurns <= 7>> The fight was hard and in the end the old world proved too much to handle for our men<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <<else>> The fight was long and hard, but despite their bravery the determination of the old world troops proved too much for our men<<if $SecExp.battles.victoryStreak >= 2 || $SecExp.battles.lossStreak >= 2>>,<<else>>.<</if>> <</if>> <<if $SecExp.battles.victoryStreak >= 2>> so interrupting a long series of military successes. <<elseif $SecExp.battles.lossStreak >= 2>> confirming the long list of recent failures our armed forces collected. <</if>> <<elseif $battleResult == 2>> The fight was long and hard, but in the end our men managed to repel the old world soldiers, though not without difficulty. <<elseif $battleResult == -2>> The fight was long and hard. Our men in the end had to yield to the old world soldiers, which were fortunately unable to capitalized on their victory. <<elseif $battleResult == -1>> You gave your troops the order to surrender, obediently they stand down. <<elseif $battleResult == 0>> You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. <<elseif $battleResult == 1>> You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. <</if>> <</if>> <br><br> /* calculates effects on the city */ <<if $battleResult == 3>> Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. You were also able to capture <<if $attackType == "raiders">> <<run repX(4000 * _majorBattleMod, "war")>> <<set $SecExp.core.authority += 800 * _majorBattleMod>> <<elseif $attackType == "free city">> <<run repX(6000 * _majorBattleMod, "war")>> <<set $SecExp.core.authority += 1200 * _majorBattleMod>> <<elseif $attackType == "freedom fighters">> <<run repX(7500 * _majorBattleMod, "war")>> <<set $SecExp.core.authority += 1500 * _majorBattleMod>> <<elseif $attackType == "old world">> <<run repX(6000 * _majorBattleMod, "war")>> <<set $SecExp.core.authority += 1200 * _majorBattleMod>> <</if>> <<if $attackTroops - $enemyLosses <= 50>> a small amount of attackers, <<set _captives = ($attackTroops - $enemyLosses) * 0.1 * random(1,3)>> <<elseif $attackTroops - $enemyLosses <= 100>> an healthy group of attackers, <<set _captives = ($attackTroops - $enemyLosses) * 0.1 * random(1,3)>> <<elseif $attackTroops - $enemyLosses <= 150>> a big group of attackers, <<set _captives = ($attackTroops - $enemyLosses) * 0.1 * random(1,3)>> <<elseif $attackTroops - $enemyLosses <= 200>> a huge group of attackers, <<set _captives = ($attackTroops - $enemyLosses) * 0.1 * random(1,3)>> <<elseif $attackTroops - $enemyLosses > 200>> a great amount of attackers, <<set _captives = ($attackTroops - $enemyLosses) * 0.1 * random(1,3)>> <</if>> and some of their equipment, which once sold produced <<if $attackEquip == 0>> @@.yellowgreen;a small amount of cash.@@ <<set _loot += 1000 * _majorBattleMod>> <<elseif $attackEquip == 1>> @@.yellowgreen;a moderate amount of cash.@@ <<set _loot += 5000 * _majorBattleMod>> <<elseif $attackEquip == 2>> @@.yellowgreen;a good amount of cash.@@ <<set _loot += 10000 * _majorBattleMod>> <<elseif $attackEquip == 3>> @@.yellowgreen;a great amount of cash.@@ <<set _loot += 15000 * _majorBattleMod>> <<elseif $attackEquip == 4>> @@.yellowgreen;wealth worthy of the mightiest warlord.@@ <<set _loot += 20000 * _majorBattleMod>> <</if>> <<if $SecExp.edicts.defense.privilege.mercSoldier == 1 && App.SecExp.battle.deployedUnits('mercs') >= 1>> Part of the loot is distributed to your mercenaries. <<set _captives = Math.trunc(_captives * 0.6)>> <<set _loot = Math.trunc(_loot * 0.6)>> <</if>> <<run cashX(_loot, "war")>> <br> Damage to the infrastructure was @@.yellow;virtually non-existent,@@ costing only pocket cash to bring the structure back to normal. The inhabitants as well reported little to no injuries, because of this the prosperity of the arcology did not suffer. <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(forceNeg(1000 * _majorBattleMod), "war")>> <<if $SecExp.battles.victoryStreak >= 3>> It seems your victories over the constant threats directed your way is having @@.green;a positive effect on the prosperity of the arcology,@@ due to the security your leadership affords. <<set $arcologies[0].prosperity += 5 * _majorBattleMod>> <</if>> <<elseif $battleResult == -3>> Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. Obviously your troops were not able to capture anyone or anything. <<if $attackType == "raiders">> <<run repX(forceNeg(400 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 400 * _majorBattleMod>> <<elseif $attackType == "free city">> <<run repX(forceNeg(600 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 600 * _majorBattleMod>> <<elseif $attackType == "freedom fighters">> <<run repX(forceNeg(750 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 750 * _majorBattleMod>> <<elseif $attackType == "old world">> <<run repX(forceNeg(600 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 600 * _majorBattleMod>> <</if>> <br> In the raiding following the battle @@.red;the arcology sustained heavy damage,@@ which will cost quite the amount of cash to fix. Reports of @@.red;citizens or slaves killed or missing@@ flood your office for a few days following the defeat. <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(forceNeg(5000 * _majorBattleMod), "war")>> <<if $week <= 30>> <<set $lowerClass -= random(100) * _majorBattleMod>> <<set _lostSlaves = random(150) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>> <<elseif $week <= 60>> <<set $lowerClass -= random(120) * _majorBattleMod>> <<set _lostSlaves = random(170) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>> <<elseif $week <= 90>> <<set $lowerClass -= random(140) * _majorBattleMod>> <<set _lostSlaves = random(190) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15) * _majorBattleMod>> <<elseif $week <= 120>> <<set $lowerClass -= random(160) * _majorBattleMod>> <<set _lostSlaves = random(210) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20) * _majorBattleMod>> <<else>> <<set $lowerClass -= random(180) * _majorBattleMod>> <<set _lostSlaves = random(230) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25) * _majorBattleMod>> <</if>> <<if $SecExp.battles.lossStreak >= 3>> This only confirms the fears of many, @@.red;your arcology is not safe@@ and it is clear their business will be better somewhere else. <<set $arcologies[0].prosperity -= 5 * _majorBattleMod>> <</if>> <<elseif $battleResult == 2>> Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ slightly increased. Our men were not able to capture any combatants, however some equipment was seized during the enemy's hasty retreat, <<if $attackType == "raiders">> <<run repX(1000 * _majorBattleMod, "war")>> <<set $SecExp.core.authority += 200 * _majorBattleMod>> <<elseif $attackType == "free city">> <<run repX(1500 * _majorBattleMod, "war")>> <<set $SecExp.core.authority += 300 * _majorBattleMod>> <<elseif $attackType == "freedom fighters">> <<run repX(2000 * _majorBattleMod, "war")>> <<set $SecExp.core.authority += 450 * _majorBattleMod>> <<elseif $attackType == "old world">> <<run repX(1500 * _majorBattleMod, "war")>> <<set $SecExp.core.authority += 300 * _majorBattleMod>> <</if>> which once sold produced <<if $attackEquip == 0>> @@.yellowgreen;a bit of cash.@@ <<set _loot += 500 * _majorBattleMod>> <<elseif $attackEquip == 1>> @@.yellowgreen;a small amount of cash.@@ <<set _loot += 2500 * _majorBattleMod>> <<elseif $attackEquip == 2>> @@.yellowgreen;a moderate amount of cash.@@ <<set _loot += 5000 * _majorBattleMod>> <<elseif $attackEquip == 3>> @@.yellowgreen;a good amount of cash.@@ <<set _loot += 7500 * _majorBattleMod>> <<elseif $attackEquip == 4>> @@.yellowgreen;a great amount of cash.@@ <<set _loot += 10000 * _majorBattleMod>> <</if>> <<if $SecExp.edicts.defense.privilege.mercSoldier == 1 && App.SecExp.battle.deployedUnits('mercs') >= 1>> Part of the loot is distributed to your mercenaries. <<set _loot = Math.trunc(_loot * 0.6)>> <</if>> <<run cashX(_loot, "war")>> <br> Damage to the city was @@.red;limited,@@ it won't take much to rebuild. Very few citizens or slaves were involved in the fight and even fewer met their end, safeguarding the prosperity of the arcology. <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(forceNeg(2000 * _majorBattleMod), "war")>> <<set $lowerClass -= random(10) * _majorBattleMod>> <<set _lostSlaves = random(20) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<elseif $battleResult == -2>> It was a close defeat, but nonetheless your @@.red;reputation@@ and @@.red;authority@@ slightly decreased. Your troops were not able to capture anyone or anything. <<if $attackType == "raiders">> <<run repX(forceNeg(40 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 40 * _majorBattleMod>> <<elseif $attackType == "free city">> <<run repX(forceNeg(60 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 60 * _majorBattleMod>> <<elseif $attackType == "freedom fighters">> <<run repX(forceNeg(75 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 75 * _majorBattleMod>> <<elseif $attackType == "old world">> <<run repX(forceNeg(60 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 60 * _majorBattleMod>> <</if>> <br> The enemy did not have the strength to raid the arcology for long, still @@.red;the arcology sustained some damage,@@ which will cost a moderate amount of cash to fix. Some citizens and slaves found themselves on the wrong end of a gun and met their demise. Some business sustained heavy damage, slightly impacting the arcology's prosperity. <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(forceNeg(3000 * _majorBattleMod), "war")>> <<if $week <= 30>> <<set $lowerClass -= random(50) * _majorBattleMod>> <<set _lostSlaves = random(75) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(2) * _majorBattleMod>> <<elseif $week <= 60>> <<set $lowerClass -= random(60) * _majorBattleMod>> <<set _lostSlaves = random(85) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>> <<elseif $week <= 90>> <<set $lowerClass -= random(70) * _majorBattleMod>> <<set _lostSlaves = random(95) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(7) * _majorBattleMod>> <<elseif $week <= 120>> <<set $lowerClass -= random(80) * _majorBattleMod>> <<set _lostSlaves = random(105) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>> <<else>> <<set $lowerClass -= random(90) * _majorBattleMod>> <<set _lostSlaves = random(115) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(12) * _majorBattleMod>> <</if>> <<elseif $battleResult == -1>> Rather than waste the lives of your men you decided to surrender, hoping your enemy will cause less damage if you indulge them, this is however a big hit to your status. Your @@.red;reputation@@ and @@.red;authority@@ are significantly impacted. <<if $attackType == "raiders">> <<run repX(forceNeg(600 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 600 * _majorBattleMod>> <<elseif $attackType == "free city">> <<run repX(forceNeg(800 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 800 * _majorBattleMod>> <<elseif $attackType == "freedom fighters">> <<run repX(forceNeg(1000 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 1000 * _majorBattleMod>> <<elseif $attackType == "old world">> <<run repX(forceNeg(800 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 800 * _majorBattleMod>> <</if>> <br> The surrender allows the arcology to survive @@.red;mostly intact,@@ however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days. <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(forceNeg(1000 * _majorBattleMod), "war")>> <<if $week <= 30>> <<set $lowerClass -= random(80) * _majorBattleMod>> <<set _lostSlaves = random(120) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>> <<elseif $week <= 60>> <<set $lowerClass -= random(100) * _majorBattleMod>> <<set _lostSlaves = random(140) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>> <<elseif $week <= 90>> <<set $lowerClass -= random(120) * _majorBattleMod>> <<set _lostSlaves = random(160) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15) * _majorBattleMod>> <<elseif $week <= 120>> <<set $lowerClass -= random(140) * _majorBattleMod>> <<set _lostSlaves = random(180) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20) * _majorBattleMod>> <<else>> <<set $lowerClass -= random(160) * _majorBattleMod>> <<set _lostSlaves = random(200) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25) * _majorBattleMod>> <</if>> <<elseif $battleResult == 0>> Unfortunately your adversary did not accept your money. <<if $attackType == "freedom fighters">> Their ideological crusade would not allow such thing<<else>>They saw your attempt as nothing more than admission of weakness<</if>>. There was no time to organize a defense and so the enemy walked into the arcology as it was his. Your reputation and authority suffer a hit. <<if $attackType == "raiders">> <<run repX(forceNeg(400 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 400 * _majorBattleMod>> <<elseif $attackType == "free city">> <<run repX(forceNeg(600 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 600 * _majorBattleMod>> <<elseif $attackType == "freedom fighters">> <<run repX(forceNeg(750 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 750 * _majorBattleMod>> <<elseif $attackType == "old world">> <<run repX(forceNeg(600 * _majorBattleMod), "war")>> <<set $SecExp.core.authority -= 600 * _majorBattleMod>> <</if>> <br> Fortunately the arcology survives @@.yellow;mostly intact,@@ however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days. <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(-1000, "war")>> <<if $week <= 30>> <<set $lowerClass -= random(80) * _majorBattleMod>> <<set _lostSlaves = random(120) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>> <<elseif $week <= 60>> <<set $lowerClass -= random(100) * _majorBattleMod>> <<set _lostSlaves = random(140) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>> <<elseif $week <= 90>> <<set $lowerClass -= random(120) * _majorBattleMod>> <<set _lostSlaves = random(160) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15) * _majorBattleMod>> <<elseif $week <= 120>> <<set $lowerClass -= random(140) * _majorBattleMod>> <<set _lostSlaves = random(180) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20) * _majorBattleMod>> <<else>> <<set $lowerClass -= random(160) * _majorBattleMod>> <<set _lostSlaves = random(200) * _majorBattleMod, $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25) * _majorBattleMod>> <</if>> <br> <<elseif $battleResult == 1>> The attackers wisely take the money offered them to leave your territory without further issues. The strength of the Free Cities was never in their guns but in their dollars, and today's events are the perfect demonstration of such strength. Your @@.green;reputation slightly increases.@@ <<if $attackType == "raiders">> <<run repX(500 * _majorBattleMod, "war")>> <<elseif $attackType == "free city">> <<run repX(750 * _majorBattleMod, "war")>> <<elseif $attackType == "freedom fighters">> <<run repX(1000 * _majorBattleMod, "war")>> <<elseif $attackType == "old world">> <<run repX(750 * _majorBattleMod, "war")>> <</if>> <<run cashX(forceNeg(App.SecExp.battle.bribeCost()), "war")>> <</if>> <<if !Number.isInteger($lowerClass)>> <<if isNaN($lowerClass)>> <br>@@.red;Error: lowerClass is NaN, please report this issue@@ <<elseif $lowerClass > 0>> <<set $lowerClass = Math.trunc($lowerClass)>> <<else>> <<set $lowerClass = 0>> <</if>> <</if>> <<if !Number.isInteger($NPCSlaves)>> <<if isNaN($NPCSlaves)>> <br>@@.red;Error: NPCSlaves is NaN, please report this issue@@ <<elseif $NPCSlaves > 0>> <<set $NPCSlaves = Math.trunc($NPCSlaves)>> <<else>> <<set $NPCSlaves = 0>> <</if>> <</if>> <br><br> <<if $battleResult != 1 && $battleResult != 0 && $battleResult != -1>> /* leaders */ <<if $leadingTroops == "PC">> <<setPlayerPronouns>> You decided to personally lead the defense of your arcology. <<if App.SecExp.battle.deployedUnits('militia') >= 1>> <<if _oldRep <= 2500>> <<if _oldRep > 1000>> You're not particularly popular between the inhabitants of your arcology, so your presence does little to reassure the volunteers. <<else>> As your low reputation proves, your volunteers do not particularly enjoy your company. As far as they are concerned your presence is more of a hindrance than an advantage. <</if>> <<if $PC.career == "celebrity">> Still, your past celebrity does carry some weight, and many look forward to fight alongside a famous name. <<elseif $PC.career == "capitalist">> Still, your past life as a famous venture capitalist does carry some weight, and many trust in your cunning to save them in the incoming battle. <<elseif $PC.career == "gang">> The situation is not made easier by your past. Many still remember you as the gang leader who used to be on the other side of their guns. <<elseif $PC.career == "escort">> The situation is not made easier by your past. Many still remember your past career as an escort and doubt you'll be of any use during the fighting. <<elseif $PC.career == "mercenary">> Still, your past mercenary work does carry some weight, and many look forward to fight alongside a battle hardened name. <</if>> <<elseif _oldRep >= 5000>> <<if _oldRep < 15000>> Your citizens are honored that their arcology owner is willing to put _hisP life in danger. <<else>> Many among the volunteers are awed by your presence; never would they have thought they would fight shoulder to shoulder with their famous arcology owner. <</if>> <<if $PC.career == "celebrity">> They consider it a priceless opportunity to fight together with someone with such a renowned past as yours. Your celebrity past still carries weight. <<elseif $PC.career == "capitalist">> They consider it a priceless opportunity to fight together with one of the great capitalist sharks of their time. Such a fine mind on their side can only bring victory! <<elseif $PC.career == "gang">> Your past, however, does not help you. Many still remember you as the gang leader who used to be on the other side of their guns. <<elseif $PC.career == "escort">> Your past, however, does not help you. Many still remember your past career as an escort and doubt you'll be of any use during the fighting. <<elseif $PC.career == "mercenary">> Your past mercenary work does carries some weight, and many look forward to fight alongside a battle hardened name. <</if>> <</if>> <</if>> <<if App.SecExp.battle.deployedUnits('slaves') >= 1>> <<if _oldAuth <= 2500>> <<if _oldAuth > 1000>> Your slave soldiers do not feel bound to you as much as they should, as your authority is far from absolute. <<else>> Your slave soldiers are often openly rebellious. Only the threat of execution holds them in line. <</if>> <<if $PC.career == "escort">> Fortunately many feel some level of kinship with you, thanks to your past as an escort. <<elseif $PC.career == "servant">> Fortunately many feel some level of kinship with you, thanks to your past as a servant. <<elseif $PC.career == "slaver">> Things are made worse by your past as a notorious slaver. <<elseif $PC.career == "mercenary">> Your past mercenary work carries some weight, and many look forward to fighting alongside a battle hardened name. <</if>> <<elseif _oldAuth >= 5000>> <<if _oldAuth < 15000>> Your slave soldiers show a surprising amount of discipline, thanks to your high authority. <<else>> Your slave soldiers show almost a fanatical level of martial discipline. Your absolute authority has a great effect on them. <</if>> <<if $PC.career == "escort">> Many have an instinctual feeling of kinship towards you because of your past as an escort. <<elseif $PC.career == "servant">> Many have an instinctual feeling of kinship towards you because of your past as a servant. <<elseif $PC.career == "slaver">> Still, some rebellious looks can be spotted once in a while. In their eyes your slaver past will always paint you in a dark light. <<elseif $PC.career == "mercenary">> Your past mercenary work carries some weight, and many look forward to fighting alongside a battle hardened name. <</if>> <</if>> <</if>> <<if App.SecExp.battle.deployedUnits('mercs') >= 1>> <<set _mercLoyalty = App.SecExp.mercenaryAvgLoyalty()>> <<if _mercLoyalty <= 25>> <<if _mercLoyalty <= 10>> Your mercenaries barely bother to pretend being loyal; their battle performance is obviously barely passable. <<else>> Your presence does little to spur your mercenaries into action; their loyalty is straining and their performance suffers. <</if>> <<if $PC.career == "mercenary">> Thankfully they hold in high regard someone who made their fortune as a mercenary themselves. <<elseif $PC.career == "wealth">> They do little to hide the contempt they have for someone who was born into wealth, rather than gaining it through blood, sweat, and tears. <<elseif $PC.career == "servant">> They do little to hide their disgust at being ordered around by an ex-servant. <<elseif $PC.career == "BlackHat">> They do little to hide their disgust at being ordered around by some unscrupulous code monkey. <</if>> <<elseif _mercLoyalty >= 50>> <<if _mercLoyalty < 75>> Your mercenaries are ready to fight their hardest for you, their loyalty a testament to your capability as a leader. <<else>> Your mercenaries fight with a martial fury worthy of religious fanatics. Their loyalty to you is absolute. <</if>> <<if $PC.career == "mercenary">> They're more than willing to follow someone who walked their same steps once as a gun for hire. <<elseif $PC.career == "wealth">> Unfortunately many still resent you being born into your wealth and power, rather than having earned it through blood, sweat, and tears. <<elseif $PC.career == "servant">> Unfortunately some still resent the fact they are ordered around by an ex-servant. <<elseif $PC.career == "BlackHat">> Unfortunately some still resent the fact they are ordered around by an unscrupulous hacker. <</if>> <</if>> <<if _oldRep >= 15000>> Your reputation is so high your name carries power by itself. Having you on the battlefield puts fear even in the hardiest of warriors. <</if>> <</if>> <<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> <<if $PC.career == "mercenary" || $PC.career == "slaver" || $PC.career == "capitalist" || $PC.career == "gang" || $PC.skill.warfare > 75>> The soldiers of $SF.Lower are ready and willing to follow you into battle, confident in your past experience. <<elseif $PC.career == "wealth" || $PC.career == "medicine" || $PC.career == "engineer">> The soldiers of $SF.Lower, as loyal as they are, are not enthusiastic to follow the orders of someone who has no experience leading men. <<elseif $PC.career == "servant">> The soldiers of $SF.Lower, as loyal as they are, are not enthusiastic to follow the orders of an ex-servant. <<elseif $PC.career == "escort">> The soldiers of $SF.Lower, as loyal as they are, are not enthusiastic to follow the orders of an ex-escort. <<elseif $PC.career == "BlackHat">> The soldiers of $SF.Lower, as loyal as they are, are not enthusiastic to follow the orders of a dubious incursion specialist. <</if>> <</if>> <<if $PC.skill.warfare <= 25 && $PC.skill.warfare > 10>> Your inexperience in military matters has a negative impact on your troops performance and the effectiveness of your battle plan. <<elseif $PC.skill.warfare <= 10>> Your ignorance in military matters has a severe negative impact on your troops performance and the effectiveness of your battle plan. <<elseif $PC.skill.warfare >= 50 && $PC.skill.warfare >= 50>> Your experience in military matters has a positive impact on your troops performance and the effectiveness of your battle plan. <<elseif $PC.skill.warfare >= 75>> Your great experience in military matters has a major positive impact on your troops performance and the effectiveness of your battle plan. <</if>> <<if $gainedWarfare == 1>> Battlefield experience increased your understanding of warfare, making you a better commander. <</if>> <<if $PC.health.shortDamage >= 60>> During the fighting @@.red;you were wounded.@@ Your medics assure you it's nothing life threatening, but you'll be weakened for a few weeks. <</if>> <<elseif $leadingTroops == "assistant">> <<setAssistantPronouns>> <<if $auto == 1>>$assistant.name<<else>>You<</if>> let your personal assistant lead the troops. <<if App.SecExp.battle.deployedUnits('mercs') >= 1 || App.SecExp.battle.deployedUnits('militia') >= 1 || App.SecExp.battle.deployedUnits('slaves') >= 1>> No soldier trusts a computer to be their commander, <<if _oldRep < 10000 && _oldAuth < 10000>> no algorithm can substitute experience, <<if $assistant.power == 0>>and as expected, <<else>>however, <</if>> <<else>> but they trust you enough to not question your decision<<if $assistant.power == 0>>, however<<else>>, and <</if>> <</if>> <<else>> You find <</if>> <<if $assistant.power == 0>> your assistant gives a rather poor field performance, due to the limited computing power available to _himA. <<elseif $assistant.power == 1>> your assistant performs decently. While nothing to write home about your men are pleasantly surprised. <<elseif $assistant.power == 2>> your assistant performs admirably. _HisA upgraded computing power allows _himA to monitor the battlefield closely, enhancing the efficiency of your troops and the effectiveness of your battle plan. <<elseif $assistant.power >= 3>> your assistant performs admirably. _HisA vast computing power allows _himA to be everywhere on the battlefield, greatly enhancing the efficiency of your troops and the effectiveness of your battle plan. <</if>> <<elseif $leadingTroops == "bodyguard">> <<setLocalPronouns _S.Bodyguard>> <<if $auto == 1>>$assistant.name<<else>>You<</if>> decided it will be your bodyguard that leads the troops. <<if App.SecExp.battle.deployedUnits('slaves') >= 1>> <<if _S.Bodyguard.devotion < -20>> $His low devotion has a negative impact on the morale of your slave soldiers. <<elseif _S.Bodyguard.devotion > 51>> $His devotion to you has a positive impact on the morale of your slave soldiers, proud to be led by one of their own. <</if>> <</if>> <<if _oldRep < 10000 && _oldAuth < 10000 || _S.Bodyguard.prestige < 1>> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> Your volunteers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a <<if $SF.Toggle && $SF.Active >= 1 && App.SecExp.battle.deployedUnits('mercs') == 1 && $SFIntervention>> commander, and neither are your mercenaries or your soldiers. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> commander, and neither are your mercenaries. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> commander, and neither are your soldiers. <<else>> commander. <</if>> <<elseif $SF.Toggle && $SF.Active >= 1 && App.SecExp.battle.deployedUnits('mercs') == 1 && $SFIntervention>> Your mercenaries and soldiers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> Your mercenaries <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your soldiers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander. <</if>> <<elseif _S.Bodyguard.prestige >= 2>> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> Your <<if App.SecExp.battle.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> volunteers, your mercenaries and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> volunteers and your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> volunteers and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <<else>> volunteers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <</if>> <<elseif App.SecExp.battle.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your mercenaries and soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> Your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <</if>> <<else>> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> Your volunteers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a <<if App.SecExp.battle.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> commander, and neither are your mercenaries and soldiers, but they trust you enough not to question your decision. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> commander, and neither are your mercenaries, but they trust you enough not to question your decision. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> commander, and neither are your soldiers, but they trust you enough not to question your decision. <<else>> commander, but they trust you enough not to question your decision. <</if>> <<elseif App.SecExp.battle.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your mercenaries and soldiers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> Your mercenaries <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your soldiers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. <</if>> <</if>> <<set _BGCareerGivesBonus = setup.bodyguardCareers.includes(_S.Bodyguard.career) || setup.HGCareers.includes(_S.Bodyguard.career) || setup.secExCombatPrestige.includes(_S.Bodyguard.prestigeDesc)>> <<set _BGTotalIntelligence = _S.Bodyguard.intelligence+_S.Bodyguard.intelligenceImplant>> <<if _BGCareerGivesBonus && _BGTotalIntelligence > 95>> With $his experience and $his great intellect, $he is able to exploit the smallest of tactical advantages, making your troops very effective. <<elseif _BGTotalIntelligence > 95>> While $he lacks experience, $his great intellect allows $him to seize and exploit any tactical advantage the battlefield offers $him. <<elseif _BGCareerGivesBonus && _BGTotalIntelligence > 50>> Having both the experience and the intelligence, $he performs admirably as your commander. $His competence greatly increases the efficiency of your troops. <<elseif _BGTotalIntelligence > 50>> Despite not having a lot of experience as a leader, $his intelligence makes $him a good commander, increasing the efficiency of your troops. <<elseif _BGCareerGivesBonus && _BGTotalIntelligence > 15>> Thanks to $his experience, $he is a decent commander, competently guiding your troops through the battle. <<elseif _BGTotalIntelligence > 15>> Lacking experience, $his performance as a commander is rather forgettable. <<elseif !_BGCareerGivesBonus || _BGTotalIntelligence < -50>> Despite the experience $he accumulated during $his past career, $his very low intelligence is a great disadvantage for your troops. <<elseif _BGTotalIntelligence < -50>> Without experience and low intelligence, $he performs horribly as a commander, greatly affecting your troops. <<elseif !_BGCareerGivesBonus || _BGTotalIntelligence < -15>> Despite the experience $he accumulated during $his past career, $he lacks the intelligence to apply it quickly and effectively, making for a rather poor performance in the field. <<elseif _BGTotalIntelligence < -15>> $He lacks the experience and the intelligence to be an effective commander, the performance of your troops suffers because of $his poor leadership. <</if>> <<if $gainedCombat == 1>> During the battle, $he had to fight for $his life, giving $him experience in modern combat. $He is now proficient with modern firearms and hand to hand combat. <</if>> <<if $leaderWounded == 1>> Unfortunately, @@.red;$he sustained major injuries.@@ <<set _woundType = App.SecExp.inflictBattleWound(_S.Bodyguard)>> <<if _woundType == "voice">> A stray bullet hit $his neck. While $he fortunately avoided fatal hemorrhaging, $his vocal cords were irreparably damaged. <<elseif _woundType == "eyes">> Some shrapnel found $his eyes as their final target, blinding $him permanently. <<elseif _woundType == "legs">> A grenade landed close to $him, and $his badly mangled legs had to be amputated. <<elseif _woundType == "arm">> A shrapnel blast mangled one of $his arms, which had to be amputated. <<elseif _woundType == "flesh">> While gravely wounded, it seems $he will be able to fully recover, given enough time. <</if>> Your troops were greatly affected by the loss of their leader. <</if>> <<if $battleResult == 3 && $SecExp.settings.battle.allowSlavePrestige == 1>> <<set _found = 0>> <<for _i = 0; _i < $SecExp.battles.slaveVictories.length; _i++>> <<if $SecExp.battles.slaveVictories[_i].ID == $BodyguardID>> <<set $SecExp.battles.slaveVictories[_i].victories++>> <<set _found = 1>> <<if $SecExp.battles.slaveVictories[_i].victories >= 10>> <<if _S.Bodyguard.prestige < 3>> <<set _S.Bodyguard.prestige++>> <<if _S.Bodyguard.prestige == 1>> <<set _S.Bodyguard.prestigeDesc = "$He is well known for being a great commander.">> <<elseif _S.Bodyguard.prestige == 2>> <<set _S.Bodyguard.prestigeDesc = "$He is famous for being an incredible commander.">> <<elseif _S.Bodyguard.prestige == 3>> <<set _S.Bodyguard.prestigeDesc = "$He is known as a legendary commander all over the world.">> <</if>> <<set $SecExp.battles.slaveVictories[_i].victories = 0>> $He brought your army to victory so many times that $his @@.green;prestige has increased.@@ <</if>> <</if>> <<break>> <</if>> <</for>> <<if _found == 0>> <<set _newSlave = {ID: $BodyguardID, victories: 0}>> <<set $SecExp.battles.slaveVictories.push(_newSlave)>> <</if>> <</if>> <<elseif $leadingTroops == "headGirl">> <<setLocalPronouns _S.HeadGirl>> <<if $auto == 1>>$assistant.name<<else>>You<</if>> decided it will be your Head Girl that leads the troops. <<if App.SecExp.battle.deployedUnits('slaves') >= 1>> <<if _S.HeadGirl.devotion < -20>> $His low devotion has a negative impact on the morale of your slave soldiers. <<elseif _S.HeadGirl.devotion > 51>> $His devotion to you has a positive impact on the morale of your slave soldiers, proud to be led by one of their own. <</if>> <</if>> <<if _oldRep < 10000 && _oldAuth < 10000 || _S.HeadGirl.prestige < 1>> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> Your volunteers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a <<if App.SecExp.battle.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> commander, and neither are your mercenaries or your soldiers. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> commander, and neither are your mercenaries. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> commander, and neither are your soldiers. <<else>> commander. <</if>> <<elseif App.SecExp.battle.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your mercenaries and soldiers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> Your mercenaries <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your soldiers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander. <</if>> <<elseif _S.HeadGirl.prestige >= 2>> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> Your <<if App.SecExp.battle.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> volunteers, your mercenaries and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> volunteers and your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> volunteers and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <<else>> volunteers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <</if>> <<elseif App.SecExp.battle.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your mercenaries and soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> Your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave. <</if>> <<else>> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> Your volunteers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a <<if App.SecExp.battle.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> commander, and neither are your mercenaries and soldiers, but they trust you enough not to question your decision. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> commander, and neither are your mercenaries, but they trust you enough not to question your decision. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> commander, and neither are your soldiers, but they trust you enough not to question your decision. <<else>> commander, but they trust you enough not to question your decision. <</if>> <<elseif App.SecExp.battle.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your mercenaries and soldiers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> Your mercenaries <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your soldiers <<if App.SecExp.battle.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision. <</if>> <</if>> <<if (setup.bodyguardCareers.includes(_S.HeadGirl.career) || setup.HGCareers.includes(_S.HeadGirl.career) || setup.secExCombatPrestige.includes(_S.HeadGirl.prestigeDesc)) && _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 95>> With $his experience and $his great intellect, $he is able to exploits the smallest of tactical advantages, making your troops greatly effective. <<elseif _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 95>> While $he lacks experience, $his great intellect allows $him to seize and exploit any tactical advantage the battlefield offers $him. <<elseif (setup.bodyguardCareers.includes(_S.HeadGirl.career) || setup.HGCareers.includes(_S.HeadGirl.career) || setup.secExCombatPrestige.includes(_S.HeadGirl.prestigeDesc)) && _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 50>> Having both the experience and the intelligence, $he performs admirably as your commander. $His competence greatly increases the efficiency of your troops. <<elseif _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 50>> Despite not having a lot of experience as a leader, $his intelligence makes $him a good commander, increasing the efficiency of your troops. <<elseif (setup.bodyguardCareers.includes(_S.HeadGirl.career) || setup.HGCareers.includes(_S.HeadGirl.career) || setup.secExCombatPrestige.includes(_S.HeadGirl.prestigeDesc)) && _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 15>> Thanks to $his experience, $he is a decent commander, competently guiding your troops through the battle. <<elseif _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant > 15>> Lacking experience $his performance as a commander is rather forgettable. <<elseif !(setup.bodyguardCareers.includes(_S.HeadGirl.career) && setup.HGCareers.includes(_S.HeadGirl.career) && setup.secExCombatPrestige.includes(_S.HeadGirl.prestigeDesc)) || _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant < -50>> Despite the experience $he accumulated during $his past career, $his very low intelligence is a great disadvantage for your troops. <<elseif _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant < -50>> Without experience and low intelligence, $he performs horribly as a commander, greatly affecting your troops. <<elseif !(setup.bodyguardCareers.includes(_S.HeadGirl.career) && setup.HGCareers.includes(_S.HeadGirl.career) && setup.secExCombatPrestige.includes(_S.HeadGirl.prestigeDesc)) || _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant < -15>> Despite the experience $he accumulated during $his past career, $he lacks the intelligence to apply it quickly and effectively, making for a rather poor performance in the field. <<elseif _S.HeadGirl.intelligence+_S.HeadGirl.intelligenceImplant < -15>> $He lacks the experience and the intelligence to be an effective commander, the performance of your troops suffers because of $his poor leadership. <</if>> <<if $gainedCombat == 1>> During the battle, $he had to fight for $his life, giving $him experience in modern combat. $He is now proficient with modern firearms and hand to hand combat. <</if>> <<if $leaderWounded == 1>> Unfortunately, @@.red;$he sustained major injuries.@@ <<set _woundType = App.SecExp.inflictBattleWound(_S.Bodyguard)>> <<if _woundType == "voice">> A stray bullet hit $his neck. While $he fortunately avoided fatal hemorrhaging, $his vocal cords were irreparably damaged. <<elseif _woundType == "eyes">> Some shrapnel found $his eyes as their final target, blinding $him permanently. <<elseif _woundType == "legs">> A grenade landed close to $him, and $his badly mangled legs had to be amputated. <<elseif _woundType == "arm">> A shrapnel blast mangled one of $his arms, which had to be amputated. <<elseif _woundType == "flesh">> While gravely wounded, it seems $he will be able to fully recover, given enough time. <</if>> Your troops were greatly affected by the loss of their leader. <</if>> <<if $battleResult == 3 && $SecExp.settings.battle.allowSlavePrestige == 1>> <<set _found = 0>> <<for _i = 0; _i < $SecExp.battles.slaveVictories.length; _i++>> <<if $SecExp.battles.slaveVictories[_i].ID == $HeadGirlID>> <<set $SecExp.battles.slaveVictories[_i].victories++>> <<set _found = 1>> <<if $SecExp.battles.slaveVictories[_i].victories >= 10>> <<if _S.HeadGirl.prestige < 3>> <<set _S.HeadGirl.prestige++>> <<if _S.HeadGirl.prestige == 1>> <<set _S.HeadGirl.prestigeDesc = "$He is well known for being a great commander.">> <<elseif _S.HeadGirl.prestige == 2>> <<set _S.HeadGirl.prestigeDesc = "$He is famous for being an incredible commander.">> <<elseif _S.HeadGirl.prestige == 3>> <<set _S.HeadGirl.prestigeDesc = "$He is known as a legendary commander all over the world.">> <</if>> <<set $SecExp.battles.slaveVictories[_i].victories = 0>> $He brought your army to victory so many times that $his @@.green;prestige has increased.@@ <</if>> <</if>> <<break>> <</if>> <</for>> <<if _found == 0>> <<set _newSlave = {ID: $HeadGirlID, victories: 0}>> <<set $SecExp.battles.slaveVictories.push(_newSlave)>> <</if>> <</if>> <<elseif $leadingTroops == "citizen">> <<if $auto == 1>>$assistant.name<<else>>You<</if>> decided to appoint one of your volunteers as the commander. <<if $arcologies[0].FSDegradationist == "unset" && $arcologies[0].FSPaternalist == "unset">> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> Your volunteers are honored and pleased that one of their own is leading the defense force of the city. <</if>> <<if App.SecExp.battle.deployedUnits('slaves') >= 1>> Your slaves<<if App.SecExp.battle.deployedUnits('militia') >= 1>>, however,<</if>> are not thrilled by the news. <</if>> <<elseif $arcologies[0].FSPaternalist != "unset">> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> Your volunteers are honored and pleased that one of their own is leading the defense force of the city. <</if>> <<if App.SecExp.battle.deployedUnits('slaves') >= 1>> Thanks to your paternalistic society, your slave soldiers trust your chosen citizen to treat them as more than cannon fodder. <</if>> <<elseif $arcologies[0].FSDegradationist != "unset">> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> Your volunteers are honored and pleased that one of their own is leading the defense force of the city. <</if>> <<if App.SecExp.battle.deployedUnits('slaves') >= 1>> Because of your degradationist society,<<if App.SecExp.battle.deployedUnits('militia') >= 1>> however,<</if>> your slave soldiers are deeply distrustful of the new leader. <</if>> <</if>> <<if $arcologies[0].FSRomanRevivalist != "unset" && App.SecExp.battle.deployedUnits('mercs') >= 1>> Since you decided to revive old Rome, many of your citizens took on themselves to educate themselves in martial matters, because of this your mercenaries feel safe enough in the hands of one of your volunteers. <<elseif $arcologies[0].FSNeoImperialist != "unset" && App.SecExp.battle.deployedUnits('mercs') >= 1>> Since having institued an Imperial society, your citizens have become adept at modern warfare and your hardened mercenaries feel far more comfortable with one of your Imperial Knights in command. <<elseif App.SecExp.battle.deployedUnits('mercs') >= 1>> Your mercenaries are not thrilled to be lead by a civilian without any formal martial training or education. <</if>> <<if $arcologies[0].FSRomanRevivalist != "unset" && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Since you decided to revive old Rome, many of your citizens took on themselves to educate themselves in martial matters, because of this your soldiers feel safe enough in the hands of one of your volunteers. <<elseif $arcologies[0].FSNeoImperialist != "unset" && App.SecExp.battle.deployedUnits('mercs') >= 1>> Since having institued an Imperial society, your citizens have become adept at modern warfare and the line soldiers feel much more comfortable being commanded by one of your Imperial Knights. <<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> You soldiers are not thrilled to be lead by a civilian without any formal martial training or education. <</if>> <<if $leaderWounded == 1>> During the battle a stray bullet managed to reach the leader. Your troops were greatly affected by the loss. <</if>> <<elseif $leadingTroops == "mercenary">> <<if $auto == 1>>$assistant.name<<else>>You<</if>> decided to appoint one of your mercenary officers as the commander. <<if App.SecExp.battle.deployedUnits('mercs') >= 1>> Your mercenaries of course approve of your decision. <</if>> <<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> Your soldiers feel more confident going into battle with an experienced commander. <</if>> <<if $arcologies[0].FSRomanRevivalist != "unset" && App.SecExp.battle.deployedUnits('militia') >= 1>> Since you decided to revive old Rome, your volunteers are more willing to trust one of your mercenaries as their leader. <<elseif App.SecExp.battle.deployedUnits('militia') >= 1>> Your volunteers are not enthusiastic at the prospect of being commanded around by a gun for hire. <</if>> <<if $arcologies[0].FSDegradationist != "unset" && App.SecExp.battle.deployedUnits('slaves') >= 1>> Because of your degradationist society, your slave soldiers are highly distrustful of the gun for hire you forced them to accept as leader. <</if>> <<if $leaderWounded == 1>> During the battle a stray bullet managed to reach the mercenary. Your troops were greatly affected by the loss of their leader. <</if>> <<elseif $leadingTroops == "colonel">> <<if $auto == 1>>$assistant.name<<else>>You<</if>> decided to appoint The Colonel as the commander. <<if App.SecExp.battle.deployedUnits('mercs') >= 1>> Your mercenaries approve of such decisions, as they feel more confident by having a good, experienced commander. <</if>> <<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> The soldiers of $SF.Lower obviously approved of your decision. <</if>> <<if $arcologies[0].FSRomanRevivalist != "unset" && App.SecExp.battle.deployedUnits('militia') >= 1>> Since you decided to revive old Rome, your volunteers are more willing to trust one of your soldiers as their leader. <<elseif $arcologies[0].FSNeoImperialist != "unset" && App.SecExp.battle.deployedUnits('militia') >= 1>> Under the strict hierarchy of your Imperial society, the militia is more willing to follow the Colonel's commands. <<elseif App.SecExp.battle.deployedUnits('militia') >= 1>> Your volunteers are not enthusiastic at the prospect of being commanded around by an old style military officer. <</if>> <<if $arcologies[0].FSDegradationist != "unset" && App.SecExp.battle.deployedUnits('slaves') >= 1>> Because of your degradationist society, your slave soldiers are highly distrustful of the soldier you forced them to accept as leader. <</if>> <<if $leaderWounded == 1>> During the battle a stray bullet managed to reach The Colonel, wounding her slightly. Your troops were greatly affected by the loss of their leader. <</if>> <</if>> <br><br> /* tactics */ <<if $auto == 1>>$assistant.name<<else>>You<</if>> <<if $chosenTactic == "Bait and Bleed">> chose to employ "bait and bleed" tactics or relying on quick attacks and harassment to tire and wound the enemy until their surrender. <<elseif $chosenTactic == "Guerrilla">> chose to employ "guerrilla" tactics or relying on stealth, terrain knowledge and subterfuge to undermine and ultimately destroy the enemy. <<elseif $chosenTactic == "Choke Points">> chose to employ "choke points" tactics or the extensive use of fortified or highly defensive positions to slow down and eventually stop the enemy. <<elseif $chosenTactic == "Interior Lines">> chose to employ "interior lines" tactics or exploiting the defender's shorter front to quickly disengage and concentrate troops when and where needed. <<elseif $chosenTactic == "Pincer Maneuver">> chose to employ "pincer maneuver" tactics or attempting to encircle the enemy by faking a collapsing center front. <<elseif $chosenTactic == "Defense In Depth">> chose to employ "defense in depth" tactics or relying on mobility to disengage and exploit overextended enemy troops by attacking their freshly exposed flanks. <<elseif $chosenTactic == "Blitzkrieg">> chose to employ "blitzkrieg" tactics or shattering the enemy's front-line with a violent, concentrated armored assault. <<elseif $chosenTactic == "Human Wave">> chose to employ "human wave" tactics or overwhelming the enemy's army with a massive infantry assault. <</if>> <<if $battleTerrain == "urban">> <<if $chosenTactic == "Bait and Bleed">> The urban terrain synergized well with bait and bleed tactics, slowly chipping away at the enemy's forces from the safety of the narrow streets and empty buildings. <<elseif $chosenTactic == "Guerrilla">> The urban terrain synergized well with guerrilla tactics, eroding your enemy's determination from the safety of the narrow streets and empty buildings. <<elseif $chosenTactic == "Choke Points">> The urban environment offers many opportunities to hunker down and stop the momentum of the enemy's assault while keeping your soldiers in relative safety. <<elseif $chosenTactic == "Interior Lines">> While the urban environment offers many highly defensive position, it does restrict movement and with it the advantages of exploiting interior lines. <<elseif $chosenTactic == "Pincer Maneuver">> The urban terrain does not allow for wide maneuvers, the attempts of your forces to encircle the attackers are mostly unsuccessful. <<elseif $chosenTactic == "Defense In Depth">> While the urban environment offers many defensive positions, it limits mobility, limiting the advantages of using a defense in depth tactic. <<elseif $chosenTactic == "Blitzkrieg">> The urban terrain is difficult to traverse, making your troops attempt at a lightning strike unsuccessful. <<elseif $chosenTactic == "Human Wave">> The urban terrain offers great advantages to the defender, your men find themselves in great disadvantage while mass assaulting the enemy's position. <</if>> <<elseif $battleTerrain == "rural">> <<if $chosenTactic == "Bait and Bleed">> The open terrain of rural lands does not lend itself well to bait and bleed tactics, making it harder for your men to achieve tactical superiority. <<elseif $chosenTactic == "Guerrilla">> The open terrain of rural lands does not offer many hiding spots, making it harder for your men to perform guerrilla actions effectively. <<elseif $chosenTactic == "Choke Points">> The open terrain of rural lands does not offer many natural choke points, making it hard for your troops to funnel the enemy towards highly defended positions. <<elseif $chosenTactic == "Interior Lines">> The open terrain allows your men to easily exploit the superior mobility of the defender, making excellent use of interior lines to strike where it hurts. <<elseif $chosenTactic == "Pincer Maneuver">> The open terrain affords your men great mobility, allowing them to easily position themselves for envelopment. <<elseif $chosenTactic == "Defense In Depth">> The open terrain affords your men great mobility, allowing them to exploit overextended assaults and concentrate where and when it matters. <<elseif $chosenTactic == "Blitzkrieg">> The open terrain affords your men great mobility, making it easier to accomplish concentrated lightning strikes. <<elseif $chosenTactic == "Human Wave">> The open terrain affords your men great mobility, making it easier to overwhelm the enemy with mass assaults. <</if>> <<elseif $battleTerrain == "hills">> <<if $chosenTactic == "Bait and Bleed">> While the hills offer some protection, they also make it harder to maneuver; bait and bleed tactics will not be 100% effective here. <<elseif $chosenTactic == "Guerrilla">> The hills offer protection to both your troops and your enemy's, making it harder for your men to accomplish guerrilla attacks effectively. <<elseif $chosenTactic == "Choke Points">> While not as defensible as mountains, hills offer numerous opportunities to funnel the enemy towards highly defensible choke points. <<elseif $chosenTactic == "Interior Lines">> The limited mobility on hills hampers the capability of your troops to exploit the defender's greater mobility afforded by interior lines. <<elseif $chosenTactic == "Pincer Maneuver">> Limited mobility due to the hills is a double edged sword, affording your men a decent shot at encirclement. <<elseif $chosenTactic == "Defense In Depth">> The limited mobility on hills hampers the capability of your troops to use elastic defense tactics. <<elseif $chosenTactic == "Blitzkrieg">> The limited mobility on hills hampers the capability of your troops to organize lightning strikes. <<elseif $chosenTactic == "Human Wave">> The defensibility of hills makes it harder to accomplish victory through mass assaults. <</if>> <<elseif $battleTerrain == "coast">> <<if $chosenTactic == "Bait and Bleed">> On the coast there's little space and protection to effectively employ bait and bleed tactics. <<elseif $chosenTactic == "Guerrilla">> On the coast there's little space and protection to effectively employ guerrilla tactics. <<elseif $chosenTactic == "Choke Points">> Amphibious attacks are difficult in the best of situations; the defender has a very easy time funneling the enemy towards their key defensive positions. <<elseif $chosenTactic == "Interior Lines">> While in an amphibious landing mobility is not the defender's best weapon, exploiting interior lines still affords your troops some advantages. <<elseif $chosenTactic == "Pincer Maneuver">> Attempting to encircle a landing party is not the best course of action, but not the worst either. <<elseif $chosenTactic == "Defense In Depth">> In an amphibious assault it's very easy for the enemy to overextend, making defense in depth tactics quite effective. <<elseif $chosenTactic == "Blitzkrieg">> The rough, restricted terrain does not lend itself well to lightning strikes, but the precarious position of the enemy still gives your mobile troops tactical superiority. <<elseif $chosenTactic == "Human Wave">> The rough, restricted terrain does not lend itself well to mass assaults, but the precarious position of the enemy still gives your troops tactical superiority. <</if>> <<elseif $battleTerrain == "outskirts">> <<if $chosenTactic == "Bait and Bleed">> Fighting just beneath the walls of the arcology does not allow for the dynamic redeployment of troops bait and bleed tactics would require. <<elseif $chosenTactic == "Guerrilla">> Fighting just beneath the walls of the arcology does not allow for the dynamic redeployment of troops guerrilla tactics would require. <<elseif $chosenTactic == "Choke Points">> The imposing structure of the arcology itself provides plenty of opportunities to create fortified choke points from which to shatter the enemy assault. <<elseif $chosenTactic == "Interior Lines">> While the presence of the arcology near the battlefield is an advantage, it does limit maneuverability, lowering overall effectiveness of interior lines tactics. <<elseif $chosenTactic == "Pincer Maneuver">> While the presence of the arcology near the battlefield is an advantage, it does limit maneuverability, lowering the chances of making an effective encirclement. <<elseif $chosenTactic == "Defense In Depth">> Having the arcology near the battlefield means there are limited available maneuvers to your troops, who still needs to defend the structure, making defense in depth tactics not as effective. <<elseif $chosenTactic == "Blitzkrieg">> While an assault may save the arcology from getting involved at all, having the imposing structure so near does limit maneuverability and so the impetus of the lightning strike. <<elseif $chosenTactic == "Human Wave">> While an attack may save the arcology from getting involved at all, having the imposing structure so near does limit maneuverability and so the impetus of the mass assault. <</if>> <<elseif $battleTerrain == "mountains">> <<if $chosenTactic == "Bait and Bleed">> While the mountains offer great protection, they also limit maneuverability; bait and bleed tactics will not be quite as effective here. <<elseif $chosenTactic == "Guerrilla">> The mountains offer many excellent hiding spots and defensive positions, making guerrilla tactics very effective. <<elseif $chosenTactic == "Choke Points">> The mountains offer plenty of opportunity to build strong defensive positions from which to shatter the enemy's assault. <<elseif $chosenTactic == "Interior Lines">> While the rough terrain complicates maneuvers, the defensive advantages offered by the mountains offsets its negative impact. <<elseif $chosenTactic == "Pincer Maneuver">> The rough terrain complicates maneuvers; your men have a really hard time pulling off an effective encirclement in this environment. <<elseif $chosenTactic == "Defense In Depth">> While mobility is limited, defensive positions are plentiful; your men are not able to fully exploit overextended assaults, but are able to better resist them. <<elseif $chosenTactic == "Blitzkrieg">> The rough terrain complicates maneuvers; your men have a really hard time pulling off an effective lightning strike in this environment. <<elseif $chosenTactic == "Human Wave">> The rough terrain complicates maneuvers; your men have a really hard time pulling off an effective mass assault in this environment. <</if>> <<elseif $battleTerrain == "wasteland">> <<if $chosenTactic == "Bait and Bleed">> While the wastelands are mostly open terrain, there are enough hiding spots to make bait and bleed tactics work well enough. <<elseif $chosenTactic == "Guerrilla">> While the wastelands are mostly open terrain, there are enough hiding spots to make guerrilla tactics work well enough. <<elseif $chosenTactic == "Choke Points">> The wastelands are mostly open terrain; your men have a difficult time setting up effective fortified positions. <<elseif $chosenTactic == "Interior Lines">> The wastelands, while rough, are mostly open terrain, where your men can exploit to the maximum the superior mobility of the defender. <<elseif $chosenTactic == "Pincer Maneuver">> The wastelands, while rough, are mostly open terrain; your men can set up an effective encirclement here. <<elseif $chosenTactic == "Defense In Depth">> The wastelands, while rough, are mostly open terrain, allowing your men to liberally maneuver to exploit overextended enemies. <<elseif $chosenTactic == "Blitzkrieg">> The wastelands, while rough, are mostly open terrain, where your men are able to mount effective lightning strikes. <<elseif $chosenTactic == "Human Wave">> The wastelands, while rough, are mostly open terrain, where your men are able to mount effective mass assaults. <</if>> <</if>> <<if $chosenTactic == "Bait and Bleed">> <<if $attackType == "raiders">> Since the bands of raiders are used to be on high alert and on the move constantly, bait and bleed tactics are not effective against them. <<elseif $attackType == "free city">> The modern armies hired by Free Cities are decently mobile, which means quick hit and run attacks will be less successful, but their discipline and confidence still make them quite susceptible to this type of attack. <<elseif $attackType == "old world">> While old world armies are tough nuts to crack, their predictability makes them the perfect target for hit and run and harassment tactics. <<elseif $attackType == "freedom fighters">> Freedom fighters live every day as chasing and being chased by far superior forces, they are far more experienced than your troops in this type of warfare and much less susceptible to it. <</if>> <<elseif $chosenTactic == "Guerrilla">> <<if $attackType == "raiders">> Since the bands of raiders are used to be on high alert and on the move constantly, guerrilla tactics are not effective against them. <<elseif $attackType == "free city">> The modern armies hired by Free Cities are highly mobile, which means quick hit and run attacks will be less successful, but their discipline and confidence still make them quite susceptible to this type of attack. <<elseif $attackType == "old world">> While old world armies are tough nuts to crack, their predictability makes them the perfect target for hit and run and harassment tactics. <<elseif $attackType == "freedom fighters">> Freedom fighters live every day as chasing and being chased by far superior forces, they are far more experienced than your troops in this type of warfare and much less susceptible to it. <</if>> <<elseif $chosenTactic == "Choke Points">> <<if $attackType == "raiders">> Raiders lack heavy weaponry or armor, so making use of fortified positions is an excellent way to dissipate the otherwise powerful momentum of their assault. <<elseif $attackType == "free city">> The high tech equipment Free Cities can afford to give their guns for hire means there's no defensive position strong enough to stop them, still the relatively low numbers means they will have to take a careful approach, slowing them down. <<elseif $attackType == "old world">> Old world armies have both the manpower and the equipment to conquer any defensive position, making use of strong fortifications will only bring you this far against them. <<elseif $attackType == "freedom fighters">> The lack of specialized weaponry means freedom fighters have a rather hard time overcoming tough defensive positions, unfortunately they have also a lot of experience in avoiding them. <</if>> <<elseif $chosenTactic == "Interior Lines">> <<if $attackType == "raiders">> The highly mobile horde of raiders will not give much room for your troops to maneuver, lowering their tactical superiority. <<elseif $attackType == "free city">> While decently mobile, Free Cities forces are not in high enough numbers to risk maintaining prolonged contact, allowing your troops to quickly disengage and redeploy where it hurts. <<elseif $attackType == "old world">> Old world armies are not famous for the mobility, which makes them highly susceptible to any tactic that exploits maneuverability and speed. <<elseif $attackType == "freedom fighters">> While not the best equipped army, the experience and mobility typical of freedom fighters groups make them tough targets for an army that relies itself on mobility. <</if>> <<elseif $chosenTactic == "Pincer Maneuver">> <<if $attackType == "raiders">> While numerous, the undisciplined masses of raiders are easy prey for encirclements. <<elseif $attackType == "free city">> While decently mobile, the low number of Free Cities expedition forces make them good candidates for encirclements. <<elseif $attackType == "old world">> The discipline and numbers of old world armies make them quite difficult to encircle. <<elseif $attackType == "freedom fighters">> While not particularly mobile, freedom fighters are used to fight against overwhelming odds, diminishing the effectiveness of the encirclement. <</if>> <<elseif $chosenTactic == "Defense In Depth">> <<if $attackType == "raiders">> While their low discipline makes them prime candidates for an elastic defense type of strategy, their high numbers limit your troops maneuverability. <<elseif $attackType == "free city">> With their low numbers Free Cities mercenaries are quite susceptible to this type of tactic, despite their mobility. <<elseif $attackType == "old world">> With their low mobility old world armies are very susceptible to this type of strategy. <<elseif $attackType == "freedom fighters">> Low mobility and not particularly high numbers mean freedom fighters can be defeated by employing elastic defense tactics. <</if>> <<elseif $chosenTactic == "Blitzkrieg">> <<if $attackType == "raiders">> With their low discipline and lack of heavy equipment, lightning strikes are very effective against raider hordes. <<elseif $attackType == "free city">> Having good equipment and discipline on their side, Free Cities expeditions are capable of responding to even strong lightning strikes. <<elseif $attackType == "old world">> While disciplined, old world armies low mobility makes them highly susceptible to lightning strikes. <<elseif $attackType == "freedom fighters">> While not well equipped, freedom fighters have plenty of experience fighting small, mobile attacks, making them difficult to defeat with lightning strikes. <</if>> <<elseif $chosenTactic == "Human Wave">> <<if $attackType == "raiders">> The hordes of raiders are much more experienced than your soldiers in executing mass assaults and they also have a lot more bodies to throw in the grinder. <<elseif $attackType == "free city">> The good equipment and mobility of Free Cities mercenaries cannot save them from an organized mass assault. <<elseif $attackType == "old world">> Unfortunately the discipline and good equipment of old world armies allow them to respond well against a mass assault. <<elseif $attackType == "freedom fighters">> The relative low numbers and not great equipment typical of freedom fighters make them susceptible to being overwhelmed by an organized mass assault. <</if>> <</if>> In the end <<if $leadingTroops == "PC">>you were<<else>>your commander was<</if>> <<if $tacticsSuccessful == 1>> @@.green;able to successfully employ <<print $chosenTactic>> tactics,@@ greatly enhancing <<else>> @@.red;not able to effectively employ <<print $chosenTactic>> tactics,@@ greatly affecting <</if>> the efficiency of your army. <br> <<include "unitsBattleReport">> <<if $SF.Toggle && $SF.Active >= 1 && ($SF.Squad.Firebase >= 7 || $SF.Squad.GunS >= 1 || $SF.Squad.Satellite >= 5 || $SF.Squad.GiantRobot >= 6 || $SF.Squad.MissileSilo >= 1)>> /* SF upgrades effects */ <br><br> <<if $SF.Squad.Firebase >= 7>> The artillery pieces installed around $SF.Lower's firebase provided vital fire support to the troops in the field. <</if>> <<if $SF.Squad.GunS >= 1>> The gunship gave our troops an undeniable advantage in recon capabilities, air superiority and fire support. <</if>> <<if $SF.Squad.Satellite >= 5 && $SF.SatLaunched > 0>> The devastating power of $SF.Lower's satellite was employed with great efficiency against the enemy. <</if>> <<if $SF.Squad.GiantRobot >= 6>> The giant robot of $SF.Lower proved to be a great boon to our troops, shielding many from the worst the enemy had to offer. <</if>> <<if $SF.Squad.MissileSilo >= 1>> The missile silo exterminated many enemy soldiers even before the battle would begin. <</if>> <</if>> <</if>> /* closes check for surrender and bribery */ <br><br> <<set _menialPrice = Math.trunc(($slaveCostFactor*1000)/100)*100>> <<set _menialPrice = Math.clamp(_menialPrice, 500, 1500)>> <<set _captives = Math.trunc(_captives)>> <<if _captives > 0>> During the battle <<print _captives>> attackers were captured. /* <<if random(1,100) <= 25>> <<set _roll = random(1,100)>> <<if _roll <= 33>> Three of them have the potential to be sex slaves. <<set _candidates = 3>> <<elseif _roll <= 66>> Two of them have the potential to be sex slaves. <<set _candidates = 2>> <<else>> One of them have the potential to be sex slaves. <<set _candidates = 1>> <</if>> <</if>> */ <br> <span id="captOptions"> <<link "sell them all immediately">> <<run cashX((_menialPrice * _captives), "menialTransfer")>> <<replace "#captOptions">>Captives sold<</replace>> <</link>> | <<link "Keep them as menial slaves">> <<set $menials += _captives>> <<replace "#captOptions">>Captives added as menial slaves<</replace>> <</link>> </span> <</if>> /* resets variables */ <<set $leaderWounded = 0>> <<set $gainedWarfare = 0>> <<set $tacticsSuccessful = 0>> <<set $attackType = "none">> <<set $chosenTactic = "none">> <<set $leadingTroops = "none">> <<set $attackTroops = 0>> <<set $attackEquip = 0>> <<set $battleTerrain = "none">> <<set $attackThisWeek = 0>> <<set $enemyLosses = 0>> <<set $losses = 0>> <<set $battleTurns = 0>> <<set $majorBattle = 0>> <<set $SFIntervention = 0>> <<set $secBots.isDeployed = 0>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<set $militiaUnits[_i].isDeployed = 0>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<set $slaveUnits[_i].isDeployed = 0>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<set $mercUnits[_i].isDeployed = 0>> <</for>>
MonsterMate/fc
src/Mods/SecExp/attackReport.tw
tw
mit
98,052
:: authorityReport [nobr] <<if $useTabs == 0>>__Authority__<</if>> <br> Your authority is <<if $SecExp.core.authority > 19500>> nearly absolute. The arcology is yours to command as it pleases you. <<elseif $SecExp.core.authority > 15000>> extremely high. There's little you cannot do within the walls of your arcology. <<elseif $SecExp.core.authority > 10000>> high. You command respect and fear in equal measure. <<elseif $SecExp.core.authority > 5000>> moderate. You command some respect from your citizens. <<else>> low. You command no respect or fear from your citizens. <</if>> <<set _authGrowth = 0>> <<if $PC.career == "wealth">> As part of the idle rich, you were used to having obedience coming naturally to you. Now you find it harder to maintain authority over the arcology. <<set _authGrowth -= (10 * random(5,15))>> <<elseif $PC.career == "slaver">> Your past as a slaver helps you assert your authority over the arcology. <<set _authGrowth += (10 * random(5,15))>> <<elseif $PC.career == "escort">> Given your past career as an escort, you find it hard to assert your authority over the arcology and its inhabitants. <<set _authGrowth -= (10 * random(5,15))>> <<elseif $PC.career == "servant">> Given your past career as a servant, you find it hard to assert your authority over the arcology and its inhabitants. <<set _authGrowth -= (10 * random(5,15))>> <<elseif $PC.career == "BlackHat">> Given your past career as a (rather questionable) incursion specialist, you find it hard to assert your authority over the arcology and its inhabitants, despite what you may know about them. <<set _authGrowth -= (10 * random(5,15))>> <<elseif $PC.career == "gang">> Given your past life as a gang leader, you find it easier to assert your authority over the arcology and its inhabitants. <<set _authGrowth += (10 * random(5,15))>> <</if>> <<if $rep >= 19500>> Your legend is so well known that your mere presence commands respect and obedience, increasing your authority. <<set _authGrowth += (10 * random(10,20))>> <<elseif $rep >= 15000>> Your reputation is so high that your mere presence commands respect, increasing your authority. <<set _authGrowth += (10 * random(5,15))>> <<elseif $rep >= 10000>> Your reputation is high enough that your presence commands some respect, increasing your authority. <<set _authGrowth += (10 * random(2,8))>> <</if>> <<if $SecExp.core.security >= 90>> Your arcology is incredibly secure and your citizens know quite well who to thank, greatly increasing your authority. <<set _authGrowth += (10 * random(10,20))>> <<elseif $SecExp.core.security >= 70>> Your arcology is really secure and your citizens know quite well who to thank, increasing your authority. <<set _authGrowth += (10 * random(5,15))>> <<elseif $SecExp.core.security >= 50>> Your arcology is quite secure and your citizens know who to thank, increasing your authority. <<set _authGrowth += (10 * random(2,8))>> <</if>> <<if $SecExp.core.crimeLow >= 90>> The all powerful criminal organizations controlling the arcology have a very easy time undermining your authority. <<set _authGrowth -= (10 * random(10,20))>> <<elseif $SecExp.core.crimeLow >= 70>> Crime is king in the arcology, powerful criminals have a very easy time undermining your authority. <<set _authGrowth -= (10 * random(5,15))>> <<elseif $SecExp.core.crimeLow >= 50>> Criminal organizations have a strong foothold in the arcology, their activities undermine your authority. <<set _authGrowth -= (10 * random(2,8))>> <</if>> <<if $averageDevotion >= 50 && $averageTrust >= 50>> The high devotion and trust of your slaves speak eloquently of your leadership capabilities, helping your authority grow. <<set _authGrowth += (5 * (($averageDevotion + $averageTrust) / 10))>> <<elseif $averageDevotion >= 50>> The high devotion of your slaves speaks eloquently of your leadership capabilities, helping your authority grow. <<set _authGrowth += (5 * ($averageDevotion / 10))>> <<elseif $averageTrust >= 50>> The high trust of your slaves speaks eloquently of your leadership capabilities, helping your authority grow. <<set _authGrowth += (5 * ($averageTrust / 10))>> <</if>> <<if $arcologies[0].ownership >= 90>> You own so much of the arcology that your authority quickly increases. <<set _authGrowth += (5 * Math.trunc($arcologies[0].ownership / 10))>> <<elseif $arcologies[0].ownership >= 70>> You own a big part of the arcology, causing your authority to increase. <<set _authGrowth += (5 * Math.trunc($arcologies[0].ownership / 10))>> <<elseif $arcologies[0].ownership >= 50>> You own the majority of the arcology, causing your authority to slowly increase. <<set _authGrowth += (5 * Math.trunc($arcologies[0].ownership / 10))>> <<else>> Your low ownership of the arcology causes your authority to decrease. <<set _authGrowth -= (5 * Math.trunc($arcologies[0].ownership / 10))>> <</if>> <<if App.SecExp.battle.activeUnits() >= 9>> Your military is massive; commanding so many troops greatly increases your authority. <<elseif App.SecExp.battle.activeUnits() >= 7>> Your military is huge; commanding such a number of soldiers increases your authority. <<elseif App.SecExp.battle.activeUnits() >= 4>> Your military is at a decent size; commanding a small army increases your authority. <</if>> <<if App.SecExp.battle.activeUnits() >= 4>> <<set _authGrowth += (12 * App.SecExp.battle.activeUnits())>> <</if>> <<set _size = App.SF.upgrades.total()>> <<if $SF.Toggle && $SF.Active >= 1 && _size > 10>> Having a powerful special force increases your authority. <<set _authGrowth += (_size/10)>> <</if>> <<if $arcologies[0].FSChattelReligionist >= 90>> Religious organizations have a tight grip on the minds of your residents and their dogma greatly helps your authority grow. <<set _authGrowth += $arcologies[0].FSChattelReligionist>> <<elseif $arcologies[0].FSChattelReligionist >= 50>> Religious organizations have a tight grip on the minds of your residents and their dogma helps your authority grow. <<set _authGrowth += $arcologies[0].FSChattelReligionist>> <</if>> <<set _elite = $arcologies[0].FSNeoImperialistLaw2 == 1 ? 'Barons' : 'Societal Elite'>> <<if $arcologies[0].FSRestart >= 90>> The arcology's society is extremely stratified. The reliance on the _elite by the lower classes greatly increases your reputation. <<set _authGrowth += $arcologies[0].FSRestart>> <<elseif $arcologies[0].FSRestart >= 50>> The arcology's society is very stratified. The reliance on the _elite by the lower classes increases your reputation. <<set _authGrowth += $arcologies[0].FSRestart>> <</if>> <<if $arcologies[0].FSPaternalist >= 90>> Your extremely paternalistic society has the unfortunate side effects of spreading dangerous ideals in the arcology, greatly damaging your authority. <<set _authGrowth -= Math.clamp($arcologies[0].FSPaternalist, 0, 100)>> <<elseif $arcologies[0].FSPaternalist >= 50>> Your paternalistic society has the unfortunate side effects of spreading dangerous ideals in the arcology, damaging your authority. <<set _authGrowth -= Math.clamp($arcologies[0].FSPaternalist, 0, 100)>> <</if>> <<if $arcologies[0].FSNull >= 90>> Extreme cultural openness allows dangerous ideas to spread in your arcology, greatly damaging your reputation. <<set _authGrowth -= $arcologies[0].FSNull>> <<elseif $arcologies[0].FSNull >= 50>> Mild cultural openness allows dangerous ideas to spread in your arcology, damaging your reputation. <<set _authGrowth -= $arcologies[0].FSNull>> <</if>> <<if $SecExp.buildings.propHub>> <<if $SecExp.buildings.propHub.upgrades.miniTruth >= 1>> Your authenticity department works tirelessly to impose your authority in all of the arcology. <<set _authGrowth += (15 * $SecExp.buildings.propHub.upgrades.miniTruth)>> <</if>> <<if $SecExp.buildings.propHub.upgrades.secretService >= 1>> Your secret services constantly keep under surveillance any potential threat, intervening when necessary. Rumors of the secretive security service and mysterious disappearances make your authority increase. <<set _authGrowth += (15 * $SecExp.buildings.propHub.upgrades.secretService)>> <</if>> <</if>> <<if App.SecExp.upkeep.edictsAuth() > 0>> Some of your authority is spent maintaining your edicts. <<set _authGrowth -= App.SecExp.upkeep.edictsAuth()>> <</if>> This week <<if _authGrowth > 0>> @@.green;authority has increased.@@ <<elseif _authGrowth == 0>> @@.yellow;authority did not change.@@ <<else>> @@.red;authority has decreased.@@ <</if>> <<set $SecExp.core.authority += _authGrowth>> <<set $SecExp.core.authority = Math.trunc(Math.clamp($SecExp.core.authority, 0, 20000))>> <<if $SecExp.settings.rebellion.enabled == 1>> <br><br> <<include "rebellionGenerator">> /* rebellions */ <</if>>
MonsterMate/fc
src/Mods/SecExp/authorityReport.tw
tw
mit
8,803
:: propagandaHub [nobr jump-to-safe jump-from-safe] <<if $career == "capitalist" || $career == "celebrity" || $career == "wealth">> <<set _HistoryDiscount = .5>> <<else>> <<set _HistoryDiscount = 1>> <</if>> <<set $nextButton = "Back">> <<set $nextLink = "Main">> Propaganda Hub <hr> The propaganda hub is a surprisingly inconspicuous building, dimly lit from the outside. You are well aware however of its role and its importance. You confidently enter its unassuming doorway and calmly review the work being done here. <<if $RecruiterID != 0>> <<setLocalPronouns _S.Recruiter>> <br><br> <<if $SecExp.buildings.propHub.recruiterOffice == 0>> <<link "Give <span class='slave-name'><<= SlaveFullName(_S.Recruiter)>></span> an office.""propagandaHub">> <<set $SecExp.buildings.propHub.recruiterOffice = 1>> <</link>> <<else>> <<link "Remove <span class='slave-name'><<= SlaveFullName(_S.Recruiter)>></span> from $his office.""propagandaHub">> <<set $SecExp.buildings.propHub.recruiterOffice = 0>> <</link>> <</if>> <br>//Providing them with an office will help boost your chosen campaign. This also stacks with the campaign boost edict.// <</if>> /* classic propaganda */ <br><br><<if $SecExp.buildings.propHub.upgrades.campaign == 0>> <<link "Set up a propaganda campaign" "propagandaHub">> <<set $SecExp.buildings.propHub.upgrades.campaign += 1>> <<run cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount)), "capEx")>> <<set $SecExp.buildings.propHub.focus = "social engineering">> <</link>> <br>Set up a propaganda campaign to align your citizens with your goals. <br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount))>>. Will provide the focused resource each week, but will cost reputation in upkeep.// <<else>> You have set up a team of trained slaves and expert propagandists, ready to spread the message of your choosing to the population. <br>Focus on: <<if $SecExp.buildings.propHub.focus == "social engineering">> social engineering <<else>> <<link "social engineering" "propagandaHub">> <<set $SecExp.buildings.propHub.focus = "social engineering">> <</link>> <</if>> | <<if $SecExp.buildings.propHub.focus == "immigration">> immigration <<else>> <<link "immigration" "propagandaHub">> <<set $SecExp.buildings.propHub.focus = "immigration">> <</link>> <</if>> | <<if $SecExp.buildings.propHub.focus == "enslavement">> enslavement <<else>> <<link "enslavement" "propagandaHub">> <<set $SecExp.buildings.propHub.focus = "enslavement">> <</link>> <</if>> <<if $SecExp.edicts.defense.militia >= 1>> | <<if $SecExp.buildings.propHub.focus == "recruitment">> recruitment <<else>> <<link "recruitment" "propagandaHub">> <<set $SecExp.buildings.propHub.focus = "recruitment">> <</link>> <</if>> <</if>> <br> You are concentrating your propaganda efforts towards <<if $SecExp.buildings.propHub.focus == "social engineering">> increasing the acceptance of your chosen future societies. <<elseif $SecExp.buildings.propHub.focus == "immigration">> convincing more people to immigrate to your arcology. <<elseif $SecExp.buildings.propHub.focus == "enslavement">> convincing more people to voluntarily enslave themselves. <<elseif $SecExp.buildings.propHub.focus == "recruitment">> convincing more citizens to enter the militia. <</if>> <br> <<if $SecExp.buildings.propHub.upgrades.campaign < 5>> <<set _costC = Math.trunc(5000 * $upgradeMultiplierArcology * ($SecExp.buildings.propHub.upgrades.campaign + 1) * _HistoryDiscount*$HackingSkillMultiplier)>> <<link "Invest more resources in the propaganda machine" "propagandaHub">> <<run cashX(-_costC, "capEx")>> <<set $SecExp.buildings.propHub.upgrades.campaign += 1>> <<= IncreasePCSkills('hacking', 0.5)>> <</link>> <br>Invest more resources into the project to increase its effectiveness. <br>//Costs <<print cashFormat(_costC)>>. Will provide more of the focused resource each week but increase reputation upkeep.// <<else>> You upgraded your propaganda machine to its limits. <</if>> <</if>> <br> <br> /* ministry of truth */ <<if $SecExp.buildings.propHub.upgrades.miniTruth == 0>> <<link "Set up the authenticity department" "propagandaHub">> <<set $SecExp.buildings.propHub.upgrades.miniTruth += 1>> <<run cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount)), "capEx")>> <</link>> <br>Set up a department tasked with guaranteeing the authenticity of all information available in the arcology. Of course if reality is against what is best for the arcology, then it should be redacted as well. <br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology * _HistoryDiscount))>>. Will provide authority and unlock special upgrades, but will increase upkeep.// <<else>> <<if $SecExp.buildings.propHub.upgrades.miniTruth < 5>> <<set _costM = Math.trunc(5000*$upgradeMultiplierArcology * ($SecExp.buildings.propHub.upgrades.miniTruth + 1) * _HistoryDiscount)>> <<link "Enlarge the authenticity department" "propagandaHub">> <<run cashX(-_costM, "capEx")>> <<set $SecExp.buildings.propHub.upgrades.miniTruth += 1>> <</link>> <br>Invest more resources into the project to increase its effectiveness. <br>//Costs <<print cashFormat(_costM)>>. Will provide more authority each week, but increases upkeep.// <<else>> You have upgraded the authenticity department to its maximum. <</if>> <br> <<if $SecExp.buildings.propHub.upgrades.fakeNews == 0>> <<link "Install a news generator" "propagandaHub">> <<set $SecExp.buildings.propHub.upgrades.fakeNews = 1>> <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount)), "capEx")>> <</link>> <br>Install an automatic news generator, able to fabricate thousands of plausible sounding news every day. <br>//Costs <<print cashFormat(Math.trunc(10000 * $upgradeMultiplierArcology * _HistoryDiscount))>>. The authenticity dept. now provides a small amount of reputation as well as authority, but increases upkeep.// <<else>> You have installed an automatic news generator. [[Remove news generator|propagandaHub][$SecExp.buildings.propHub.upgrades.fakeNews = 0]] <</if>> <br> <<if $SecExp.buildings.propHub.upgrades.controlLeaks == 0>> <<link "Institute controlled leaks protocols" "propagandaHub">> <<set $SecExp.buildings.propHub.upgrades.controlLeaks = 1>> <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier)), "capEx")>> <<= IncreasePCSkills('hacking', 1)>> <</link>> <br>Institute a system able to release erroneous, but plausible, information about your business, leading your competitors to prepared financial traps. <br>//Costs <<print cashFormat(Math.trunc(10000 * $upgradeMultiplierArcology * _HistoryDiscount*$HackingSkillMultiplier))>>. The authenticity dept. now slightly increases prosperity each week as well as authority, but increases upkeep.// <<else>> You have instituted controlled leaks protocols, able to create fabricated leaks of sensible information. [[Shut down leak protocols|propagandaHub][$SecExp.buildings.propHub.upgrades.controlLeaks = 0]] <</if>> <</if>> <br> <br> /* secret police */ <<if $SecExp.buildings.propHub.upgrades.secretService == 0>> <<link "Set up personal secret service" "propagandaHub">> <<set $SecExp.buildings.propHub.upgrades.secretService += 1>> <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount)), "capEx")>> <</link>> <br>Set up a department tasked with the protection of your person, as well as operations requiring a delicate approach. <br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology * _HistoryDiscount))>>. Will provide authority and unlock special upgrades, but will increase upkeep.// <<else>> <<if $SecExp.buildings.propHub.upgrades.secretService < 5 && $rep >= ($SecExp.buildings.propHub.upgrades.secretService * 1000) + 5000>> <<set _costSS = Math.trunc(5000*$upgradeMultiplierArcology * ($SecExp.buildings.propHub.upgrades.secretService + 1) * _HistoryDiscount)>> <<link "Expand the secret service" "propagandaHub">> <<run cashX(-_costSS, "capEx")>> <<set $SecExp.buildings.propHub.upgrades.secretService += 1>> <</link>> <br>Invest more resources into the project to increase its effectiveness. <br>//Costs <<print cashFormat(_costSS)>>. Will provide more authority each week, but increases upkeep.// <<elseif $SecExp.buildings.propHub.upgrades.secretService < 5>> You lack the reputation to further expand operations. <<else>> You have upgraded the secret service to its maximum. <</if>> <br> <<if $SecExp.buildings.propHub.upgrades.blackOps == 0>> <<link "Create a black ops team" "propagandaHub">> <<set $SecExp.buildings.propHub.upgrades.blackOps = 1>> <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount)), "capEx")>> <</link>> <br>Create a black ops team, ready to carry out corporate sabotage and sensitive operations to further your goals. <br>//Costs <<print cashFormat(Math.trunc(10000 * $upgradeMultiplierArcology * _HistoryDiscount))>>. The secret services now provides security as well as authority, but increases upkeep.// <<else>> You have created a black ops team. <</if>> <br> <<if $SecExp.buildings.propHub.upgrades.marketInfiltration == 0>> <<link "Infiltrate" "propagandaHub">> <<set $SecExp.buildings.propHub.upgrades.marketInfiltration = 1>> <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount)), "capEx")>> <</link>> the black market in order to manipulate it. <br>//Costs <<print cashFormat(Math.trunc(10000 * $upgradeMultiplierArcology * _HistoryDiscount))>>. The secret services now provides cash as well as authority each week, but will increase crime growth.// <<else>> You have infiltrated the black market and are now in partial control of it. [[Withdraw from the black market|propagandaHub][$SecExp.buildings.propHub.upgrades.marketInfiltration = 0]] <</if>> <</if>>
MonsterMate/fc
src/Mods/SecExp/buildings/propagandaHub.tw
tw
mit
10,130
:: riotControlCenter [nobr jump-to-safe jump-from-safe] <<set $nextButton = "Back", $nextLink = "Main">> Riot Control Center<hr> The riot control center opens its guarded doors to you. The great chamber inside is dominated by massive screens filled with vital information and propaganda being tested. <br><br> <<if $SecExp.rebellions.tension <= 33>> Tensions in the arcology are low. Political and ideological opposition against the arcology owner is almost unheard of. <<elseif $SecExp.rebellions.tension <= 66>> Tensions in the arcology are rising; political and ideological opposition against the arcology owner are becoming a part of the daily life of the arcology. <<else>> Tensions are high. Opposition to the arcology owner is a sentiment shared by many and armed resistance is on the rise. <</if>> <br> <<if $SecExp.buildings.riotCenter.upgrades.freeMedia == 0>> [[Provide free media access in all the arcology|riotControlCenter][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $SecExp.buildings.riotCenter.upgrades.freeMedia = 1]] <br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>. Will slowly lower tensions in the arcology, but will incur in upkeep costs.// <<else>> You are providing free access to many mass media in the arcology. <<if $SecExp.buildings.riotCenter.upgrades.freeMedia < 5>> <<set _costFM = Math.trunc(5000 * $upgradeMultiplierArcology * ($SecExp.buildings.riotCenter.upgrades.freeMedia + 1)*$HackingSkillMultiplier)>> <br><<link "Invest more resources in the free media project" "riotControlCenter">> <<run cashX(-_costFM, "capEx")>> <<set $SecExp.buildings.riotCenter.upgrades.freeMedia++>> <<= IncreasePCSkills('hacking', 0.5)>> <</link>> <br>Invest more resources into the project to increase its effectiveness. <br>//Costs <<print cashFormat(_costFM)>>. Will accelerate the tension decay, but will increase upkeep costs.// <<else>> You upgraded your free media scheme to its limits. <</if>> <</if>> <br><br> <<if $SecExp.rebellions.slaveProgress <= 25>> There is very low unrest between slaves in the arcology. The chances of a rebellion igniting are extremely low. <<elseif $SecExp.rebellions.slaveProgress <= 50>> There is some unrest between the slaves. No major movement is forming yet, but it might be time to consider preventive measures. <<elseif $SecExp.rebellions.slaveProgress <= 75>> Unrest is getting high between the slaves of the arcology. Preventive measures are necessary if we want to prevent a violent rebellion. <<else>> Unrest is extremely high between slaves. The chances of a rebellion happening in the near future are extremely high. <</if>> <br> <<if $SecExp.rebellions.citizenProgress <= 25>> There is very low unrest between the citizens of the arcology. The chances of a rebellion igniting are extremely low. <<elseif $SecExp.rebellions.citizenProgress <= 50>> There is some unrest between the citizens. No major movement is forming yet, but it might be time to consider preventive measures. <<elseif $SecExp.rebellions.citizenProgress <= 75>> Unrest is getting high between the citizens of the arcology. Preventive measures are necessary if we want to prevent a violent rebellion. <<else>> Unrest is extremely high between citizens. The chances of a rebellion happening in the near future are extremely high. <</if>> <br><br> <<if $SecExp.buildings.riotCenter.upgrades.rapidUnit == 0>> [[Create rapid deployment riot units|riotControlCenter][cashX(forceNeg(Math.trunc(7500*$upgradeMultiplierArcology)), "capEx"), $SecExp.buildings.riotCenter.upgrades.rapidUnit = 1]] <br>//Costs <<print cashFormat(Math.trunc(7500*$upgradeMultiplierArcology))>>. Will allow spending authority or reputation to lower the progress of rebellions.// <<else>> You created a rapid deployment riot unit. <<if $SecExp.buildings.riotCenter.upgrades.rapidUnit < 5>> <<set _costRU = Math.trunc(5000 * $upgradeMultiplierArcology * ($SecExp.buildings.riotCenter.upgrades.rapidUnit + 1))>> <br><<link "Invest more resources in the rapid deployment unit" "riotControlCenter">> <<run cashX(-_costRU, "capEx")>> <<set $SecExp.buildings.riotCenter.upgrades.rapidUnit++>> <</link>> <br>Invest more resources into the project to increase its effectiveness. <br>//Costs <<print cashFormat(_costRU)>>. Will lower action costs.// <<else>> <br>You upgraded your rapid deployment unit to its limits. <</if>> <<if $SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed < 2>> <<set _costRUS = Math.trunc(5000 * $upgradeMultiplierArcology * ($SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed + 1))>> <br><<link "Enhance the internal informants network" "riotControlCenter">> <<run cashX(-_costRUS, "capEx")>> <<set $SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed++>> <</link>> <br>Invest more resources into the effectiveness of the informants network. <br>//Costs <<print cashFormat(_costRUS)>>. Will reduce cooldown of the rapid deployment riot unit.// <<else>> <br>You enhanced your informants network to its limits. <</if>> <span id="result"> <<if $SecExp.buildings.riotCenter.sentUnitCooldown == 0>> <br><br>You can send out the squad to slow down the progress of hostile groups within the arcology: <<link "spend authority" "riotControlCenter">> <<set $SecExp.buildings.riotCenter.upgrades.rapidUnitCost = 0>> <</link>> | <<link "spend reputation" "riotControlCenter">> <<set $SecExp.buildings.riotCenter.upgrades.rapidUnitCost = 1>> <</link>> <br>Your <<if $SecExp.buildings.riotCenter.upgrades.rapidUnitCost == 0>> authority <<else>> reputation <</if>> will be leveraged to suppress the rebels.<br> <br><<link "Deploy the unit against slaves rebel leaders">> <<if $SecExp.buildings.riotCenter.upgrades.rapidUnitCost == 0>> <<set $SecExp.core.authority -= 1000 + 50 * $SecExp.buildings.riotCenter.upgrades.rapidUnit>> <<else>> <<run repX(forceNeg(1000 + 50 * $SecExp.buildings.riotCenter.upgrades.rapidUnit), "war")>> <</if>> <<set _change = random(15) + random(1,2) * $SecExp.buildings.riotCenter.upgrades.rapidUnit>> <<set $SecExp.rebellions.slaveProgress = Math.clamp($SecExp.rebellions.slaveProgress - _change,0,100)>> <<set $SecExp.buildings.riotCenter.sentUnitCooldown = 3 - $SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed>> <<replace "#result">> Slave rebellion progress set back by <<print _change>>%. The unit will be able to deployed again in $SecExp.buildings.riotCenter.sentUnitCooldown weeks. <</replace>> <</link>> <br><<link "Deploy the unit against citizens rebel leaders">> <<if $SecExp.buildings.riotCenter.upgrades.rapidUnitCost == 0>> <<set $SecExp.core.authority -= 1000 + 50 * $SecExp.buildings.riotCenter.upgrades.rapidUnit>> <<else>> <<run repX(forceNeg(1000 + 50 * $SecExp.buildings.riotCenter.upgrades.rapidUnit), "war")>> <</if>> <<set _change = random(15) + random(1,2) * $SecExp.buildings.riotCenter.upgrades.rapidUnit>> <<set $SecExp.rebellions.citizenProgress = Math.clamp($SecExp.rebellions.citizenProgress - _change,0,100)>> <<set $SecExp.buildings.riotCenter.sentUnitCooldown = 3 - $SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed>> <<replace "#result">> Citizen rebellion progress set back by <<print _change>>%. The unit will be able to deployed again in $SecExp.buildings.riotCenter.sentUnitCooldown weeks. <</replace>> <</link>> <<else>> <br>The unit cannot be deployed again for $SecExp.buildings.riotCenter.sentUnitCooldown weeks. <</if>> </span> <</if>> <br><br> <<if $SecExp.buildings.riotCenter.brainImplant < 106>> <<if $SecExp.buildings.riotCenter.brainImplantProject == 0>> <<link "Start secretly installing brain implants in your citizens and resident slaves" "riotControlCenter">> <<set $SecExp.buildings.riotCenter.brainImplantProject = 1>> <<set $SecExp.buildings.riotCenter.brainImplant = 0>> <</link>> <br>//Will take weeks of work and will cost <<print cashFormat(5000)>> each week, but once finished rebellions will progress a lot slower.// <<elseif $SecExp.buildings.riotCenter.brainImplantProject < 5>> <<set _costBIP = Math.trunc(50000 * $upgradeMultiplierArcology * $SecExp.buildings.riotCenter.brainImplantProject*$HackingSkillMultiplier)>> <<link "Invest more resources in the brain implant project" "riotControlCenter">> <<run cashX(-_costBIP, "capEx")>> <<set $SecExp.buildings.riotCenter.brainImplantProject++>> <<= IncreasePCSkills('hacking', 1)>> <</link>> <br>Invest more resources into the project to increase its speed. <br>//One-time cost of <<print cashFormat(_costBIP)>> with an additional <<print cashFormat(5000)>> each week in maintenance. Will shorten the time required to complete the project.// <<else>> You sped up the project to its maximum. <</if>> <<if $SecExp.buildings.riotCenter.brainImplant != -1>> <br>The great brain implant project is underway. Estimated time to completion: <<print Math.trunc((100 - $SecExp.buildings.riotCenter.brainImplant) / $SecExp.buildings.riotCenter.brainImplantProject)>>. <</if>> <<else>> The great brain implant project is completed, rebellions against you will be extremely difficult to organize. <</if>> <br><br> <<if $SecExp.buildings.riotCenter.advancedRiotEquip == 0>> <<link "Develop advanced anti-riot equipment" "riotControlCenter">> <<set $SecExp.buildings.riotCenter.advancedRiotEquip = 1>> <<run cashX(forceNeg(30000 * $upgradeMultiplierTrade), "capEx")>> <</link>> <br>//Costs <<print cashFormat(30000 * $upgradeMultiplierTrade)>>. Will allow the selection of advanced riot equipment in case of a rebellion, which will let your troops fight at full effectiveness while doing reduced collateral damage.// <<else>> You developed advanced riot equipment, which allows your troops to fight within the confines of your arcology without the fear of doing major collateral damage. <</if>> <br> <<if $SecExp.buildings.riotCenter.fort.reactor == 0>> <<link "Reinforce the reactor complex" "riotControlCenter">> <<set $SecExp.buildings.riotCenter.fort.reactor = 1>> <<run cashX(forceNeg(10000 * $upgradeMultiplierArcology), "capEx")>> <</link>> <br>//Costs <<print cashFormat(10000 * $upgradeMultiplierArcology)>>. Will add protection to the reactor building, making it less likely to be damaged and speeding up repairs if our defensive efforts should fail.// <<else>> You have installed additional protection layers and redundant systems in the reactor complex. <</if>> <br> <<if $SecExp.buildings.riotCenter.fort.waterway == 0>> <<link "Reinforce the waterways" "riotControlCenter">> <<set $SecExp.buildings.riotCenter.fort.waterway = 1>> <<run cashX(forceNeg(10000 * $upgradeMultiplierArcology), "capEx")>> <</link>> <br>//Costs <<print cashFormat(10000 * $upgradeMultiplierArcology)>>. Will add protection to the waterways, making it less likely to be damaged and speeding up repairs if our defensive efforts should fail.// <<else>> You have installed additional protection layers and redundant systems in the waterways. <</if>> <br> <<if $SecExp.buildings.riotCenter.fort.assistant == 0>> <<link "Reinforce the assistant CPU core" "riotControlCenter">> <<set $SecExp.buildings.riotCenter.fort.assistant = 1>> <<run cashX(forceNeg(10000 * $upgradeMultiplierArcology), "capEx")>> <</link>> <br>//Costs <<print cashFormat(10000 * $upgradeMultiplierArcology)>>. Will add protection to the assistant CPU core, making it less likely to be damaged and speeding up repairs if our defensive efforts should fail.// <<else>> You have installed additional protection layers and redundant systems in the assistant CPU core. <</if>> <<if $SF.Toggle && $SF.Active >= 1>> <br> <<if $SecExp.edicts.SFSupportLevel >= 4 && $SF.Squad.Armoury >= 8 && !$SecExp.rebellions.sfArmor>> <<set _costSFA = Math.ceil(500000*App.SF.env()*(1.15+($SF.Squad.Armoury/10)))>> <<link "Give the riot unit access to the combat armor suits of $SF.Lower.""riotControlCenter">> <<set $SecExp.rebellions.sfArmor = 1>> <<run cashX(-_costSFA, "capEx")>> <</link>> //Costs <<print cashFormat(_costSFA)>> <<else>> You have given the riot unit access to the combat armor suits of $SF.Lower. <</if>> <</if>>
MonsterMate/fc
src/Mods/SecExp/buildings/riotControlCenter.tw
tw
mit
12,278
:: secBarracks [nobr jump-to-safe jump-from-safe] <<set $nextButton = "Back", $nextLink = "Main">> The Barracks <hr>__Upgrades__<br> While this a sore sight for many citizens of $arcologies[0].name, the barracks stand proud before you. <<if $SecExp.buildings.barracks.size == 0>> The building is relatively small and able to house a limited number of units. <<elseif $SecExp.buildings.barracks.size == 1>> The building has been expanded and can now house more units comfortably. <<elseif $SecExp.buildings.barracks.size == 2>> The building has been further expanded and can now house a high number of units. <<elseif $SecExp.buildings.barracks.size == 3>> The building has been greatly expanded and can now house a sizable military. <<elseif $SecExp.buildings.barracks.size == 4>> The building has been greatly expanded and can now house a small army. <<else>> The building has been greatly expanded and can now house an army worthy of an old world nation. <</if>> <<if $SecExp.buildings.barracks.luxury == 0>> The barracks are a spartan building, with little to make the day to day lives of your soldiers pleasant. <<elseif $SecExp.buildings.barracks.luxury == 1>> The barracks have been made more comfortable by installing high tech furniture. <<elseif $SecExp.buildings.barracks.luxury == 2>> The barracks have been made more comfortable by installing high tech furniture and advanced kitchen facilities. <<elseif $SecExp.buildings.barracks.luxury == 3>> The barracks have been made more comfortable by installing high tech furniture and advanced kitchen facilities. It also provides free access to any digital media. <<else>> The barracks have been made more comfortable by installing high tech furniture and advanced kitchen facilities. It also provides free access to any digital media. A small limited-access brothel has been added to the structure. <</if>> <<if $SecExp.buildings.barracks.training == 0>> The building lacks the space and the equipment to train your units. <<elseif $SecExp.buildings.barracks.training == 1>> A training facility has been set up, allowing your units to better their skills with time. <<else>> The training facility has been filled with specialized equipment and skilled trainers. <</if>> <<if $SecExp.buildings.barracks.loyaltyMod == 0>> The barracks lack an indoctrination facility. <<elseif $SecExp.buildings.barracks.loyaltyMod == 1>> The barracks have been fitted with an indoctrination facility. <<else>> The barracks have been fitted with an advanced indoctrination facility. <</if>> <br><br> <<if $SecExp.buildings.barracks.size < 5>> <<link "Increase the size of the barracks" "secBarracks">> <<run cashX(forceNeg(Math.trunc((5000 * ($SecExp.buildings.barracks.size + 1))*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.barracks.size += 1>> <</link>> <br>//Costs <<print cashFormat((5000 * ($SecExp.buildings.barracks.size + 1))*$upgradeMultiplierArcology)>> and will increase the maximum number of units by 2.// <<else>> <<if $SF.Toggle && $SF.Active >= 1>> <<set _capSF = capFirstChar($SF.Lower || "the special force")>> <<set _reasons = [], _cost = Math.ceil((750000*(1.15+(App.SF.upgrades.total()/1000))*(1.15+($SF.Squad.Firebase/10)))*App.SF.env())>> <br> _capSF might be able to provide assistance. <<if $SF.Squad.Firebase > 5 && $SecExp.edicts.SFSupportLevel >= 4 && App.SecExp.battle.maxUnits() === 18 && App.SecExp.battle.deploySpeed() <= 10>> <br>_capSF [[will provide the security force their own section in the Firebase.|secBarracks][$SecExp.sectionInFirebase = 1, cashX(-_cost, "specialForcesCap")]] @@.red;<<print cashFormat(_cost)>>@@ <</if>> <<if $SF.Squad.Firebase < 5>> <<set _reasons.push('Firebase would likely require additional expansion(s)')>> <</if>> <<if $SecExp.edicts.SFSupportLevel < 4>> <<set _reasons.push('support contract needs more clauses')>> <</if>> <<set _reasons.join(',')>> <<if _reasons.length > 0>><br>The Colonel says that the; _reasons.<</if>> <<else>> You've expanded the barracks to their maximum. <</if>> <</if>> <br> <<if $SecExp.buildings.barracks.luxury == 0>> <<link "Increase the quality of life of your soldiers by installing high tech furniture and appliances." "secBarracks">> <<set $SecExp.buildings.barracks.luxury += 1>> <<run cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierTrade)), "capEx")>> <</link>> <br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierTrade))>> and will provide a 5% bonus to morale.// <<elseif $SecExp.buildings.barracks.luxury == 1>> <<link "Further increase the quality of life of your soldiers by installing advanced kitchen equipment and hiring skilled chefs." "secBarracks">> <<set $SecExp.buildings.barracks.luxury += 1>> <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierTrade)), "capEx")>> <</link>> <br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierTrade))>> and will provide a 5% bonus to morale, for a total of +10%.// <<elseif $SecExp.buildings.barracks.luxury == 2>> <<link "Further increase the quality of life of your soldiers by providing high speed, free access to digital media" "secBarracks">> <<set $SecExp.buildings.barracks.luxury += 1>> <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierTrade)), "capEx")>> <</link>> <br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierTrade))>> and will provide a 5% bonus to morale, for a total of +15%.// <<elseif $SecExp.buildings.barracks.luxury == 3>> <<link "Further increase the quality of life of your soldiers by adding and staffing an exclusive brothel to the structure" "secBarracks">> <<set $SecExp.buildings.barracks.luxury += 1>> <<run cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx")>> <</link>> <br>//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>> and will provide a 5% bonus to morale, for a total of +20%.// <<else>> You've made life in your barracks as good as it can get. <</if>> <br> <<if $SecExp.buildings.barracks.training == 0>> <<link "Add a training facility to the barracks" "secBarracks">> <<set $SecExp.buildings.barracks.training += 1>> <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx")>> <</link>> <br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and will allow units to accumulate some experience each week.// <<elseif $SecExp.buildings.barracks.training == 1>> <<link "Improve the training facility with modern equipment and skilled personnel" "secBarracks">> <<set $SecExp.buildings.barracks.training += 1>> <<run cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierTrade)), "capEx")>> <</link>> <br>//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierTrade))>> and will allow units to accumulate experience each week.// <<else>> You have improved the training facility to the limit. <</if>> <br> <<if $SecExp.buildings.barracks.loyaltyMod == 0>> <<link "Add an indoctrination facility to the barracks" "secBarracks">> <<set $SecExp.buildings.barracks.loyaltyMod += 1>> <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx")>> <</link>> <br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and will slowly raise loyalty of all units// <<elseif $SecExp.buildings.barracks.loyaltyMod == 1>> <<link "Improve the indoctrination facility with advanced equipment and skilled personnel" "secBarracks">> <<set $SecExp.buildings.barracks.loyaltyMod += 1>> <<run cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierTrade)), "capEx")>> <</link>> <br>//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierTrade))>> and will raise loyalty of all units faster.// <<else>> You have improved the indoctrination facility to the limit. <</if>> <hr>__Units__<br> Your current maximum number of units is <<print App.SecExp.battle.maxUnits()>> (<<print num($secBots.maxTroops+(50*App.SecExp.battle.maxUnits()))>> troops), <<print App.SecExp.battle.activeUnits()>> (<<print num($secBots.troops+App.SecExp.Manpower.employedOverall)>> troops) are active and <<print (2 * App.SecExp.battle.deploySpeed())>> units can be deployed. <<if $SecExp.buildings.barracks.luxury > 0>>The barracks provides <<print $SecExp.buildings.barracks.luxury * 5>>% bonus morale when battle occurs.<</if>> <<if $SecExp.buildings.barracks.training > 0>>The training facility will increase the effectiveness of your units with time.<</if>> <br> <<set _options = new App.UI.OptionsGroup()>> <<run _options.addOption("Unit descriptions are", "unitDescriptions", $SecExp.settings) .addValue("Abbreviated", 1).on().addValue("Summarized", 0).off()>> <<includeDOM _options.render()>> <<if App.SecExp.battle.activeUnits() >= App.SecExp.battle.maxUnits()>> <br>You have reached the maximum number of units. You'll have to disband one or enlarge the barracks before forming a new unit. <</if>> <<replenishAllUnits>> <<if $arcologyUpgrade.drones === 0>> You have not yet installed a drone security system in your arcology, you will not be able to form a unit of drones. <</if>> <<if $SecExp.edicts.defense.militia === 0>> <br>You have not yet founded the militia, you will not be able to form citizens units. <</if>> <<if $mercenaries === 0>> <br>Mercenaries are not allowed inside the arcology. You will not be able to recruit mercenary units. <</if>> <div class="tab-bar"> <<if $arcologyUpgrade.drones == 1>> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Bots')" id="tab Bots">Security Drones</button> <</if>> <<if $SecExp.edicts.defense.militia >= 1>> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Militia')" id="tab Militia">Militia: ($militiaUnits.length)</button> <</if>> <<if $mercenaries >= 1>> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Mercs')" id="tab Mercs">Mercenaries: ($mercUnits.length)</button> <</if>> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Slaves')" id="tab Slaves">Slaves: ($slaveUnits.length)</button> </div> <<run App.UI.tabBar.handlePreSelectedTab($tabChoice.secBarracks)>> <div id="Bots" class="tab-content"> <div class="content"> <<set _secBotsCost = 500, _secBotsUpgradeCost = 250>> <<= App.SecExp.getUnit("Bots").describe()>> <br> <<if $secBots.active == 1>> <<if $secBots.maxTroops > $secBots.troops>> <<link "Replenish the unit" "secBarracks">> <<run cashX(forceNeg(($secBots.maxTroops - $secBots.troops) * _secBotsCost), "securityExpansion")>> <<set $secBots.troops = $secBots.maxTroops>> <</link>> <</if>> <<if $secBots.maxTroops < 80>> <br> <<link "Improve the digital control matrix" "secBarracks">> <<set $secBots.maxTroops += 10>> <<run cashX(-5000, "securityExpansion")>> <</link>> Invest in the development of more refined controls for your drones to increase the maximum number of drones in the unit. <br>//Costs <<print cashFormat(5000)>> per upgrade and each will increase the max by 10// <<elseif $SF.Toggle && $SF.Active >= 1 && $secBots.maxTroops < 100 && $SecExp.edicts.SFSupportLevel >= 1>> <br> <<link "Refine the drone network with $SF.Lower assistance" "secBarracks">> <<set $secBots.maxTroops += 10>> <<run cashX(forceNeg(5000 + 10 * _secBotsUpgradeCost * $secBots.equip), "securityExpansion")>> <</link>> Utilize the technological developments made by $SF.Lower to further improve the control matrix of the security drones. <br>//Costs <<print cashFormat(5000 + 10 * _secBotsUpgradeCost * $secBots.equip)>> and will increase the max by 10// <<elseif $SF.Toggle && $SF.Active >= 1 && $SecExp.edicts.SFSupportLevel === 0>> There's little left to improve in the matrix. However support from $SF.Lower might give some more room from improvement, if an assistance contract is signed. <<else>> There's little left to improve in the matrix. Your control systems are at top capacity and won't be able to handle a bigger drone unit. <</if>> <<if $secBots.equip < 3>> <br> <<link "Improve drone weaponry and armor" "secBarracks">> <<set $secBots.equip += 1>> <<run cashX(forceNeg((_secBotsUpgradeCost * $secBots.maxTroops) + 1000), "securityExpansion")>> <</link>> Invest in better equipment for your drones to increase their battle effectiveness. <br>//Costs <<print cashFormat((_secBotsUpgradeCost * $secBots.maxTroops) + 1000)>> and will increase attack and defense value of the unit by 15% for every upgrade.// <<else>> <br>Your drones are equipped with top tier weaponry and armor. <</if>> <<if $SecExp.settings.showStats == 1>> <br><<= App.SecExp.getUnit("Bots").printStats()>> <</if>> <<else>> <<link "Rebuild the unit" "secBarracks">> <<run cashX(forceNeg(($secBots.maxTroops - $secBots.troops) * _secBotsCost), "securityExpansion")>> <<set $secBots.troops = $secBots.maxTroops>> <<set $secBots.active = 1>> <</link>> <</if>> </div> </div> <div id="Slaves" class="tab-content"> <div class="content"> You are free to organize your menial slaves into fighting units. Currently you have <<print num($menials)>> slaves available, while <<print num(App.SecExp.Manpower.employedSlave)>> are already employed as soldiers. During all your battles you lost a total of <<print num($slavesTotalCasualties)>>. <br>Default unit name: <<textbox "$SecExp.defaultNames.slaves" $SecExp.defaultNames.slaves "secBarracks">> | <<if $menials > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>> <<link "Form a new unit" "secBarracks">> <<set $slaveUnits.push(App.SecExp.generateUnit("slaves"))>> <</link>> | <</if>> <<includeDOM App.SecExp.bulkUpgradeUnit($slaveUnits)>> <<set _popCap = menialPopCap()>> <<set _menialPrice = menialSlaveCost()>> <<set _bulkMax = _popCap.value-$menials-$fuckdolls-$menialBioreactors>> <<if $cash > _menialPrice>> <<if _bulkMax > 0>> <br> [[Buy|secBarracks][$menials+=1,$menialSupplyFactor-=1,cashX(forceNeg(_menialPrice), "menialTransfer")]] <<if $cash > (menialSlaveCost(10))*10>> [[(x10)|secBarracks][$menials+=10,$menialSupplyFactor-=10,cashX(forceNeg((menialSlaveCost(10))*10), "menialTransfer")]] <</if>> <<if $cash > (menialSlaveCost(100))*100>> [[(x100)|secBarracks][$menials+=100,$menialSupplyFactor-=100,cashX(forceNeg((menialSlaveCost(100))*100), "menialTransfer")]] <</if>> <<if $cash > (_menialPrice+1)*2>> <<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>> [[(max)|secBarracks][$menials+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))), "menialTransfer")]] <</if>> //Bulk transactions may require offering a premium.// <</if>> <</if>> <br> <<set _sL = $slaveUnits.length>> <<for _i = 0; _i < _sL; _i++>> <<capture _i>> <<= App.SecExp.getUnit("Slaves", _i).describe()>> <br> Rename unit <<textbox "$slaveUnits[_i].platoonName" $slaveUnits[_i].platoonName "secBarracks">> | <<link "Disband the unit" "secBarracks">> <<set $menials += $slaveUnits[_i].troops>> <<set $slaveUnits.deleteAt(_i)>> <</link>> <<if $slaveUnits[_i].active == 1>> <<if $slaveUnits[_i].troops < $slaveUnits[_i].maxTroops && $menials > 0>> | <<link "Replenish unit" "secBarracks">> <<if $menials >= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> <<set $menials -= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> <<set _expLoss = ($slaveUnits[_i].maxTroops - $slaveUnits[_i].troops) / $slaveUnits[_i].troops>> <<set $slaveUnits[_i].training -= $slaveUnits[_i].training * _expLoss>> <<set $slaveUnits[_i].troops = $slaveUnits[_i].maxTroops>> <<else>> <<set _expLoss = $menials / $slaveUnits[_i].troops>> <<set $slaveUnits[_i].training -= $slaveUnits[_i].training * _expLoss>> <<set $slaveUnits[_i].troops += $menials>> <<set $menials = 0>> <</if>> <</link>> <</if>> <<else>> <<if $menials > 0>> | <<link "Reform the unit" "secBarracks">> <<if $menials >= $slaveUnits[_i].maxTroops>> <<set $menials -= $slaveUnits[_i].maxTroops>> <<set $slaveUnits[_i].troops = $slaveUnits[_i].maxTroops>> <<set $slaveUnits[_i].training = 0>> <<else>> <<set $slaveUnits[_i].troops += $menials>> <<set $menials = 0>> <<set $slaveUnits[_i].training = 0>> <</if>> <<set $slaveUnits[_i].active = 1>> <</link>> <</if>> <</if>> | <<includeDOM App.SecExp.bulkUpgradeUnit($slaveUnits[_i])>> <<if $SecExp.settings.showStats == 1>> <<= App.SecExp.getUnit("Slaves", _i).printStats()>> <</if>> <<includeDOM App.SecExp.humanUnitUpgradeList($slaveUnits[_i])>> <</capture>> <</for>> </div> </div> <div id="Militia" class="tab-content"> <div class="content"> You founded the $arcologies[0].name free militia. You are now able to organize your citizens into fighting units. <<if $SecExp.edicts.defense.militia === 2>> The militia is composed entirely of volunteers, your manpower is <<= num(App.SecExp.militiaCap()*100)>>% of the citizens population of your arcology. <<elseif $SecExp.edicts.defense.militia === 3>> With the establishment of conscription, your available manpower has increased to now <<= num(App.SecExp.militiaCap()*100)>>% of the arcology's citizens population. <<elseif $SecExp.edicts.defense.militia === 4>> By establishing obligatory military service to obtain citizenship you have enlarged your manpower pool to be <<= num(App.SecExp.militiaCap()*100)>>% of the arcology's citizens population. <<elseif $SecExp.edicts.defense.militia === 5>> With the adoption of a militarized society, your available manpower has swelled to be <<= num(App.SecExp.militiaCap()*100)>>% of the arcology's citizens population. <</if>> Your current total manpower is <<print num(App.SecExp.Manpower.totalMilitia)>>, of which <<print num(App.SecExp.Manpower.employedMilitia)>> is in active duty. You lost in total <<print num($militiaTotalCasualties)>> citizens, leaving you with <<print num($militiaFreeManpower)>> available citizens. <br>Default unit name: <<textbox "$SecExp.defaultNames.militia" $SecExp.defaultNames.militia "secBarracks">> | <<if $militiaFreeManpower > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>> <<link "Form a new unit" "secBarracks">> <<set $militiaUnits.push(App.SecExp.generateUnit("militia"))>> <</link>> | <</if>> <<includeDOM App.SecExp.bulkUpgradeUnit($militiaUnits)>> <br> <<set _mL = $militiaUnits.length>> <<for _i = 0; _i < _mL; _i++>> <<capture _i>> <<= App.SecExp.getUnit("Militia", _i).describe()>> <br> Rename unit <<textbox "$militiaUnits[_i].platoonName" $militiaUnits[_i].platoonName "secBarracks">> | <<link "Disband the unit" "secBarracks">> <<set $militiaFreeManpower += $militiaUnits[_i].troops>> <<set $militiaUnits.deleteAt(_i)>> <</link>> <<if $militiaUnits[_i].active == 1>> <<if $militiaUnits[_i].troops < $militiaUnits[_i].maxTroops && $militiaFreeManpower > 0>> | <<link "Replenish unit" "secBarracks">> <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> <<set _expLoss = ($militiaUnits[_i].maxTroops - $militiaUnits[_i].troops) / $militiaUnits[_i].troops>> <<set $militiaUnits[_i].training -= $militiaUnits[_i].training * _expLoss>> <<set $militiaUnits[_i].troops = $militiaUnits[_i].maxTroops>> <<else>> <<set _expLoss = $militiaFreeManpower / $militiaUnits[_i].troops>> <<set $militiaUnits[_i].training -= $militiaUnits[_i].training * _expLoss>> <<set $militiaUnits[_i].troops += $militiaFreeManpower>> <<set $militiaFreeManpower = 0>> <</if>> <</link>> <</if>> <<else>> <<if $militiaFreeManpower > 0>> | <<link "Reform the unit" "secBarracks">> <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops>> <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops>> <<set $militiaUnits[_i].troops = $militiaUnits[_i].maxTroops>> <<set $militiaUnits[_i].training = 0>> <<else>> <<set $militiaUnits[_i].troops += $militiaFreeManpower>> <<set $militiaFreeManpower = 0>> <<set $militiaUnits[_i].training = 0>> <</if>> <<set $militiaUnits[_i].active = 1>> <</link>> <</if>> <</if>> | <<includeDOM App.SecExp.bulkUpgradeUnit($militiaUnits[_i])>> <<if $SecExp.settings.showStats == 1>> <<= App.SecExp.getUnit("Militia", _i).printStats()>> <</if>> <<includeDOM App.SecExp.humanUnitUpgradeList($militiaUnits[_i])>> <</capture>> <</for>> </div> </div> <div id="Mercs" class="tab-content"> <div class="content"> With the installation of a mercenary company in the arcology, many other are attracted to your free city, hoping to land a contract with you. You are able to organize them in units to use in the defense of the arcology. Excluding the defense force you set up, there are <<print num(App.SecExp.Manpower.totalMerc)>> mercenaries in your arcology, of which <<print num(App.SecExp.Manpower.employedMerc)>> actively employed and <<print num($mercFreeManpower)>> not yet under contract. In total <<print num($mercTotalCasualties)>> mercenaries have died defending your arcology. <br>Default unit name: <<textbox "$SecExp.defaultNames.mercs" $SecExp.defaultNames.mercs "secBarracks">> | <<if $mercFreeManpower > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>> <<link "Form a new unit" "secBarracks">> <<set $mercUnits.push(App.SecExp.generateUnit("mercs"))>> <</link>> | <</if>> <<includeDOM App.SecExp.bulkUpgradeUnit($mercUnits)>> <br> <<set _meL = $mercUnits.length>> <<for _i = 0; _i < _meL; _i++>> <<capture _i>> <<= App.SecExp.getUnit("Mercs", _i).describe()>> <br> Rename unit <<textbox "$mercUnits[_i].platoonName" $mercUnits[_i].platoonName "secBarracks">> | <<link "Disband the unit" "secBarracks">> <<set $mercFreeManpower += $mercUnits[_i].troops>> <<set $mercUnits.deleteAt(_i)>> <</link>> <<if $mercUnits[_i].active == 1>> <<if $mercUnits[_i].troops < $mercUnits[_i].maxTroops && $mercFreeManpower > 0>> | <<link "Replenish unit" "secBarracks">> <<if $mercFreeManpower >= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> <<set $mercFreeManpower -= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> <<set _expLoss = ($mercUnits[_i].maxTroops - $mercUnits[_i].troops) / $mercUnits[_i].troops>> <<set $mercUnits[_i].training -= $mercUnits[_i].training * _expLoss>> <<set $mercUnits[_i].troops = $mercUnits[_i].maxTroops>> <<else>> <<set _expLoss = $mercFreeManpower / $mercUnits[_i].troops>> <<set $mercUnits[_i].training -= $mercUnits[_i].training * _expLoss>> <<set $mercUnits[_i].troops += $mercFreeManpower>> <<set $mercFreeManpower = 0>> <</if>> <</link>> <</if>> <<else>> <<if $mercFreeManpower > 0>> | <<link "Reform the unit" "secBarracks">> <<if $mercFreeManpower >= $mercUnits[_i].maxTroops>> <<set $mercFreeManpower -= $mercUnits[_i].maxTroops>> <<set $mercUnits[_i].troops = $mercUnits[_i].maxTroops>> <<set $mercUnits[_i].training = 0>> <<else>> <<set $mercUnits[_i].troops += $mercFreeManpower>> <<set $mercFreeManpower = 0>> <<set $mercUnits[_i].training = 0>> <</if>> <<set $mercUnits[_i].active = 1>> <</link>> <</if>> <</if>> | <<includeDOM App.SecExp.bulkUpgradeUnit($mercUnits[_i])>> <<if $SecExp.settings.showStats == 1>> <<= App.SecExp.getUnit("Mercs", _i).printStats()>> <</if>> <<includeDOM App.SecExp.humanUnitUpgradeList($mercUnits[_i])>> <</capture>> <</for>> </div> </div>
MonsterMate/fc
src/Mods/SecExp/buildings/secBarracks.tw
tw
mit
24,242
:: securityHQ [nobr jump-to-safe jump-from-safe] <<set $nextButton = "Back", $nextLink = "Main", _HistoryDiscount = 1>> <<if $career == "mercenary" || $career == "gang" || $career == "slaver">> <<set _HistoryDiscount = 0.5>> <</if>> Security Headquarters<hr> The security headquarters stand in front of you. Innumerable screens flood with light the great central room. <<if $SecExp.buildings.secHub.menials > 0>>Some slaves see you enter and interrupt their work to greet you.<</if>> From here you can build a safe and prosperous arcology. <<if $SecExp.core.authority < 10000 || $SecExp.core.authority < 12000>> <br><br>You lack the authority to access more advanced upgrades. <</if>> <br><br>You have <span id="secHel"> <<print num($SecExp.buildings.secHub.menials)>> </span> slaves working in the HQ. <<= App.SecExp.Check.reqMenials()>> are required and you have <span id="hel"> <<print num($menials)>> </span> free menial slaves. <<if $SecExp.buildings.secHub.menials < App.SecExp.Check.reqMenials()>> <br>You do not have enough slaves here. You will not receive the full benefit of the installed upgrades. <<else>> <br>You have enough slaves to man all security systems. <</if>> <<set _popCap = menialPopCap()>> <<set _menialPrice = menialSlaveCost()>> <<set _bulkMax = _popCap.value-$menials-$fuckdolls-$menialBioreactors>> <<if $cash > _menialPrice>> <<if _bulkMax > 0 || $menials+$fuckdolls+$menialBioreactors == 0>> <br>[[Buy|securityHQ][$menials++,$menialSupplyFactor -= 1, cashX(-_menialPrice, "menialTransfer")]] <<if $cash > (menialSlaveCost(10))*10>> [[(x10)|securityHQ][$menials += 10,$menialSupplyFactor -= 10, cashX(-(menialSlaveCost(10)*10), "menialTransfer")]] <</if>> <<if $cash > (menialSlaveCost(100))*100>> [[(x100)|securityHQ][$menials += 100,$menialSupplyFactor -= 100, cashX(-(menialSlaveCost(100)*100), "menialTransfer")]] <</if>> <<if $cash > (_menialPrice+1)*2>> <<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>> <<set _maxMenials = Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)>> <<set _finalMaxCost = Math.trunc(_maxMenials*(_menialPrice+_menialBulkPremium))>> [[(max)|securityHQ][$menials += Math.trunc(_maxMenials), $menialSupplyFactor -= Math.trunc(_maxMenials), cashX(-_finalMaxCost, "menialTransfer")]] <</if>> //Bulk transactions may require offering a premium. The remaining slaves will be more efficient in dealing with crime.// <</if>> <</if>> <<set _optionsList = [1, 5, 10, 100, 500, 1000]>> <<if $menials > 0>> <br>Transfer in: <<for _i = 0; _i < _optionsList.length; _i++>> <<capture _optionsList[_i]>> <<if $menials >= _optionsList[_i]>> <<if _optionsList[_i] > 1>> | <</if>> <<link _optionsList[_i]>> <<set $menials -= _optionsList[_i]>> <<set $SecExp.buildings.secHub.menials += _optionsList[_i]>> <<replace "#secHel">><<print $SecExp.buildings.secHub.menials>><</replace>> <<replace "#hel">><<print $menials>><</replace>> <<if $menials < _optionsList[_i] || $SecExp.buildings.secHub.menials >= App.SecExp.Check.reqMenials() || $SecExp.buildings.secHub.menials == _i>> <<goto "securityHQ">> <</if>> <</link>> <</if>> <</capture>> <</for>> <</if>> <<if $SecExp.buildings.secHub.menials > 0>> <br>Transfer out <<for _i = 0; _i < _optionsList.length; _i++>> <<capture _optionsList[_i]>> <<if $SecExp.buildings.secHub.menials >= _optionsList[_i]>> <<if _optionsList[_i] > 1>> | <</if>> <<link _optionsList[_i]>> <<set $menials += _optionsList[_i]>> <<set $SecExp.buildings.secHub.menials -= _optionsList[_i]>> <<replace "#secHel">><<print $SecExp.buildings.secHub.menials>><</replace>> <<replace "#hel">><<print $menials>><</replace>> <<if $SecExp.buildings.secHub.menials < _optionsList[_i] || $SecExp.buildings.secHub.menials < App.SecExp.Check.reqMenials()>> <<goto "securityHQ">> <</if>> <</link>> <</if>> <</capture>> <</for>> <</if>> <<if $SecExp.buildings.secHub.menials != App.SecExp.Check.reqMenials()>> <br><<link "Match the requirement" "securityHQ">> <<if $menials >= App.SecExp.Check.reqMenials() - $SecExp.buildings.secHub.menials>> <<set $menials -= App.SecExp.Check.reqMenials() - $SecExp.buildings.secHub.menials>> <<set $SecExp.buildings.secHub.menials = App.SecExp.Check.reqMenials()>> <<elseif App.SecExp.Check.reqMenials() < $SecExp.buildings.secHub.menials>> <<set $menials += $SecExp.buildings.secHub.menials - App.SecExp.Check.reqMenials()>> <<set $SecExp.buildings.secHub.menials = App.SecExp.Check.reqMenials()>> <<else>> <<set $SecExp.buildings.secHub.menials += $menials>> <<set $menials = 0>> <</if>> <</link>> <</if>> <br><br>Your security level (@@.deepskyblue;$SecExp.core.security@@) /* security level and upgrades */ <<if $SecExp.core.security <= 20>> is dangerously low. <<elseif $SecExp.core.security <= 40>> is low. <<elseif $SecExp.core.security <= 60>> is decent. <<elseif $SecExp.core.security <= 80>> is good. <<else>> is great. <</if>> Considering the current upgrades the resting level for security is <<print App.SecExp.Check.reqMenials()>>, while the effective maximum level is <<print Math.trunc(App.SecExp.Check.reqMenials() * (Math.clamp($SecExp.buildings.secHub.menials,0,App.SecExp.Check.reqMenials()) / App.SecExp.Check.reqMenials()))>>. <br>Your crime level (@@.orangered;$SecExp.core.crimeLow@@) /* crime level and upgrades */ <<if $SecExp.core.crimeLow <= 20>> is very low. <<elseif $SecExp.core.crimeLow <= 40>> is low. <<elseif $SecExp.core.crimeLow <= 60>> is average. <<elseif $SecExp.core.crimeLow <= 80>> is high. <<else>> is extremely high. <</if>> Considering the current upgrades the maximum level of crime is <<print App.SecExp.Check.crimeCap()>>, while the effective maximum level is <<print Math.trunc(Math.clamp(App.SecExp.Check.crimeCap() + (App.SecExp.Check.crimeCap() - App.SecExp.Check.crimeCap() * ($SecExp.buildings.secHub.menials / App.SecExp.Check.reqMenials())),0,100))>>. <<if App.SecExp.battle.recon() == 0>> <br>Your reconnaissance capabilities are very limited. Very little information will be available if the arcology is attacked. <<elseif App.SecExp.battle.recon() == 1>> <br>You have limited reconnaissance capabilities. You'll have limited intel available in case of an attack. <<elseif App.SecExp.battle.recon() == 2>> <br>You have good reconnaissance capabilities. Good, reliable intel will be available if the arcology is attacked. <<else>> <br>You have great reconnaissance capabilities. You'll have very accurate information on the enemy if the arcology is attacked. <</if>> <<if App.SecExp.battle.deploySpeed() == 1>> <br>You have low readiness. You won't be able to mobilize many troops in time in case of an attack. <<elseif App.SecExp.battle.deploySpeed() == 2>> <br>You have decent readiness. You will be able to muster up sufficient forces to handle an average attack. <<elseif App.SecExp.battle.deploySpeed() == 3>> <br>You have good readiness. You will be able to mobilize a lot of troops in case of an attack. <<else>> <br>You have great readiness. You can mobilize a small army in very little time. <</if>> <<if $SecExp.core.authority > 12000>> <br><br>__Cold Data Storage Facility__: <<if App.SecExp.Check.reqMenials() <= 10>> <br>Personnel cannot be further reduced. <<elseif $SecExp.buildings.secHub.coldstorage > 6>> <br>You have installed a cold storage facility for the Security HQ's archives with a data retention capability of three years. <<elseif $SecExp.buildings.secHub.coldstorage == 6 && $SecExp.core.authority >= 19500 && App.SecExp.Check.reqMenials() > 10>> <br>You have installed a cold storage facility for the Security HQ's archives with a data retention capability of two years. <br>[[Expand the cold storage facility to increase data retention to three years|securityHQ][cashX(-Math.trunc(2400000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.coldstorage++, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(2400000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will lower the amount of required slaves by a further 10, but will increase upkeep. The remaining slaves will be more efficient in dealing with crime.// <<elseif $SecExp.buildings.secHub.coldstorage == 5 && $SecExp.core.authority >= 19500 && App.SecExp.Check.reqMenials() > 10>> <br>You have installed a cold storage facility for the Security HQ's archives with a data retention capability of one year. <br>[[Expand the cold storage facility to increase data retention to two years|securityHQ][cashX(-Math.trunc(1200000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.coldstorage++, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(1200000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will lower the amount of required slaves by a further 10, but will increase upkeep. The remaining slaves will be more efficient in dealing with crime.// <<elseif $SecExp.buildings.secHub.coldstorage == 4 && $SecExp.core.authority >= 19500 && App.SecExp.Check.reqMenials() > 10>> <br>You have installed a cold storage facility for the Security HQ's archives with a data retention capability of nine months. <br>[[Expand the cold storage facility to increase data retention to one year|securityHQ][cashX(-Math.trunc(900000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.coldstorage++, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(900000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will lower the amount of required slaves by a further 10, but will increase upkeep. The remaining slaves will be more efficient in dealing with crime.// <<elseif $SecExp.buildings.secHub.coldstorage == 3 && $SecExp.core.authority > 18000 && App.SecExp.Check.reqMenials() > 10>> <br>You have installed a cold storage facility for the Security HQ's archives with a data retention capability of six months. <br>[[Expand the cold storage facility to increase data retention to nine months|securityHQ][cashX(-Math.trunc(600000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.coldstorage++, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(600000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will lower the amount of required slaves by a further 10, but will increase upkeep. The remaining slaves will be more efficient in dealing with crime.// <<elseif $SecExp.buildings.secHub.coldstorage == 2 && $SecExp.core.authority > 16000 && App.SecExp.Check.reqMenials() > 10>> <br>You have installed a cold storage facility for the Security HQ's archives with a data retention capability of three months. <br>[[Expand the cold storage facility to increase data retention to six months|securityHQ][cashX(-Math.trunc(300000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.coldstorage++, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(300000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will lower the amount of required slaves by a further 10, but will increase upkeep. The remaining slaves will be more efficient in dealing with crime.// <<elseif $SecExp.buildings.secHub.coldstorage == 1 && $SecExp.core.authority > 14000 && App.SecExp.Check.reqMenials() > 10>> <br>You have installed a cold storage facility for the Security HQ's archives with a data retention capability of one month. <br>[[Expand the cold storage facility to increase data retention to three months|securityHQ][cashX(-Math.trunc(100000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.coldstorage++, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will lower the amount of required slaves by a further 10, but will increase upkeep. The remaining slaves will be more efficient in dealing with crime.// <<elseif $SecExp.buildings.secHub.coldstorage == 0 && $SecExp.core.authority > 12000 && App.SecExp.Check.reqMenials() > 10>> [[Install a cold storage facility|securityHQ][cashX(-Math.trunc(50000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.coldstorage++, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will lower the amount of required slaves by 10, but will increase upkeep. The remaining slaves will be more efficient in dealing with crime.// <</if>> <</if>> <br><br> <<run App.UI.tabBar.handlePreSelectedTab($tabChoice.securityHQ)>> <div class="tab-bar"> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'SecurityCrime')" id="tab SecurityCrime">Security and crime</button> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'ReconReadiness')" id="tab ReconReadiness">Reconnaissance and readiness</button> </div> <div id="SecurityCrime" class="tab-content"> <div class="content"> Security<hr> <<if $SecExp.buildings.secHub.upgrades.security.nanoCams == 0>> [[Install a nano-camera system |securityHQ][cashX(-Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.upgrades.security.nanoCams = 1]] <br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will raise rest point of security by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> You have installed all across the arcology closed circuit nano-cameras to keep the arcology under your watchful eye. <</if>> <<if $SecExp.buildings.secHub.upgrades.security.cyberBots == 0>> <br>[[Buy cybersecurity algorithms|securityHQ][cashX(-Math.trunc(7500*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.upgrades.security.cyberBots = 1]] <br>//Costs <<print cashFormat(Math.trunc(7500*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will raise rest point of security by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> <br>You have bought advanced cybersecurity algorithms that will defend your arcology against hack attempts or cyber frauds. <</if>> <<if $SecExp.core.authority > 10000>> <<if $SecExp.buildings.secHub.upgrades.security.eyeScan == 0>> <br>[[Install invisible eye scanners|securityHQ][cashX(-Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.upgrades.security.eyeScan = 1]] <br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will raise rest point of security by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> <br>You have installed numerous hidden eye scanners that accurately register the movements of everyone inside the arcology. <</if>> <<if $SecExp.buildings.secHub.upgrades.security.cryptoAnalyzer == 0>> <br>[[Buy and install crypto analyzers|securityHQ][cashX(-Math.trunc(15000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.upgrades.security.cryptoAnalyzer = 1]] <br>//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will raise rest point of security by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> <br>You have bought and employed sophisticated crypto analyzing software to accurately track and archive every financial movement or transaction made inside the walls of your arcology. <</if>> <</if>> <br><br>Crime<hr> <<if $SecExp.buildings.secHub.upgrades.crime.advForensic == 0>> [[Install advanced forensic equipment|securityHQ][cashX(-Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.upgrades.crime.advForensic = 1, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will bring down the crime level cap by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> You have installed advanced forensic equipment, able to extract every bit of precious information from any clue. <</if>> <<if $SecExp.buildings.secHub.upgrades.crime.autoArchive == 0>> <br>[[Install auto-curating archiver|securityHQ][cashX(-Math.trunc(7500*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.upgrades.crime.autoArchive = 1, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(7500*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will bring down the crime level cap by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> <br>You have installed auto-curating archiver software, which will update in real time your data archives with any new relevant information on criminals residing in your arcology. <</if>> <<if $SecExp.core.authority > 10000>> <<if $SecExp.buildings.secHub.upgrades.crime.autoTrial == 0>> <br>[[Install automated trials software|securityHQ][cashX(-Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.upgrades.crime.autoTrial = 1, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will bring down the crime level cap by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> <br>You have installed advanced legal algorithms that allows the handling of legal matters much quicker and much more accurately. <</if>> <<if $SecExp.buildings.secHub.upgrades.crime.worldProfiler == 0>> <br>[[Install worldwide profilers|securityHQ][cashX(-Math.trunc(15000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.upgrades.crime.worldProfiler = 1, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will bring down the crime level cap by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> <br>You have installed advanced profiler software, which will constantly scour every known data archive on the globe (legally or not) to gather as much information as possible on dangerous criminals. <</if>> <</if>> </div> </div> <div id="ReconReadiness" class="tab-content"> <div class="content"> Reconnaissance<hr> <<if $SecExp.buildings.secHub.upgrades.intel.sensors == 0>> [[Install perimeter sensors|securityHQ][cashX(-Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.upgrades.intel.sensors = 1, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will increase recon capabilities, but will require 5 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> You have installed perimeter seismic sensors able to detect movement with high accuracy. <</if>> <<if $SecExp.buildings.secHub.upgrades.intel.signalIntercept == 0>> <br>[[Create signal interception hub|securityHQ][cashX(-Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.upgrades.intel.signalIntercept = 1, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will increase recon capabilities, but will require 5 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> <br>You have installed advanced signal interception equipment. <</if>> <<if $SecExp.core.authority > 10000>> <<if $SecExp.buildings.secHub.upgrades.intel.radar == 0>> <br>[[Install advanced radar equipment|securityHQ][cashX(-Math.trunc(15000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $SecExp.buildings.secHub.upgrades.intel.radar = 1, $PC.skill.hacking += 1]] <br>//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will increase recon capabilities, but will require 10 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> <br>You have installed sophisticated radar equipment. <</if>> <</if>> <br><br>Readiness<hr> <<if $SecExp.buildings.secHub.upgrades.readiness.pathways == 0>> [[Build specialized pathways in the arcology|securityHQ][cashX(-Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount), "capEx"), $SecExp.buildings.secHub.upgrades.readiness.pathways = 1]] <br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount))>>. Will increase readiness by 1, but will increase upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> You have built specialized pathways inside the arcology to quickly move troops around the structure. <</if>> <<if $SecExp.buildings.secHub.upgrades.readiness.rapidVehicles == 0>> <br>[[Buy rapid armored transport vehicles|securityHQ][cashX(-Math.trunc(7500*$upgradeMultiplierArcology*_HistoryDiscount), "capEx"), $SecExp.buildings.secHub.upgrades.readiness.rapidVehicles = 1]] <br>//Costs <<print cashFormat(Math.trunc(7500*$upgradeMultiplierArcology*_HistoryDiscount))>>. Will increase readiness by 2, but will require 5 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> <br>You have bought rapid armored transport vehicles able to bring your troops to battle much quicker than before. <</if>> <<if $SecExp.core.authority > 10000>> <<if $SecExp.buildings.secHub.upgrades.readiness.rapidPlatforms == 0>> <br>[[Build rapid deployment platforms|securityHQ][cashX(-Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount), "capEx"), $SecExp.buildings.secHub.upgrades.readiness.rapidPlatforms = 1]] <br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount))>>. Will increase readiness by 2, but will require 5 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> <br>You have built rapid deployment platforms able to equip and deploy units within very limited time windows. <</if>> <<if $SecExp.buildings.secHub.upgrades.readiness.earlyWarn == 0>> <br>[[Institute early warning systems|securityHQ][cashX(-Math.trunc(15000*$upgradeMultiplierArcology*_HistoryDiscount), "capEx"), $SecExp.buildings.secHub.upgrades.readiness.earlyWarn = 1]] <br>//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology*_HistoryDiscount))>>. Will increase readiness by 2, but will require 10 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealing with crime.// <<else>> <br>You have created early warning systems that constantly analyze in real time data to determine the likeness of an attack. <</if>> <</if>> </div> </div>
MonsterMate/fc
src/Mods/SecExp/buildings/securityHQ.tw
tw
mit
24,753
:: transportHub [nobr] <<set $nextButton = "Back", $nextLink = "Main">> <strong>The Transport Hub</strong> <hr> You quickly reach the transport hub, where a constant stream of vehicles, people and goods greets you. Part of the structure is dedicated to air travel and the other is mainly occupied by the <<if $terrain != "oceanic" && $terrain != "marine">>rail station<<else>>docks<</if>>. <<if $SecExp.edicts.limitImmigration == 1 || $policies.immigrationRep == -1>> Due to your strict policies concerning immigration, very few new citizens arrive in the transport hub. <<elseif $SecExp.edicts.openBorders == 1 || $policies.immigrationCash == 1>> Due to your liberal policies concerning immigration, the transport hub is filled with a flow of new citizens. <</if>> <<if $SecExp.buildings.transportHub.airport == 1>> The arcology's airport is relatively small and poorly equipped. It can handle some traffic, but nothing noteworthy. <<elseif $SecExp.buildings.transportHub.airport == 2>> The arcology's airport is relatively small, but well equipped. It can handle some traffic, but nothing too serious. <<elseif $SecExp.buildings.transportHub.airport == 3>> The arcology's airport is good sized and well equipped. It can handle a good amount of traffic. <<elseif $SecExp.buildings.transportHub.airport == 4>> The arcology's airport is good sized and very well equipped. It can handle a lot of traffic. <<else>> The arcology's airport is huge and very well equipped. It can handle an impressive amount of traffic. <</if>> <<if $terrain != "oceanic" && $terrain != "marine">> <<if $SecExp.buildings.transportHub.surfaceTransport == 1>> The railway network is old and limited. It can handle some traffic, but not sustain commercial activity. <<elseif $SecExp.buildings.transportHub.surfaceTransport == 2>> The railway network is modern and efficient, but limited in reach. It can handle some traffic, but not sustain commercial activity of any significant size. <<elseif $SecExp.buildings.transportHub.surfaceTransport == 3>> The railway network is modern, efficient and expansive. It can handle a significant amount of traffic. <<else>> The railway network is high tech and very far reaching. It can handle an enormous amount of traffic. <</if>> <<else>> <<if $SecExp.buildings.transportHub.surfaceTransport == 1>> The docks are old and small. They can handle some traffic, but not sustain commercial activity. <<elseif $SecExp.buildings.transportHub.surfaceTransport == 2>> The docks are modern and efficient, but limited in size. They can handle some traffic, but not sustain commercial activity of significant size. <<elseif $SecExp.buildings.transportHub.surfaceTransport == 3>> The docks are modern, efficient and expansive. They can handle a significant amount of traffic. <<else>> The docks are huge in size and high tech. They can handle an enormous amount of traffic. <</if>> <</if>> <<if $SecExp.buildings.transportHub.security == 1>> The security of the hub is limited to a few cameras and the occasional guard. <<elseif $SecExp.buildings.transportHub.security == 2>> The security of the hub is guaranteed by a powerful camera surveillance system. <<elseif $SecExp.buildings.transportHub.security == 3>> The security of the hub is guaranteed by a powerful camera surveillance system and a rapid response team constantly patrolling the structure. <<else>> The security of the hub is guaranteed by a powerful camera surveillance system, a rapid response team constantly patrolling the building and additional security drones making the rounds around the exterior. <</if>> <<if $SecExp.core.trade <= 20>> <br><br>Trade is @@.red;almost non-existent.@@ Outside the supplies for the arcology's domestic consumption little else crosses the territory of the free city. <<elseif $SecExp.core.trade <= 40>> <br><br>Trade is @@.orange;low.@@ There's some but limited commercial activity crossing the territory of the free city. <<elseif $SecExp.core.trade <= 60>> <br><br>Trade is at @@.yellow;positive levels.@@ There's a good amount commercial activity outside the supplies for the arcology's domestic consumption. <<elseif $SecExp.core.trade <= 80>> <br><br>Trade is at @@.limegreen;high levels.@@ There's a lot of commercial activity outside the supplies for the arcology's domestic consumption. <<else>> <br><br>Trade is at @@.green;extremely high levels.@@ There's a constant stream of commercial activity crossing the arcology. <</if>> <<if $SecExp.buildings.transportHub.airport == 1>> <br><br> <<link "Modernize the airport" "transportHub">> <<run cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.airport++>> <</link>> //Will cost <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>> and will increase trade, but will affect security// <<elseif $SecExp.buildings.transportHub.airport == 2>> <br><br> <<link "Enlarge the airport" "transportHub">> <<run cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.airport++>> <</link>> //Will cost <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>> and will increase trade, but will affect security// <<elseif $SecExp.buildings.transportHub.airport == 3>> <br><br> <<link "Further modernize the airport" "transportHub">> <<run cashX(forceNeg(Math.trunc(45000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.airport++>> <</link>> //Will cost <<print cashFormat(Math.trunc(45000*$upgradeMultiplierArcology))>> and will increase trade, but will affect security// <<elseif $SecExp.buildings.transportHub.airport == 4>> <br><br> <<link "Further enlarge the airport" "transportHub">> <<run cashX(forceNeg(Math.trunc(85000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.airport++>> <</link>> //Will cost <<print cashFormat(Math.trunc(85000*$upgradeMultiplierArcology))>> and will increase trade, but will affect security// <<else>> <br><br>The airport is fully upgraded. <</if>> <<if $terrain != "oceanic" && $terrain != "marine">> /* trainyard/dockyard */ <<if $SecExp.buildings.transportHub.surfaceTransport == 1>> <br> <<link "Modernize the railway" "transportHub">> <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.surfaceTransport++>> <</link>> //Will cost <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// <<elseif $SecExp.buildings.transportHub.surfaceTransport == 2>> <br> <<link "Enlarge the railway" "transportHub">> <<run cashX(forceNeg(Math.trunc(25000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.surfaceTransport++>> <</link>> //Will cost <<print cashFormat(Math.trunc(25000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// <<elseif $SecExp.buildings.transportHub.surfaceTransport == 3>> <br> <<link "Further modernize and enlarge the railway" "transportHub">> <<run cashX(forceNeg(Math.trunc(65000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.surfaceTransport++>> <</link>> //Will cost <<print cashFormat(Math.trunc(65000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// <<else>> <br>The railway is fully upgraded. <</if>> <<else>> <<if $SecExp.buildings.transportHub.surfaceTransport == 1>> <br> <<link "Modernize the docks" "transportHub">> <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.surfaceTransport++>> <</link>> //Will cost <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// <<elseif $SecExp.buildings.transportHub.surfaceTransport == 2>> <br> <<link "Enlarge the docks" "transportHub">> <<run cashX(forceNeg(Math.trunc(25000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.surfaceTransport++>> <</link>> //Will cost <<print cashFormat(Math.trunc(25000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// <<elseif $SecExp.buildings.transportHub.surfaceTransport == 3>> <br> <<link "Further modernize and enlarge the docks" "transportHub">> <<run cashX(forceNeg(Math.trunc(65000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.surfaceTransport++>> <</link>> //Will cost <<print cashFormat(Math.trunc(65000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// <<else>> <br>The docks are fully upgraded. <</if>> <</if>> <<if $SecExp.buildings.transportHub.security == 1>> /* security */ <br> <<link "Expand and modernize the surveillance system" "transportHub">> <<run cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.security++>> <</link>> //Will cost <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>> and lower the transport hub security modifiers// <<elseif $SecExp.buildings.transportHub.security == 2>> <br> <<link "Establish a rapid response team" "transportHub">> <<run cashX(forceNeg(Math.trunc(35000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.security++>> <</link>> //Will cost <<print cashFormat(Math.trunc(35000*$upgradeMultiplierArcology))>> and further lower the transport hub security modifiers// <<elseif $SecExp.buildings.transportHub.security == 3>> <br> <<link "Add additional security drones to the structure" "transportHub">> <<run cashX(forceNeg(Math.trunc(55000*$upgradeMultiplierArcology)), "capEx")>> <<set $SecExp.buildings.transportHub.security++>> <</link>> //Will cost <<print cashFormat(Math.trunc(55000*$upgradeMultiplierArcology))>> and further lower the transport hub security modifiers// <<else>> <br>The hub security is fully upgraded <</if>> <br><br>[[Return this sector to standard markets|Main][delete $SecExp.buildings.transportHub, cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx"), App.Arcology.cellUpgrade($building, App.Arcology.Cell.Market, "Transport Hub", "Markets")]] //Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>//
MonsterMate/fc
src/Mods/SecExp/buildings/transportHub.tw
tw
mit
10,603
:: weaponsManufacturing [nobr jump-to-safe jump-from-safe] <<set $nextButton = "Back", $nextLink = "Main", _baseUpgradeTime = App.SecExp.weapManuUpgrade.baseTime()>> This sector of the arcology has been dedicated to weapons manufacturing. These factories supply <<if $militiaUnits.length > 0>> your militia and<</if>> <<if $slaveUnits.length > 0>> your slave soldiers and<</if>> <<if $mercenaries > 0>> your mercenaries and<</if>> many small old world nations as the advanced technology that Free Cities have available is hard to come by otherwise. <<if $SecExp.buildings.weapManu.productivity == 1>> <br>Production is completely manned by human workers. The complex has close to zero automation. <<elseif $SecExp.buildings.weapManu.productivity == 2>> <br>Production is mostly handled by human workers. A few of the most tiresome tasks are handled by robots. <<elseif $SecExp.buildings.weapManu.productivity == 3>> <br>A good part of production is handled by robots with humans handling the most complex tasks. <<elseif $SecExp.buildings.weapManu.productivity == 4>> <br>Almost all production is handled by robots, with humans acting as support for the machines. <<else>> <br>All production here is handled by robots. The few humans working in the complex occupy themselves exclusively with management and quality assurance. <</if>> <<if $SecExp.buildings.weapManu.lab == 1>> <br>There's a very spartan lab attached to the complex that occupies itself mainly with weapons testing and small adjustments to the manufacturing process. <<elseif $SecExp.buildings.weapManu.lab == 2>> <br>There's a lab attached to the complex. It mainly test weapons effectiveness and manufacturing efficiency, but has enough equipment and personnel to develop new technology. <<else>> <br>There's a large lab attached to the complex. The complement of equipment and personnel makes it a great beacon of military science in an otherwise ignorant world. <</if>> <<if $SecExp.buildings.weapManu.menials > 0>> <br><br>Assigned here are $SecExp.buildings.weapManu.menials slaves working to produce as much equipment as possible. <<else>> <br><br>There are no assigned menial slaves here. The spaces is manned exclusively by low rank citizens. <</if>> You own <<print num($menials)>> free menial slaves. This manufacturing complex can house 500 at most, with <<print 500 - $SecExp.buildings.weapManu.menials>> free slots. <br> <<set _popCap = menialPopCap()>> <<set _menialPrice = menialSlaveCost()>> <<set _bulkMax = _popCap.value-$menials-$fuckdolls-$menialBioreactors>> <<if $cash > _menialPrice>> <<if _bulkMax > 0 || $menials+$fuckdolls+$menialBioreactors == 0>> [[Buy|weaponsManufacturing][$menials+=1,$menialSupplyFactor-=1,cashX(forceNeg(_menialPrice), "menialTransfer")]] <<if $cash > (menialSlaveCost(10))*10>> [[(x10)|weaponsManufacturing][$menials+=10,$menialSupplyFactor-=10,cashX(forceNeg((menialSlaveCost(10))*10), "menialTransfer")]] <</if>> <<if $cash > (menialSlaveCost(100))*100>> [[(x100)|weaponsManufacturing][$menials+=100,$menialSupplyFactor-=100,cashX(forceNeg((menialSlaveCost(100))*100), "menialTransfer")]] <</if>> <<if $cash > (_menialPrice+1)*2>> <<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>> [[(max)|weaponsManufacturing][$menials+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))), "menialTransfer")]] <</if>> //Bulk transactions may require offering a premium.// <</if>> <</if>> <<if $SecExp.buildings.weapManu.menials < 500>> <<if $menials >= 1>> <<link "Transfer a menial slave" "weaponsManufacturing">> <<set $menials--, $SecExp.buildings.weapManu.menials++>> <</link>> <</if>> <<if $menials >= 10 && $SecExp.buildings.weapManu.menials <= 490>> | <<link "Transfer 10 menial slaves" "weaponsManufacturing">> <<set $menials -= 10, $SecExp.buildings.weapManu.menials += 10>> <</link>> <</if>> <<if $menials >= 100 && $SecExp.buildings.weapManu.menials <= 400>> | <<link "Transfer 100 menial slaves" "weaponsManufacturing">> <<set $menials -= 100, $SecExp.buildings.weapManu.menials += 100>> <</link>> <</if>> <<if $menials > 0>> | <<link "Transfer all free menial slaves" "weaponsManufacturing">> <<if $menials > 500 - $SecExp.buildings.weapManu.menials>> <<set $menials -= 500 - $SecExp.buildings.weapManu.menials>> <<set $SecExp.buildings.weapManu.menials = 500>> <<else>> <<set $SecExp.buildings.weapManu.menials += $menials, $menials = 0>> <</if>> <</link>> <</if>> <<else>> The complex does not require more workers. <</if>> <<if $SecExp.buildings.weapManu.menials > 0>> <br> <<link "Transfer out all menial slaves" "weaponsManufacturing">> <<set $menials += $SecExp.buildings.weapManu.menials, $SecExp.buildings.weapManu.menials = 0>> <</link>> <</if>> <<if $SecExp.buildings.weapManu.productivity < 5>> <br> <<link "Invest in automating the complex" "weaponsManufacturing">> <<run cashX(forceNeg(10000 * $SecExp.buildings.weapManu.productivity), "capEx")>> <<set $SecExp.buildings.weapManu.productivity++>> <<for _i = 0; _i < $SecExp.buildings.weapManu.upgrades.queue.length; _i++>> <<if $SecExp.buildings.weapManu.upgrades.queue[_i].time > 0>> <<set _percentComplete = $SecExp.buildings.weapManu.upgrades.queue[_i].time / (_baseUpgradeTime / ($SecExp.buildings.weapManu.productivity - 1))>> <<set _newTime = Math.ceil(_percentComplete * _baseUpgradeTime / $SecExp.buildings.weapManu.productivity)>> <<set $SecExp.buildings.weapManu.upgrades.queue[_i].time = _newTime>> <</if>> <</for>> <</link>> //Will cost <<print cashFormat(10000 * $SecExp.buildings.weapManu.productivity)>> and will increase the facility income in addition to speeding up upgrade production.// <<elseif $SecExp.buildings.weapManu.lab < 3>> <br>You have fully automated the complex. <</if>> <<if $SecExp.buildings.weapManu.lab < 3>> <br> <<link "Invest in research and development" "weaponsManufacturing">> <<run cashX(forceNeg(10000 * $SecExp.buildings.weapManu.lab), "capEx")>> <<set $SecExp.buildings.weapManu.lab++>> <</link>> //Will cost <<print cashFormat(10000 * $SecExp.buildings.weapManu.lab)>> and will increase the facility income as well as unlock upgrades for our troops// <<elseif $SecExp.buildings.weapManu.productivity < 5>> <br>You have fully upgraded and funded the R&D department <</if>> <<if $SecExp.buildings.weapManu.lab >= 3 && $SecExp.buildings.weapManu.productivity >= 5>> The facility is completely automated and its R&D department is fully upgraded and funded. <</if>> <br><br>__Markets__: //You are free to sell to whoever you please, but expect hostile forces of a certain kind to be stronger if we'll ever meet in battle.// <<if $SecExp.buildings.weapManu.sellTo.citizen == 1>> <br>We are currently selling our weapons to the domestic market of the arcology. [[Forbid|weaponsManufacturing][$SecExp.buildings.weapManu.sellTo.citizen = 0]] <<else>> <br>We are not selling our weaponry to our citizens. [[Allow|weaponsManufacturing][$SecExp.buildings.weapManu.sellTo.citizen = 1]] <</if>> <<if $SecExp.buildings.weapManu.sellTo.raiders == 1>> <br>We are currently selling our weapons to various groups of outlaws, also known as raiders. [[Forbid|weaponsManufacturing][$SecExp.buildings.weapManu.sellTo.raiders = 0]] <<else>> <br>We are not selling our weaponry to raiders. [[Allow|weaponsManufacturing][$SecExp.buildings.weapManu.sellTo.raiders = 1]] <</if>> <<if $SecExp.buildings.weapManu.sellTo.oldWorld == 1>> <br>We are currently selling our weapons to many old world nations. [[Forbid|weaponsManufacturing][$SecExp.buildings.weapManu.sellTo.oldWorld = 0]] <<else>> <br>We are not selling our weaponry to old world nations. [[Allow|weaponsManufacturing][$SecExp.buildings.weapManu.sellTo.oldWorld = 1]] <</if>> <<if $SecExp.buildings.weapManu.sellTo.FC == 1>> <br>We are currently selling our weapons to other Free Cities. [[Forbid|weaponsManufacturing][$SecExp.buildings.weapManu.sellTo.FC = 0]] <<else>> <br>We are not selling our weaponry to other Free Cities. [[Allow|weaponsManufacturing][$SecExp.buildings.weapManu.sellTo.FC = 1]] <</if>> <<set _time = Math.ceil(_baseUpgradeTime / $SecExp.buildings.weapManu.productivity)>> <br><br>Upgrades: With our current industrial and research capabilities upgrades will be finished in _time weeks. <<if App.SecExp.weapManuUpgrade.fully().bots && App.SecExp.weapManuUpgrade.fully().human>> <<run delete $SecExp.buildings.weapManu.upgrades.queue>> <<else>> <<set $SecExp.buildings.weapManu.upgrades.queue = $SecExp.buildings.weapManu.upgrades.queue || []>> <<if $SecExp.buildings.weapManu.lab < 3>> <br>Upgrade the research facility further to unlock additional upgrades. <</if>> <br>Security Drones: <<if App.SecExp.weapManuUpgrade.fully().bots>> You have fully upgraded the security drones. <<else>> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(-1)>> </div> <<if $SecExp.buildings.weapManu.lab >= 2>> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(-2)>> </div> <</if>> <<if $SecExp.buildings.weapManu.lab >= 3>> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(-3)>> </div> <</if>> <br> <</if>> <br>Troops: <<if $SF.Toggle && $SF.Active >= 1 && (App.SecExp.getAppliedUpgrades('human').attack >= 4 || App.SecExp.getAppliedUpgrades('human').hp >= 4 || App.SecExp.getAppliedUpgrades('human').morale >= 40 || App.SecExp.getAppliedUpgrades('human').defense >= 4)>> You have fully upgraded your human troops. <<elseif App.SecExp.getAppliedUpgrades('human').attack >= 2 || App.SecExp.getAppliedUpgrades('human').hp >= 2 || App.SecExp.getAppliedUpgrades('human').morale >= 20 || App.SecExp.getAppliedUpgrades('human').defense >= 2>> <<if $SF.Toggle && $SF.Active >= 1>> <<set _reasons = []>> <<if $SF.Squad.Drugs < 8>> <<set _reasons.push('drug lab needs more advanced equipement')>> <</if>> <<if $SecExp.edicts.SFSupportLevel < 2 || $SecExp.edicts.SFSupportLevel < 4 || $SecExp.edicts.SFSupportLevel < 5>> <<set _reasons.push('support contract needs more clauses')>> <</if>> <<if $SF.Squad.Firebase < 7>> <<set _reasons.push('Firebase would likely require additional expansion(s)')>> <</if>> <<set _reasons.join(',')>> With support from $SF.Lower, we may be able to further upgrade our troops. <<if _reasons.length > 0>><br>The Colonel says that the; _reasons.<</if>> <<else>> You have fully upgraded your human troops. <</if>> <</if>> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(0)>> </div> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(1)>> </div> <<if $SecExp.buildings.weapManu.lab >= 2>> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(2)>> </div> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(3)>> </div> <</if>> <<if $SecExp.buildings.weapManu.lab >= 3>> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(4)>> </div> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(5)>> </div> <</if>> <<if $SF.Toggle && $SF.Active >= 1>> <<if $SecExp.buildings.weapManu.lab >= 2 && $SecExp.edicts.SFSupportLevel >= 2 && $SF.Squad.Firebase >= 7>> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(6)>> </div> <</if>> <<if $SecExp.buildings.weapManu.lab >= 2 && $SecExp.edicts.SFSupportLevel >= 4 && $SF.Squad.Drugs >= 8>> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(7)>> </div> <</if>> <<if $SecExp.buildings.weapManu.lab >= 3 && $SecExp.edicts.SFSupportLevel >= 5>> <div> <<includeDOM App.SecExp.weapManuUpgrade.purchase(8)>> </div> <</if>> <</if>> <<for _i = 0; _i < $SecExp.buildings.weapManu.upgrades.queue.length; _i++>> <<set _current = App.SecExp.weapManuUpgrade.current($SecExp.buildings.weapManu.upgrades.queue[_i].ID)>> <<if _i === 0>><br>Currently developing<<else>><br><<= ordinalSuffix(_i + 1)>> in queue<</if>>: _current.dec for _current.unit. It will enhance their _current.purpose. Estimated completion time is <<= numberWithPluralOne($SecExp.buildings.weapManu.upgrades.queue[_i].time, "week")>> <</for>> <</if>> <<set _completed = $SecExp.buildings.weapManu.upgrades.completed>> <<if _completed.length > 0>> <p> You have completed the following projects: <<for _i = 0; _i < _completed.length; _i++>> <<= App.SecExp.weapManuUpgrade.current($SecExp.buildings.weapManu.upgrades.completed[_i]).dec>><<if _i < _completed.length - 1>>,<<else>>.<</if>> <</for>> </p> <</if>> <<set _cost = Math.trunc(10000*$upgradeMultiplierArcology)>> <p>[[Return this sector to standard manufacturing|Main][delete $SecExp.buildings.weapManu, cashX(-_cost, "capEx"), App.Arcology.cellUpgrade($building, App.Arcology.Cell.Manufacturing, "Weapon Manufacturing", "Manufacturing")]] //Costs <<print cashFormat(_cost)>>//</p>
MonsterMate/fc
src/Mods/SecExp/buildings/weaponsManufacturing.tw
tw
mit
13,052
:: edicts [nobr jump-to-safe jump-from-safe] <<set $nextButton = "Back", $nextLink = "Main">> //Passing any edict will cost <<print cashFormat(5000)>> and some authority. More edicts will become available as the arcology develops.// <<run App.UI.tabBar.handlePreSelectedTab($tabChoice.edicts)>> <br> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Society')" id="tab Society">Society</button> <<if $SecExp.battles.victories + $SecExp.battles.losses > 0 || $SecExp.rebellions.victories + $SecExp.rebellions.losses > 0 || $mercenaries > 0>> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Military')" id="tab Military">Military</button> <</if>> <div id="Society" class="tab-content"> <div class="content"> <<if $SecExp.edicts.alternativeRents == 1>> <br>''Alternative rent payment:'' you are allowing citizens to pay for their rents in menial slaves rather than cash. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.alternativeRents = 0]]</span> <<else>> <br>''Alternative rent payment:'' allow citizens to pay for their rents in menial slaves rather than cash, if so they wish. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.alternativeRents = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will decrease rents, but will supply a small amount of menial slaves each week.// <</if>> <<if $SecExp.edicts.enslavementRights == 1>> <br>''Enslavement rights:'' you are the only authority able to declare a person enslaved or not. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.enslavementRights = 0]]</span> <<else>> <br>''Enslavement rights:'' the arcology owner will be the only authority able to declare a person enslaved or not. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.enslavementRights = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will provide cash each week. The higher the flux of citizens to slaves the higher the income. Will cost a small amount of authority each week.// <</if>> <<if $SecExp.buildings.secHub>> <<set _secUpgrades = $SecExp.buildings.secHub.upgrades>> <<if $SecExp.edicts.sellData === 1>> <br>''Private Data marketization:'' you are selling private citizens' data to the best bidder. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.sellData = 0]]</span> <<elseif $SecExp.edicts.sellData === 0 && Object.values(_secUpgrades.security).reduce((a, b) => a + b) > 0 || Object.values(_secUpgrades.crime).reduce((a, b) => a + b) > 0 || Object.values(_secUpgrades.intel).reduce((a, b) => a + b) > 0>> <br>''Private Data marketization:'' allow the selling of private citizens' data. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.sellData = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will generate income dependent on the amount of upgrades installed in the security HQ, but will cost a small amount of authority each week.// <</if>> <</if>> <<if $SecExp.buildings.propHub>> <<if $SecExp.edicts.propCampaignBoost == 1>> <br>''Obligatory educational material:'' you are forcing residents to read curated educational material about the arcology. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.propCampaignBoost = 0]]</span> <<else>> <br>''Obligatory educational material:'' force residents to read curated educational material about the arcology. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.propCampaignBoost = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will increase the effectiveness of propaganda campaigns, but will incur upkeep costs.// <</if>> <</if>> <<if $SecExp.buildings.transportHub>> <<if $SecExp.edicts.tradeLegalAid == 1>> <br>''Legal aid for new businesses:'' New businesses can rely on your help for legal expenses and issues. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.tradeLegalAid = 0]]</span> <<else>> <br>''Legal aid for new businesses:'' Support new businesses in the arcology by helping them cover legal costs and issues. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.tradeLegalAid = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will increase trade, but will incur upkeep costs.// <</if>> <<if $SecExp.edicts.taxTrade == 1>> <br>''Trade tariffs:'' all goods transitioning in your arcology have to pay a transition fee. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.taxTrade = 0]]</span> <<else>> <br>''Trade tariffs:'' all goods transitioning in your arcology will have to pay a transition fee. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.taxTrade = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will provide income based on trade level, but will negatively affect trade.// <</if>> <</if>> <<if $arcologies[0].FSPaternalist != "unset">> <<if $SecExp.edicts.slaveWatch == 1>> <br>''@@.lime;Slave mistreatment watch:@@'' slaves are able access a special security service in case of mistreatment. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.slaveWatch = 0]]</span> <<else>> <br>''@@.lime;Slave mistreatment watch:@@'' slaves will be able access a special security service in case of mistreatment. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.slaveWatch = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will help advance paternalism, but will incur upkeep costs.// <</if>> <</if>> <<if $arcologies[0].FSChattelReligionist >= 40>> <<if $SecExp.edicts.subsidyChurch == 1>> <br>''@@.lime;Religious activities subsidy:@@'' you are providing economic support to religious activities following the official dogma. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.subsidyChurch = 0]]</span> <<else>> <br>''@@.lime;Religious activities subsidy:@@'' will provide economic support to religious activities following the official dogma. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.subsidyChurch = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will provide authority each week, but will incur upkeep costs.// <</if>> <</if>> <br><br>__Immigration:__ <<if $SecExp.edicts.limitImmigration == 1>> <br>''Immigration limits:'' you put strict limits to the amount of people the arcology can accept each week. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.limitImmigration = 0]]</span> <<else>> <br>''Immigration limits:'' institute limits to the amount of people the arcology will accept each week. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.openBorders = 0, $SecExp.edicts.limitImmigration = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will lower the amount of people immigrating into the arcology and enhance security.// <</if>> <<if $SecExp.edicts.openBorders == 1>> <br>''Open borders:'' you have lowered considerably the requirements to become citizens. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.openBorders = 0]]</span> <<else>> <br>''Open borders:'' considerably lower requirements to become citizens. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.openBorders = 1, $SecExp.edicts.limitImmigration = 0, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will increase immigration to the arcology, but will increase crime.// <</if>> <br><br>__Weapons:__ <<if $SecExp.edicts.weaponsLaw == 0>> <br>''Forbid weapons inside the arcology:'' residents are forbidden to buy, sell and keep weaponry while within the arcology. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.weaponsLaw = 3]]</span> <<elseif $SecExp.edicts.weaponsLaw == 2>> <br>''Heavy weaponry forbidden:'' residents are allowed to buy, sell and keep weapons within the arcology as long as they are non-heavy, non-explosive. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.weaponsLaw = 3]]</span> <<elseif $SecExp.edicts.weaponsLaw == 1>> <br>''Heavily restricted weaponry:'' residents are allowed to buy, sell and keep weapons within the arcology as long as they are non-automatic, non-high caliber. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.weaponsLaw = 3]]</span> <<else>> <br>''All weapons allowed:'' residents are allowed to buy, sell and keep all kind of weapons in the arcology. <</if>> <<if $SecExp.edicts.weaponsLaw == 3>> <br>''Heavy weaponry forbidden:'' set the range of weapons allowed within the arcology to non-heavy, non-explosive. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.weaponsLaw = 2, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will slightly increase prosperity, but will cost a small amount of authority each week and will leave rebellions decently armed.// <<elseif $SecExp.edicts.weaponsLaw == 2>> <br>''All weapons allowed:'' allow residents of the arcology to buy, sell and keep weaponry of any kind within the arcology. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.weaponsLaw = 3, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will slightly increase prosperity and provide a small weekly amount of reputation, but rebellions will be very well armed.// <br>''Heavily restricted weaponry:'' set the range of weapons allowed within the arcology to non-automatic, non-high caliber. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.weaponsLaw = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will cost some authority each week, but rebellions will be poorly armed.// <<elseif $SecExp.edicts.weaponsLaw == 1>> <br>''Heavy weaponry forbidden:'' set the range of weapons allowed within the arcology to non-heavy, non-explosive. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.weaponsLaw = 2, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will slightly increase prosperity, but will cost a small amount of authority each week and will leave rebellions decently armed.// <br>''Forbid weapons inside the arcology:'' forbid residents to buy, sell and keep weaponry while within the arcology. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.weaponsLaw = 0, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will cost a moderate amount of authority each week, but rebellions will be very poorly armed.// <<elseif $SecExp.edicts.weaponsLaw == 0>> <br>''Heavily restricted weaponry:'' set the range of weapons allowed within the arcology to non-automatic, non-high caliber. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.weaponsLaw = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will cost some authority each week, but rebellions will be poorly armed.// <</if>> <<if $FSAnnounced>> <br><br>__Future Societies:__ <<if $SecExp.edicts.defense.legionTradition === 1>> <br>''@@.lime;Legionaries traditions:@@'' you are funding specialized training for your recruits following the Roman tradition of professional armies. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.legionTradition = 0]]</span> <</if>> <<if $SecExp.edicts.defense.imperialTradition === 1>> <br>''@@.lime;Neo-Imperial traditions:@@'' you are funding specialized training for your recruits to inculcate them into a professional Imperial army, led by highly trained and hand-picked $mercenariesTitle. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.imperialTradition = 0]]</span> <</if>> <<if $SecExp.edicts.defense.pharaonTradition === 1>> <br>''@@.lime;Pharaonic traditions:@@'' you are funding specialized training for your recruits to turn them into an army worthy of a pharaon. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.pharaonTradition = 0]]</span> <</if>> <<if $SecExp.edicts.defense.militia >= 1>> <<if $arcologies[0].FSRomanRevivalist >= 40>> <<if $SecExp.edicts.defense.legionTradition === 0>> <br>''@@.lime;Legionaries traditions:@@'' Fund specialized training for your recruits to turn them into the professional of Roman tradition. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.legionTradition = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will increase defense, morale and hp of militia units, but will incur upkeep costs.// <</if>> <</if>> <<if $arcologies[0].FSEgyptianRevivalist >= 40>> <<if $SecExp.edicts.defense.pharaonTradition === 0>> <br>''@@.lime;Pharaonic traditions:@@'' Fund specialized training for your recruits to turn them into an army worthy of a pharaoh. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.pharaonTradition = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will increase attack, defense and morale of militia units, but will incur upkeep costs.// <</if>> <</if>> <<if $arcologies[0].FSNeoImperialist >= 40>> <<if $SecExp.edicts.defense.imperialTradition === 0>> <br>''@@.lime;Neo-Imperial traditions:@@'' Fund specialized training for your recruits to turn them into a professional Imperial army, led by your handpicked Imperial Knights. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.imperialTradition = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will moderately increase defense, hp, and morale of your militia units and increase attack, defense and morale of your mrecenaries, but will incur upkeep costs.// <</if>> <</if>> <</if>> <<if $SecExp.edicts.defense.eagleWarriors === 1>> <br>''@@.lime;Eagle warriors traditions:@@'' you are funding specialized training for your mercenaries following the Aztec tradition of elite warriors. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.eagleWarriors = 0]]</span> <</if>> <<if $SecExp.edicts.defense.ronin === 1>> <br>''@@.lime;Ronin traditions:@@'' you are funding specialized training for your mercenaries following the Japanese tradition of elite errant samurai. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.ronin = 0]]</span> <</if>> <<if $mercenaries > 0>> <<if $arcologies[0].FSAztecRevivalist >= 40>> <<if $SecExp.edicts.defense.eagleWarriors === 0>> <br>''@@.lime;Eagle warriors traditions:@@'' Fund specialized training for your mercenaries to turn them into the elite units of Aztec tradition. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.eagleWarriors = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will give a high increase in attack and morale, but will lower defense of mercenary units and will incur upkeep costs.// <</if>> <</if>> <<if $arcologies[0].FSEdoRevivalist >= 40>> <<if $SecExp.edicts.defense.ronin === 0>> <br>''@@.lime;Ronin traditions:@@'' Fund specialized training for your mercenaries to turn them into the errant samurai of Japanese tradition. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.ronin = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will increase attack, defense and morale of mercenary units, but will incur upkeep costs.// <</if>> <</if>> <</if>> <<if $SecExp.edicts.defense.mamluks === 1>> <br>''@@.lime;Mamluks traditions:@@'' you are funding specialized training for your slaves following the Arabian tradition of mamluks slave soldiers. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.mamluks = 0]]</span> <</if>> <<if $SecExp.edicts.defense.sunTzu === 1>> <br>''@@.lime;Sun Tzu Teachings:@@'' you are funding specialized training for your units and officers to follow the teachings of the "Art of War". <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.sunTzu = 0]]</span> <</if>> <<if $arcologies[0].FSArabianRevivalist >= 40>> <<if $SecExp.edicts.defense.mamluks === 0>> <br>''@@.lime;Mamluks traditions:@@'' Fund specialized training for your slaves to turn them into the mamluks slave soldiers of Arabian tradition. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.mamluks = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will increase attack, morale and hp of slave units, but will incur upkeep costs.// <</if>> <</if>> <<if $arcologies[0].FSChineseRevivalist >= 40>> <<if $SecExp.edicts.defense.sunTzu === 0>> <br>''@@.lime;Sun Tzu Teachings:@@'' Fund specialized training for your units and officers to conform your army to the teachings of the "Art of War". <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.sunTzu = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will slightly increase attack, defense and morale of all units, but will incur upkeep costs.// <</if>> <</if>> <</if>> </div> </div> <div id="Military" class="tab-content"> <div class="content"> <<if $SecExp.edicts.defense.soldierWages === 0>> <br>''Low wages for soldiers:'' wages for soldiers are set to a low level compared to market standards. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.soldierWages = 1]]</span> <<elseif $SecExp.edicts.defense.soldierWages === 1>> <br>''Average wages for soldiers:'' wages for soldiers are set to the market standards. <<else>> <br>''High wages for soldiers:'' wages for soldiers are set to a high level compared to market standards. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.soldierWages = 1]]</span> <</if>> <<if $SecExp.edicts.defense.soldierWages === 0>> <br>''Average wages for soldiers:'' will set the wages paid to the soldiers of the arcology to an average amount. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.soldierWages += 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will raise all units upkeep and push loyalty to average levels.// <<elseif $SecExp.edicts.defense.soldierWages === 1>> <br>''Low wages for soldiers:'' will set the wages paid to the soldiers of the arcology to a low amount. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.soldierWages -= 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will lower all units upkeep and push loyalty to low levels.// <br>''High wages for soldiers:'' will set the wages paid to the soldiers of the arcology to a high amount. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.soldierWages += 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will raise all units upkeep and push loyalty to high levels.// <<else>> <br>''Average wages for soldiers:'' will set the wages paid to the soldiers of the arcology to an average amount. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.soldierWages -= 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will lower all units upkeep and push loyalty to average levels.// <</if>> <<if $SecExp.edicts.defense.slavesOfficers === 1>> <br>''Slave Officers:'' your trusted slaves are allowed to lead the defense forces of the arcology. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.slavesOfficers = 0]]</span> <<else>> <br>''Slave Officers:'' allow your trusted slaves to lead the defense forces of the arcology. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.slavesOfficers = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will allow your bodyguard and Head Girl to lead troops into battle, but will cost a small amount of authority each week.// <</if>> <<if $mercenaries > 0>> <<if $SecExp.edicts.defense.discountMercenaries === 1>> <br>''Mercenary subsidy:'' mercenaries willing to immigrate in your arcology will be offered a discount on rent. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.discountMercenaries = 0]]</span> <<else>> <br>''Mercenary subsidy:'' mercenaries willing to immigrate in your arcology will be offered a discount on rent. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.discountMercenaries = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will slightly lower rent, but will increase the amount of available mercenaries.// <</if>> <</if>> <<if $SecExp.edicts.defense.militia === 0>> <br>''Found the militia:'' lay the groundwork for the formation of the arcology's citizens' army. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.militia = 2, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will allow for the recruitment and training of citizens.// <<else>> <<if $SecExp.edicts.defense.militia === 1>> <br>''Volunteers' militia:'' only volunteers will be accepted in the militia. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.militia = 2, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will replenish militia manpower slowly and will cap at <<= num(App.SecExp.militiaCap(2)*100)>>% of the total citizens population.// <</if>> <<if $SecExp.edicts.defense.militia === 3>> <br>''Conscription:'' every citizen is required to train in the militia and serve the arcology for a limited amount of time. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.militia = 2]]</span> <<else>> <br>''Conscription:'' every citizen is required to train in the militia and serve the arcology if the need arises. <<if $SecExp.core.authority >= 4000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.militia = 3, cashX(-5000, "edicts"), $SecExp.core.authority -= 4000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will replenish militia manpower moderately fast and will cap at <<= num(App.SecExp.militiaCap(3)*100)>>% of the total citizens population, but has a high authority cost// <</if>> <<if $SecExp.edicts.defense.militia === 4>> <br>''Obligatory military service:'' every citizen is required to register and serve under the militia. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.militia = 2]]</span> <<else>> <br>''Obligatory military service:'' every citizen is required to register and serve under the militia. <<if $SecExp.core.authority >= 6000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.militia = 4, cashX(-5000, "edicts"), $SecExp.core.authority -= 6000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will quickly replenish militia manpower and will cap at <<= num(App.SecExp.militiaCap(4)*100)>>% of the total citizens population, but has a very high authority cost// <</if>> <<if $SecExp.edicts.defense.militia === 5>> <br>''Militarized Society:'' every adult citizen is required to train and actively participate in the military of the arcology. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.militia = 2]]</span> <<else>> <br>''Militarized Society:'' every adult citizen is required to train and participate in the defense of the arcology. <<if $SecExp.core.authority >= 8000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.militia = 5, cashX(-5000, "edicts"), $SecExp.core.authority -= 8000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will very quickly replenish militia manpower and will cap at <<= num(App.SecExp.militiaCap(5)*100)>>% of the total citizens population, but has an extremely high authority cost// <</if>> <<if $SecExp.edicts.defense.militaryExemption === 1>> <br>''Military exemption:'' you allow citizens to avoid military duty by paying a weekly fee. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.militaryExemption = 0]]</span> <</if>> <<if $SecExp.edicts.defense.militia >= 3>> <<if $SecExp.edicts.defense.militaryExemption === 0>> <br>''Military exemption:'' allow citizens to avoid military duty by paying a weekly fee. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.militaryExemption = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will slow down the replenishment of manpower, but will supply cash each week. More profitable with stricter recruitment laws.// <</if>> <</if>> <<if $SecExp.edicts.defense.lowerRequirements == 1>> <br>''@@.lime;Revised minimum requirements:@@'' you allow citizens outside the normally accepted range to join the militia. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.lowerRequirements = 0]]</span> <</if>> <<if $arcologies[0].FSHedonisticDecadence >= 40>> <<if $SecExp.edicts.defense.lowerRequirements == 0>> <br>''@@.lime;Revised minimum requirements:@@'' will allow citizens outside the normally accepted range to join the militia. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.lowerRequirements = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will slightly lower defense and hp of militia units, but will increase the manpower replenishment rate.// <</if>> <</if>> <<if $SecExp.edicts.defense.noSubhumansInArmy == 1>> <br>''@@.lime;No subhumans in the militia:@@'' it is forbidden for subhumans to join the militia. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.noSubhumansInArmy = 0]]</span> <</if>> <<if $arcologies[0].FSSubjugationist >= 40>> <<if $SecExp.edicts.defense.noSubhumansInArmy == 0>> <br>''@@.lime;No subhumans in the militia:@@'' prevent subhumans from joining the militia. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.noSubhumansInArmy = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will help advance racial Subjugation, but will slow down slightly manpower replenishment.// <</if>> <</if>> <<if $SecExp.edicts.defense.pregExemption == 1>> <br>''@@.lime;Military exemption for pregnancies:@@'' pregnant citizens are allowed, and encouraged, to avoid military service. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.pregExemption = 0]]</span> <</if>> <<if $arcologies[0].FSRepopulationFocus >= 40 && $SecExp.edicts.defense.militia >= 3>> <<if $SecExp.edicts.defense.pregExemption == 0>> <br>''@@.lime;Military exemption for pregnancies:@@'' pregnant citizens will be allowed, and encouraged, to avoid military service. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.pregExemption = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will help advance repopulation focus, but will slow down slightly manpower replenishment.// <</if>> <</if>> <</if>> <<if $SecExp.edicts.defense.privilege.militiaSoldier === 1>> <br>''Special militia privileges:'' citizens joining the militia are exempt from rent payment. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.privilege.militiaSoldier = 0]]</span> <</if>> <<if $SecExp.edicts.defense.privilege.militiaSoldier === 0 && $SecExp.edicts.defense.militia >= 1>> <br>''Special militia privileges'' will allow citizens joining the militia to avoid paying rent. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.privilege.militiaSoldier = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will increase the loyalty of militia units, but will decrease rents.// <</if>> <<if $SecExp.edicts.defense.privilege.slaveSoldier === 1>> <br>''Special slaves privileges:'' Slaves into the army are allowed to have material possessions. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.privilege.slaveSoldier = 0]]</span> <</if>> <<if $SecExp.edicts.defense.privilege.slaveSoldier === 0>> <br>''Special slaves privileges'' will allow slaves drafted into the army to be able to have material possessions. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.privilege.slaveSoldier = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will increase the loyalty of slave units, but will cost authority each week.// <</if>> <<if $SecExp.edicts.defense.privilege.mercSoldier === 1>> <br>''Special mercenary privileges:'' Mercenaries under contract can claim part of the loot gained from battles. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.privilege.mercSoldier = 0]]</span> <</if>> <<if $SecExp.edicts.defense.privilege.mercSoldier === 0 && $mercenaries > 0>> <br>''Special mercenary privileges'' will allow mercenaries under contract to claim part of the loot gained from battles. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.privilege.mercSoldier = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will increase the loyalty of mercenary units, but will reduce cash and menial slaves gained from battles.// <</if>> <<if $SecExp.edicts.defense.martialSchool === 1>> <br>''@@.lime;Slave martial schools:@@'' specialized schools are training slaves in martial arts and bodyguarding. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.martialSchool = 0]]</span> <</if>> <<if $arcologies[0].FSPhysicalIdealist >= 40>> <<if $SecExp.edicts.defense.martialSchool === 0>> <br>''@@.lime;Slave martial schools:@@'' specialized schools will be set up to train slaves in martial arts and bodyguarding. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.martialSchool = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will slightly increase morale of slave units, but will incur upkeep costs.// <</if>> <</if>> <<if $SecExp.edicts.defense.eliteOfficers === 1>> <br>''@@.lime;Elite officers:@@'' officers are exclusively recruited from the elite of society. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.eliteOfficers = 0]]</span> <</if>> <<if $arcologies[0].FSRestart >= 40>> <<if $SecExp.edicts.defense.eliteOfficers === 0>> <br>''@@.lime;Elite officers:@@'' officers will be exclusively recruited from the elite of society. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.eliteOfficers = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will help advance eugenics and provide a small morale boost to militia units, but will give a small morale malus to slave units.// <</if>> <</if>> <<if $SecExp.edicts.defense.liveTargets === 1>> <br>''@@.lime;Live targets drills:@@'' disobedient slaves are used as live targets at shooting ranges. <span class ='yellow'>[[Repeal|edicts][$SecExp.edicts.defense.liveTargets = 0]]</span> <</if>> <<if $arcologies[0].FSDegradationist >= 40>> <<if $SecExp.edicts.defense.liveTargets === 0>> <br>''@@.lime;Live targets drills:@@'' disobedient slaves will be used as live targets at shooting ranges. <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.defense.liveTargets = 1, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will help advance degradationism and provide a small amount of exp to units, but will make the slave population slowly decline.// <</if>> <</if>> <<if $SF.Toggle && $SF.Active >= 1>> <br><br>__Special Force:__ <<set _capSF = capFirstChar($SF.Lower || "the special force")>> <<if $SecExp.edicts.SFSupportLevel > 0>> <<if $SecExp.edicts.SFSupportLevel === 1>> <br>''Equipment provision:'' _capSF is providing the security HQ with advanced equipment, boosting its efficiency. <<elseif $SecExp.edicts.SFSupportLevel === 2>> <br>''Personnel training:'' _capSF is currently providing advanced equipment and training to security HQ personnel. <<elseif $SecExp.edicts.SFSupportLevel === 3>> <br>''Troops detachment:'' _capSF has currently transferred troops to the security department HQ in addition to providing advanced equipment and training to security HQ personnel. <<elseif $SecExp.edicts.SFSupportLevel === 4>> <br>''Full support:'' _capSF is currently providing its full support to the security department, while transferring troops to the security department HQ in addition to providing advanced equipment and training to security HQ personnel. <<elseif $SecExp.edicts.SFSupportLevel === 5>> <br>''Network assistance:'' _capSF is currently assisting with a local install of its custom network full support and has transferred troops to the security department HQ in addition to providing advanced equipment and training to security HQ personnel. <</if>> <span class='yellow'>[[Repeal|edicts][$SecExp.edicts.SFSupportLevel--]]</span> <</if>> <<if $SecExp.edicts.SFSupportLevel < 5>> <<if $SecExp.edicts.SFSupportLevel === 0 && App.SecExp.Check.reqMenials() > 5>> <br>''Equipment provision:'' _capSF will provide the security HQ with advanced equipment. <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will lower the amount of personnel necessary to man the security HQ by 5, but will incur upkeep costs.// <<elseif $SecExp.edicts.SFSupportLevel === 1 && $SF.Squad.Firebase >= 4 && App.SecExp.Check.reqMenials() > 5>> <br>''Personnel training:'' _capSF will provide the security HQ personnel with advanced training. <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will lower the amount of personnel necessary to man the security HQ by a further 5, but will incur additional upkeep costs.// <<elseif $SecExp.edicts.SFSupportLevel === 2 && $SF.Squad.Firebase >= 6 && App.SecExp.Check.reqMenials() > 5>> <br>''Troops detachment:'' _capSF will provide troops to the security department. <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will lower the amount of personnel necessary to man the security HQ by a further 5, but will incur additional upkeep costs.// <<elseif $SecExp.edicts.SFSupportLevel === 3 && $SF.Squad.Firebase >= 6 && App.SecExp.Check.reqMenials() > 5>> <br>''Full Support:'' _capSF will give the security department its full support. <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will lower the amount of personnel necessary to man the security HQ by a further 5, but will incur additional upkeep costs.// <<elseif $SecExp.edicts.SFSupportLevel === 4 && $SF.Squad.Firebase === 10 && App.SecExp.Check.reqMenials() > 5>> <br>''Network assistance:'' _capSF will assist the security department with installing a local version of their custom network. <br>&nbsp;&nbsp;&nbsp;&nbsp;//Will lower the amount of personnel necessary to man the security HQ by a further 5, but will incur additional upkeep costs.// <</if>> <<if $SecExp.core.authority >= 1000>> <span class='green'>[[Implement|edicts][$SecExp.edicts.SFSupportLevel++, cashX(-5000, "edicts"), $SecExp.core.authority -= 1000]]</span> <<else>> <br>//Not enough Authority.// <</if>> <</if>> <</if>> </div> </div>
MonsterMate/fc
src/Mods/SecExp/edicts.tw
tw
mit
39,962
/** Creates a bulk upgrade link for the unit that is passed. * @param {object} [unit] the unit to be checked. */ App.SecExp.bulkUpgradeUnit = function(unit) { unit = Array.isArray(unit) ? unit : [unit]; let el = document.createElement("a"); function upgradeUnit(x) { Object.assign(x, { maxTroops: 50, equip: 3, commissars: 2, cyber: 1, medics: 1, SF: 1 }); } function getCost(x) { let cost = 0; const equipUpgradeCost = 250; if (x.maxTroops < 50) { cost += 5000 + (((50 - x.maxTroops) /10) * equipUpgradeCost * (x.equip + x.commissars + x.cyber + x.SF)); } if (x.equip < 3) { cost += (equipUpgradeCost * x.maxTroops + 1000) * (3 - x.equip); } if (x.commissars < 2) { cost += (equipUpgradeCost * x.maxTroops + 1000) * (2 - x.commissars); } if ((V.prostheticsUpgrade >= 2 || V.researchLab.advCombatPLimb === 1) && x.cyber === 0) { cost += equipUpgradeCost * x.maxTroops + 2000; } if (x.medics === 0) { cost += equipUpgradeCost * x.maxTroops + 1000; } if (V.SF.Toggle && V.SF.Active >= 1 && x.SF === 0) { cost += equipUpgradeCost * x.maxTroops + 5000; } return Math.ceil(cost *= 1.1); } const price = unit.map(getCost).reduce((acc, cur) => acc + cur, 0); if (price > 0) { el.append(App.UI.DOM.link(`Bulk upgrade for ${cashFormat(price)}`, () => { unit.map(upgradeUnit).reduce((acc, cur) => acc + cur); cashX(-price, "securityExpansion"); }, [], passage() )); } return el; }; /** Reports changes to the supplied unit's loyalty. * @param {FC.SecExp.PlayerHumanUnitData} input the unit type to be checked. * @param {FC.SecExp.PlayerHumanUnitType} type */ App.SecExp.humanUnitLoyaltyChanges = function(input, type) { let loyaltyChange = 0, el = document.createElement("div"); el.append(`${input.platoonName}: `); if (V.SecExp.buildings.barracks && V.SecExp.buildings.barracks.loyaltyMod >= 1) { el.append("is periodically sent to the indoctrination facility in the barracks for thought correction therapy."); loyaltyChange += 2 * V.SecExp.buildings.barracks.loyaltyMod; } if (input.commissars >= 1) { el.append("The commissars attached to the unit carefully monitor the officers and grunts for signs of insubordination."); loyaltyChange += 2 * input.commissars; } if (V.SecExp.edicts.defense.soldierWages === 2) { if (type === 'slave') { el.append("The slaves greatly appreciate the generous wage given to them for their service as soldiers. Occasions to earn money for a slave are scarce after all."); } else if (type === 'citizens') { el.append("The soldiers greatly appreciate the generous wage given to them for their service. They are proud to defend their homes while making a small fortune out of it."); } else if (type === 'mercenary') { el.append("The mercenaries greatly appreciate the generous wage given to them for their service. After all coin is the fastest way to reach their hearts."); } loyaltyChange += random(5, 10); } else if (V.SecExp.edicts.defense.soldierWages === 1) { if (type === 'slave') { el.append("The slaves appreciate the wage given to them for their service as soldiers, despite it being just adequate. Occasions to earn money for a slave are scarce after all."); } else if (type === 'citizens') { el.append("The soldiers appreciate the wage given to them for their service, despite it being just adequate. They are proud to defend their homes, though at the cost of possible financial gains."); } else if (type === 'mercenary') { el.append("The mercenaries do not appreciate the barely adequate wage given to them for their service. Still their professionalism keeps them determined to finish their contract."); } loyaltyChange += random(-5, 5); } else { if (type === 'slave') { el.append("The slaves do not appreciate the low wage given to them for their service as soldiers, but occasions to earn money for a slave are scarce, so they're not too affected by it."); } else if (type === 'citizens') { el.append("The soldiers do not appreciate the low wage given to them for their service. Their sense of duty keeps them proud of their role as defenders of the arcology, but many do feel its financial weight."); } else if (type === 'mercenary') { el.append("The mercenaries do not appreciate the low wage given to them for their service. Their skill would be better served by a better contract and this world does not lack demand for guns for hire."); } loyaltyChange -= random(5, 10); } if (type === 'slave' && V.SecExp.edicts.defense.privilege.slaveSoldier) { el.append("Allowing them to hold material possessions earns you their devotion and loyalty."); loyaltyChange += random(1, 2); } if (type === 'citizens' && V.SecExp.edicts.defense.privilege.militiaSoldier) { el.append("Allowing them to avoid rent payment for their military service earns you their happiness and loyalty."); loyaltyChange += random(1, 2); } if (type === 'mercenary' && V.SecExp.edicts.defense.privilege.mercSoldier) { el.append("Allowing them to keep part of the loot gained from your enemies earns you their trust and loyalty."); loyaltyChange += random(1, 2); } el.append("This week, the loyalty of this unit "); if (loyaltyChange > 0) { App.UI.DOM.appendNewElement("span", el, "increased.", "green"); } else if (loyaltyChange === 0) { App.UI.DOM.appendNewElement("span", el, "did not change.", "yellow"); } else { App.UI.DOM.appendNewElement("span", el, "decreased.", "red"); } input.loyalty = Math.clamp(input.loyalty + loyaltyChange, 0, 100); if (input.training < 100 && V.SecExp.buildings && V.SecExp.buildings.barracks.training >= 1) { let options = document.createElement("div"); options.append("The unit is able to make use of the training facilities to better prepare its soldiers, slowly increasing their experience level."); el.append(options); input.training += random(2, 4) * 1.5 * V.SecExp.buildings.barracks.training; } return el; }; /** Repairs unit if needed. * @param {object} [input] the unit to be checked. */ App.SecExp.fixBrokenUnit = function(input) { input.SF = input.SF || 0; if (!jsDef(input.ID)) { input.ID = App.SecExp.generateUnitID(); } input.cyber = input.cyber || 0; input.commissars = input.commissars || 0; input.maxTroops = Math.min(30, input.maxTroops); Math.clamp(input.troops, 0, input.maxTroops); }; /** Creates the requested unit object. * @param {string} [type] the unit type to be created. */ App.SecExp.generateUnit = function(type) { let newUnit = { ID: -1, equip: 0, active: 1, isDeployed: 0, maxTroops:30, troops: 30 }; if (type !== "bots") { Object.assign(newUnit, { training: 0, cyber: 0, medics: 0, SF: 0, commissars: 0, battlesFought: 0, loyalty: jsRandom(40, 60), ID: App.SecExp.generateUnitID() }); if (type === "slaves") { newUnit.platoonName = `${ordinalSuffix(++V.createdSlavesUnits)} ` + V.SecExp.defaultNames[type]; newUnit.troops = Math.min(newUnit.maxTroops, V.menials); V.menials -= newUnit.troops; } else if (type === "militia") { newUnit.platoonName = `${ordinalSuffix(++V.createdMilitiaUnits)} ` + V.SecExp.defaultNames[type]; newUnit.troops = Math.min(newUnit.maxTroops, V.militiaFreeManpower); V.militiaFreeManpower -= newUnit.troops; } else if (type === "mercs") { newUnit.platoonName = `${ordinalSuffix(++V.createdMercUnits)} ` + V.SecExp.defaultNames[type]; newUnit.troops = Math.min(newUnit.maxTroops, V.mercFreeManpower); V.mercFreeManpower -= newUnit.troops; } } return newUnit; }; /** Display's the deploy menu for the unit. * @param {FC.SecExp.PlayerHumanUnitData} input the unit to be checked. * @param {FC.SecExp.PlayerHumanUnitType} type * @param {number} [count=0] */ App.SecExp.deployUnitMenu = function(input, type, count = 0) { let el = document.createElement("div"), options = document.createElement("div"); const canDeploy = input.isDeployed === 0 && App.SecExp.battle.deployableUnits() > 0; if (input.active === 1 && input.troops > 0) { if (type === "bots") { $(el).append(App.SecExp.getUnit("Bots").describe()); } else { $(el).append(App.SecExp.getUnit(capFirstChar(type), count).describe()); } options = document.createElement("div"); options.append(App.UI.DOM.link(`${canDeploy ? 'Deploy' : 'Remove'} the unit`, () => { input.isDeployed = canDeploy ? 1 : 0; V.saveValid = 0; }, [], passage() )); } el.append(options); return el; }; /** Prints a list of upgrades that can be applied to the passed human unit. * @param {FC.SecExp.PlayerHumanUnitData} input the human unit to be checked. */ App.SecExp.humanUnitUpgradeList = function(input) { const equipUpgradeCost = 250; let el = document.createElement("div"); let options = document.createElement("div"); if (input.maxTroops < 50) { options.append(`For ${cashFormat(5000 + 10 * equipUpgradeCost * (input.equip + input.commissars + input.cyber + input.SF))} provide this unit's `); options.append(App.UI.DOM.link("officers with intensive training", () => { input.maxTroops += 10; cashX(-(5000 + 10 * equipUpgradeCost * (input.equip + input.commissars + input.cyber + input.SF)), "securityExpansion"); }, [], passage() )); options.append(` to increase the maximum number of soldiers in the unit by 10.`); } else { options.append(`Your officers reached their peak. Further training will have little impact on the number of troops they can effectively lead.`); } el.append(options); options = document.createElement("div"); if (input.equip < 3) { options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 1000)} invest in `); options.append(App.UI.DOM.link("better equipment", () => { input.equip++; cashX(-(equipUpgradeCost * input.maxTroops + 1000), "securityExpansion"); }, [], passage() )); options.append(` to increase this unit's attack and defense by 15% per investement.`); } else { options.append(`The unit is equipped with state of the art weaponry and equipment.`); } el.append(options); options = document.createElement("div"); if (input.commissars === 0) { options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 1000)} attach `); options.append(App.UI.DOM.link("commissars", () => { input.commissars++; cashX(-(equipUpgradeCost * input.maxTroops + 1000), "securityExpansion"); }, [], passage() )); options.append(` to slowly increase this unit's loyalty.`); } else if (input.commissars < 2) { options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 1000)} attach `); options.append(App.UI.DOM.link("commissars", () => { input.commissars++; cashX(-(equipUpgradeCost * input.maxTroops + 1000), "securityExpansion"); }, [], passage() )); options.append(` to slowly increase this unit's loyalty.`); } if (input.commissars === 1) { options.append(" The unit has a commissar detachment, keeping under control the ambitions of the unit's officers."); } else if (input.commissars === 2) { options.append(" The unit has a perfectly trained and loyal commissar detachment, keeping under control the ambitions of the unit's officers."); } el.append(options); options = document.createElement("div"); if (V.prostheticsUpgrade >= 2 || V.researchLab.advCombatPLimb === 1) { if (input.cyber === 0) { options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 1000)} `); options.append(App.UI.DOM.link("augment all soldiers of the unit", () => { input.cyber++; cashX(-(equipUpgradeCost * input.maxTroops + 2000), "securityExpansion"); }, [], passage() )); options.append(` with high tech cyber enhancements that will increase attack, defense and base hp values.`); } else { options.append('The unit is equipped with advanced cybernetic enhancements.'); } } el.append(options); options = document.createElement("div"); if (input.medics === 0) { options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 1000)} `); options.append(App.UI.DOM.link("attach trained medics to the unit", () => { input.medics++; cashX(-(equipUpgradeCost * input.maxTroops + 1000), "securityExpansion"); }, [], passage() )); options.append(' which will decrease the number of casualties suffered during battle.'); } else { options.append('The unit has a medic detachment following it into battle, decreasing the number of casualties the unit suffers'); } el.append(options); if (V.SF.Toggle && V.SF.Active >= 1) { options = document.createElement("div"); if (input.SF === 0) { options.append(`For ${cashFormat(equipUpgradeCost * input.maxTroops + 5000)} `); options.append(App.UI.DOM.link("attach Special Force advisors", () => { input.SF++; cashX(-(equipUpgradeCost * input.maxTroops + 5000), "securityExpansion"); }, [], passage() )); options.append(' which will slightly increase the base stats of the unit.'); } else { options.append(`The unit has attached advisors from ${V.SF.Lower} that will help the squad remain tactically aware and active.`); } el.append(options); } return el; }; /** Generate a unit ID for a new unit * @returns {number} */ App.SecExp.generateUnitID = function() { return Math.max( V.militiaUnits.reduce((acc, cur) => Math.max(acc, cur.ID), 0), V.slaveUnits.reduce((acc, cur) => Math.max(acc, cur.ID), 0), V.mercUnits.reduce((acc, cur) => Math.max(acc, cur.ID), 0) ) + 1; }; /** Player unit factory - get a unit based on its type and index * @param {string} type - "Bots", "Militia", "Slaves", "Mercs", or "SF" * @param {number} [index] - must be supplied if type is not "Bots" * @returns {App.SecExp.Unit} */ App.SecExp.getUnit = function(type, index) { if (type === "Bots") { return new App.SecExp.DroneUnit(V.secBots, App.SecExp.BaseDroneUnit); } else if (type === "SF") { return new App.SecExp.SFUnit(); } else if (typeof index !== "number") { throw `Bad index for unit type ${type}: ${index}`; } switch (type) { case "Militia": return new App.SecExp.HumanUnit(V.militiaUnits[index], App.SecExp.BaseMilitiaUnit, type); case "Slaves": return new App.SecExp.HumanUnit(V.slaveUnits[index], App.SecExp.BaseSlaveUnit, type); case "Mercs": return new App.SecExp.HumanUnit(V.mercUnits[index], App.SecExp.BaseMercUnit, type); default: throw `Unknown unit type: ${type}`; } }; /** Enemy unit factory - get a unit based on its type and basic data * @param {FC.SecExp.EnemyUnitType} type - "raiders", "free city", "old world", or "freedom fighters" * @param {number} troops * @param {number} equipment * @returns {App.SecExp.Unit} */ App.SecExp.getEnemyUnit = function(type, troops, equipment) { const baseUnitMap = new Map([ ["raiders", App.SecExp.BaseRaiderUnit], ["free city", App.SecExp.BaseFreeCityUnit], ["old world", App.SecExp.BaseOldWorldUnit], ["freedom fighters", App.SecExp.BaseFreedomFighterUnit], ]); const unitData = { troops: troops, maxTroops: troops, equip: equipment }; return new App.SecExp.EnemyUnit(unitData, baseUnitMap.get(type)); }; /** Irregular unit factory - get an irregular unit (without organization/upgrade bonuses) based on its type and basic data * @param {string} type - "Militia", "Slaves", or "Mercs" * @param {number} troops * @param {number} equipment * @returns {App.SecExp.Unit} */ App.SecExp.getIrregularUnit = function(type, troops, equipment) { const baseUnitMap = new Map([ ["Militia", App.SecExp.BaseMilitiaUnit], ["Slaves", App.SecExp.BaseSlaveUnit], ["Mercs", App.SecExp.BaseMercUnit], ]); const unitData = { troops: troops, maxTroops: troops, equip: equipment }; return new App.SecExp.IrregularUnit(unitData, baseUnitMap.get(type)); }; /** Equipment multiplier (static balance variable) */ App.SecExp.equipMod = 0.15; /** Turn a loyalty value into a corresponding bonus factor * @param {number} value range: [0-100] * @returns {number} bonus - range: [0.0-0.3], cap at input 67 */ App.SecExp.loyaltyValueToBonusFactor = function(value) { return Math.min(value * 3 / 670, 0.3); }; /** Turn a training value into a corresponding bonus factor * @param {number} value range: [0-100] * @returns {number} bonus - range: [0.0-0.5], cap at input 67 */ App.SecExp.trainingValueToBonusFactor = function(value) { return Math.min(value * 3 / 400, 0.5); }; /** Gets the bonus values provided for completing weapon manufacturing upgrades. * @param {string} type - unit type to check. * @returns {object} bouns values after checking for completed upgrades. */ App.SecExp.getAppliedUpgrades = function(type) { let hp = 0, morale = 0, def = 0, attack = 0; if (V.SecExp.buildings.weapManu) { if (type === 'drone') { if (V.SecExp.buildings.weapManu.upgrades.completed.includes(-3)) { hp++; } if (V.SecExp.buildings.weapManu.upgrades.completed.includes(-2)) { def++; } if (V.SecExp.buildings.weapManu.upgrades.completed.includes(-1)) { attack++; } } else if (type === 'human') { if (V.SecExp.buildings.weapManu.upgrades.completed.includes(0)) { attack++; } if (V.SecExp.buildings.weapManu.upgrades.completed.includes(1)) { def++; } if (V.SecExp.buildings.weapManu.upgrades.completed.includes(2)) { hp++; } if (V.SecExp.buildings.weapManu.upgrades.completed.includes(3)) { morale += 10; } if (V.SecExp.buildings.weapManu.upgrades.completed.includes(4)) { attack++; def++; } if (V.SecExp.buildings.weapManu.upgrades.completed.includes(5)) { hp++; morale += 10; } if (V.SecExp.buildings.weapManu.upgrades.completed.includes(6)) { attack++; def++; } if (V.SecExp.buildings.weapManu.upgrades.completed.includes(7)) { hp++; morale += 10; } if (V.SecExp.buildings.weapManu.upgrades.completed.includes(8)) { attack++; def++; hp++; morale += 10; } if (V.arcologies[0].FSNeoImperialistLaw1) { attack++; } } } return { attack: attack, defense: def, hp: hp, morale: morale }; }; App.SecExp.getEdictUpgradeVal = (function() { const data = { Militia: new Map([ ["legionTradition", {defense: 2, morale: 5, hp: 1}], ["imperialTradition", {defense: 1, morale: 5, hp: 1}], ["pharaonTradition", {attack: 2, defense: 2, morale: 10}], ["sunTzu", {attack: 1, defense: 1, morale: 5}], ["eliteOfficers", {morale: 5}], ["lowerRequirements", {defense: -1, hp: -1}] ]), Slave: new Map([ ["mamluks", {attack: 2, morale: 10, hp: 1}], ["sunTzu", {attack: 1, defense: 1, morale: 5}], ["eliteOfficers", {morale: -5}], ["martialSchool", {morale: 5}] ]), Merc: new Map([ ["eagleWarriors", {attack: 4, defense: -2, morale: 10}], ["ronin", {attack: 2, defense: 2, morale: 10}], ["sunTzu", {attack: 1, defense: 1, morale: 5}], ["imperialTradition", {attack: 1, defense: 2, morale: 5}], ]) }; /** Get the total edict upgrade effect on a particular stat for a particular unit * @param {string} unitType * @param {string} stat * @returns {number} */ function getNetEffect(unitType, stat) { let retval = 0; for (const [key, val] of data[unitType]) { if (V.SecExp.edicts.defense[key] > 0 && val[stat]) { retval += val[stat]; } } return retval; } return getNetEffect; })(); /** * @interface * @typedef {object} BaseUnit * @property {number} attack * @property {number} defense * @property {number} morale * @property {number} hp */ /** @implements {BaseUnit} */ App.SecExp.BaseMilitiaUnit = class BaseMilitiaUnit { static get attack() { return 7 + App.SecExp.getAppliedUpgrades('human').attack + App.SecExp.getEdictUpgradeVal("Militia", "attack"); } static get defense() { return 5 + App.SecExp.getAppliedUpgrades('human').defense + App.SecExp.getEdictUpgradeVal("Militia", "defense"); } static get morale() { return 140 + App.SecExp.getAppliedUpgrades('human').morale + App.SecExp.getEdictUpgradeVal("Militia", "morale"); } static get hp() { return 3 + App.SecExp.getAppliedUpgrades('human').hp + App.SecExp.getEdictUpgradeVal("Militia", "hp"); } }; /** @implements {BaseUnit} */ App.SecExp.BaseSlaveUnit = class BaseSlaveUnit { static get attack() { return 8 + App.SecExp.getAppliedUpgrades('human').attack + App.SecExp.getEdictUpgradeVal("Slave", "attack"); } static get defense() { return 3 + App.SecExp.getAppliedUpgrades('human').defense + App.SecExp.getEdictUpgradeVal("Slave", "defense"); } static get morale() { return 110 + App.SecExp.getAppliedUpgrades('human').morale + App.SecExp.getEdictUpgradeVal("Slave", "morale"); } static get hp() { return 3 + App.SecExp.getAppliedUpgrades('human').hp + App.SecExp.getEdictUpgradeVal("Slave", "hp"); } }; /** @implements {BaseUnit} */ App.SecExp.BaseMercUnit = class BaseMercUnit { static get attack() { return 8 + App.SecExp.getAppliedUpgrades('human').attack + App.SecExp.getEdictUpgradeVal("Merc", "attack"); } static get defense() { return 4 + App.SecExp.getAppliedUpgrades('human').defense + App.SecExp.getEdictUpgradeVal("Merc", "defense"); } static get morale() { return 125 + App.SecExp.getAppliedUpgrades('human').morale + App.SecExp.getEdictUpgradeVal("Merc", "morale"); } static get hp() { return 4 + App.SecExp.getAppliedUpgrades('human').hp + App.SecExp.getEdictUpgradeVal("Merc", "hp"); } }; /** @implements {BaseUnit} */ App.SecExp.BaseDroneUnit = class BaseDroneUnit { static get attack() { return 7 + App.SecExp.getAppliedUpgrades('drone').attack; } static get defense() { return 3 + App.SecExp.getAppliedUpgrades('drone').defense; } static get morale() { return 200; } static get hp() { return 3 + App.SecExp.getAppliedUpgrades('drone').hp; } }; /** @implements {BaseUnit} */ App.SecExp.BaseRaiderUnit = class BaseRaiderUnit { static get attack() { return 7; } static get defense() { return 2; } static get morale() { return 100; } static get hp() { return 2; } }; /** @implements {BaseUnit} */ App.SecExp.BaseFreeCityUnit = class BaseFreeCityUnit { static get attack() { return 6; } static get defense() { return 4; } static get morale() { return 130; } static get hp() { return 3; } }; /** @implements {BaseUnit} */ App.SecExp.BaseOldWorldUnit = class BaseOldWorldUnit { static get attack() { return 8; } static get defense() { return 4; } static get morale() { return 110; } static get hp() { return 2; } }; /** @implements {BaseUnit} */ App.SecExp.BaseFreedomFighterUnit = class BaseFreedomFighterUnit { static get attack() { return 9; } static get defense() { return 2; } static get morale() { return 160; } static get hp() { return 2; } }; /** @implements {BaseUnit} */ App.SecExp.BaseSpecialForcesUnit = class BaseSpecialForcesUnit { static get attack() { return 8 + App.SecExp.getAppliedUpgrades('human').attack; } static get defense() { return 4 + App.SecExp.getAppliedUpgrades('human').defense; } static get morale() { return 140 + App.SecExp.getAppliedUpgrades('human').morale; } static get hp() { return 4 + App.SecExp.getAppliedUpgrades('human').hp; } }; /** Unit base class */ App.SecExp.Unit = class SecExpUnit { /** @param {FC.SecExp.UnitData} data * @param {BaseUnit} baseUnit */ constructor(data, baseUnit) { this._data = data; this._baseUnit = baseUnit; } /** @abstract * @returns {number} */ get attack() { throw "derive me"; } /** @abstract * @returns {number} */ get defense() { throw "derive me"; } /** @abstract * @returns {number} */ get morale() { return this._baseUnit.morale; // no morale modifiers } /** @abstract * @returns {number} */ get hp() { throw "derive me"; } /** @abstract * @returns {string} */ describe() { throw "derive me"; } /** @abstract * @returns {string} */ printStats() { throw "derive me"; } }; App.SecExp.DroneUnit = class SecExpDroneUnit extends App.SecExp.Unit { /** @param {FC.SecExp.PlayerUnitData} data * @param {BaseUnit} baseUnit */ constructor(data, baseUnit) { super(data, baseUnit); this._data = data; // duplicate assignment, just for TypeScript } get attack() { const equipmentFactor = this._data.equip * App.SecExp.equipMod; return this._baseUnit.attack * (1 + equipmentFactor); } get defense() { const equipmentFactor = this._data.equip * App.SecExp.equipMod; return this._baseUnit.defense * (1 + equipmentFactor); } get hp() { return this._baseUnit.hp * this._data.troops; } describe() { return App.SecExp.describeUnit(this._data, "Bots"); } printStats() { let r = []; r.push(`<br>Security drones base attack: ${this._baseUnit.attack} (After modifiers: ${Math.trunc(this.attack)})`); r.push(`<br>Security drones base defense: ${this._baseUnit.defense} (After modifiers: ${Math.trunc(this.defense)})`); r.push(`<br>Equipment bonus: +${this._data.equip * 15}%`); r.push(`<br>Security drones base hp: ${this._baseUnit.hp} (Total after modifiers for ${this._data.troops} drones: ${this.hp})`); r.push(`<br>Security drones base morale: ${this._baseUnit.morale}`); return r.join(` `); } }; App.SecExp.HumanUnit = class SecExpHumanUnit extends App.SecExp.Unit { /** @param {FC.SecExp.PlayerHumanUnitData} data * @param {BaseUnit} baseUnit * @param {string} descriptionType */ constructor(data, baseUnit, descriptionType) { super(data, baseUnit); this._data = data; // duplicate assignment, just for TypeScript this._descType = descriptionType; } get attack() { const equipmentFactor = this._data.equip * App.SecExp.equipMod; const experienceFactor = App.SecExp.trainingValueToBonusFactor(this._data.training); const loyaltyFactor = App.SecExp.loyaltyValueToBonusFactor(this._data.loyalty); const SFFactor = 0.20 * this._data.SF; return this._baseUnit.attack * (1 + equipmentFactor + experienceFactor + loyaltyFactor + SFFactor) + this._data.cyber; } get defense() { const equipmentFactor = this._data.equip * App.SecExp.equipMod; const experienceFactor = App.SecExp.trainingValueToBonusFactor(this._data.training); const loyaltyFactor = App.SecExp.loyaltyValueToBonusFactor(this._data.loyalty); const SFFactor = 0.20 * this._data.SF; return this._baseUnit.defense * (1 + equipmentFactor + experienceFactor + loyaltyFactor + SFFactor) + this._data.cyber; } get hp() { const medicFactor = 0.25 * this._data.medics; const singleTroopHp = this._baseUnit.hp * (1 + medicFactor) + this._data.cyber; return singleTroopHp * this._data.troops; } describe() { return App.SecExp.describeUnit(this._data, this._descType); } printStats() { let r = []; r.push(`<br>${this._descType} base attack: ${this._baseUnit.attack} (After modifiers: ${Math.trunc(this.attack)})`); r.push(`<br>${this._descType} base defense: ${this._baseUnit.defense} (After modifiers: ${Math.trunc(this.defense)})`); if (this._data.equip > 0) { r.push(`<br>Equipment bonus: +${this._data.equip * 15}%`); } if (this._data.cyber > 0) { r.push(`<br>Cyber enhancements bonus: +1`); } if (this._data.training > 0) { r.push(`<br>Experience bonus: +${Math.trunc(App.SecExp.trainingValueToBonusFactor(this._data.training)*100)}%`); } if (this._data.loyalty > 0) { r.push(`<br>Loyalty bonus: +${Math.trunc(App.SecExp.loyaltyValueToBonusFactor(this._data.loyalty)*100)}%`); } if (this._data.SF > 0) { r.push(`<br>Special Force advisors bonus: +20%`); } r.push(`<br>${this._descType} base morale: ${this._baseUnit.morale} (After modifiers: ${this.morale})`); if (jsDef(V.SecExp.buildings.barracks) && V.SecExp.buildings.barracks.luxury > 0) { r.push(`<br>Barracks bonus: +${V.SecExp.buildings.barracks.luxury * 5}%`); } r.push(`<br>${this._descType} base hp: ${this._baseUnit.hp} (Total after modifiers for ${this._data.troops} troops: ${this.hp})`); if (this._data.medics > 0) { r.push(`<br>Medics detachment bonus: +25%`); } return r.join(` `); } }; App.SecExp.troopsFromSF = function() { if (V.slaveRebellion !== 1 || V.citizenRebellion !== 1) { // attack: how many troops can we actually carry? const transportMax = Math.trunc(125 * (V.SF.Squad.GunS + (V.terrain !== "oceanic" ? ((V.SF.Squad.AV + V.SF.Squad.TV)/2) : 0))); return Math.min(transportMax, V.SF.ArmySize); } else { return V.SF.ArmySize; // rebellion: transport capabilities are irrelevant } }; App.SecExp.SFUnit = class SFUnit extends App.SecExp.Unit { constructor() { super(null, App.SecExp.BaseSpecialForcesUnit); this._distancePenalty = (V.slaveRebellion !== 1 || V.citizenRebellion !== 1) ? 0.10 : 0.0; } get attack() { // ignores base attack? weird. const attackUpgrades = V.SF.Squad.Armoury + V.SF.Squad.Drugs + V.SF.Squad.AA + (V.terrain !== "oceanic" ? V.SF.Squad.AV : 0); return (0.75 - this._distancePenalty) * attackUpgrades; } get defense() { // ignores base defense? weird. const defenseUpgrades = V.SF.Squad.Armoury + V.SF.Squad.Drugs + (V.SF.Squad.AA + V.SF.Squad.TA) / 2 + (V.terrain !== "oceanic" ? (V.SF.Squad.AV + V.SF.Squad.TV) / 2 : 0); return (0.5 - this._distancePenalty) * defenseUpgrades; } get hp() { return this._baseUnit.hp * App.SecExp.troopsFromSF(); } }; App.SecExp.EnemyUnit = class SecExpEnemyUnit extends App.SecExp.Unit { /** @param {FC.SecExp.UnitData} data * @param {BaseUnit} baseUnit */ constructor(data, baseUnit) { super(data, baseUnit); } get attack() { const equipmentFactor = this._data.equip * App.SecExp.equipMod; return this._baseUnit.attack * (1 + equipmentFactor) + V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.oldWorld : 0; } get defense() { const equipmentFactor = this._data.equip * App.SecExp.equipMod; return this._baseUnit.defense * (1 + equipmentFactor) + V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.oldWorld : 0; } get hp() { return this._baseUnit.hp * this._data.troops; } }; App.SecExp.IrregularUnit = class SecExpEnemyUnit extends App.SecExp.Unit { /** @param {FC.SecExp.UnitData} data * @param {BaseUnit} baseUnit */ constructor(data, baseUnit) { super(data, baseUnit); } get attack() { const equipmentFactor = this._data.equip * App.SecExp.equipMod; return (this._baseUnit.attack - App.SecExp.getAppliedUpgrades('human').attack) * (1 + equipmentFactor); } get defense() { const equipmentFactor = this._data.equip * App.SecExp.equipMod; return (this._baseUnit.defense - App.SecExp.getAppliedUpgrades('human').defense) * (1 + equipmentFactor); } get hp() { return (this._baseUnit.hp - App.SecExp.getAppliedUpgrades('human').hp) * this._data.troops; } }; App.SecExp.describeUnit = (function() { return description; /** * @param {FC.SecExp.PlayerUnitData} input * @param {string} unitType */ function description(input, unitType = '') { let r = ``; const brief = V.SecExp.settings.unitDescriptions; if (unitType !== "Bots") { r += `<br><strong>${input.platoonName}</strong>${!brief ? ``:`. `} `; if (brief === 0) { if (input.battlesFought > 1) { r += `has participated in ${input.battlesFought} battles and is ready to face the enemy once more at your command. `; } else if (input.battlesFought === 1) { r += `is ready to face the enemy once more at your command. `; } else { r += `is ready to face the enemy in battle. `; } r += `<br>Its ${input.troops} men and women are `; if (unitType === "Militia") { r += `all proud citizens of your arcology, willing to put their lives on the line to protect their home. `; } else if (unitType === "Slaves") { r += `slaves in your possession, tasked with the protection of their owner and their arcology. `; } else if (unitType === "Mercs") { r += `mercenaries contracted to defend the arcology against external threats. `; } } else { r += `Battles fought: ${input.battlesFought}. `; } } else { if (brief === 0) { r += `<br>The drone unit is made up of ${input.troops} drones. All of which are assembled in an ordered formation in front of you, absolutely silent and ready to receive their orders.`; } else { r += `<br>Drone squad.`; } } if (brief === 0) { if (input.troops < input.maxTroops) { r += `The unit is not at its full strength of ${input.maxTroops} operatives. `; } } else { r += `Unit size: ${input.troops}/${input.maxTroops}.`; } if (brief === 0) { if (unitType !== "Bots") { if (input.equip === 0) { r += `They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more. `; } else if (input.equip === 1) { r += `They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor. `; } else if (input.equip === 2) { r += `They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like night vision and portable radars. `; } else { r += `They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment. `; } } else { if (input.equip === 0) { r += `They are equipped with light weaponry, mainly anti-riot nonlethal weapons. Not particularly effective in battle. `; } else if (input.equip === 1) { r += `They are equipped with light firearms, not an overwhelming amount of firepower, but with their mobility good enough to be effective. `; } else if (input.equip === 2) { r += `They are equipped with powerful, modern firearms and simple armor mounted around their frames. They do not make for a pretty sight, but on the battlefield they are a dangerous weapon. `; } else { r += `They are equipped with high energy railguns and adaptive armor. They are a formidable force on the battlefield, even for experienced soldiers. `; } } } else { r += `Equipment quality: `; if (input.equip === 0) { r += `basic. `; } else if (input.equip === 1) { r += `average. `; } else if (input.equip === 2) { r += `high. `; } else { r += `advanced. `; } } if (unitType !== "Bots") { if (brief === 0) { if (input.training <= 33) { r += `They lack the experience to be considered professionals, but `; if (unitType === "Militia") { r += `their eagerness to defend the arcology makes up for it. `; } else if (unitType === "Slaves") { r += `their eagerness to prove themselves makes up for it. `; } else if (unitType === "Mercs") { r += `they're trained more than enough to still be an effective unit. `; } } else if (input.training <= 66) { r += `They have trained `; if (input.battlesFought > 0) { r += `and fought `; } r += `enough to be considered disciplined, professional soldiers, ready to face the battlefield. `; } else { r += `They are consummate veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything. `; } if (input.loyalty < 10) { r += `The unit is extremely disloyal. Careful monitoring of their activities and relationships should be implemented. `; } else if (input.loyalty < 33) { r += `Their loyalty is low. Careful monitoring of their activities and relationships is advised. `; } else if (input.loyalty < 66) { r += `Their loyalty is not as high as it can be, but they are not actively working against their arcology owner. `; } else if (input.loyalty < 90) { r += `Their loyalty is high and strong. The likelihood of this unit betraying the arcology is low to non-existent. `; } else { r += `The unit is fanatically loyal. They would prefer death over betrayal. `; } if (input.cyber > 0) { r += `The soldiers of the unit have been enhanced with numerous cyberaugmentations which greatly increase their raw power. `; } if (input.medics > 0) { r += `The unit has a dedicated squad of medics that will follow them in battle. `; } if (V.SF.Toggle && V.SF.Active >= 1 && input.SF > 0) { r += `The unit has "advisors" from ${V.SF.Lower} that will help the squad remain tactically aware and active. `; } } else { r += `\nTraining: `; if (input.training <= 33) { r += `low. `; } else if(input.training <= 66) { r += `medium. `; } else { r += `high. `; } r += `Loyalty: `; if (input.loyalty < 10) { r += `extremely disloyal. `; } else if (input.loyalty < 33) { r += `low. `; } else if (input.loyalty < 66) { r += `medium. `; } else if (input.loyalty < 90) { r += `high. `; } else { r += `fanatical. `; } if (jsDef(input.cyber) && input.cyber > 0) { r += `\nCyberaugmentations applied. `; } if (jsDef(input.medics) && input.medics > 0) { r += `Medical squad attached. `; } if (V.SF.Toggle && V.SF.Active >= 1 && jsDef(input.SF) && input.SF > 0) { r += `${capFirstChar(V.SF.Lower || "the special force")} "advisors" attached. `; } } } if (!input.active) { r += `<br>This unit has lost too many operatives `; if (jsDef(input.battlesFought)) { r += `in the ${input.battlesFought} it fought `; } r += `and can no longer be considered a unit at all.`; } return r; } })(); App.SecExp.mercenaryAvgLoyalty = function() { return _.mean(V.mercUnits.filter((u) => u.active === 1).map((u) => u.loyalty)); }; App.SecExp.Manpower = { get totalMilitia() { return this.employedMilitia + this.freeMilitia; }, get employedMilitia() { return V.militiaUnits.reduce((acc, cur) => acc + cur.troops, 0); }, get freeMilitia() { return V.militiaFreeManpower; }, get employedSlave() { return V.slaveUnits.reduce((acc, cur) => acc + cur.troops, 0); }, get totalMerc() { return this.employedMerc + this.freeMerc; }, get employedMerc() { return V.mercUnits.reduce((acc, cur) => acc + cur.troops, 0); }, get freeMerc() { return V.mercFreeManpower; }, get employedOverall() { return this.employedMerc + this.employedMilitia + this.employedSlave; } };
MonsterMate/fc
src/Mods/SecExp/js/Unit.js
JavaScript
mit
38,335
App.SecExp.weapManuUpgrade = (function() { return { baseTime, current, purchase, fully, }; /** Weeks to completion without any modification. * @returns {number} */ function baseTime() { return 10; } /** Checks the supplied ID value and assigns values. * @param {number} [x=null] the optional ID value to use instead of the current upgrades ID. * @returns {Object} */ function current(x = null) { let o = {unit: "our human troops", ID: jsDef(x) ? x : V.SecExp.buildings.weapManu.upgrades.queue[0].ID}; switch(o.ID) { case -3: Object.assign(o, { dec: "advanced synthetic alloys", type: "hp", unit: "the security drones", cost: 10000*V.HackingSkillMultiplier, }); break; case -2: Object.assign(o, { dec: "adaptive armored frames", type: "defense", unit: "the security drones", cost: 10000 }); break; case -1: Object.assign(o, { dec: "dynamic battle aware AI", type: "attack", unit: "the security drones", cost: 30000 }); break; case 0: Object.assign(o, { dec: "magnetic based ballistic weaponry", type: "attack", cost: 30000 }); break; case 1: Object.assign(o, { dec: "ceramo-metallic alloys", type: "defense", cost: 30000 }); break; case 2: Object.assign(o, { dec: "rapid action stimulants", type: "hp", cost: 60000 }); break; case 3: Object.assign(o, { dec: "fast response neural stimulant", type: "morale", cost: 60000 }); break; case 4: Object.assign(o, { dec: "universal cyber enhancements", type: "attack and defense", cost: 120000*V.HackingSkillMultiplier }); break; case 5: Object.assign(o, { dec: "remote neural links", type: "hp and morale", cost: 120000*V.HackingSkillMultiplier }); break; case 6: Object.assign(o, { dec: "combined training regimens with the special force", type: "attack and defense", cost: 0 }); break; case 7: Object.assign(o, { dec: `a variant of the stimulant cocktail that the ${V.SF.Lower} created`, type: "hp and morale", cost: 300000 }); break; case 8: Object.assign(o, { dec: "a mesh network based off the custom network of the special force", type: "all", cost: 1000000*V.HackingSkillMultiplier }); break; } switch(o.type) { case "hp": Object.assign(o, {purpose: "survivability"}); break; case "defense": Object.assign(o, {purpose: "defensive capabilities"}); break; case "attack": Object.assign(o, {purpose: "attack power"}); break; case "morale": Object.assign(o, {purpose: "standing power"}); break; case "attack and defense": Object.assign(o, {purpose: "offensive and defensive effectiveness."}); break; case "hp and morale": Object.assign(o, {purpose: "morale and survivability"}); break; case "all": Object.assign(o, {purpose: "offensive,defensive effectiveness in addition to morale and survivability"}); break; } return o; } /** Prints a line that allows a user to purchase an upgrade. * @param {number} [x] ID value to use. * @returns {Node} */ function purchase(x) { let el = document.createElement("div"), found = null; if (!V.SecExp.buildings.weapManu.upgrades.completed.includes(x)) { for (let i = 0; i < V.SecExp.buildings.weapManu.upgrades.queue.length; i++) { if (V.SecExp.buildings.weapManu.upgrades.queue[i].ID === x) { found = i; break; } } const item = current(x), time = Math.ceil(baseTime() / V.SecExp.buildings.weapManu.productivity); if (!jsDef(found)) { el.append(App.UI.DOM.link(`Develop ${item.dec}.`, () => { V.SecExp.buildings.weapManu.upgrades.queue.push({ID: x, time: time}); cashX(-item.cost, "capEx"); }, [], passage() )); el.append(`This will take ${time} weeks`); if (item.cost > 0) { el.append(`, cost ${cashFormat(item.cost)}`); } el.append(` and will increase `); if (item.type !== "all") { el.append(`the base ${item.type} value${item.type.contains("and") ? 's' : ''}`); } else { el.append('all base stats'); } el.append(` of ${item.unit}.`); } else { el.append(App.UI.DOM.link(`Remove ${item.dec} from the queue.`, () => { V.SecExp.buildings.weapManu.upgrades.queue.deleteAt(found); }, [], passage() )); } } return el; } function fully() { const human = (V.SF.Toggle && V.SF.Active >= 1) ? [0, 1, 2, 3, 4, 5, 6, 7, 8] : [0, 1, 2, 3, 4, 5]; return { human: V.SecExp.buildings.weapManu.upgrades.completed.includesAll(human), bots: V.SecExp.buildings.weapManu.upgrades.completed.includesAll(-1, -2, -3), }; } })(); App.SecExp.propHub = (function() { return { Init, BC }; function Init() { V.SecExp.buildings.propHub = { recruiterOffice: 0, upgrades: { campaign: 0, miniTruth: 0, fakeNews: 0, controlLeaks: 0, secretService: 0, blackOps: 0, marketInfiltration: 0, }, focus: "social engineering", }; } function BC() { if (V.SecExp.buildings.pr === null) { delete V.SecExp.buildings.pr; } if (V.SecExp.buildings.pr) { V.SecExp.buildings.propHub = V.SecExp.buildings.pr; delete V.SecExp.buildings.pr; } if (V.SecExp.buildings.propHub) { delete V.SecExp.buildings.propHub.active; } if (V.SecExp.buildings.propHub && Object.entries(V.SecExp.buildings.propHub).length === 0) { delete V.SecExp.buildings.propHub; } else if (V.propHub || (V.SecExp.buildings.propHub && Object.entries(V.SecExp.buildings.propHub).length > 0)) { V.SecExp.buildings.propHub = V.SecExp.buildings.propHub || {}; V.SecExp.buildings.propHub.upgrades = V.SecExp.buildings.propHub.upgrades || {}; V.SecExp.buildings.propHub.recruiterOffice = V.SecExp.buildings.propHub.recruiterOffice || V.SecExp.buildings.propHub.recuriterOffice || V.recuriterOffice || V.RecuriterOffice || 0; delete V.SecExp.buildings.propHub.recuriterOffice; V.SecExp.buildings.propHub.upgrades.campaign = V.SecExp.buildings.propHub.upgrades.campaign || V.SecExp.buildings.propHub.campaign || V.propCampaign || 0; delete V.SecExp.buildings.propHub.campaign; V.SecExp.buildings.propHub.upgrades.miniTruth = V.SecExp.buildings.propHub.upgrades.miniTruth || V.SecExp.buildings.propHub.miniTruth || V.miniTruth || 0; delete V.SecExp.buildings.propHub.miniTruth; V.SecExp.buildings.propHub.upgrades.secretService = V.SecExp.buildings.propHub.upgrades.secretService || V.SecExp.buildings.propHub.secretService || V.SecExp.buildings.propHub.SS || V.secretService || 0; delete V.SecExp.buildings.propHub.secretService; delete V.SecExp.buildings.propHub.SS; V.SecExp.buildings.propHub.focus = V.SecExp.buildings.propHub.focus || "social engineering"; if (V.propFocus && V.propFocus !== "none") { V.SecExp.buildings.propHub.focus = V.propFocus; } V.SecExp.buildings.propHub.upgrades.fakeNews = V.SecExp.buildings.propHub.upgrades.fakeNews || V.SecExp.buildings.propHub.fakeNews || V.fakeNews || 0; delete V.SecExp.buildings.propHub.fakeNews; V.SecExp.buildings.propHub.upgrades.controlLeaks = V.SecExp.buildings.propHub.upgrades.controlLeaks || V.SecExp.buildings.propHub.controlLeaks || V.controlLeaks || 0; delete V.SecExp.buildings.propHub.controlLeaks; V.SecExp.buildings.propHub.upgrades.marketInfiltration = V.SecExp.buildings.propHub.upgrades.marketInfiltration || V.SecExp.buildings.propHub.marketInfiltration || V.marketInfiltration || 0; delete V.SecExp.buildings.propHub.marketInfiltration; V.SecExp.buildings.propHub.upgrades.blackOps = V.SecExp.buildings.propHub.upgrades.blackOps || V.SecExp.buildings.propHub.blackOps || V.blackOps || 0; delete V.SecExp.buildings.propHub.blackOps; } } })(); App.SecExp.barracks = (function() { return { Init, BC }; function Init() { V.SecExp.buildings.barracks = { size: 0, luxury: 0, training: 0, loyaltyMod: 0 }; } function BC() { if (V.SecExp.buildings.barracks) { delete V.SecExp.buildings.barracks.active; } if (V.SecExp.buildings.barracks && Object.entries(V.SecExp.buildings.barracks === 0).length) { delete V.SecExp.buildings.barracks; } else if (V.secBarracks || (V.SecExp.buildings.barracks && Object.entries(V.SecExp.buildings.barracks).length > 0)) { V.SecExp.buildings.barracks = V.SecExp.buildings.barracks || V.secBarracksUpgrades || {}; V.SecExp.buildings.barracks.size = V.SecExp.buildings.barracks.size || 0; V.SecExp.buildings.barracks.luxury = V.SecExp.buildings.barracks.luxury || 0; V.SecExp.buildings.barracks.training = V.SecExp.buildings.barracks.training || 0; V.SecExp.buildings.barracks.loyaltyMod = V.SecExp.buildings.barracks.loyaltyMod || 0; if (V.SecExp.buildings.barracks.upgrades) { V.SecExp.buildings.barracks.size = V.SecExp.buildings.barracks.upgrades.size; V.SecExp.buildings.barracks.luxury = V.SecExp.buildings.barracks.upgrades.luxury; V.SecExp.buildings.barracks.training = V.SecExp.buildings.barracks.upgrades.training; V.SecExp.buildings.barracks.loyaltyMod = V.SecExp.buildings.barracks.upgrades.loyaltyMod; delete V.SecExp.buildings.barracks.upgrades; } } } })(); App.SecExp.secHub = (function() { return { Init, BC }; function Init() { V.SecExp.buildings.secHub = { menials: 0, coldstorage: 0, upgrades: { security: { nanoCams: 0, cyberBots: 0, eyeScan: 0, cryptoAnalyzer: 0, }, crime: { autoTrial: 0, autoArchive: 0, worldProfiler: 0, advForensic: 0, }, intel : { sensors: 0, radar: 0, signalIntercept: 0, }, readiness: { earlyWarn: 0, rapidPlatforms: 0, pathways: 0, rapidVehicles: 0, } } }; } function BC() { if (V.secHQ || (V.SecExp.buildings.secHub && Object.entries(V.SecExp.buildings.secHub).length > 0)){ V.SecExp.buildings.secHub = V.SecExp.buildings.secHub || {}; V.SecExp.buildings.secHub.menials = V.SecExp.buildings.secHub.menials || V.secMenials || V.secHelots || 0; V.SecExp.buildings.secHub.coldstorage = V.SecExp.buildings.secHub.coldstorage || 0; V.SecExp.buildings.secHub.upgrades = V.SecExp.buildings.secHub.upgrades || {}; V.SecExp.buildings.secHub.upgrades.security = V.SecExp.buildings.secHub.upgrades.security || {}; if (V.secUpgrades) { V.SecExp.buildings.secHub.coldstorage = V.secUpgrades.coldstorage; V.SecExp.buildings.secHub.upgrades.security = { nanoCams: V.secUpgrades.nanoCams, cyberBots: V.secUpgrades.cyberBots, eyeScan: V.secUpgrades.eyeScan, cryptoAnalyzer: V.secUpgrades.cryptoAnalyzer, }; } V.SecExp.buildings.secHub.upgrades.crime = V.SecExp.buildings.secHub.upgrades.crime || V.crimeUpgrades || {}; V.SecExp.buildings.secHub.upgrades.intel = V.SecExp.buildings.secHub.upgrades.intel || V.intelUpgrades || {}; V.SecExp.buildings.secHub.upgrades.readiness = V.SecExp.buildings.secHub.upgrades.readiness || V.readinessUpgrades || {}; V.SecExp.buildings.secHub.upgrades.security.nanoCams = V.SecExp.buildings.secHub.upgrades.security.nanoCams || 0; V.SecExp.buildings.secHub.upgrades.security.cyberBots = V.SecExp.buildings.secHub.upgrades.security.cyberBots || 0; V.SecExp.buildings.secHub.upgrades.security.eyeScan = V.SecExp.buildings.secHub.upgrades.security.eyeScan || 0; V.SecExp.buildings.secHub.upgrades.security.cryptoAnalyzer = V.SecExp.buildings.secHub.upgrades.security.cryptoAnalyzer || 0; V.SecExp.buildings.secHub.upgrades.crime.autoTrial = V.SecExp.buildings.secHub.upgrades.crime.autoTrial || 0; V.SecExp.buildings.secHub.upgrades.crime.autoArchive = V.SecExp.buildings.secHub.upgrades.crime.autoArchive || 0; V.SecExp.buildings.secHub.upgrades.crime.worldProfiler = V.SecExp.buildings.secHub.upgrades.crime.worldProfiler || 0; V.SecExp.buildings.secHub.upgrades.crime.advForensic = V.SecExp.buildings.secHub.upgrades.crime.advForensic || 0; V.SecExp.buildings.secHub.upgrades.intel.sensors = V.SecExp.buildings.secHub.upgrades.intel.sensors || 0; V.SecExp.buildings.secHub.upgrades.intel.radar = V.SecExp.buildings.secHub.upgrades.intel.radar || 0; V.SecExp.buildings.secHub.upgrades.intel.signalIntercept = V.SecExp.buildings.secHub.upgrades.intel.signalIntercept || 0; V.SecExp.buildings.secHub.upgrades.readiness.earlyWarn = V.SecExp.buildings.secHub.upgrades.readiness.earlyWarn || 0; V.SecExp.buildings.secHub.upgrades.readiness.rapidPlatforms = V.SecExp.buildings.secHub.upgrades.readiness.rapidPlatforms || 0; V.SecExp.buildings.secHub.upgrades.readiness.pathways = V.SecExp.buildings.secHub.upgrades.readiness.pathways || 0; V.SecExp.buildings.secHub.upgrades.readiness.rapidVehicles = V.SecExp.buildings.secHub.upgrades.readiness.rapidVehicles || 0; } } })(); App.SecExp.riotCenter = (function() { return { Init, BC }; function Init() { V.SecExp.buildings.riotCenter = { upgrades: { freeMedia: 0, rapidUnit: 0, rapidUnitSpeed: 0, }, fort: { reactor: 0, waterway: 0, assistant: 0, }, sentUnitCooldown: 0, advancedRiotEquip: 0, brainImplant: -1, brainImplantProject: 0, }; } function BC() { if (V.riotCenter || (V.SecExp.buildings.riotCenter && Object.entries(V.SecExp.buildings.riotCenter).length > 0)) { V.SecExp.buildings.riotCenter = V.SecExp.buildings.riotCenter || {}; V.SecExp.buildings.riotCenter.upgrades = V.SecExp.buildings.riotCenter.upgrades || V.riotUpgrades || {}; V.SecExp.buildings.riotCenter.fort = V.SecExp.buildings.riotCenter.fort || V.fort || {}; V.SecExp.buildings.riotCenter.upgrades.freeMedia = V.SecExp.buildings.riotCenter.upgrades.freeMedia || 0; V.SecExp.buildings.riotCenter.upgrades.rapidUnit = V.SecExp.buildings.riotCenter.upgrades.rapidUnit || 0; V.SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed = V.SecExp.buildings.riotCenter.upgrades.rapidUnitSpeed || 0; V.SecExp.buildings.riotCenter.fort.reactor = V.SecExp.buildings.riotCenter.fort.reactor || 0; V.SecExp.buildings.riotCenter.fort.waterway = V.SecExp.buildings.riotCenter.fort.waterway || 0; V.SecExp.buildings.riotCenter.fort.assistant = V.SecExp.buildings.riotCenter.fort.assistant || 0; V.SecExp.buildings.riotCenter.sentUnitCooldown = V.SecExp.buildings.riotCenter.sentUnitCooldown || V.sentUnitCooldown || 0; V.SecExp.buildings.riotCenter.advancedRiotEquip = V.SecExp.buildings.riotCenter.advancedRiotEquip || V.advancedRiotEquip || 0; V.SecExp.buildings.riotCenter.brainImplant = V.SecExp.buildings.riotCenter.brainImplant || -1; if (jsDef(V.brainImplant)) { V.SecExp.buildings.riotCenter.brainImplant = V.brainImplant; } V.SecExp.buildings.riotCenter.brainImplantProject = V.SecExp.buildings.riotCenter.brainImplantProject || V.brainImplantProject || 0; } } })(); App.SecExp.weapManu = (function() { return { Init, BC, }; function Init() { V.SecExp.buildings.weapManu = { menials: 0, productivity: 1, lab: 1, sellTo: { citizen: 1, raiders: 1, oldWorld: 1, FC: 1, }, upgrades: {completed: []} }; } function BC() { if (V.weapManu || (V.SecExp.buildings.weapManu && Object.entries(V.SecExp.buildings.weapManu).length > 0)) { V.SecExp.buildings.weapManu = V.SecExp.buildings.weapManu || {}; V.SecExp.buildings.weapManu.menials = V.SecExp.buildings.weapManu.menials || V.weapMenials || V.weapHelots || 0; V.SecExp.buildings.weapManu.productivity = V.SecExp.buildings.weapManu.productivity || V.weapProductivity || 1; V.SecExp.buildings.weapManu.lab = V.SecExp.buildings.weapManu.lab || V.weapLab || 1; V.SecExp.buildings.weapManu.sellTo = V.SecExp.buildings.weapManu.sellTo || V.sellTo || {}; if (!jsDef(V.SecExp.buildings.weapManu.sellTo.citizen)) { V.SecExp.buildings.weapManu.sellTo.citizen = 1; } if (!jsDef(V.SecExp.buildings.weapManu.sellTo.raiders)) { V.SecExp.buildings.weapManu.sellTo.raiders = 1; } if (!jsDef(V.SecExp.buildings.weapManu.sellTo.oldWorld)) { V.SecExp.buildings.weapManu.sellTo.oldWorld = 1; } if (!jsDef(V.SecExp.buildings.weapManu.sellTo.FC)) { V.SecExp.buildings.weapManu.sellTo.FC = 1; } V.SecExp.buildings.weapManu.upgrades = V.SecExp.buildings.weapManu.upgrades || {}; V.SecExp.buildings.weapManu.upgrades.completed = V.SecExp.buildings.weapManu.upgrades.completed || V.completedUpgrades || []; if (!App.SecExp.weapManuUpgrade.fully().bots && !App.SecExp.weapManuUpgrade.fully().human) { V.SecExp.buildings.weapManu.upgrades.queue = V.SecExp.buildings.weapManu.upgrades.queue || []; if (jsDef(V.currentUpgrade)) { if (!jsDef(V.currentUpgrade.ID)) { if (V.currentUpgrade.name === "magnetic based ballistic weaponry") { V.currentUpgrade.ID = 0; } else if (V.currentUpgrade.name === "ceramo-metallic alloys") { V.currentUpgrade.ID = 1; } else if (V.currentUpgrade.name === "rapid action stimulants") { V.currentUpgrade.ID = 2; } else if (V.currentUpgrade.name === "fast response neural stimulant") { V.currentUpgrade.ID = 3; } else if (V.currentUpgrade.name === "universal cyber enhancements") { V.currentUpgrade.ID = 4; } else if (V.currentUpgrade.name === "remote neural links") { V.currentUpgrade.ID = 5; } else if (V.currentUpgrade.name === "combined training regimens with the special force") { V.currentUpgrade.ID = 6; } else if (V.currentUpgrade.name === "a variant of the stimulant cocktail that the special force created") { V.currentUpgrade.ID = 7; } else if (V.currentUpgrade.name === "a mesh network based off the custom network of the special force") { V.currentUpgrade.ID = 8; } else if (V.currentUpgrade.name === "dynamic battle aware AI") { V.currentUpgrade.ID = -1; } else if (V.currentUpgrade.name === "adaptive armored frames") { V.currentUpgrade.ID = -2; } else if (V.currentUpgrade.name === "advanced synthetic alloys") { V.currentUpgrade.ID = -3; } } V.SecExp.buildings.weapManu.upgrades.queue.push({ID: V.currentUpgrade.ID, time: V.currentUpgrade.time}); } if (jsDef(V.SecExp.buildings.weapManu.upgrades.current)) { if (V.SecExp.buildings.weapManu.upgrades.current.time > 0) { V.SecExp.buildings.weapManu.upgrades.queue.push(V.SecExp.buildings.weapManu.upgrades.current); } delete V.SecExp.buildings.weapManu.upgrades.current; } } else { delete V.SecExp.buildings.weapManu.upgrades.queue; } } } })(); App.SecExp.transportHub = (function() { return { Init, BC }; function Init() { V.SecExp.buildings.transportHub = { airport: 1, security: 1, surfaceTransport: 1, }; } function BC() { if (V.transportHub || (V.SecExp.buildings.transportHub && Object.entries(V.SecExp.buildings.transportHub).length > 0)) { V.SecExp.buildings.transportHub = V.SecExp.buildings.transportHub || {}; V.SecExp.buildings.transportHub.airport = V.SecExp.buildings.transportHub.airport || V.airport || 1; V.SecExp.buildings.transportHub.security = V.SecExp.buildings.transportHub.security || V.hubSecurity || 1; V.SecExp.buildings.transportHub.surfaceTransport = V.SecExp.buildings.transportHub.surfaceTransport || 1; if (V.releaseID < 1093) { if (V.terrain !== "oceanic" && V.terrain !== "marine") { V.SecExp.buildings.transportHub.surfaceTransport = V.railway || 1; } else { V.SecExp.buildings.transportHub.surfaceTransport = V.docks || 1; } } } } })();
MonsterMate/fc
src/Mods/SecExp/js/buildingsJS.js
JavaScript
mit
19,626
/** * Returns the effect (if any) the Special Force provides. * @param {string} [report] which report is this function being called from. * @param {string} [section=''] which sub section (if any) is this function being called from. * @returns {{text:string, bonus:number}} */ App.SecExp.SF_effect = function(report, section = '') { const size = V.SF.Toggle && V.SF.Active >= 1 ? App.SF.upgrades.total() : 0; let r = ``, bonus = 0; if (size > 10) { if (report === 'authority' || report === 'trade') { r += `Having a powerful special force increases ${report === 'authority' ? 'your authority' : 'trade security'}.`; bonus += size / 10; } else if (report === 'security') { r += `Having a powerful special force attracts a lot of ${section === 'militia' ? 'citizens' : 'mercenaries'}, hopeful that they may be able to fight along side it.`; if (section === 'militia') { bonus *= 1 + (random(1, (Math.round(size / 10))) / 20); // not sure how high size goes, so I hope this makes sense } else if (section === 'mercs') { bonus += random(1, Math.round(size / 10)); } } } return {text: r, bonus: bonus}; }; /** * Returns the effect of a campaign launched from the PR hub. * @param {string} [focus] campaign option to check against. * @returns {{text:string, effect:number}}} */ App.SecExp.propagandaEffects = function(focus) { let t = ``, increase = 0; if (V.secExpEnabled > 0 && V.SecExp.buildings.propHub && V.SecExp.buildings.propHub.upgrades.campaign >= 1 && V.SecExp.buildings.propHub.focus === focus) { let campaign, modifier; const forcedViewing = V.SecExp.edicts.propCampaignBoost === 1; const noRecruiter = V.SecExp.buildings.propHub.recruiterOffice === 0 || V.RecruiterID === 0; const recruiterActive = V.SecExp.buildings.propHub.recruiterOffice && V.RecruiterID > 0; switch (focus) { case "social engineering": campaign = 'societal engineering'; modifier = forcedViewing ? V.SecExp.buildings.propHub.upgrades.campaign : 1; if (noRecruiter) { increase += (forcedViewing ? 2 : 1) * modifier; } else if (recruiterActive) { increase += modifier + Math.floor((S.Recruiter.intelligence + S.Recruiter.intelligenceImplant) / 32); } break; case "recruitment": campaign = 'militia recruitment'; modifier = forcedViewing ? 0.2 : 0.15; if (noRecruiter) { increase += modifier + (forcedViewing ? 0.1 : 0.05); } else if (recruiterActive) { increase += modifier + Math.floor((S.Recruiter.intelligence + S.Recruiter.intelligenceImplant) / 650); } break; case "immigration": modifier = forcedViewing ? V.SecExp.buildings.propHub.upgrades.campaign : 1; if (noRecruiter) { increase += (forcedViewing ? random(1, 4) : random(1, 2)) * modifier; } else if (recruiterActive) { increase += modifier + Math.floor((S.Recruiter.intelligence + S.Recruiter.intelligenceImplant) / 16); } t = `Your advertisement campaign outside the free city brings more people to the gates of your arcology`; break; case "enslavement": modifier = forcedViewing ? V.SecExp.buildings.propHub.upgrades.campaign : 1; if (noRecruiter) { increase += (forcedViewing ? random(0, 4) : random(0, 2)) * modifier; } else if (recruiterActive) { increase += modifier + Math.floor((S.Recruiter.intelligence + S.Recruiter.intelligenceImplant) / 16); } t = `Many were attracted by your advertisement campaigns.`; break; } if (focus === "social engineering" || focus === "recruitment") { t += `<span class='green'>Your propaganda campaign helps further your ${campaign} efforts.`; if (recruiterActive) { t += ` <span class='slave-name'>${SlaveFullName(S.Recruiter)}</span> is boosting your ${campaign} campaign.`; } t += `</span>`; } } return {text: t, effect: Math.round(increase)}; }; /** * Returns the raw percentage of society that can be drafted. * @returns {number} */ App.SecExp.militiaCap = function(x = 0) { x = x || V.SecExp.edicts.defense.militia; if (x === 2) { return 0.02; } else if (x === 3) { return 0.05; } else if (x === 4) { return 0.1; } else if (x === 5) { return 0.2; } }; App.SecExp.initTrade = function() { if (V.SecExp.core.trade === 0 || !jsDef(V.SecExp.core.trade)) { let init = jsRandom(20, 30); if (V.terrain === "urban") { init += jsRandom(10, 10); } else if (V.terrain === "ravine") { init -= jsRandom(5, 5); } if (["BlackHat", "capitalist", "celebrity", "wealth"].includes(V.PC.career)) { init += jsRandom(5, 5); } else if (["escort", "gang", "servant"].includes(V.PC.career)) { init -= jsRandom(5, 5); } V.SecExp.core.trade = init; } }; App.SecExp.generalInit = function() { if (V.secExpEnabled === 0) { return; } Object.assign(V.SecExp, { battles: { major: 0, slaveVictories: [], lastSelection: [], victories: 0, victoryStreak: 0, losses: 0, lossStreak: 0, lastEncounterWeeks: 0, saved: {} }, rebellions: { tension: 0, slaveProgress: 0, citizenProgress: 0, victories: 0, losses: 0, lastEncounterWeeks: 0 }, core: { trade: 0, authority: 0, security: 100, crimeLow: 30, totalKills: 0, }, settings: { difficulty: 1, unitDescriptions: 0, battle: { enabled: 1, allowSlavePrestige: 1, force: 0, showStats: 0, frequency: 1, major: { enabled: 0, gameOver: 1, mult: 1, force: 0 } }, rebellion: { enabled: 1, force: 0, gameOver: 1, speed: 1 } }, buildings: {}, proclamation: { cooldown: 0, currency: "", type: "crime" }, /* repairTime: { waterway: 0, assistant: 0, reactor: 0, arc: 0 }, units: { bots: {}, slaves: { created: 0, casualties: 0, squads: [] }, militia: { created: 0, free: 0, casualties: 0, squads: [] }, mercs: { created: 0, free: 0, casualties: 0, squads: [] } }, */ edicts: { alternativeRents: 0, enslavementRights: 0, sellData: 0, propCampaignBoost: 0, tradeLegalAid: 0, taxTrade: 0, slaveWatch: 0, subsidyChurch: 0, SFSupportLevel: 0, limitImmigration: 0, openBorders: 0, weaponsLaw: 3, defense: { soldierWages: 1, slavesOfficers: 0, discountMercenaries: 0, militia: 0, militaryExemption: 0, noSubhumansInArmy: 0, pregExemption: 0, liveTargets: 0, privilege: { militiaSoldier: 0, slaveSoldier: 0, mercSoldier: 0, }, // Soldiers martialSchool: 0, eliteOfficers: 0, lowerRequirements: 0, // FS soldiers legionTradition: 0, eagleWarriors: 0, ronin: 0, sunTzu: 0, mamluks: 0, pharaonTradition: 0, } }, smilingMan: {progress: 0}, defaultNames: { slaves: "slave platoon", militia: "citizens' platoon", mercs: "mercenary platoon" } }); App.SecExp.initTrade(); }; App.SecExp.upkeep = (function() { return { edictsCash, edictsAuth, SF, buildings }; /** Upkeep cost of edicts, in cash * @returns {number} */ function edictsCash() { let value = 0; if (V.SecExp.edicts.slaveWatch) { value++; } if (V.SecExp.edicts.subsidyChurch) { value++; } if (V.SecExp.edicts.tradeLegalAid) { value++; } if (V.SecExp.edicts.propCampaignBoost) { value++; } if (V.SecExp.edicts.defense.martialSchool) { value++; } if (V.SecExp.edicts.defense.legionTradition) { value++; } if (V.SecExp.edicts.defense.pharaonTradition) { value++; } if (V.SecExp.edicts.defense.eagleWarriors) { value++; } if (V.SecExp.edicts.defense.ronin) { value++; } if (V.SecExp.edicts.defense.mamluks) { value++; } if (V.SecExp.edicts.defense.sunTzu) { value++; } return value * 1000; } /** Upkeep cost of edicts, in authority * @returns {number} */ function edictsAuth() { let value = 0; if (V.SecExp.edicts.enslavementRights > 0) { value += 10; } if (V.SecExp.edicts.sellData === 1) { value += 10; } if (V.SecExp.edicts.defense.privilege.slaveSoldier === 1) { value += 10; } if (V.SecExp.edicts.weaponsLaw === 0) { value += 30; } else if (V.SecExp.edicts.weaponsLaw === 1) { value += 20; } else if (V.SecExp.edicts.weaponsLaw === 2) { value += 10; } if (V.SecExp.edicts.defense.slavesOfficers === 1) { value += 10; } return value; } /** Upkeep cost of Special Forces (why is this here? who knows!) * @returns {number} */ function SF() { let value = 0; if (V.SecExp.edicts.SFSupportLevel >= 1) { value += 1000; } if (V.SecExp.edicts.SFSupportLevel >= 2) { value += 2000; } if (V.SecExp.edicts.SFSupportLevel >= 3) { value += 3000; } if (V.SecExp.edicts.SFSupportLevel >= 4) { value += 3000; } if (V.SecExp.edicts.SFSupportLevel >= 5) { value += 4000; } return value; } /** Upkeep cost of buildings (in cash) * @returns {number} */ function buildings() { let value = 0; const base = V.facilityCost * 5, upgrade = 50; if (V.SecExp.buildings.propHub) { value += base + upgrade * Object.values(V.SecExp.buildings.propHub.upgrades).reduce((a, b) => a + b); } if (V.SecExp.buildings.secHub) { value += base + 20 * V.SecExp.buildings.secHub.menials; value += upgrade * Object.values(V.SecExp.buildings.secHub.upgrades.security).reduce((a, b) => a + b); value += upgrade * Object.values(V.SecExp.buildings.secHub.upgrades.crime).reduce((a, b) => a + b); value += upgrade * Object.values(V.SecExp.buildings.secHub.upgrades.readiness).reduce((a, b) => a + b); value += upgrade * Object.values(V.SecExp.buildings.secHub.upgrades.intel).reduce((a, b) => a + b); value += V.SecExp.edicts.SFSupportLevel >= 5 ? 1000 : 0; } if (V.SecExp.buildings.barracks) { value += base + upgrade * Object.values(V.SecExp.buildings.barracks).reduce((a, b) => a + b); } if (V.SecExp.buildings.riotCenter) { value += base + upgrade * Object.values(V.SecExp.buildings.riotCenter.upgrades).reduce((a, b) => a + b); if (V.SecExp.buildings.riotCenter.brainImplant < 106 && V.SecExp.buildings.riotCenter.brainImplantProject > 0) { value += 5000 * V.SecExp.buildings.riotCenter.brainImplantProject; } if (V.SF.Toggle && V.SF.Active >= 1 && V.SecExp.rebellions.sfArmor) { value += 15000; } } return value; } })(); App.SecExp.battle = (function() { "use strict"; return { deployedUnits, troopCount, deploySpeed, deployableUnits, activeUnits, maxUnits, recon, bribeCost, }; /** Get count of deployed/active units for a particular battle * @param {string} [input] unit type to measure; if omitted, count all types * @returns {number} unit count */ function deployedUnits(input = '') { let bots = 0, militiaC = 0, slavesC = 0, mercsC = 0, init = 0; if (V.slaveRebellion !== 1 && V.citizenRebellion !== 1) { // attack if (V.secBots.isDeployed > 0) { bots++; } if (V.SF.Toggle && V.SF.Active >= 1 && V.SFIntervention) { init++; } militiaC += V.militiaUnits.filter((u) => u.isDeployed === 1).length; slavesC += V.slaveUnits.filter((u) => u.isDeployed === 1).length; mercsC += V.mercUnits.filter((u) => u.isDeployed === 1).length; } else { // rebellion if (V.secBots.active > 0) { bots++; } if (V.SF.Toggle && V.SF.Active >= 1) { init++; } if (V.irregulars > 0) { militiaC++; } militiaC += V.militiaUnits.filter((u) => u.active === 1 && !V.rebellingID.includes(u.ID)).length; slavesC += V.slaveUnits.filter((u) => u.active === 1 && !V.rebellingID.includes(u.ID)).length; mercsC += V.mercUnits.filter((u) => u.active === 1 && !V.rebellingID.includes(u.ID)).length; } if (input === '') { return bots + militiaC + slavesC + mercsC + init; } else if (input === 'bots') { return bots; } else if (input === 'militia') { return militiaC; } else if (input === 'slaves') { return slavesC; } else if (input === 'mercs') { return mercsC; } } /** Get total troop count of deployed/active units for a particular battle * @returns {number} troop count */ function troopCount() { let troops = 0; /** @param {function(FC.SecExp.PlayerHumanUnitData) : boolean} pred */ function countHumanTroops(pred) { const arrays = [V.militiaUnits, V.slaveUnits, V.mercUnits]; for (const arr of arrays) { for (const unit of arr) { if (pred(unit)) { troops += unit.troops; } } } } if (V.slaveRebellion !== 1 && V.citizenRebellion !== 1) { // attack if (V.secBots.isDeployed === 1) { troops += V.secBots.troops; } countHumanTroops((u) => u.isDeployed === 1); if (V.SF.Toggle && V.SF.Active >= 1 && V.SFIntervention) { troops += App.SecExp.troopsFromSF(); } } else { if (V.irregulars > 0) { troops += V.irregulars; } if (V.secBots.active === 1) { troops += V.secBots.troops; } countHumanTroops((u) => u.active === 1 && !V.rebellingID.includes(u.ID)); if (V.SF.Toggle && V.SF.Active >= 1) { troops += App.SecExp.troopsFromSF(); } } return troops; } /** Get mobilization readiness (in *pairs* of units) given upgrades * @returns {number} readiness */ function deploySpeed() { let init = 1; if (V.SecExp.buildings.secHub) { if (V.SecExp.buildings.secHub.upgrades.readiness.pathways > 0) { init += 1; } if (V.SecExp.buildings.secHub.upgrades.readiness.rapidVehicles > 0) { init += 2; } if (V.SecExp.buildings.secHub.upgrades.readiness.rapidPlatforms > 0) { init += 2; } if (V.SecExp.buildings.secHub.upgrades.readiness.earlyWarn > 0) { init += 2; } } if (V.SF.Toggle && V.SF.Active >= 1 && V.SecExp.sectionInFirebase >= 1) { init += 2; } return init; } /** Get remaining deployable units (mobilization in units minus units already deployed) * @returns {number} */ function deployableUnits() { let init = 2 * App.SecExp.battle.deploySpeed(); if (V.secBots.isDeployed > 0) { init--; } const Militia = V.militiaUnits.length; for (let i = 0; i < Militia; i++) { if (V.militiaUnits[i].isDeployed > 0) { init--; } } const Slaves = V.slaveUnits.length; for (let i = 0; i < Slaves; i++) { if (V.slaveUnits[i].isDeployed > 0) { init--; } } const Mercs = V.mercUnits.length; for (let i = 0; i < Mercs; i++) { if (V.mercUnits[i].isDeployed > 0) { init--; } } return Math.max(0, init); } /** Get total active units * @returns {number} */ function activeUnits() { return V.secBots.active + V.militiaUnits.length + V.slaveUnits.length + V.mercUnits.length; } /** Get maximum active units * @returns {number} */ function maxUnits() { let max = 0; if (V.SecExp.buildings.barracks) { max = 8 + (V.SecExp.buildings.barracks.size * 2); if (App.SecExp.battle.deploySpeed() === 10) { max += 2; } } return max; } /** Get recon score (scale 0-3) * @returns {number} */ function recon() { return V.SecExp.buildings.secHub ? Object.values(V.SecExp.buildings.secHub.upgrades.intel).reduce((a, b) => a + b) : 0; } /** Get bribe cost for an attacker to go away * @returns {number} */ function bribeCost() { let cost; const baseBribePerAttacker = 5; if (V.week <= 30) { cost = 5000 + baseBribePerAttacker * V.attackTroops; } else if (V.week <= 40) { cost = 10000 + baseBribePerAttacker * V.attackTroops; } else if (V.week <= 50) { cost = 15000 + baseBribePerAttacker * V.attackTroops; } else if (V.week <= 60) { cost = 20000 + baseBribePerAttacker * V.attackTroops; } else if (V.week <= 70) { cost = 25000 + baseBribePerAttacker * V.attackTroops; } else { cost = 30000 + baseBribePerAttacker * V.attackTroops; } cost *= V.majorBattle > 0 ? 3 : 1; return Math.trunc(Math.clamp(cost, 0, 1000000)); } })(); App.SecExp.Check = (function() { "use strict"; return { secRestPoint, crimeCap, reqMenials, }; function secRestPoint() { let rest = 40; if (V.SecExp.buildings.secHub) { if (V.SecExp.buildings.secHub.upgrades.security.nanoCams === 1) { rest += 15; } if (V.SecExp.buildings.secHub.upgrades.security.cyberBots === 1) { rest += 15; } if (V.SecExp.buildings.secHub.upgrades.security.eyeScan === 1) { rest += 20; } if (V.SecExp.buildings.secHub.upgrades.security.cryptoAnalyzer === 1) { rest += 20; } } return rest; } function crimeCap() { let cap = 100; if (V.SecExp.buildings.secHub) { if (V.SecExp.buildings.secHub.upgrades.crime.autoTrial === 1) { cap -= 10; } if (V.SecExp.buildings.secHub.upgrades.crime.autoArchive === 1) { cap -= 10; } if (V.SecExp.buildings.secHub.upgrades.crime.worldProfiler === 1) { cap -= 15; } if (V.SecExp.buildings.secHub.upgrades.crime.advForensic === 1) { cap -= 15; } } return cap; } function reqMenials() { let Req = 20; if (V.SecExp.buildings.secHub) { if (V.SecExp.buildings.secHub.upgrades.security.nanoCams === 1) { Req += 5; } if (V.SecExp.buildings.secHub.upgrades.security.cyberBots === 1) { Req += 5; } if (V.SecExp.buildings.secHub.upgrades.security.eyeScan === 1) { Req += 10; } if (V.SecExp.buildings.secHub.upgrades.security.cryptoAnalyzer === 1) { Req += 10; } if (V.SecExp.buildings.secHub.upgrades.crime.autoTrial === 1) { Req += 5; } if (V.SecExp.buildings.secHub.upgrades.crime.autoArchive === 1) { Req += 5; } if (V.SecExp.buildings.secHub.upgrades.crime.worldProfiler === 1) { Req += 10; } if (V.SecExp.buildings.secHub.upgrades.crime.advForensic === 1) { Req += 10; } if (V.SecExp.buildings.secHub.upgrades.intel.sensors === 1) { Req += 5; } if (V.SecExp.buildings.secHub.upgrades.intel.signalIntercept === 1) { Req += 5; } if (V.SecExp.buildings.secHub.upgrades.intel.radar === 1) { Req += 10; } if (V.SecExp.buildings.secHub.upgrades.readiness.rapidVehicles === 1) { Req += 5; } if (V.SecExp.buildings.secHub.upgrades.readiness.rapidPlatforms === 1) { Req += 10; } if (V.SecExp.buildings.secHub.upgrades.readiness.earlyWarn === 1) { Req += 10; } Req -= 5 * V.SecExp.edicts.SFSupportLevel; Req -= 10 * V.SecExp.buildings.secHub.coldstorage; } return Req; } })(); App.SecExp.inflictBattleWound = (function() { /** @typedef {object} Wound * @property {number} weight * @property {function(App.Entity.SlaveState):boolean} allowed * @property {function(App.Entity.SlaveState):void} effects */ /** @type { Object<string, Wound> } */ const wounds = { eyes: { weight: 10, allowed: (s) => canSee(s), effects: (s) => { clampedDamage(s, 30); eyeSurgery(s, "both", "blind"); } }, voice: { weight: 10, allowed: (s) => canTalk(s), effects: (s) => { clampedDamage(s, 60); s.voice = 0; } }, legs: { weight: 5, allowed: (s) => hasAnyNaturalLegs(s), effects: (s) => { clampedDamage(s, 80); removeLimbs(s, "left leg"); removeLimbs(s, "right leg"); } }, arm: { weight: 5, allowed: (s) => hasAnyNaturalArms(s), effects: (s) => { clampedDamage(s, 60); removeLimbs(s, jsEither(["left arm", "right arm"])); } }, flesh: { weight: 70, allowed: () => true, effects: (s) => { clampedDamage(s, 30); } } // TODO: add more wound types? destroy prosthetics? }; /** Inflicts a large amount of damage upon a slave without killing them (i.e. leaving their health total above -90) * @param {App.Entity.SlaveState} slave * @param {number} magnitude */ function clampedDamage(slave, magnitude) { if ((slave.health.health - magnitude) > -90) { healthDamage(slave, magnitude); } else { healthDamage(slave, 90 + slave.health.health); } } /** Inflicts a wound upon a slave during a battle. Returns the wound type from the wound table (see above) so it can be described. * @param {App.Entity.SlaveState} slave * @returns {string} */ function doWound(slave) { let woundHash = {}; for (const w of Object.keys(wounds)) { if (wounds[w].allowed(slave)) { woundHash[w] = wounds[w].weight; } } /** @type {string} */ // @ts-ignore - FIXME: hashChoice has bad JSDoc const wound = hashChoice(woundHash); wounds[wound].effects(slave); return wound; } return doWound; })();
MonsterMate/fc
src/Mods/SecExp/js/secExp.js
JavaScript
mit
20,321
// @ts-nocheck App.SecExp.generalBC = function() { if (jsDef(V.secExp)) { if (V.secExpEnabled !== 1) { V.secExpEnabled = V.secExp; } } if (typeof V.secExpEnabled !== "number") { V.secExpEnabled = 0; } V.SecExp.settings = V.SecExp.settings || {}; delete V.SecExp.settings.show; delete V.SecExp.army; if (V.secExpEnabled === 0) { return; } else { V.SecExp.edicts = V.SecExp.edicts || {}; V.SecExp.edicts.alternativeRents = V.SecExp.edicts.alternativeRents || V.alternativeRents || 0; V.SecExp.edicts.enslavementRights = V.SecExp.edicts.enslavementRights || V.enslavementRights || 0; V.SecExp.edicts.sellData = V.SecExp.edicts.sellData || V.sellData || 0; V.SecExp.edicts.propCampaignBoost = V.SecExp.edicts.propCampaignBoost || V.propCampaignBoost || 0; V.SecExp.edicts.tradeLegalAid = V.SecExp.edicts.tradeLegalAid || V.tradeLegalAid || 0; V.SecExp.edicts.taxTrade = V.SecExp.edicts.taxTrade || V.taxTrade || 0; V.SecExp.edicts.slaveWatch = V.SecExp.edicts.slaveWatch || V.slaveWatch || 0; V.SecExp.edicts.subsidyChurch = V.SecExp.edicts.subsidyChurch || V.subsidyChurch || 0; V.SecExp.edicts.SFSupportLevel = V.SecExp.edicts.SFSupportLevel || V.SFSupportLevel || 0; V.SecExp.edicts.limitImmigration = V.SecExp.edicts.limitImmigration || V.limitImmigration || 0; V.SecExp.edicts.openBorders = V.SecExp.edicts.openBorders || V.openBorders || 0; V.SecExp.edicts.weaponsLaw = V.SecExp.edicts.weaponsLaw || V.weaponsLaw || 3; V.SecExp.edicts.defense = V.SecExp.edicts.defense || {}; V.SecExp.edicts.defense.soldierWages = V.SecExp.edicts.defense.soldierWages || V.soldierWages || 1; V.SecExp.edicts.defense.slavesOfficers = V.SecExp.edicts.defense.slavesOfficers || V.slavesOfficers || 0; V.SecExp.edicts.defense.discountMercenaries = V.SecExp.edicts.defense.discountMercenaries || V.discountMercenaries || 0; V.SecExp.edicts.defense.militia = V.SecExp.edicts.defense.militia || 0; if (V.militiaFounded) { V.SecExp.edicts.defense.militia = 1; } if (V.recruitVolunteers) { V.SecExp.edicts.defense.militia = 2; } if (V.conscription) { V.SecExp.edicts.defense.militia = 3; } if (V.militaryService) { V.SecExp.edicts.defense.militia = 4; } if (V.militarizedSociety) { V.SecExp.edicts.defense.militia = 5; } V.SecExp.edicts.defense.militaryExemption = V.SecExp.edicts.defense.militaryExemption || V.militaryExemption || 0; V.SecExp.edicts.defense.noSubhumansInArmy = V.SecExp.edicts.defense.noSubhumansInArmy || V.noSubhumansInArmy || 0; V.SecExp.edicts.defense.pregExemption = V.SecExp.edicts.defense.pregExemption || V.pregExemption || 0; V.SecExp.edicts.defense.liveTargets = V.SecExp.edicts.defense.liveTargets || V.liveTargets || 0; V.SecExp.edicts.defense.pregExemption = V.SecExp.edicts.defense.pregExemption || V.pregExemption || 0; // Units V.SecExp.edicts.defense.martialSchool = V.SecExp.edicts.defense.martialSchool || V.martialSchool || 0; V.SecExp.edicts.defense.eliteOfficers = V.SecExp.edicts.defense.eliteOfficers || V.eliteOfficers || 0; V.SecExp.edicts.defense.lowerRequirements = V.SecExp.edicts.defense.lowerRequirements || V.lowerRequirements|| V.lowerRquirements || 0; V.SecExp.edicts.defense.legionTradition = V.SecExp.edicts.defense.legionTradition || V.legionTradition || 0; V.SecExp.edicts.defense.eagleWarriors = V.SecExp.edicts.defense.eagleWarriors || V.eagleWarriors || 0; V.SecExp.edicts.defense.ronin = V.SecExp.edicts.defense.ronin || V.ronin || 0; V.SecExp.edicts.defense.sunTzu = V.SecExp.edicts.defense.sunTzu || V.sunTzu || 0; V.SecExp.edicts.defense.mamluks = V.SecExp.edicts.defense.mamluks || V.mamluks || 0; V.SecExp.edicts.defense.pharaonTradition = V.SecExp.edicts.defense.pharaonTradition || V.pharaonTradition || 0; // Priv V.SecExp.edicts.defense.privilege = V.SecExp.edicts.defense.privilege || {}; V.SecExp.edicts.defense.privilege.militiaSoldier = V.SecExp.edicts.defense.privilege.militiaSoldier || V.militiaSoldier || 0; V.SecExp.edicts.defense.privilege.slaveSoldier = V.SecExp.edicts.defense.privilege.slaveSoldier || V.slaveSoldier || 0; V.SecExp.edicts.defense.privilege.mercSoldier = V.SecExp.edicts.defense.privilege.mercSoldier || V.mercSoldier || 0; V.SecExp.defaultNames = V.SecExp.defaultNames || {}; V.SecExp.defaultNames.slaves = V.SecExp.defaultNames.slaves || "slave platoon"; V.SecExp.defaultNames.militia = V.SecExp.defaultNames.militia || "citizens' platoon"; if (jsDef(V.SecExp.defaultNames.milita)) { V.SecExp.defaultNames.militia = V.SecExp.defaultNames.milita; delete V.SecExp.defaultNames.milita; } V.SecExp.defaultNames.mercs = V.SecExp.defaultNames.mercs || "mercenary platoon"; // V.SecExp.units = V.SecExp.units || {}; Object.assign(V.secBots, { active: Math.max(0, V.secBots.active) || V.arcologyUpgrade.drones > 0 ? 1 : 0, ID: -1, isDeployed: V.secBots.isDeployed || 0, troops: Math.max(V.secBots.troops || 0, V.arcologyUpgrade.drones > 0 ? 30 : 0), maxTroops: Math.max(V.secBots.maxTroops || 0, V.arcologyUpgrade.drones > 0 ? 30 : 0) }); /* if (V.secBots) { V.SecExp.units.bots = V.secBots; } */ // V.SecExp.units.slaves = V.SecExp.units.slaves || {}; // V.SecExp.units.slaves.casualties = V.SecExp.units.slaves.casualties || V.slavesTotalCasualties || 0; // V.SecExp.units.slaves.created = V.SecExp.units.slaves.created || V.createdSlavesUnits || 0; // V.SecExp.units.slaves.sqauds = V.SecExp.units.slaves.sqauds || V.slaveUnits || []; for (let i = 0; i < V.slaveUnits; i++) { App.SecExp.fixBrokenUnit(V.slaveUnits[i]); } // V.SecExp.units.milita = V.SecExp.units.milita || {}; // V.SecExp.units.milita.created = V.SecExp.units.milita.created || V.createdMilitiaUnits || 0; // V.SecExp.units.milita.free = V.SecExp.units.milita.free || V.militiaFreeManpower || 0; // V.SecExp.units.milita.casualties = V.SecExp.units.milita.casualties || V.militiaTotalCasualties || 0; // V.SecExp.units.milita.sqauds = V.SecExp.units.milita.sqauds || V.militiaUnits || []; for (let i = 0; i < V.militiaUnits; i++) { App.SecExp.fixBrokenUnit(V.militiaUnits[i]); } // V.SecExp.units.mercs = V.SecExp.units.mercs || {}; // V.SecExp.units.mercs.created = V.SecExp.units.mercs.created || V.createdMercUnits || 0; // V.SecExp.units.mercs.free = V.SecExp.units.mercs.free || V.mercFreeManpower || 0; if (V.mercFreeManpower === 0) { if (V.mercenaries === 1) { V.mercFreeManpower = 15; } else if (V.mercenaries > 1) { V.mercFreeManpower = 30; } } // V.SecExp.units.mercs.casualties = V.SecExp.units.mercs.casualties || V.mercTotalCasualties || 0; // V.SecExp.units.mercs.sqauds = V.SecExp.units.mercs.sqauds || V.mercUnits || []; for (let i = 0; i < V.mercUnits; i++) { App.SecExp.fixBrokenUnit(V.mercUnits[i]); } V.SecExp.smilingMan = V.SecExp.smilingMan || {}; V.SecExp.smilingMan.progress = V.SecExp.smilingMan.progress || V.smilingManProgress || 0; if (jsDef(V.smilingManFate)) { if (V.smilingManFate === 0) { // Offer $him a new life V.SecExp.smilingMan.progress = 10; } else if (V.smilingManFate === 1) { // Make $him pay V.SecExp.smilingMan.progress = 20; } else if (V.smilingManFate === 2) { // Enslave $him V.SecExp.smilingMan.progress = 30; } } if (V.SecExp.smilingMan.progress === 4) { V.SecExp.smilingMan.progress = 10; } else if (V.SecExp.smilingMan.progress < 4) { if (V.SecExp.smilingMan.progress === 0 && V.investedFunds) { V.SecExp.smilingMan.investedFunds = V.investedFunds; } if (V.relationshipLM) { V.SecExp.smilingMan.relationship = V.relationshipLM; } if (V.globalCrisisWeeks) { V.SecExp.smilingMan.globalCrisisWeeks = V.globalCrisisWeeks; } } V.SecExp.core = V.SecExp.core || {}; delete V.SecExp.core.crimeCap; V.SecExp.core.trade = V.SecExp.core.trade || V.trade || 0; App.SecExp.initTrade(); V.SecExp.core.authority = V.SecExp.core.authority || V.authority || 0; V.SecExp.core.security = V.SecExp.core.security || V.security || 100; if (jsDef(V.SecExp.security)) { V.SecExp.core.security = V.SecExp.security.cap; delete V.SecExp.security; } V.SecExp.core.totalKills = +V.SecExp.core.totalKills || V.totalKills || 0; if (V.week === 1 || !jsDef(V.SecExp.core.crimeLow)) { V.SecExp.core.crimeLow = 30; } V.SecExp.core.crimeLow = Math.clamp(V.SecExp.core.crimeLow, 0, 100); if (V.crime) { V.SecExp.core.crimeLow = V.crime; } V.SecExp.battles = V.SecExp.battles || {}; V.SecExp.battles.slaveVictories = V.SecExp.battles.slaveVictories || V.slaveVictories || []; V.SecExp.battles.major = V.SecExp.battles.major || 0; if (jsDef(V.majorBattlesCount)) { if (V.majorBattlesCount === 0 && V.hasFoughtMajorBattleOnce === 1) { V.SecExp.battles.major = 1; } else { V.SecExp.battles.major = V.majorBattlesCount; } } V.SecExp.battles.victories = V.SecExp.battles.victories || V.PCvictories || 0; V.SecExp.battles.victoryStreak = V.SecExp.battles.victoryStreak || V.PCvictoryStreak || 0; V.SecExp.battles.losses = V.SecExp.battles.losses || V.PClosses || 0; V.SecExp.battles.lossStreak = V.SecExp.battles.lossStreak || V.PClossStreak || 0; V.SecExp.battles.lastEncounterWeeks = V.SecExp.battles.lastEncounterWeeks || V.lastAttackWeeks || 0; V.SecExp.battles.lastSelection = V.SecExp.battles.lastSelection || V.lastSelection || []; V.SecExp.battles.saved = V.SecExp.battles.saved || {}; V.SecExp.battles.saved.commander = V.SecExp.battles.saved.commander || V.SavedLeader || ""; V.SecExp.battles.saved.sfSupport = V.SecExp.battles.saved.sfSupport || V.SavedSFI || 0; V.SecExp.rebellions = V.SecExp.rebellions || {}; V.SecExp.rebellions.tension = V.SecExp.rebellions.tension || V.tension || 0; V.SecExp.rebellions.slaveProgress = V.SecExp.rebellions.slaveProgress || V.slaveProgress || 0; V.SecExp.rebellions.citizenProgress = V.SecExp.rebellions.citizenProgress || V.citizenProgress || 0; V.SecExp.rebellions.victories = V.SecExp.rebellions.victories || V.PCrebWon || 0; V.SecExp.rebellions.losses = V.SecExp.rebellions.losses || V.PCrebLoss || 0; V.SecExp.rebellions.lastEncounterWeeks = V.SecExp.rebellions.lastEncounterWeeks || V.lastRebellionWeeks || 0; if (V.SFGear) { V.SecExp.rebellions.sfArmor = V.SFGear; } V.SecExp.settings.difficulty = V.SecExp.settings.difficulty || 1; if (jsDef(V.difficulty)) { V.SecExp.settings.difficulty = V.difficulty; } V.SecExp.settings.battle = V.SecExp.settings.battle || {}; if (!jsDef(V.SecExp.settings.battle.enabled)) { V.SecExp.settings.battle.enabled = 1; } if (jsDef(V.battlesEnabled)) { V.SecExp.settings.battle.enabled = V.battlesEnabled; } delete V.SecExp.battle; V.SecExp.settings.battle.major = V.SecExp.settings.battle.major || {}; V.SecExp.settings.battle.frequency = V.SecExp.settings.battle.frequency || 1; if (jsDef(V.battleFrequency)) { V.SecExp.settings.battle.frequency = V.battleFrequency; } V.SecExp.settings.battle.force = V.SecExp.settings.battle.force || 0; if (jsDef(V.forceBattle)) { V.SecExp.settings.battle.force = V.forceBattle; } if (V.readiness && V.readiness === 10 || V.sectionInFirebase) { V.SecExp.sectionInFirebase = 1; } V.SecExp.settings.unitDescriptions = V.SecExp.settings.unitDescriptions || 0; if (!jsDef(V.SecExp.settings.battle.allowSlavePrestige)) { V.SecExp.settings.battle.allowSlavePrestige = 1; } if (jsDef(V.allowPrestigeFromBattles)) { V.SecExp.settings.battle.allowSlavePrestige = V.allowPrestigeFromBattles; } V.SecExp.settings.battle.major.enabled = V.SecExp.settings.battle.major.enabled || 0; if (jsDef(V.majorBattlesEnabled)) { V.SecExp.settings.battle.major.enabled = V.majorBattlesEnabled; } if (!jsDef(V.SecExp.settings.battle.major.gameOver)) { V.SecExp.settings.battle.major.gameOver = 1; } if (jsDef(V.majorBattleGameOver)) { V.SecExp.settings.battle.major.gameOver = V.majorBattleGameOver; } V.SecExp.settings.battle.major.force = V.SecExp.settings.battle.major.force || 0; if (jsDef(V.forceMajorBattle)) { V.SecExp.settings.battle.major.force = V.forceMajorBattle; } V.SecExp.settings.battle.major.mult = V.SecExp.settings.battle.major.mult || 1; V.SecExp.settings.rebellion = V.SecExp.settings.rebellion || {}; if (!jsDef(V.SecExp.settings.rebellion.enabled)) { V.SecExp.settings.rebellion.enabled = 1; } if (jsDef(V.rebellionsEnabled)) { V.SecExp.settings.rebellion.enabled = V.rebellionsEnabled; } V.SecExp.settings.rebellion.force = V.SecExp.settings.rebellion.force || 0; if (jsDef(V.forceRebellion)) { V.SecExp.settings.rebellion.force = V.forceRebellion; } if (!jsDef(V.SecExp.settings.rebellion.gameOver)) { V.SecExp.settings.rebellion.gameOver = 1; } if (jsDef(V.rebellionGameOver)) { V.SecExp.settings.rebellion.gameOver = V.rebellionGameOver; } V.SecExp.settings.rebellion.speed = V.SecExp.settings.rebellion.speed || 1; if (jsDef(V.rebellionSpeed)) { V.SecExp.settings.rebellion.speed = V.rebellionSpeed; } V.SecExp.settings.showStats = V.SecExp.settings.showStats || 0; if (jsDef(V.showBattleStatistics)) { V.SecExp.settings.showStats = V.showBattleStatistics; } V.SecExp.buildings = V.SecExp.buildings || {}; App.SecExp.propHub.BC(); App.SecExp.barracks.BC(); App.SecExp.secHub.BC(); App.SecExp.transportHub.BC(); App.SecExp.riotCenter.BC(); App.SecExp.weapManu.BC(); V.SecExp.proclamation = V.SecExp.proclamation || {}; V.SecExp.proclamation.cooldown = V.SecExp.proclamation.cooldown || V.proclamationsCooldown || 0; V.SecExp.proclamation.currency = V.SecExp.proclamation.currency || V.proclamationCurrency || ""; V.SecExp.proclamation.type = V.SecExp.proclamation.type || "crime"; if (jsDef(V.proclamationType) && V.proclamationType !== "none") { V.SecExp.proclamation.type = V.proclamationType; } /* V.SecExp.rebellions.repairTime = V.SecExp.rebellions.repairTime || {}; V.SecExp.rebellions.repairTime.waterway = V.SecExp.rebellions.repairTime.waterway || 0; V.SecExp.rebellions.repairTime.assistant = V.SecExp.rebellions.repairTime.assistant || 0; V.SecExp.rebellions.repairTime.reactor = V.SecExp.rebellions.repairTime.reactor || 0; V.SecExp.rebellions.repairTime.arc = V.SecExp.rebellions.repairTime.arc || 0; if (jsDef(V.garrison)) { V.SecExp.rebellions.repairTime.waterway = V.garrison.waterwayTime; V.SecExp.rebellions.repairTime.assistant = V.garrison.assistantTime; V.SecExp.rebellions.repairTime.reactor = V.garrison.reactorTime; V.SecExp.rebellions.repairTime.arc = V.arcRepairTime; } */ } delete V.SecExp.security; };
MonsterMate/fc
src/Mods/SecExp/js/secExpBC.js
JavaScript
mit
14,688
App.SecExp.tradeReport = function() { let r = [], tradeChange = 0, bonus = 0; if (V.week < 30) { r.push(`The world economy is in good enough shape to sustain economic growth. Trade flows liberally in all the globe.`); tradeChange += 1; } else if (V.week < 60) { r.push(`The world economy is deteriorating, but still in good enough shape to sustain economic growth.`); tradeChange += 0.5; } else if (V.week < 90) { r.push(`The world economy is deteriorating, but still in decent enough shape to sustain economic growth.`); } else if (V.week < 120) { r.push(`The world economy is deteriorating and the slowing down of global growth is starting to have some effect on trade flow.`); tradeChange -= 1; } else { r.push(`The world economy is heavily deteriorated. The slowing down of global growth has a great negative effect on trade flow.`); tradeChange -= 2; } const warEffects = function(type) { if (V.SecExp[type].victories + V.SecExp[type].losses >= 1) { if (V.SecExp[type].lastEncounterWeeks < 2) { r.push(`The recent ${type === 'battles' ? 'attack' : 'rebellion'} has a negative effect on the trade of the arcology.`); tradeChange -= 1; } else if (V.SecExp[type].lastEncounterWeeks < 4) { r.push(`While some time has passed, the last ${type === 'battles' ? 'attack' : 'rebellion'} still has a negative effect on the commercial activity of the arcology.`); tradeChange -= 0.5; } } }; warEffects('battles'); warEffects('rebellions'); if (V.terrain === "urban") { r.push(`Since your arcology is located in the heart of an urban area, its commerce is naturally vibrant.`); tradeChange++; } else if (V.terrain === "ravine") { r.push(`Since your arcology is located in the heart of a ravine, its commerce is hindered by a lack of accessibility.`); tradeChange -= 0.5; } if (["wealth", "capitalist", "celebrity", "BlackHat"].includes(V.PC.career)) { tradeChange += 1; } else if (["escort", "servant", "gang"].includes(V.PC.career)) { tradeChange -= 0.5; } if (V.rep > 12000) { r.push(`Your ${V.rep > 18000 ? 'extremely' : ''} high reputation attracts trade from all over the world.`); tradeChange += (V.rep > 18000 ? 2 : 1); } if (V.assistant.power > 0) { const lowPower = V.assistant.power === 1; r.push(`Due to ${lowPower ? '' : 'incredible'} computing power, ${V.assistant.name} is able to guide the commercial development of the arcology to greater levels.`); tradeChange += (lowPower ? 1 : 2); } if (V.SecExp.edicts.tradeLegalAid === 1) { r.push(`Your support in legal matters for new businesses helps improve the economic dynamicity of your arcology, boosting commercial activities.`); tradeChange += 1; } if (V.SecExp.edicts.taxTrade === 1) { r.push(`The fees imposed on transitioning goods do little to earn you the favor of the companies making use of your arcology.`); tradeChange -= 1; } if (V.SecExp.buildings.weapManu) { r.push(`The weapons manufacturing facility of the arcology attracts a significant amount of trade.`); tradeChange += 0.5 * (V.SecExp.buildings.weapManu.productivity + V.SecExp.buildings.weapManu.lab); } if (V.SecExp.buildings.transportHub) { if (V.SecExp.buildings.transportHub.airport === 1) { r.push(`The airport, while small, helps facilitate the commercial development of the arcology.`); tradeChange += 1; } else if (V.SecExp.buildings.transportHub.airport === 2) { r.push(`The airport, while fairly small, helps facilitate the commercial development of the arcology.`); tradeChange += 1.5; } else if (V.SecExp.buildings.transportHub.airport === 3) { r.push(`The airport helps facilitate the commercial development of the arcology.`); tradeChange += 2; } else if (V.SecExp.buildings.transportHub.airport === 4) { r.push(`The airport is a great boon to the commercial development of the arcology.`); tradeChange += 2.5; } else { r.push(`The airport is an incredible boon to the commercial development of the arcology.`); tradeChange += 3; } if (V.terrain !== "oceanic" && V.terrain !== "marine") { if (V.SecExp.buildings.transportHub.surfaceTransport === 1) { r.push(`The railway network's age and limited extension limit commercial activity.`); } else if (V.SecExp.buildings.transportHub.surfaceTransport === 2) { r.push(`The railway network is a great help to the commercial development of the arcology, but its limited extension hampers its potential.`); tradeChange += 1; } else if (V.SecExp.buildings.transportHub.surfaceTransport === 3) { r.push(`The railway network is a great help to the commercial development of the arcology.`); tradeChange += 1.5; } else { r.push(`The railway network is a huge help to the commercial development of the arcology. Few in the world can boast such a modern and efficient transport system.`); tradeChange += 2; } } else { if (V.SecExp.buildings.transportHub.surfaceTransport === 1) { r.push(`The docks' age and limited size limit commercial activity.`); } else if (V.SecExp.buildings.transportHub.surfaceTransport === 2) { r.push(`The docks are a great help to the commercial development of the arcology, but their limited size hampers its potential.`); tradeChange += 1; } else if (V.SecExp.buildings.transportHub.surfaceTransport === 3) { r.push(`The docks are a great help to the commercial development of the arcology.`); tradeChange += 1.5; } else { r.push(`The docks are a huge help to the commercial development of the arcology. Few in the world can boast such a modern and efficient transport system.`); tradeChange += 2; } } } const SF = App.SecExp.SF_effect('trade'); r.push(SF.text); tradeChange += SF.bonus; if (tradeChange > 0) { r.push(`This week <span class="green">trade improved.</span>`); } else if (tradeChange === 0) { r.push(`This week <span class="yellow">trade did not change.</span>`); } else { r.push(`This week <span class="red">trade diminished.</span>`); } V.SecExp.core.trade = Math.clamp(V.SecExp.core.trade + tradeChange, 0, 100); if (V.SecExp.core.trade <= 20) { r.push(`The almost non-existent trade crossing the arcology <span class="yellow">does little to promote growth.</span>`); } else if (V.SecExp.core.trade <= 40) { r.push(`The low level of trade crossing the arcology promotes a <span class="green">slow yet steady growth</span> of its economy.`); bonus += 1.5; } else if (V.SecExp.core.trade <= 60) { r.push(`With trade at positive levels, the <span class="green">prosperity of the arcology grows more powerful.</span>`); bonus += 2.5; } else if (V.SecExp.core.trade <= 80) { r.push(`With trade at high levels, the <span class="green">prosperity of the arcology grows quickly and violently.</span>`); bonus += 3.5; } else { r.push(`With trade at extremely high levels, the <span class="green">prosperity of the arcology grows with unprecedented speed.</span>`); bonus += 4.5; } return {text: r.join(" "), bonus: bonus}; };
MonsterMate/fc
src/Mods/SecExp/js/tradeReport.js
JavaScript
mit
7,036
:: miscSecExpWidgets [widget nobr] <<widget "fixBrokenStats">> <<if !Number.isInteger($mercTotalCasualties)>> <<set $mercTotalCasualties = 0>> <</if>> <<if !Number.isInteger($slavesTotalCasualties)>> <<set $slavesTotalCasualties = 0>> <</if>> <<if !Number.isInteger($militiaTotalCasualties)>> <<set $militiaTotalCasualties = 0>> <</if>> <<if !Number.isInteger($militiaFreeManpower)>> <<set $militiaFreeManpower = 0>> <</if>> <</widget>> <<widget "replenishAllUnits">> <<set _hasLossesBots = 0, _hasLossesM = 0, _hasLossesS = 0, _hasLossesMe = 0>> <<if $secBots.troops < $secBots.maxTroops && $cash >= 500>> <<set _hasLossesBots = 1>> <</if>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].troops < $militiaUnits[_i].maxTroops && $militiaFreeManpower > 0>> <<set _hasLossesM = 1>> <<break>> <</if>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].troops < $slaveUnits[_i].maxTroops && $menials > 0>> <<set _hasLossesS = 1>> <<break>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].troops < $mercUnits[_i].maxTroops && $mercFreeManpower > 0>> <<set _hasLossesMe = 1>> <<break>> <</if>> <</for>> <<if _hasLossesBots == 1 || _hasLossesM == 1 || _hasLossesS == 1 || _hasLossesMe == 1>> <<link "Replenish all units">> <<if _hasLossesBots == 1>> <<run cashX(-(($secBots.maxTroops - $secBots.troops) * 500), "securityExpansion")>> <<set $secBots.troops = $secBots.maxTroops>> <</if>> <<if _hasLossesM == 1>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].troops < $militiaUnits[_i].maxTroops && $militiaFreeManpower > 0>> <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> <<set _expLoss = ($militiaUnits[_i].maxTroops - $militiaUnits[_i].troops) / $militiaUnits[_i].troops>> <<set $militiaUnits[_i].training -= $militiaUnits[_i].training * _expLoss>> <<set $militiaUnits[_i].troops = $militiaUnits[_i].maxTroops>> <<else>> <<set _expLoss = $militiaFreeManpower / $militiaUnits[_i].troops>> <<set $militiaUnits[_i].training -= $militiaUnits[_i].training * _expLoss>> <<set $militiaUnits[_i].troops += $militiaFreeManpower>> <<set $militiaFreeManpower = 0>> <</if>> <</if>> <</for>> <</if>> <<if _hasLossesS == 1>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].troops < $slaveUnits[_i].maxTroops && $menials > 0>> <<if $menials >= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> <<set $menials -= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> <<set _expLoss = ($slaveUnits[_i].maxTroops - $slaveUnits[_i].troops) / $slaveUnits[_i].troops>> <<set $slaveUnits[_i].training -= $slaveUnits[_i].training * _expLoss>> <<set $slaveUnits[_i].troops = $slaveUnits[_i].maxTroops>> <<else>> <<set _expLoss = $menials / $slaveUnits[_i].troops>> <<set $slaveUnits[_i].training -= $slaveUnits[_i].training * _expLoss>> <<set $slaveUnits[_i].troops += $menials>> <<set $menials = 0>> <</if>> <</if>> <</for>> <</if>> <<if _hasLossesMe == 1>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].troops < $mercUnits[_i].maxTroops && $mercFreeManpower > 0>> <<if $mercFreeManpower >= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> <<set $mercFreeManpower -= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> <<set _expLoss = ($mercUnits[_i].maxTroops - $mercUnits[_i].troops) / $mercUnits[_i].troops>> <<set $mercUnits[_i].training -= $mercUnits[_i].training * _expLoss>> <<set $mercUnits[_i].troops = $mercUnits[_i].maxTroops>> <<else>> <<set _expLoss = $mercFreeManpower / $mercUnits[_i].troops>> <<set $mercUnits[_i].training -= $mercUnits[_i].training * _expLoss>> <<set $mercUnits[_i].troops += $mercFreeManpower>> <<set $mercFreeManpower = 0>> <</if>> <</if>> <</for>> <</if>> <<= SugarCube.Engine.play(passage())>> <</link>> //Will replenish units as long as requirements are met.//<br> <</if>> <</widget>>
MonsterMate/fc
src/Mods/SecExp/miscSecExpWidgets.tw
tw
mit
4,359
Hexall90's last merged commit: 52dde0b3 - Remove unit.isDeployed as it is only used in battles and add the IDs to an array. This would require that units have unique IDs (e.g bots: -1 -> 99, militia: 100 -> 199, slaves: 200 -> 299, mercs: 300 - 399, etc). It would also allow for _*RebelledID to potentially be removed. - While at it something for barracks(general? commissar?) and riot center([Insert player title there]'s Will?? Big Sister? ) too would be nice - While at it decoupling of propaganda slave and recruiter when? - Would it be possible to add option for assigning hacker to security HQ that would work similarly to giving office for recruiter in propaganda hub? Preferably with smiling man slave giving extra bonuses there - Does having a large standing army give any bonus to authority/reputation growth? - Fix broken immigration stuff (https://gitgud.io/pregmodfan/fc-pregmod/-/issues/2073 && https://gitgud.io/pregmodfan/fc-pregmod/-/merge_requests/7375) - My personal asst keeps getting the credit, even though I choose to personally lead my forces. (Has been this way for a fewish days): Military01.swf - Enable oceanic battles Fine, I'll Do It Myself Pirates? Enemy navies? - 328279 Pirates could raid trade routs and such ,even could capture a high class cruise liner and you have to move retake it with an army similar to the ground battles. you could have an event where you gain a old world port to ship your goods to, and you have to defend it . -328413 - How to make threads - 355452 A suggestion for prisoners of war after winning the battle: maybe add an option to execute them on the spot for authority gains? And how about giving a chance (depending on the amount of captives) to actually make one or two of them that aren't as hateful or wounded as your sex slaves instead of just menials? Perhaps you may even turn (hypothetical) female captives into sex dolls or bioreactors too. It can be an optional button. Also, maybe make some of them actually surrender so it will be possible to get captives even when you completely overwhelm their forces in numbers/efficiency? - How to make threads - 355478 - One thing I find to be weird/stupid is that facilities must be manned with menial slaves. I think that it instead should be an option, like with armies, to man them with free citizens instead who then do a better job but instead require a monthly wage. - Oni-girl soldiers. - Modify DOL battle scene to recognise SecExp units. - Update encyclopedia entry to reflect above. - Add suicide units. - Add WarAnimal's units - Optimally Functioning Code, 254511 - 3rd Military Animal Platoon. - Loli unit - Unlocked from Black market, origin Wedding edition - 310602. - Feature Request: Attack Imminent Layout (GUI suggestion done) - https://gitgud.io/pregmodfan/fc-pregmod/issues/1145 - Feature Request: Potential for damage to Security Expansion Upgrades - https://gitgud.io/pregmodfan/fc-pregmod/issues/1146 - Special Forces Morale Bonus - https://gitgud.io/pregmodfan/fc-pregmod/issues/1165 - Suggestion - Specialized Schools, Fortifications and Militia Edicts -https://gitgud.io/pregmodfan/fc-pregmod/issues/763 - Suggestion - Arcology Conquest - https://gitgud.io/pregmodfan/fc-pregmod/issues/760 - Does forcing every citizen to be in military raise appeal of slaves that know how to fight? - And if I am a master tactician, maybe I could get an estimate how effective the various tacticts could be? - Ability to create more drone squads. - Increase base maximum units to 18, 20 with SF. - Suggestion - Gradual Battle Frequency - https://gitgud.io/pregmodfan/fc-pregmod/issues/1245#note_82504 - Option to send slaves into military unit to gain some nice scars and experience wold be nice (with retrieval). - So would be taking slaves from slave units as personal ones. The slave units would pretty much be menial slaves I'd imagine, not sex slaves. - If I think about it having a squad of personal slaves that you equip in whatever gear you want and send out to capture new slaves, raid caravans and cities and shit would be pretty sweet, I would even call it special forces but that's taken, also the combat skill is still a binary thing which makes the whole thing pointless. How about to start off with option to send one or two of your combat trained slaves to assist the merc's when they are on a raid with the possibility of receiving battle wounds. - It would be a start if the tactics talking about the size difference of the armies actually took the size difference into account. - How about to start off with option to send one or two of your combat trained slaves to assist the merc's when they are on a raid with the possibility of receiving battle wounds. - If there are choices, they should be along the lines of "higher risk, higher reward" (defeating the enemy with fewer casualties and damage if it goes right, but suffering higher casualties and damage if it goes wrong), or things like accepting more/less military casualties for better/worse protection of economic assets (costing money/damaging economy) and civilians (costing reputation/damaging population). - The ability to send units to the general to increase relationship as an alternative to sending slaves.
MonsterMate/fc
src/Mods/SecExp/potentialToDo.txt
Text
mit
5,234
:: proclamations [nobr] <<set $nextButton = "Back to Main", $nextLink = "Main">> <<if $SecExp.proclamation.cooldown == 0>> __Issue a proclamation:__ <br>You can dedicate the week to issuing a proclamation, a powerful tool that will have an immediate noticeable effect on the arcology. <br>Use: <<if $SecExp.core.authority >= 2000>> <<link "authority" "Personal Attention Select">> <<set $SecExp.proclamation.currency = "authority">> <</link>> <<else>> //Requires at least <<= num(2000)>> authority// <</if>> | <<if $rep >= 4000>> <<link "reputation" "Personal Attention Select">> <<set $SecExp.proclamation.currency = "reputation">> <</link>> <<else>> //Requires at least <<= num(4000)>> reputation// <</if>> | <<if $cash >= 8000>> <<link "cash" "Personal Attention Select">> <<set $SecExp.proclamation.currency = "cash">> <</link>> <<else>> //Requires at least <<print cashFormat(8000)>> cash// <</if>> <br><br> <<link "Issue a proclamation about security" "Main">> <<set $personalAttention = "proclamation", $SecExp.proclamation.type = "security">> <</link>> <br>//You will use your <<if $SecExp.proclamation.currency == "authority">>control over the arcology<<elseif $SecExp.proclamation.currency == "reputation">>great influence<<elseif $SecExp.proclamation.currency == "cash">>vast financial means<</if>> to force citizens to give up on sensitive information for the good of the arcology.// <br> <<link "Issue a proclamation about crime" "Main">> <<set $personalAttention = "proclamation", $SecExp.proclamation.type = "crime">> <</link>> <br>//You will use your <<if $SecExp.proclamation.currency == "authority">>control over the arcology<<elseif $SecExp.proclamation.currency == "reputation">>great influence<<elseif $SecExp.proclamation.currency == "cash">>vast financial means<</if>> to force the arrest of suspected citizens without passing through the normal legal procedures.// <<else>> It's too early to issue another proclamation. Another will be available in <<= numberWithPluralOne($SecExp.proclamation.cooldown, "week")>>. <</if>>
MonsterMate/fc
src/Mods/SecExp/proclamations.tw
tw
mit
2,104
:: rebellionEvents [nobr] <<if $slaveRebellionEventFires == 1>> <<if $SecExp.rebellions.tension <= 33>> <<set _event = 1>> <<elseif $SecExp.rebellions.tension <= 66>> <<set _event = 2>> <<else>> <<set _event = 3>> <</if>> <<elseif $citizenRebellionEventFires == 1>> <<if $SecExp.rebellions.tension <= 33>> <<set _event = 4>> <<elseif $SecExp.rebellions.tension <= 66>> <<set _event = 5>> <<else>> <<set _event = 6>> <</if>> <</if>> <<setNonlocalPronouns $seeDicks>> <<switch _event>> <<case 1>> /* low tension slave rebellion events */ <<set _rand = random(0,6)>> <<if _rand == 0>> This week several slaves were found plotting the death of their master. They were quickly dealt with, but their owner's choice of punishment did little to calm tensions in the arcology. <<elseif _rand == 1>> This week a large group of slaves attempted to escape. Several were recaptured, but others were deemed too dangerous and were shot on sight. The unfortunate circumstances raised the disapproval of many citizens, either because of the waste of good slaves or the brutality with which the operation was carried. With a bit of luck, however, the incident will be soon forgotten. <<elseif _rand == 2>> This week books of unknown origin and dangerous content were found in the possession of several slaves. They were mostly sociopolitical treaties, making it clear that the intent of the ones responsible was to fan the fire of rebellion. The books were quickly collected and archived, hopefully this affair will not have lasting consequences. <<elseif _rand == 3>> This week a citizen was caught giving refuge to an escaped slave. He was not able to pay for the value of the stolen goods, so he was processed as the case required and the slave returned to their rightful master. Many questions however remain without answers. <<elseif _rand == 4>> This week a member of a well known anti-slavery group was caught trying to infiltrate the arcology. During the capture attempt shots were fired and several guards were injured, and in the end the fugitive unfortunately managed to escape. Reports indicate several slaves helped the criminal, some going as far as using themselves as shields against the bullets of the security drones. <<elseif _rand == 5>> This week a slave was caught attempting to sabotage a machine in one of the factories. _HeU explained _hisU action as "trying to defend _himselfU from a dangerous machine". Reports confirmed that the apparatus is indeed quite deadly, having killed several slaves since it was installed, but the expert way _heU handled the sabotage leaves open the possibility of a deliberate plan or even external help. <<else>> This week a slave was found dead in one of the sewer tunnels. It seems _heU was stabbed repeatedly with a sharp object. _HeU was fairly famous for _hisU capabilities as a slave trainer; _hisU old master spent not an insignificant amount of money trying to find _himU once he realized _heU was missing. The episode might have been a simple mugging gone wrong, but _hisU activities as a slave breaker might have played a role in _hisU homicide. <</if>> <<set $SecExp.rebellions.tension += random(1,5)>> <<case 2>> /* med tension slave rebellion events */ <<set _rand = random(0,5)>> <<if _rand == 0>> This week some strange reports came in: it seems some assemblies of slaves were observed several nights in a row. The slaves were traced and their masters notified, but many suspect there may be something deeper than a few slaves congregating in the night. <<elseif _rand == 1>> This week an underground railroad was discovered. The rebels did not go down without a fight, but in the end <<if $mercenaries >= 1>>your mercenaries<<else>>your security drones<</if>> managed to destroy the old tunnels they were using to ship out slaves out of the arcology. <<elseif _rand == 2>> This week a famous citizen was assaulted and brutally murdered by his slaves. The ones responsible were apprehended and dealt with easily enough, but the mere fact something like this could have happened is concerning. Those slaves had to be aware of their certain doom. <<elseif _rand == 3>> This week a group of slavers entering the arcology was assaulted. Many reported heavy injuries, but fortunately there were no casualties. The attackers were disguised, but the security systems already identified several slaves who were likely part of the group, based on camera feeds. <<elseif _rand == 4>> This week the waterways were found infected by a virulent pathogen. The cause was later found to be a diseased slave that died while in the maintenance tunnels. It's not clear if the slave was there because of orders given to _himU or if _heU was trying to escape. <<else>> This week a sleeper cell of a famous anti slavery organization was discovered in the low levels of the arcology. The group, however, was aware of the coming security forces and retreated before they could be dealt with. <</if>> <<set $SecExp.rebellions.tension += random(5,10)>> <<case 3>> /* high tension slave rebellion events */ <<set _rand = random(0,4)>> <<if _rand == 0>> This week a group of slaves took control of one of the manufacturing plants and barricaded themselves inside. It took several days of negotiations and skirmishes to finally end this little insurrection. Many of the slaves involved will be executed in the next few days. <<elseif _rand == 1>> This week a number of shops were burned to the ground by rioting slaves and sympathetic citizens. It took considerable effort for the security forces to take control of the situation. Harsh punishment is required and scheduled for the instigators. <<elseif _rand == 2>> This week a mass escape attempt was barely stopped before becoming a catastrophe. Many citizens were trampled by the desperate horde of slaves. It will take some time to restore the streets involved to working order. <<elseif _rand == 3>> This week a number of riots inflamed the arcology. Many slaves took violent actions against citizens and security personnel. The number of victims keeps getting higher as still now the last sparks of revolt are still active. <</if>> <<set $SecExp.rebellions.tension += random(10,15)>> <<case 4>> <<set _rand = random(0,6)>> <<if _rand == 0>> This week a citizen refused to pay rent, claiming ideological opposition to the arcology's ownership policies. He was quickly dealt with, but his words might not have fallen silent yet. <<elseif _rand == 1>> This week books of unknown origin and dangerous content were found in the possession of several citizens. They were mostly sociopolitical treaties, making it clear that the intent of the ones responsible was to fan the fire of rebellion. Most of them were bought and archived, but a few are still circling amongst the citizens of the arcology. <<elseif _rand == 2>> This week a citizen was caught giving refuge to other citizens, who would be liable to be enslaved because of their debts. The situation was quickly resolved, but the misplaced generosity of that citizen might have inflamed a few souls. <<elseif _rand == 3>> This week a citizen died in one of the factories. His death sparked some outrage, even some talk of protests against the owners of the factory, but things seem to have calmed down for now. <<elseif _rand == 4>> This week a citizen refused to be evicted from his house. After some negotiations the man was forcibly removed from the property by your security forces. Unfortunately the forced entry caused some damage to the building. <<elseif _rand == 5>> This week a citizen refused to be enslaved as his contract established. With an impressive display of his rhetoric capabilities he managed to gather a small crowd agreeing with his position. The impromptu assembly was promptly disrupted by the drones. <<else>> This week a security drone was found disabled and stripped of important electronic components. It seems the act was not dictated by greed, as the most precious parts of the drone were left on the machine, but rather to cover up something that the drone saw. <</if>> <<set $SecExp.rebellions.tension += random(1,5)>> <<case 5>> <<set _rand = random(0,5)>> <<if _rand == 0>> This week a factory was subject to a strike by a group of citizens protesting against the owner. They were promptly arrested and the factory returned to its rightful proprietor by your security department. <<elseif _rand == 1>> This week a group of citizens organized a protest against the systemic enslavement of the citizens of the arcology. Their little parade gathered a surprisingly large crowd, but it was nonetheless quickly suppressed by your forces. <<elseif _rand == 2>> This week the security department registered the formation of several assemblies of citizens, whose purpose seems to be political in nature. For now no further steps were taken, but it's a worrying sign of further political opposition within the arcology. <<elseif _rand == 3>> This week there was a protest against one of the wealthiest citizen of the arcology. Many criticize his near monopoly. Supporters of the citizen met the protesters on the streets and it was just thanks to the intervention of the security drones that violence was avoided. <<elseif _rand == 4>> This week several cameras were sabotaged and in many cases damaged beyond repair. A group of anonymous citizens claims to be responsible; their motivation is apparently the excessive surveillance in the arcology and their attack a response to the breach of their privacy. <<else>> This week several citizens barricaded themselves in a private brothel. It seems their intention is to protest against the use of ex-citizens in the sex trade, claiming that such a position is unfitting for them. The problem was quickly resolved with the intervention of the security department. <</if>> <<set $SecExp.rebellions.tension += random(5,10)>> <<case 6>> <<set _rand = random(0,4)>> <<if _rand == 0>> This week the arcology was shaken by a number of strikes throughout the manufacturing levels. Many lament the predatory nature of Free Cities society, many other just want to cause damage to their perceived oppressors. It was a significant effort for the security department to stop all protests. <<elseif _rand == 1>> This week several factories were set aflame by their workers. The security department worked day and night to control the fire and apprehend the criminals behind the act. Many are known dissidents, but there are a fair few new faces within them. This is a worrying sign. <<elseif _rand == 2>> This week numerous riots exploded all over the arcology. Many citizens took to the streets to protest against the arcology owner and its supporters. The security forces slowly managed to stop the rioters, with no small amount of trouble and only through generous use of violence. <<elseif _rand == 3>> This week a massive protest of citizens and slaves gathered just outside the penthouse. The crowd was dispersed only after several hours. There were several victims from both sides and no shortage of injured. <</if>> <<set $SecExp.rebellions.tension += random(10,15)>> <</switch>> <<set $SecExp.rebellions.tension = Math.clamp($SecExp.rebellions.tension,0,100)>>
MonsterMate/fc
src/Mods/SecExp/rebellionEvents.tw
tw
mit
11,312
:: rebellionGenerator [nobr] <<set _slave = 0>> <<set _citizen = 0>> <<set _CSratio = $ACitizens / ($ASlaves)>> <strong>Slaves security analysis:</strong> <<if $SecExp.core.authority <= 3000>> Your very low authority allows slaves to think too freely. <<set _slave += 30>> <<elseif $SecExp.core.authority <= 6000>> Your low authority allows slaves to think too freely. <<set _slave += 25>> <<elseif $SecExp.core.authority <= 9000>> Your moderate authority allows slaves to think a bit too freely. <<set _slave += 20>> <<elseif $SecExp.core.authority <= 12000>> Your good authority does not allow slaves to think too freely. <<set _slave += 15>> <<elseif $SecExp.core.authority <= 15000>> Your high authority does not allow slaves to think too freely. <<set _slave += 10>> <<elseif $SecExp.core.authority <= 18000>> Your very high authority does not allow slaves to think too freely. <<set _slave += 5>> <<else>> Your absolute authority does not allow slaves to have a single free thought. <<set _slave += 1>> <</if>> <<if _CSratio <= 0.4>> There are a lot more slaves than citizens, making some doubt their masters are strong enough to stop them. <<set _slave += 30>> <<elseif _CSratio <= 0.6>> There are a lot more slaves than citizens, making some doubt their masters are strong enough to stop them. <<set _slave += 25>> <<elseif _CSratio <= 0.8>> There are more slaves than citizens, making some doubt their masters are strong enough to stop them. <<set _slave += 20>> <<elseif _CSratio <= 1>> There are more slaves than citizens, making some doubt their masters are strong enough to stop them. <<set _slave += 15>> <<elseif _CSratio <= 1.5>> There are fewer slaves than citizens, making some doubt they would be strong enough to defeat their masters. <<set _slave += 10>> <<elseif _CSratio >= 3>> There are fewer slaves than citizens, making some doubt they would be strong enough to defeat their masters. <<set _slave -= 5>> <<else>> Citizen and slave populations are sufficiently balanced not to cause problems either way. <<set _slave -= 1>> <</if>> <<if $SecExp.core.security <= 10>> The very low security of the arcology leaves free space for slaves to organize and agitate. <<set _slave += 30>> <<elseif $SecExp.core.security <= 30>> The low security of the arcology leaves free space for slaves to organize and agitate. <<set _slave += 20>> <<elseif $SecExp.core.security <= 60>> The moderate security of the arcology does not allow free space for slaves to organize and agitate. <<set _slave += 10>> <<elseif $SecExp.core.security >= 90>> The high security of the arcology does not allow free space for slaves to organize and agitate. <<set _slave -= 5>> <<else>> The high security of the arcology does not allow free space for slaves to organize and agitate. <<set _slave -= 1>> <</if>> <<if $arcologies[0].FSDegradationist != "unset">> Many slaves are so disgusted by your degradationist society, that they are willing to rise up against their masters to escape. <<set _slave += 30>> <<elseif $arcologies[0].FSPaternalist != "unset">> Many slaves are content to live in your paternalist society. <<set _slave -= 5>> <<else>> <<set _slave += 5>> <</if>> <<if $arcologies[0].FSRestart != "unset">> Many slaves are worried by your eugenics projects and some are pushed towards radicalization. <<set _slave += 30>> <<elseif $arcologies[0].FSRepopulationFocus != "unset">> Many slaves are pleasantly happy of your repopulation effort, affording them the freedom to reproduce. <<set _slave -= 5>> <<else>> <<set _slave += 5>> <</if>> <br><br> <strong>Citizens security analysis:</strong> <<if $SecExp.core.authority <= 3000>> Your very low authority allows your citizens to think too freely. <<set _citizen += 30>> <<elseif $SecExp.core.authority <= 6000>> Your very low authority allows your citizens to think too freely. <<set _citizen += 25>> <<elseif $SecExp.core.authority <= 9000>> Your moderate authority allows your citizens to think a bit too freely. <<set _citizen += 20>> <<elseif $SecExp.core.authority <= 12000>> Your good authority does not allow your citizens to think too freely. <<set _citizen += 15>> <<elseif $SecExp.core.authority <= 15000>> Your high authority does not allow your citizens to think too freely. <<set _citizen += 10>> <<elseif $SecExp.core.authority <= 18000>> Your very high authority does not allow your citizens to think too freely. <<set _citizen += 5>> <<else>> Your absolute authority does not allow your citizens to have a single free thought. <<set _citizen += 1>> <</if>> <<if $SecExp.core.crimeLow >= 90>> The very high crime level of the arcology breeds extreme discontent between your citizens. <<set _citizen += 30>> <<elseif $SecExp.core.crimeLow >= 60>> The high crime level of the arcology breeds high discontent between your citizens. <<set _citizen += 15>> <<elseif $SecExp.core.crimeLow >= 30>> The low crime level of the arcology leaves your citizens happy and satisfied. <<set _citizen += 5>> <<else>> The very low crime level of the arcology leaves your citizens happy and satisfied. <<set _citizen -= 5>> <</if>> <<if $SecExp.edicts.defense.militia >= 1>> <<if ($arcologies[0].FSRomanRevivalist == "unset" && $arcologies[0].FSAztecRevivalist == "unset" && $arcologies[0].FSEgyptianRevivalist == "unset" && $arcologies[0].FSEdoRevivalist == "unset" && $arcologies[0].FSArabianRevivalist == "unset" && $arcologies[0].FSChineseRevivalist == "unset" && $arcologies[0].FSNeoImperialist == "unset")>> <<if $SecExp.edicts.defense.militia === 5>> Many of your citizens are offended by your extreme militarization of the arcology's society. <<set _citizen += 20>> <<elseif $SecExp.edicts.defense.militia === 4>> Many of your citizens are offended by your militarization of the arcology's society. <<set _citizen += 15>> <<else>> <<set _citizen += 10>> <</if>> <<else>> <<if $SecExp.edicts.defense.militia === 5>> Some of your citizens are offended by your extreme militarization of the arcology's society. <<set _citizen += 10>> <<elseif $SecExp.edicts.defense.militia === 4>> Some of your citizens are offended by your militarization of the arcology's society. <<set _citizen += 5>> <<else>> <<set _citizen -= 5>> <</if>> <</if>> <</if>> <<if $arcologies[0].FSNull != "unset">> Many of your more conservative citizens do not enjoy the cultural freedom you afford the residents of the arcology. <<set _citizen += either(20,30)>> <</if>> <<if $arcologies[0].FSRestart != "unset">> <<if _CSratio > 2>> Your citizens are not happy with the noticeable lack of slaves compared to their numbers. <<set _citizen += 20>> <<elseif _CSratio > 1>> Your citizens are not happy with the lack of slaves compared to their numbers. <<set _citizen += 15>> <<elseif _CSratio < 0.5>> <<set _citizen -= 5>> <</if>> <<elseif $arcologies[0].FSRepopulationFocus != "unset">> <<if _CSratio < 0.5>> Your citizens are not happy about being outbred by the slaves of the arcology. <<set _citizen += 20>> <<elseif _CSratio < 1>> Your citizens are not happy about being outbred by the slaves of the arcology. <<set _citizen += 15>> <<elseif _CSratio > 1.4>> <<set _citizen += 5>> <</if>> <</if>> /* rolls to see if event happens */ <<if _slave < 0>> <<set _slave = 0>> <<elseif _slave >= 95>> <<set _slave = 95>> /* there's always a min 5% chance nothing happens */ <</if>> <<if _citizen < 0>> <<set _citizen = 0>> <<elseif _citizen >= 95>> <<set _citizen = 95>> <</if>> <<set _roll = random(1,_slave + _citizen)>> <<if $SecExp.buildings.riotCenter && $SecExp.buildings.riotCenter.brainImplant == 106>> <<set _slave = Math.trunc(_slave * 0.5 * $SecExp.settings.rebellion.speed), _citizen = Math.trunc(_citizen * 0.5 * $SecExp.settings.rebellion.speed)>> <<else>> <<set _slave = Math.trunc(_slave * $SecExp.settings.rebellion.speed), _citizen = Math.trunc(_citizen * $SecExp.settings.rebellion.speed)>> <</if>> <<if _roll <= _slave>> <<if random(1,100) < _slave>> <<set $slaveRebellionEventFires = 1>> <<set $citizenRebellionEventFires = 0>> <<if $SecExp.rebellions.tension != 0>> <<set $SecExp.rebellions.slaveProgress += Math.trunc(random(1,5) * ($SecExp.rebellions.tension / 100) * 10)>> /* progress scales with tension */ <<else>> <<set $SecExp.rebellions.slaveProgress += random(1,5)>> <</if>> <</if>> <<else>> <<if random(1,100) < _citizen>> <<set $slaveRebellionEventFires = 0>> <<set $citizenRebellionEventFires = 1>> <<if $SecExp.rebellions.tension != 0>> <<set $SecExp.rebellions.citizenProgress += Math.trunc(random(1,5) * ($SecExp.rebellions.tension / 100) * 10)>> <<else>> <<set $SecExp.rebellions.citizenProgress += random(1,5)>> <</if>> <</if>> <</if>> /* if there is an advancement selects a random mini event */ <<set _oldTension = $SecExp.rebellions.tension>> <<if $slaveRebellionEventFires == 1 || $citizenRebellionEventFires == 1>> <br><br> <<include "rebellionEvents">> <<elseif $SecExp.rebellions.tension > 0>> /* otherwise tension decays */ <br><br> <strong>Tension</strong>: <<if $SecExp.buildings.riotCenter && $SecExp.buildings.riotCenter.upgrades.freeMedia >= 1>> The guaranteed free media access you offer does wonders to lower tensions in the arcology. <<set $SecExp.rebellions.tension = Math.trunc(Math.clamp($SecExp.rebellions.tension - $SecExp.buildings.riotCenter.upgrades.freeMedia / 2,0,100))>> <</if>> In the absence of noteworthy events, tensions in the arcology are able to relax. <<set $SecExp.rebellions.tension = Math.trunc(Math.clamp($SecExp.rebellions.tension * 0.97,0,100))>> <</if>> <br> <<if $SecExp.rebellions.tension < _oldTension>> <br>This week @@.green;tensions relaxed.@@<br> <<elseif $SecExp.rebellions.tension == _oldTension && $SecExp.rebellions.tension != 0>> <br>This week @@.yellow;tensions did not change.@@<br> <<elseif $SecExp.rebellions.tension > _oldTension>> <br>This week @@.red;tension rose@@ and <<if $slaveRebellionEventFires == 1>> @@.red;slave malcontent increased.@@<br> <<elseif $citizenRebellionEventFires == 1>> @@.red;citizen malcontent increased.@@<br> <</if>> <<elseif !Number.isInteger($SecExp.rebellions.tension)>> <br>Error: tension is outside accepted range.<br> <</if>> /* resets flags */ <<set $slaveRebellionEventFires = 0>> <<set $citizenRebellionEventFires = 0>> /* rolls for rebellions */ <<if $SecExp.rebellions.slaveProgress >= 100>> <<if random(1,100) <= 80>> /* 80% of firing a rebellion once progress is at 100 */ <<set $slaveRebellion = 1>> <<set $SecExp.rebellions.slaveProgress = 0>> <<set $SecExp.rebellions.citizenProgress *= 0.2>> <<else>> <<set $SecExp.rebellions.slaveProgress = 100>> <</if>> <<elseif $SecExp.rebellions.citizenProgress >= 100>> <<if random(1,100) <= 80>> <<set $citizenRebellion = 1>> <<set $SecExp.rebellions.citizenProgress = 0>> <<set $SecExp.rebellions.slaveProgress *= 0.2>> <<else>> <<set $SecExp.rebellions.citizenProgress = 100>> <</if>> <</if>> <<if $SecExp.settings.rebellion.force == 1 && $foughtThisWeek == 0>> <<if random(1,100) <= 50>> <<set $slaveRebellion = 1>> <<set $citizenRebellion = 0>> <<else>> <<set $slaveRebellion = 0>> <<set $citizenRebellion = 1>> <</if>> <</if>> <<set _weekMod = 0.50>> <<if $week <= 30>> <<set _weekMod = 0.75 + (0.01+($week/200))>> <<elseif $week <= 60>> <<set _weekMod = 1 + (0.01+($week/300))>> <<elseif $week <= 90>> <<set _weekMod = 1.25 + (0.01+($week/400))>> <<elseif $week <= 120>> <<set _weekMod = 1.50 + (0.01+($week/500))>> <<else>> <<set _weekMod = 1.75>> <</if>> /* resetting ID list */ <<set $rebellingID = []>> /* if a rebellion fires determine amount of rebels and rebelling units */ <<if $slaveRebellion == 1>> <<set $engageRule = 0>> <<set $SecExp.rebellions.lastEncounterWeeks = 0>> <<set $leadingTroops = "assistant">> /* calc how many slaves and citizens participate */ <<set _authFactor = Math.clamp(1 - ($SecExp.core.authority / 20000),0.4,0.6)>> <<set _repFactor = Math.clamp($rep / 20000,0.4,0.6)>> <<set _rebelPercent = 0.3 * _authFactor>> <<set _irregularPercent = 0.2 * _repFactor>> <<set $attackTroops = Math.clamp(Math.trunc($ASlaves * _rebelPercent * _weekMod) + random(-100,100),50,$ASlaves)>> <<set $irregulars = Math.clamp(Math.trunc($ACitizens * _irregularPercent * _weekMod) + random(-100,100),50,$ACitizens)>> /* calc if units rebel */ <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].loyalty < 10>> <<if random(1,100) <= 70>> <<set $rebellingID.push($slaveUnits[_i].ID)>> <</if>> <<elseif $slaveUnits[_i].loyalty < 33>> <<if random(1,100) <= 30>> <<set $rebellingID.push($slaveUnits[_i].ID)>> <</if>> <<elseif $slaveUnits[_i].loyalty < 66>> <<if random(1,100) <= 10>> <<set $rebellingID.push($slaveUnits[_i].ID)>> <</if>> <</if>> <</for>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].loyalty < 10>> <<if random(1,100) <= 70>> <<set $rebellingID.push($militiaUnits[_i].ID)>> <</if>> <<elseif $militiaUnits[_i].loyalty < 33>> <<if random(1,100) <= 30>> <<set $rebellingID.push($militiaUnits[_i].ID)>> <</if>> <<elseif $militiaUnits[_i].loyalty < 66>> <<if random(1,100) <= 10>> <<set $rebellingID.push($militiaUnits[_i].ID)>> <</if>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].loyalty < 10>> <<if random(1,100) <= 70>> <<set $rebellingID.push($mercUnits[_i].ID)>> <</if>> <<elseif $mercUnits[_i].loyalty < 33>> <<if random(1,100) <= 30>> <<set $rebellingID.push($mercUnits[_i].ID)>> <</if>> <<elseif $mercUnits[_i].loyalty < 66>> <<if random(1,100) <= 10>> <<set $rebellingID.push($mercUnits[_i].ID)>> <</if>> <</if>> <</for>> <<set $attackEquip = Math.clamp($SecExp.edicts.weaponsLaw + random(-2,1),0,4)>> <<elseif $citizenRebellion == 1>> <<set $engageRule = 0>> <<set $SecExp.rebellions.lastEncounterWeeks = 0>> <<set $leadingTroops = "assistant">> /* calc how many citizens participate */ <<set _authFactor = Math.clamp(1 - ($SecExp.core.authority / 20000),0.4,0.6)>> <<set _repFactor = Math.clamp($rep / 20000,0.4,0.6)>> <<set _rebelPercent = 0.3 * _authFactor>> <<set _irregularPercent = 0.2 * _repFactor>> <<set $attackTroops = Math.clamp(Math.trunc($ACitizens * _rebelPercent * _weekMod) + random(-100,100),50,$ACitizens)>> <<set $irregulars = Math.clamp(Math.trunc($ACitizens * _irregularPercent * _weekMod) + random(-100,100),50,$ACitizens)>> /* calc if units rebel */ <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].loyalty < 10>> <<if random(1,100) <= 70>> <<set $rebellingID.push($militiaUnits[_i].ID)>> <</if>> <<elseif $militiaUnits[_i].loyalty < 33>> <<if random(1,100) <= 30>> <<set $rebellingID.push($militiaUnits[_i].ID)>> <</if>> <<elseif $militiaUnits[_i].loyalty < 66>> <<if random(1,100) <= 10>> <<set $rebellingID.push($militiaUnits[_i].ID)>> <</if>> <</if>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].loyalty < 10>> <<if random(1,100) <= 70>> <<set $rebellingID.push($slaveUnits[_i].ID)>> <</if>> <<elseif $slaveUnits[_i].loyalty < 33>> <<if random(1,100) <= 30>> <<set $rebellingID.push($slaveUnits[_i].ID)>> <</if>> <<elseif $slaveUnits[_i].loyalty < 66>> <<if random(1,100) <= 10>> <<set $rebellingID.push($slaveUnits[_i].ID)>> <</if>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].loyalty < 10>> <<if random(1,100) <= 70>> <<set $rebellingID.push($mercUnits[_i].ID)>> <</if>> <<elseif $mercUnits[_i].loyalty < 33>> <<if random(1,100) <= 30>> <<set $rebellingID.push($mercUnits[_i].ID)>> <</if>> <<elseif $mercUnits[_i].loyalty < 66>> <<if random(1,100) <= 10>> <<set $rebellingID.push($mercUnits[_i].ID)>> <</if>> <</if>> <</for>> <<set $attackEquip = Math.clamp($SecExp.edicts.weaponsLaw + random(-1,1),0,4)>> <<else>> <<set $SecExp.rebellions.lastEncounterWeeks++>> <</if>>
MonsterMate/fc
src/Mods/SecExp/rebellionGenerator.tw
tw
mit
16,162
:: rebellionHandler [nobr] <<set $nextButton = " ", $nextLink = "attackReport", $encyclopedia = "Battles">> <<set _turns = $maxTurns * 2>> <<set _attack = 0>> <<set _defense = 0>> <<set _morale = 0>> <<set _hp = 0>> <<set _baseHp = 0>> <<set _enemyAttack = 0>> <<set _enemyDefense = 0>> <<set _enemyMorale = 0>> <<set _enemyHp = 0>> <<set _enemyBaseHp = 0>> <<set _woundChance = 5>> /* leader has a base chance of 5% to get wounded */ <<set _irregularMod = 0>> <<set _armyMod = 0>> /* calculates PC army stats */ <<if $engageRule == 0>> <<set _engageMod = 0.5>> <<elseif $engageRule == 1>> <<set _engageMod = 0.75>> <<elseif $engageRule == 2>> <<set _engageMod = 1>> <<else>> <<set _engageMod = 1.4>> <</if>> <<if $week <= 30>> <<set _irregularMod = $irregulars / 60>> <<elseif $week <= 60>> <<set _irregularMod = $irregulars / 50>> <<elseif $week <= 90>> <<set _irregularMod = $irregulars / 40>> <<elseif $week <= 120>> <<set _irregularMod = $irregulars / 30>> <<else>> <<set _irregularMod = $irregulars / 20>> <</if>> <<if $irregulars > 0>> <<set _irregularMod = Math.trunc(_irregularMod)>> <<set _unit = App.SecExp.getIrregularUnit("Militia", $irregulars, $attackEquip)>> <<set _attack += _unit.attack * _irregularMod * 0.80>> <<set _defense += _unit.defense * _irregularMod * 0.80>> <<set _hp += _unit.hp>> <</if>> <<if $secBots.active == 1>> <<set _unit = App.SecExp.getUnit("Bots")>> <<set _attack += _unit.attack>> <<set _defense += _unit.defense>> <<set _hp += _unit.hp>> <</if>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].active == 1 && (!$rebellingID.includes($militiaUnits[_i].ID))>> <<set _unit = App.SecExp.getUnit("Militia", _i)>> <<set _attack += _unit.attack>> <<set _defense += _unit.defense>> <<set _hp += _unit.hp>> <</if>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].active == 1 && (!$rebellingID.includes($slaveUnits[_i].ID))>> <<set _unit = App.SecExp.getUnit("Slaves", _i)>> <<set _attack += _unit.attack>> <<set _defense += _unit.defense>> <<set _hp += _unit.hp>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].active == 1 && (!$rebellingID.includes($mercUnits[_i].ID))>> <<set _unit = App.SecExp.getUnit("Mercs", _i)>> <<set _attack += _unit.attack>> <<set _defense += _unit.defense>> <<set _hp += _unit.hp>> <</if>> <</for>> <<if $SF.Toggle && $SF.Active >= 1>> <<set _unit = App.SecExp.getUnit("SF")>> <<set _attack += _unit.attack>> <<set _defense += _unit.defense>> <<set _hp += _unit.hp>> <</if>> <<set _attack *= _engageMod>> <<set _defense *= _engageMod>> <<set _hp *= _engageMod>> <<if $garrison.assistant == 1>> <<set _attack *= 0.95>> <<set _defense *= 0.95>> <<set _hp *= 0.95>> <</if>> <<if $garrison.reactor == 1>> <<set _attack *= 0.95>> <<set _defense *= 0.95>> <<set _hp *= 0.95>> <</if>> <<if $garrison.penthouse == 1>> <<set _attack *= 0.95>> <<set _defense *= 0.95>> <<set _hp *= 0.95>> <</if>> <<if $garrison.waterway == 1>> <<set _attack *= 0.95>> <<set _defense *= 0.95>> <<set _hp *= 0.95>> <</if>> <<set _moraleTroopMod = Math.clamp(App.SecExp.battle.troopCount() / 100,1,10)>> /* morale and baseHp calculation */ <<set _morale += (App.SecExp.BaseDroneUnit.morale * $secBots.active + App.SecExp.BaseMilitiaUnit.morale * App.SecExp.battle.deployedUnits('militia') + App.SecExp.BaseSlaveUnit.morale * App.SecExp.battle.deployedUnits('slaves') + App.SecExp.BaseMercUnit.morale * App.SecExp.battle.deployedUnits('mercs') + App.SecExp.BaseSpecialForcesUnit.morale * $SF.Active) / ($secBots.active + App.SecExp.battle.deployedUnits('militia') + App.SecExp.battle.deployedUnits('slaves') + App.SecExp.battle.deployedUnits('mercs') + $SF.Active)>> <<set _morale += _morale * $SecExp.buildings.barracks ? $SecExp.buildings.barracks.luxury * 0.05 : 0>> /* barracks bonus */ <<set _morale *= _moraleTroopMod>> <<set _baseHp = (App.SecExp.BaseDroneUnit.hp * $secBots.active + App.SecExp.BaseMilitiaUnit.hp * App.SecExp.battle.deployedUnits('militia') + App.SecExp.BaseSlaveUnit.hp * App.SecExp.battle.deployedUnits('slaves') + App.SecExp.BaseMercUnit.hp * App.SecExp.battle.deployedUnits('mercs') + App.SecExp.BaseSpecialForcesUnit.hp * $SF.Active) / ($secBots.active + App.SecExp.battle.deployedUnits('militia') + App.SecExp.battle.deployedUnits('slaves') + App.SecExp.battle.deployedUnits('mercs') + $SF.Active)>> /* calculates rebelling army stats */ <<if $week <= 30>> <<set _armyMod = $attackTroops / 100>> <<elseif $week <= 60>> <<set _armyMod = $attackTroops / 90>> <<elseif $week <= 90>> <<set _armyMod = $attackTroops / 80>> <<elseif $week <= 120>> <<set _armyMod = $attackTroops / 70>> <<else>> <<set _armyMod = $attackTroops / 60>> <</if>> <<set _armyMod = Math.trunc(_armyMod)>> <<set _rebellingSlaves = 0, _rebellingMilitia = 0, _rebellingMercs = 0>> <<if $slaveRebellion == 1>> <<set _rebellingSlaves = 1>> <<set _unit = App.SecExp.getIrregularUnit("Slaves", $attackTroops, $attackEquip)>> <<else>> <<set _rebellingMilitia = 1>> <<set _unit = App.SecExp.getIrregularUnit("Militia", $attackTroops, $attackEquip)>> <</if>> <<set _enemyAttack += _unit.attack * _armyMod>> <<set _enemyDefense += _unit.defense * _armyMod>> <<set _enemyHp += _unit.hp>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].active == 1 && $rebellingID.includes($militiaUnits[_i].ID)>> <<set _rebellingMilitia = 1>> <<set $attackTroops += $militiaUnits[_i].troops>> <<set $militiaUnits[_i].loyalty = 0>> <<set _unit = App.SecExp.getUnit("Militia", _i)>> <<set _enemyAttack += _unit.attack>> <<set _enemyDefense += _unit.defense>> <<set _enemyHp += _unit.hp>> <</if>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].active == 1 && $rebellingID.includes($slaveUnits[_i].ID)>> <<set _rebellingSlaves = 1>> <<set $attackTroops += $slaveUnits[_i].troops>> <<set $slaveUnits[_i].loyalty = 0>> <<set _unit = App.SecExp.getUnit("Slaves", _i)>> <<set _enemyAttack += _unit.attack>> <<set _enemyDefense += _unit.defense>> <<set _enemyHp += _unit.hp>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].active == 1 && $rebellingID.includes($mercUnits[_i].ID)>> <<set _rebellingMercs = 1>> <<set $attackTroops += $mercUnits[_i].troops>> <<set $mercUnits[_i].loyalty = 0>> <<set _unit = App.SecExp.getUnit("Mercs", _i)>> <<set _enemyAttack += _unit.attack>> <<set _enemyDefense += _unit.defense>> <<set _enemyHp += _unit.hp>> <</if>> <</for>> <<set _enemyMoraleTroopMod = Math.clamp($attackTroops / 100,1,10)>> <<set _enemyMorale = 1.5 * (App.SecExp.BaseMilitiaUnit.morale * _rebellingMilitia + App.SecExp.BaseSlaveUnit.morale * _rebellingSlaves + App.SecExp.BaseMercUnit.morale * _rebellingMercs) / (_rebellingMilitia + _rebellingSlaves + _rebellingMercs)>> <<set _enemyMorale *= _enemyMoraleTroopMod>> <<set _enemyBaseHp = (App.SecExp.BaseMilitiaUnit.hp * _rebellingMilitia + App.SecExp.BaseSlaveUnit.hp * _rebellingSlaves + App.SecExp.BaseMercUnit.hp * _rebellingMercs) / (_rebellingMilitia + _rebellingSlaves + _rebellingMercs)>> <<if isNaN(_attack)>> <br>@@.red;Error: attack value reported NaN@@ <</if>> <<if isNaN(_defense)>> <br>@@.red;Error: defense value reported NaN@@ <</if>> <<if isNaN(_hp)>> <br>@@.red;Error: hp value reported NaN@@ <</if>> <<if isNaN(_morale)>> <br>@@.red;Error: morale value reported NaN@@ <</if>> <<if isNaN(_enemyAttack)>> <br>@@.red;Error: enemy attack value reported NaN@@ <</if>> <<if isNaN(_enemyDefense)>> <br>@@.red;Error: enemy defense value reported NaN@@ <</if>> <<if isNaN(_enemyHp)>> <br>@@.red;Error: enemy hp value reported NaN@@ <</if>> <<if isNaN(_enemyMorale)>> <br>@@.red;Error: enemy morale value reported NaN@@ <</if>> /* difficulty */ <<set _enemyAttack *= $SecExp.settings.difficulty>> <<set _enemyDefense *= $SecExp.settings.difficulty>> <<set _enemyMorale *= $SecExp.settings.difficulty>> <<set _enemyHp *= $SecExp.settings.difficulty>> <<set _enemyBaseHp *= $SecExp.settings.difficulty>> <<if $SecExp.settings.showStats == 1>> <<set _engageMod -= 1>> <<set _engageMod = Math.round(_engageMod * 100)>> <<set _difficulty = ($SecExp.settings.difficulty -1) * 100>> __Difficulty__:<br> <<if $SecExp.settings.difficulty == 0.5>> Very easy <<elseif $SecExp.settings.difficulty == 0.75>> Easy <<elseif $SecExp.settings.difficulty == 1>> Normal <<elseif $SecExp.settings.difficulty == 1.25>> Hard <<elseif $SecExp.settings.difficulty == 1.5>> Very hard <<else>> Extremly hard <</if>> <br><br>__Army__: <br>troops: <<print num(Math.round(App.SecExp.battle.troopCount()))>> <br>attack: <<print num(Math.round(_attack))>> <br>defense: <<print num(Math.round(_defense))>> <br>engagement rule modifier: <<if _engageMod > 0>>+<</if>><<print _engageMod>>% <br>Hp: <<print num(Math.round(_hp))>> <br>base HP: <<print num(Math.round(_baseHp))>> <br>morale: <<print num(Math.round(_morale))>> <<if _enemyMoraleTroopMod > 0>> <br>morale increase due to troop numbers: +<<print _moraleTroopMod>>% <</if>> <br><br>__Rebels__: <br>enemy troops: <<print num(Math.round($attackTroops))>> <br>enemy attack: <<print num(Math.round(_enemyAttack))>> <br>enemy defense: <<print num(Math.round(_enemyDefense))>> <br>enemy Hp: <<print num(Math.round(_enemyHp))>> <br>enemy base Hp: <<print num(Math.round(_enemyBaseHp))>> <br>enemy morale: <<print num(Math.round(_enemyMorale))>> <<if _enemyMoraleTroopMod > 0>> <br>enemy morale increase due to troop numbers: +<<print _enemyMoraleTroopMod>>% <</if>> <br>Difficulty modifier: <<if _difficulty > 0>>+<</if>><<print _difficulty>>% <</if>> /* simulates the combat by pitting attk against def */ <<for _i = 0; _i < _turns; _i++>> <<if $SecExp.settings.showStats == 1>> <br><br>turn: <<print _i + 1>><</if>> /* player army attacks */ <<set _damage = Math.clamp(_attack - _enemyDefense,_attack * 0.1,_attack)>> <<if $SecExp.settings.showStats == 1>> <br>player damage: <<print num(Math.round(_damage))>><</if>> <<set _enemyHp -= _damage>> <<if $SecExp.settings.showStats == 1>> <br>remaining enemy Hp: <<print num(Math.round(_enemyHp))>><</if>> <<set $enemyLosses += _damage / _enemyBaseHp>> <<set _moraleDamage = Math.clamp(_damage/ 2 + _damage / _enemyBaseHp,0,_damage*1.5)>> <<set _enemyMorale -= _moraleDamage>> <<if $SecExp.settings.showStats == 1>> <br>remaining enemy morale: <<print num(Math.round(_enemyMorale))>><</if>> <<if _enemyHp <= 0 || _enemyMorale <= 0>> <<if $SecExp.settings.showStats == 1>> <br>Victory!<</if>> <<set $battleResult = 3>> <<set $battleTurns = _i>> <<break>> <</if>> /* attacker army attacks */ <<set _damage = _enemyAttack - _defense>> <<if _damage < _enemyAttack * 0.1>> <<set _damage = _enemyAttack * 0.1>> <</if>> <<if $SecExp.settings.showStats == 1>> <br>enemy damage: <<print num(Math.round(_damage))>><</if>> <<set _hp -= _damage*($SecExp.rebellions.sfArmor ? 0.85 : 1)>> <<if $SecExp.settings.showStats == 1>> <br>remaining hp: <<print num(Math.round(_hp))>><</if>> <<set $losses += _damage / _baseHp>> <<set _moraleDamage = Math.clamp(_damage / 2 + _damage / _baseHp,0,_damage*1.5)>> <<set _morale -= _moraleDamage>> <<if $SecExp.settings.showStats == 1>> <br>remaining morale: <<print num(Math.round(_morale))>><</if>> <<if _hp <= 0 || _morale <= 0>> <<if $SecExp.settings.showStats == 1>> <br>Defeat!<</if>> <<set $battleResult = -3>> <<set $battleTurns = _i>> <<break>> <</if>> <</for>> <<if $battleResult != 3 && $battleResult != -3>> <<if _morale > _enemyMorale>> <<if $SecExp.settings.showStats == 1>> <br>Partial victory!<</if>> <<set $battleResult = 2>> <<elseif _morale < _enemyMorale>> <<if $SecExp.settings.showStats == 1>> <br>Partial defeat!<</if>> <<set $battleResult = -2>> <</if>> <</if>> <<if $battleResult > 3 || $battleResult < -3>> <br><br>@@.red;Error: failed to determine battle result@@ <</if>> <<if $SecExp.settings.showStats == 1>> <<if $SecExp.settings.rebellion.gameOver == 1 && $battleResult == -3>> <br>[[Proceed|Gameover][$gameover = "Rebellion defeat"]] <<else>> <br>[[Proceed|rebellionReport]] <</if>> <<else>> <<if $SecExp.settings.rebellion.gameOver == 1 && $battleResult == -3>> <<set $gameover = "Rebellion defeat">> <<goto "Gameover">> <<else>> <<goto "rebellionReport">> <</if>> <</if>>
MonsterMate/fc
src/Mods/SecExp/rebellionHandler.tw
tw
mit
12,364
:: rebellionOptions [nobr] <<set $nextButton = " ", $nextLink = "rebellionOptions", $encyclopedia = "Battles">> <strong> <<if $slaveRebellion == 1>>Slave<<else>>Citizen<</if>> Rebellion!</strong> <hr> <<if $slaveRebellion == 1>> In the end it happened, the slaves of your arcology dared took up arms and rose up against their betters. Your penthouse is flooded with reports from all over the arcology of small skirmishes between the rioting slaves and the security forces. It appears <strong><<print num(Math.trunc($attackTroops))>></strong> rebels are in the streets right now, building barricades and freeing their peers. They are <<if $attackEquip <= 0>> <strong>poorly armed</strong>. <<elseif $attackEquip == 1>> <strong>lightly armed</strong>. <<elseif $attackEquip == 2>> <strong>decently armed</strong>. <<elseif $attackEquip == 3>> <strong>well armed</strong>. <<elseif $attackEquip >= 4>> <strong>extremely well armed</strong>. <</if>> <<if $irregulars > 0>> <<print num(Math.trunc($irregulars))>> of your citizens took up arms to defend their arcology owner. <</if>> <<set _count = 0>> <<if $rebellingID.length > 0>> <br><br> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].active == 1 && ($rebellingID.includes($militiaUnits[_i].ID))>> <<set _count++>> <<if _count < $rebellingID.length>> $militiaUnits[_i].platoonName, <<else>> $militiaUnits[_i].platoonName <</if>> <</if>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].active == 1 && ($rebellingID.includes($slaveUnits[_i].ID))>> <<set _count++>> <<if _count < $rebellingID.length>> $slaveUnits[_i].platoonName, <<else>> $slaveUnits[_i].platoonName <</if>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].active == 1 && ($rebellingID.includes($mercUnits[_i].ID))>> <<set _count++>> <<if _count < $rebellingID.length>> $mercUnits[_i].platoonName, <<else>> $mercUnits[_i].platoonName <</if>> <</if>> <</for>> betrayed you and joined the insurrection. <</if>> <<set _count = 0>> <<set _loyalUnits = $militiaUnits.length + $slaveUnits.length + $mercUnits.length - $rebellingID.length>> <<if _loyalUnits > 0>> <br><br> <<if $arcologyUpgrade.drones == 1>>Your security drones,<</if>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].active == 1 && (!$rebellingID.includes($militiaUnits[_i].ID))>> <<set _count++>> <<if _count < _loyalUnits>> $militiaUnits[_i].platoonName, <<else>> $militiaUnits[_i].platoonName <</if>> <</if>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].active == 1 && (!$rebellingID.includes($slaveUnits[_i].ID))>> <<set _count++>> <<if _count < _loyalUnits>> $slaveUnits[_i].platoonName, <<else>> $slaveUnits[_i].platoonName <</if>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].active == 1 && (!$rebellingID.includes($mercUnits[_i].ID))>> <<set _count++>> <<if _count < _loyalUnits>> $mercUnits[_i].platoonName, <<else>> $mercUnits[_i].platoonName <</if>> <</if>> <</for>> <<if $SF.Toggle && $SF.Active >= 1>>and $SF.Lower, <<print num($SF.ArmySize)>> strong<</if>> are called to defend the arcology from this menace. <<else>> <<if $arcologyUpgrade.drones == 1>>Your security drones<<if $SF.Toggle && $SF.Active >= 1>>and $SF.Lower, <<print num($SF.ArmySize)>> strong<</if>> <</if>> are called to defend the arcology from this menace. <</if>> <hr> <<else>> In the end it happened, the citizens of your arcology dared took up arms and rose up against their betters. Your penthouse is flooded with reports from all over the arcology of small skirmishes between the rioting residents and the security forces. It appears <<print num(Math.trunc($attackTroops))>> rebels are in the streets right now, building barricades and destroying your property. They are <<if $attackEquip <= 0>> <strong>poorly armed</strong>. <<elseif $attackEquip == 1>> <strong>lightly armed</strong>. <<elseif $attackEquip == 2>> <strong>decently armed</strong>. <<elseif $attackEquip == 3>> <strong>well armed</strong>. <<elseif $attackEquip >= 4>> <strong>extremely well armed</strong>. <</if>> <<if $irregulars > 0>> <<print num(Math.trunc($irregulars))>> of your citizens took up arms to defend their arcology owner. <</if>> <<set _count = 0>> <<if $rebellingID.length > 0>> <br><br> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].active == 1 && ($rebellingID.includes($militiaUnits[_i].ID))>> <<set _count++>> <<if _count < $rebellingID.length>> $militiaUnits[_i].platoonName, <<else>> $militiaUnits[_i].platoonName <</if>> <</if>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].active == 1 && ($rebellingID.includes($slaveUnits[_i].ID))>> <<set _count++>> <<if _count < $rebellingID.length>> $slaveUnits[_i].platoonName, <<else>> $slaveUnits[_i].platoonName <</if>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].active == 1 && ($rebellingID.includes($mercUnits[_i].ID))>> <<set _count++>> <<if _count < $rebellingID.length>> $mercUnits[_i].platoonName, <<else>> $mercUnits[_i].platoonName <</if>> <</if>> <</for>> betrayed you and joined the insurrection. <</if>> <<set _count = 0>> <<set _loyalUnits = $militiaUnits.length + $slaveUnits.length + $mercUnits.length - $rebellingID.length>> <<if _loyalUnits > 0>> <br><br> <<if $arcologyUpgrade.drones == 1>>Your security drones,<</if>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].active == 1 && (!$rebellingID.includes($militiaUnits[_i].ID))>> <<set _count++>> <<if _count < _loyalUnits>> $militiaUnits[_i].platoonName, <<else>> $militiaUnits[_i].platoonName <</if>> <</if>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].active == 1 && (!$rebellingID.includes($slaveUnits[_i].ID))>> <<set _count++>> <<if _count < _loyalUnits>> $slaveUnits[_i].platoonName, <<else>> $slaveUnits[_i].platoonName <</if>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].active == 1 && (!$rebellingID.includes($mercUnits[_i].ID))>> <<set _count++>> <<if _count < _loyalUnits>> $mercUnits[_i].platoonName, <<else>> $mercUnits[_i].platoonName <</if>> <</if>> <</for>> <<if $SF.Toggle && $SF.Active >= 1>>and $SF.Lower, <<print num($SF.ArmySize)>> strong<</if>> are called to defend the arcology from this menace. <<else>> <<if $arcologyUpgrade.drones == 1>>Your security drones<<if $SF.Toggle && $SF.Active >= 1>>and $SF.Lower, <<print num($SF.ArmySize)>> strong<</if>><</if>> are called to defend the arcology from this menace. <</if>> <hr> <</if>> The confined spaces of the arcology and the number of vital yet delicate systems within its walls do not allow a lot of tactical flexibility. This will be a long and strenuous fight, street after street, barricade after barricade. In order to preserve the structural integrity of the building and the lives of our civilians, we will have to limit our firepower. <br><<link "Only light firearms and nonlethal weapons">> <<set $engageRule = 0>> <<replace "#engage">> <br>Your troops will use only nonlethal weapons or light firearms to limit to the maximum the collateral damage. This will however weaken our troops considerably. <</replace>> <</link>> <br><<link "No heavy ordnance">> <<set $engageRule = 1>> <<replace "#engage">> <br>Your troops will limit the use of explosives and heavy weapons to limit considerably the collateral damage. This will however weaken our troops. <</replace>> <</link>> <br><<link "Normal engagement rules">> <<set $engageRule = 2>> <<replace "#engage">> <br>Your troops will not limit their arsenal. This will put the structure and your citizens at risk, but our troops will be at full capacity. <</replace>> <</link>> <<if $SecExp.buildings.riotCenter && $SecExp.buildings.riotCenter.advancedRiotEquip == 1>> <br><<link "Advanced riot protocol">> <<set $engageRule = 3>> <<replace "#engage">> <br>Your troops will make use of the special weaponry, equipment and infrastructure developed by the riot control center to surgically eliminate rebels and dissidents with little to no collateral damage. <</replace>> <</link>> <</if>> <span id="engage"> <br>Your troops will use only nonlethal weapons or light firearms to limit to the maximum the collateral damage. This will however weaken our troops considerably. </span> <br><br>We can dedicate some of our forces to the protection of the vital parts of the arcology, doing so will prevent the failure of said systems, but will also take away strength from our assault. <<if $garrison.penthouse == 0>> <br><<link "Garrison the penthouse" "rebellionOptions">> <<set $garrison.penthouse = 1>> <</link>> <<else>> <br>Troops will be dispatched to the penthouse. <<link "Discard the order" "rebellionOptions">> <<set $garrison.penthouse = 0>> <</link>> <</if>> <<if $garrison.reactor == 0>> <br><<link "Garrison the reactors" "rebellionOptions">> <<set $garrison.reactor = 1>> <</link>> <<else>> <br>Troops will be dispatched to the reactors. <<link "Discard the order" "rebellionOptions">> <<set $garrison.reactor = 0>> <</link>> <</if>> <<if $garrison.assistant == 0>> <br><<link "Garrison the assistant's central CPU" "rebellionOptions">> <<set $garrison.assistant = 1>> <</link>> <<else>> <br>Troops will be dispatched to the assistant's central CPU. <<link "Discard the order" "rebellionOptions">> <<set $garrison.assistant = 0>> <</link>> <</if>> <<if $garrison.waterway == 0>> <br><<link "Garrison the waterways" "rebellionOptions">> <<set $garrison.waterway = 1>> <</link>> <<else>> <br>Troops will be dispatched to the waterways. <<link "Discard the order" "rebellionOptions">> <<set $garrison.waterway = 0>> <</link>> <</if>> <br><br> <<replenishAllUnits>> <<link "Proceed" "rebellionHandler">> <<set $battleResult = 4, $foughtThisWeek = 1>> /* sets $battleResult value outside accepted range (-3, 3) to avoid evaluation problems */ <</link>> <br> <<link "Surrender" "rebellionReport">> <<set $battleResult = -1, $foughtThisWeek = 1>> <</link>>
MonsterMate/fc
src/Mods/SecExp/rebellionOptions.tw
tw
mit
10,618
:: rebellionReport [nobr] <<set $nextButton = "Continue", $nextLink = "Scheduled Event", $encyclopedia = "Battles">> <<set _oldRep = $rep>> <<set _oldAuth = $SecExp.core.authority>> <<set $enemyLosses = Math.trunc($enemyLosses)>> <<if $enemyLosses > $attackTroops>> <<set $enemyLosses = $attackTroops>> <</if>> <<set $SecExp.core.totalKills += $enemyLosses>> <<set $losses = Math.trunc($losses)>> <<if $battleResult == 3>> <strong>Victory!</strong> <<set $SecExp.rebellions.victories++>> <<elseif $battleResult == -3>> <strong>Defeat!</strong> <<set $SecExp.rebellions.losses++>> <<elseif $battleResult == 2>> <strong>Partial victory!</strong> <<set $SecExp.rebellions.victories++>> <<elseif $battleResult == -2>> <strong>Partial defeat!</strong> <<set $SecExp.rebellions.losses++>> <<elseif $battleResult == -1>> <strong>We surrendered</strong> <<set $SecExp.rebellions.losses++>> <</if>> <hr> <<if $slaveRebellion == 1>> Today, <<= asDateString($week, random(0,7))>>, our arcology was inflamed by the fires of rebellion. <<print num(Math.trunc($attackTroops))>> rebels from all over the structure dared rise up against their owners and conquer their freedom through blood. Our defense force, <<print num(Math.trunc(App.SecExp.battle.troopCount()))>> strong, fought with them street by street <<if $enemyLosses != $attackTroops>> inflicting <<print num(Math.trunc($enemyLosses))>> casualties, while sustaining <<if $losses > 1>><<print num(Math.trunc($losses))>> casualties<<elseif $losses > 0>>a casualty<<else>>zero<</if>> themselves. <<else>> completely annihilating their troops, while sustaining <<if $losses > 1>><<print num(Math.trunc($losses))>> casualties<<elseif $losses > 0>>a casualty<<else>>zero casualties<</if>>. <</if>> <<if $SecExp.rebellions.sfArmor>> More units were able to survive thanks to wearing $SF.Lower's combat armor suits. <</if>> <<set $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * $enemyLosses), $menials -= Math.trunc(($menials / $ASlaves) * $enemyLosses), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * $enemyLosses), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * $enemyLosses)>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> The fight was quick and one sided: our men easily stopped the disorganized revolt in a few well aimed assaults. <<elseif $battleTurns <= 7>> The fight was hard, but in the end our men stopped the disorganized revolt with several well aimed assaults. <<else>> The fight was long and hard, but in the end our men stopped the revolt before it could accumulate momentum. <</if>> <<elseif $battleResult == -3>> <<if $battleTurns <= 5>> The fight was quick and one sided: our men were easily crushed by the furious charge of the rebels. <<elseif $battleTurns <= 7>> The fight was hard and in the end the rebels proved too much to handle for our men. <<else>> The fight was long and hard, but despite their bravery the rebels proved too much for our men. <</if>> <<elseif $battleResult == 2>> The fight was long and hard, but in the end our men managed to stop the revolt, though not without difficulty. <<elseif $battleResult == -2>> The fight was long and hard. In the end, our men had to yield to the rebelling slaves, which were fortunately unable to capitalize on their victory. <<elseif $battleResult == -1>> You gave your troops the order to surrender; they obediently stand down. <</if>> /* effects */ <<if $battleResult == 3>> Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. <<run repX(random(800,1000), "war")>> <<set $SecExp.core.authority += random(800,1000)>> <br>Many of the rebelling slaves were recaptured and punished. The instigators were executed one after another in a public trial that lasted for almost three days. <<set $NPCSlaves -= random(10,30)>> <<elseif $battleResult == -3>> Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. <<run repX(random(-800,-1000), "war")>> <<set $SecExp.core.authority -= random(800,1000)>> <br>After the battle most of the rebelling slaves managed to escape, while others remained in the arcology for days looting and hunting their former masters. The arcology will bear the scars of this day for a long time. <<set $lowerClass -= random(50,100)>> <<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $rebelDefeatAftermath = 5>> <<elseif $battleResult == -2>> Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. <<run repX(random(-600,-800), "war")>> <<set $SecExp.core.authority -= random(600,800)>> <br>After the battle most of the rebelling slaves managed to escape, while others remained in the arcology for days looting and hunting their former masters. The arcology will bear the scars of this day for a long time. <<set $lowerClass -= random(40,80)>> <<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $rebelDefeatAftermath = 3>> <<elseif $battleResult == 2>> Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. <<run repX(random(600,180), "war")>> <<set $SecExp.core.authority += random(600,800)>> <br>Many of the rebelling slaves were recaptured and punished. The instigators were executed one after another in a public trial that lasted for almost three days. <<set $NPCSlaves -= random(10,30)>> <<elseif $battleResult == -1>> Rather than waste the lives of your men you decided to surrender, hoping the rebels will cause less damage if you indulge them, this is however a big hit to your status. Your @@.red;reputation@@ and @@.red;authority@@ are significantly impacted. <<run repX(random(-1000,-1200), "war")>> <<set $SecExp.core.authority -= random(1000,1200)>> <br> The surrender allows the arcology to survive @@.yellow;mostly intact,@@ however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days. <<run cashX(-1000, "war")>> <<if $week <= 30>> <<set $lowerClass -= random(100)>> <<set _lostSlaves = random(150), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5)>> <<elseif $week <= 60>> <<set $lowerClass -= random(120)>> <<set _lostSlaves = random(170), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10)>> <<elseif $week <= 90>> <<set $lowerClass -= random(140)>> <<set _lostSlaves = random(190), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15)>> <<elseif $week <= 120>> <<set $lowerClass -= random(160)>> <<set _lostSlaves = random(210), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20)>> <<else>> <<set $lowerClass -= random(180)>> <<set _lostSlaves = random(230), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25)>> <</if>> <br>After the battle most of the rebelling slaves managed to escape, while others remained in the arcology for days looting and hunting their former masters. The arcology will bear the scars of this day for a long time. <<set $lowerClass -= random(50,100)>> <<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $rebelDefeatAftermath = 5>> <</if>> <<else>> Today, <<= asDateString($week, random(0,7))>>, our arcology was inflamed by the fires of rebellion. <<print num(Math.trunc($attackTroops))>> rebels from all over the structure dared rise up to dethrone their arcology owner. Our defense force, <<print num(App.SecExp.battle.troopCount())>> strong, fought with them street by street <<if $enemyLosses != $attackTroops>> inflicting <<print num(Math.trunc($enemyLosses))>> casualties, while sustaining <<if $losses > 1>> <<print num(Math.trunc($losses))>> casualties <<else>> a casualty<</if>> themselves. <<else>> completely annihilating their troops, while sustaining <<if $losses > 1>> <<print num(Math.trunc($losses))>> casualties <<else>> a casualty.<</if>> <</if>> <<if $SecExp.rebellions.sfArmor>> More units were able to survive thanks to wearing $SF.Lower's combat armor suits. <</if>> <<set $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * $enemyLosses), $menials -= Math.trunc(($menials / $ASlaves) * $enemyLosses), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * $enemyLosses), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * $enemyLosses)>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men easily stopped the disorganized revolt in a few well aimed assaults. <<elseif $battleTurns <= 7>> The fight was hard, but in the end our men stopped the disorganized revolt with several well aimed assaults. <<else>> The fight was long and hard, but in the end our men stopped the revolt before it could accumulate momentum. <</if>> <<elseif $battleResult == -3>> <<if $battleTurns <= 5>> The fight was quick and one sided, our men were easily crushed by the furious charge of the rebels. <<elseif $battleTurns <= 7>> The fight was hard and in the end the rebels proved too much to handle for our men. <<else>> The fight was long and hard, but despite their bravery the rebels proved too much for our men. <</if>> <<elseif $battleResult == 2>> The fight was long and hard, but in the end our men managed to stop the revolt, though not without difficulty. <<elseif $battleResult == -2>> The fight was long and hard. Our men in the end had to yield to the rebelling slaves, which were fortunately unable to fully capitalize on their victory. <<elseif $battleResult == -1>> You gave your troops the order to surrender, obediently they stand down. <</if>> /* effects */ <<if $battleResult == 3>> Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. <<run repX(random(800,1000), "war")>> <<set $SecExp.core.authority += random(800,1000)>> <br>Many of the rebelling citizens were captured and punished, many others enslaved. The instigators were executed one after another in a public trial that lasted for almost three days. <<set $lowerClass -= random(10,30)>> <<elseif $battleResult == -3>> Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. <<run repX(random(-800,-1000), "war")>> <<set $SecExp.core.authority -= random(800,1000)>> <br>After the battle most of the rebelling citizens remained in the arcology for days looting and hunting their former arcology. We will bear the scars of this day for a long time. <<set $lowerClass -= Math.trunc(($attackTroops - $enemyLosses) * 0.8)>> <<set $rebelDefeatAftermath = 5>> <<elseif $battleResult == -2>> Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased. <<run repX(random(-600,-800), "war")>> <<set $SecExp.core.authority -= random(600,800)>> <br>After the battle most of the rebelling citizens remained in the arcology for days looting and hunting their former arcology. We will bear the scars of this day for a long time. <<set $lowerClass -= random(40,80)>> <<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.6), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $rebelDefeatAftermath = 3>> <<elseif $battleResult == 2>> Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased. <<run repX(random(600,180), "war")>> <<set $SecExp.core.authority += random(600,800)>> <br>Many of the rebelling citizens were captured and punished, many others enslaved. The instigators were executed one after another in a public trial that lasted for almost three days. <<set $NPCSlaves -= random(10,30)>> <<elseif $battleResult == -1>> Rather than waste the lives of your men you decided to surrender, hoping the rebels will cause less damage if you indulge them, this is however a big hit to your status. Your @@.red;reputation@@ and @@.red;authority@@ are significantly impacted. <<run repX(random(-1000,-1200), "war")>> <<set $SecExp.core.authority -= random(1000,1200)>> <br> The surrender allows the arcology to survive @@.yellow;mostly intact,@@ however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days. <<run cashX(-1000, "war")>> <<if $week <= 30>> <<set $lowerClass -= random(100)>> <<set _lostSlaves = random(150), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5)>> <<elseif $week <= 60>> <<set $lowerClass -= random(120)>> <<set _lostSlaves = random(170), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10)>> <<elseif $week <= 90>> <<set $lowerClass -= random(140)>> <<set _lostSlaves = random(190), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15)>> <<elseif $week <= 120>> <<set $lowerClass -= random(160)>> <<set _lostSlaves = random(210), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20)>> <<else>> <<set $lowerClass -= random(180)>> <<set _lostSlaves = random(230), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25)>> <</if>> <br>After the battle most of the rebelling citizens remained in the arcology for days looting and hunting their former arcology. We will bear the scars of this day for a long time. <<set $lowerClass -= random(50,100)>> <<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $rebelDefeatAftermath = 5>> <</if>> <</if>> /* engage rules */ <<if $battleResult != -1>> <<if $engageRule == 0>> Since you ordered your troops to limit their weaponry to low caliber or nonlethal, the arcology reported only @@.red;minor damage.@@ Most citizens and non involved slaves remained unharmed, though some casualties between the civilians were inevitable. A few businesses were looted and burned, but the damage was pretty limited. <<set $arcRepairTime += 3, IncreasePCSkills('engineering', 0.1)>> <<if $week <= 30>> <<set $lowerClass -= random(40)>> <<set _lostSlaves = random(65), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(2)>> <<elseif $week <= 60>> <<set $lowerClass -= random(50)>> <<set _lostSlaves = random(75), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5)>> <<elseif $week <= 90>> <<set $lowerClass -= random(60)>> <<set _lostSlaves = random(85), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(7)>> <<elseif $week <= 120>> <<set $lowerClass -= random(70)>> <<set _lostSlaves = random(95), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10)>> <<else>> <<set $lowerClass -= random(80)>> <<set _lostSlaves = random(105), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(12)>> <</if>> <<elseif $engageRule == 1>> You ordered your troops to limit their weaponry to non-heavy, non-explosive, because of this the arcology reported @@.red;moderate damage.@@ Most citizens and non involved slaves remained unharmed or only lightly wounded, but many others did not make it. Unfortunately casualties between the civilians were inevitable. A few businesses were looted and burned, but the damage was pretty limited. <<set $arcRepairTime += 5, IncreasePCSkills('engineering', 0.1)>> <<if $week <= 30>> <<set $lowerClass -= random(60)>> <<set _lostSlaves = random(85), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(4)>> <<elseif $week <= 60>> <<set $lowerClass -= random(70)>> <<set _lostSlaves = random(95), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(7)>> <<elseif $week <= 90>> <<set $lowerClass -= random(80)>> <<set _lostSlaves = random(105), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(9)>> <<elseif $week <= 120>> <<set $lowerClass -= random(90)>> <<set _lostSlaves = random(115), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(12)>> <<else>> <<set $lowerClass -= random(100)>> <<set _lostSlaves = random(125), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(14)>> <</if>> <<elseif $engageRule == 2>> Since you did not apply any restriction on the weapons your forces should use, the arcology reported @@.red;heavy damage.@@ Many citizens and uninvolved slaves are reported killed or missing. Casualties between the civilians were inevitable. Many businesses were damaged during the battle either by the fight itself, by fires which spread unchecked for hours or by looters. <<set $arcRepairTime += 7, IncreasePCSkills('engineering', 0.1)>> <<if $week <= 30>> <<set $lowerClass -= random(100)>> <<set _lostSlaves = random(150), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(5)>> <<elseif $week <= 60>> <<set $lowerClass -= random(120)>> <<set _lostSlaves = random(170), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10)>> <<elseif $week <= 90>> <<set $lowerClass -= random(140)>> <<set _lostSlaves = random(190), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(15)>> <<elseif $week <= 120>> <<set $lowerClass -= random(160)>> <<set _lostSlaves = random(210), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(20)>> <<else>> <<set $lowerClass -= random(180)>> <<set _lostSlaves = random(230), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(25)>> <</if>> <<else>> Thanks to the advance riot control weaponry developed by your experts, the rebels were mostly subdued or killed with @@.yellow;little to no collateral damage to the arcology@@ and its inhabitants. A few businesses were looted, but the damage was very limited. <<set $arcRepairTime += 2, IncreasePCSkills('engineering', 0.1)>> <<run cashX(-1000, "war")>> <<if $week <= 30>> <<set $lowerClass -= random(20)>> <<set _lostSlaves = random(45), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(2)>> <<elseif $week <= 60>> <<set $lowerClass -= random(30)>> <<set _lostSlaves = random(55), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(4)>> <<elseif $week <= 90>> <<set $lowerClass -= random(40)>> <<set _lostSlaves = random(65), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(6)>> <<elseif $week <= 120>> <<set $lowerClass -= random(50)>> <<set _lostSlaves = random(75), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(8)>> <<else>> <<set $lowerClass -= random(60)>> <<set _lostSlaves = random(85), $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves), $menials -= Math.trunc(($menials / $ASlaves) * _lostSlaves), $fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves), $menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>> <<set $arcologies[0].prosperity -= random(10)>> <</if>> <</if>> <</if>> <<if $lowerClass < 0>> <<set $lowerClass = 0>> <</if>> <<if $NPCSlaves < 0>> <<set $NPCSlaves = 0>> <</if>> /* garrisons */ <<if $garrison.reactor == 0>> <<if random(1,100) <= (75 - (($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.reactor : 0) * 25))>> Unfortunately during the fighting a group of slaves infiltrated the reactor complex and sabotaged it, causing massive power fluctuations and blackouts. It will take @@.red;time and money to repair the damage.@@ <<set $garrison.reactorTime = $repairTime + random(1) - ($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.reactor : 0), IncreasePCSkills('engineering', 0.1)>> <<run cashX(-2000, "war")>> <<else>> While the reactor was left defenseless without a garrison, there was no attempt at sabotage. Let's hope we'll always be this lucky. <</if>> <<else>> The garrison assigned to the reactor protected it from the multiple sabotage attempts carried out by the rebels. <</if>> <<if $garrison.waterway == 0>> <<if random(1,100) <= (75 - (($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.waterway : 0) * 25))>> Unfortunately during the fighting a group of slaves infiltrated the water management complex and sabotaged it, causing huge water leaks throughout the arcology and severely limiting the water supply. It will take @@.red;time and money to repair the damage.@@ <<set $garrison.waterwayTime = $repairTime + random(1) - ($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.waterway : 0), IncreasePCSkills('engineering', 0.1)>> <<run cashX(-2000, "war")>> <<else>> While the water management complex was left defenseless without a garrison, there was no attempt at sabotage. Let's hope we'll always be this lucky. <</if>> <<else>> The garrison assigned to the water management complex protected it from the sabotage attempt of the rebels. <</if>> <<if $garrison.assistant == 0>> <<if random(1,100) <= (75 - (($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.assistant : 0) * 25))>> Unfortunately during the fighting a group of slaves infiltrated the facility housing $assistant.name's mainframe and sabotaged it. Without its AI, the arcology will be next to impossible to manage. It will take @@.red;time and money to repair the damage.@@ <<set $garrison.assistantTime = $repairTime + random(1) - ($SecExp.buildings.riotCenter ? $SecExp.buildings.riotCenter.fort.assistant : 0), IncreasePCSkills('engineering', 0.1)>> <<run cashX(-2000, "war")>> <<else>> While the $assistant.name's mainframe was left defenseless without a garrison, there was no attempt at sabotage. Let's hope we'll always be this lucky. <</if>> <<else>> The garrison assigned to the facility housing $assistant.name's mainframe prevented any sabotage attempt. <</if>> <<if $garrison.penthouse == 1 && $BodyguardID != 0>> <<setLocalPronouns _S.Bodyguard 2>> The garrison assigned to the penthouse together with your loyal Bodyguard stopped all assaults against your penthouse with ease. <<elseif $BodyguardID != 0>> <<if random(1,100) <= 75>> During the fighting a group of slaves assaulted the penthouse. Your Bodyguard, _S.Bodyguard.slaveName, stood strong against the furious attack. <<set _woundChance = 0>> <<if $PC.career == "mercenary" || $PC.career == "gang">> <<set _woundChance -= 5>> <<elseif $PC.skill.warfare >= 75>> <<set _woundChance -= 3>> <</if>> <<if $personalArms >= 1>> <<set _woundChance -= 5>> <</if>> <<if $PC.physicalAge >= 60>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.belly > 5000>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.boobs >= 1000>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.butt >= 4>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.preg >= 30>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.balls >= 20>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.balls >= 9>> <<set _woundChance += random(1,5)>> <</if>> <<if random(1,100) <= _woundChance>> A lucky shot managed to find its way to you, leaving a painful, but thankfully not lethal, wound. <<run healthDamage($PC, 60)>> <<else>> Fortunately you managed to avoid injury. <</if>> <<if _S.Concubine>> <<setLocalPronouns _S.Concubine>> <<set _woundChance = 0>> <<if _S.Concubine.skill.combat == 1>> <<set _woundChance -= 2>> <</if>> <<set _woundChance -= 0.25 * (getLimbCount(_S.Concubine, 105))>> <<if _S.Concubine.health.condition >= 50>> <<set _woundChance -= 1>> <</if>> <<if _S.Concubine.weight > 130>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.muscles < -30>> <<set _woundChance += 1>> <</if>> <<if getBestVision(_S.Concubine) === 0>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.heels == 1>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.boobs >= 1400>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.butt >= 6>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.belly >= 10000>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.dick >= 8>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.balls >= 8>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.intelligence+_S.Concubine.intelligenceImplant < -95>> <<set _woundChance += 1>> <</if>> <<set _woundChance *= random(2,4)>> <<if random(1,100) <= _woundChance>> Your Concubine was unfortunately caught in the crossfire and <<set _woundType = App.SecExp.inflictBattleWound(_S.Concubine)>> <<if _woundType == "voice">> a splinter pierced $his throat, severing $his vocal cords. <<elseif _woundType == "eyes">> a splinter hit $his face, severely damaging $his eyes. <<elseif _woundType == "legs">> an explosion near $him caused the loss of both of $his legs. <<elseif _woundType == "arm">> an explosion near $him caused the loss of one of $his arms. <<elseif _woundType == "flesh">> a stray shot severely wounded $him. <</if>> <</if>> <</if>> <<setLocalPronouns _S.Bodyguard>> <<set _woundChance = 0>> <<if _S.Bodyguard.skill.combat == 1>> <<set _woundChance -= 2>> <</if>> <<set _woundChance -= 0.25 * (getLimbCount(_S.Bodyguard, 105))>> <<if _S.Bodyguard.health.condition >= 50>> <<set _woundChance -= 1>> <</if>> <<if _S.Bodyguard.weight > 130>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.muscles < -30>> <<set _woundChance += 1>> <</if>> <<if getBestVision(_S.Bodyguard) === 0>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.heels == 1>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.boobs >= 1400>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.butt >= 6>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.belly >= 10000>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.dick >= 8>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.balls >= 8>> <<set _woundChance += 1>> <</if>> <<if _S.Bodyguard.intelligence+_S.Bodyguard.intelligenceImplant < -95>> <<set _woundChance += 1>> <</if>> <<set _woundChance *= random(2,4)>> <<if random(1,100) <= _woundChance>> During one of the assaults your Bodyguard was hit. <<set _woundType = App.SecExp.inflictBattleWound(_S.Bodyguard)>> <<if _woundType == "voice">> A splinter pierced $his throat, severing $his vocal cords. <<elseif _woundType == "eyes">> A splinter hit $his face, severely damaging $his eyes. <<elseif _woundType == "legs">> An explosion near $him caused the loss of both of $his legs. <<elseif _woundType == "arm">> An explosion near $him caused the loss of one of $his arms. <<elseif _woundType == "flesh">> A stray shot severely wounded $him. <</if>> <</if>> The damage to the structure will be @@.red;costly to repair.@@ <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(-2000, "war")>> <<else>> While the penthouse was left without a sizable garrison, there was no dangerous assault against it. Let's hope we'll always be this lucky. <</if>> <<elseif $garrison.penthouse == 1>> <<if random(1,100) <= 75>> During the fighting a group of slaves assaulted the penthouse. The garrison stood strong against the furious attack. <<set _woundChance = 0>> <<if $PC.career == "mercenary" || $PC.career == "gang">> <<set _woundChance -= 5>> <<elseif $PC.skill.warfare >= 75>> <<set _woundChance -= 3>> <</if>> <<if $personalArms >= 1>> <<set _woundChance -= 5>> <</if>> <<if $PC.physicalAge >= 60>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.belly > 5000>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.boobs >= 1000>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.butt >= 4>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.preg >= 30>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.balls >= 20>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.balls >= 9>> <<set _woundChance += random(1,5)>> <</if>> <<set _woundChance *= random(1,2)>> <<if random(1,100) <= _woundChance>> A lucky shot managed to find its way to you, leaving a painful, but thankfully nonlethal, wound. <<run healthDamage($PC, 60)>> <<else>> Fortunately you managed to avoid injury. <</if>> <<if _S.Concubine>> <<setLocalPronouns _S.Concubine>> <<set _woundChance = 0>> <<if _S.Concubine.skill.combat == 1>> <<set _woundChance -= 2>> <</if>> <<set _woundChance -= 0.25 * (getLimbCount(_S.Concubine, 105))>> <<if _S.Concubine.health.condition >= 50>> <<set _woundChance -= 1>> <</if>> <<if _S.Concubine.weight > 130>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.muscles < -30>> <<set _woundChance += 1>> <</if>> <<if getBestVision(_S.Concubine) === 0>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.heels == 1>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.boobs >= 1400>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.butt >= 6>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.belly >= 10000>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.dick >= 8>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.balls >= 8>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.intelligence+_S.Concubine.intelligenceImplant < -95>> <<set _woundChance += 1>> <</if>> <<set _woundChance *= random(2,4)>> <<if random(1,100) <= _woundChance>> Your Concubine was unfortunately caught in the crossfire and <<set _woundType = App.SecExp.inflictBattleWound(_S.Concubine)>> <<if _woundType == "voice">> a splinter pierced $his throat, severing $his vocal cords. <<elseif _woundType == "eyes">> a splinter hit $his face, severely damaging $his eyes. <<elseif _woundType == "legs">> an explosion near $him caused the loss of both of $his legs. <<elseif _woundType == "arm">> an explosion near $him caused the loss of one of $his arms. <<elseif _woundType == "flesh">> a stray shot severely wounded $him. <</if>> <</if>> <</if>> The damage to the structure will be @@.red;costly to repair.@@ <<= IncreasePCSkills('engineering', 0.1)>> <<run cashX(-2000, "war")>> <<else>> There was no sizable assault against the penthouse. Let's hope we'll always be this lucky. <</if>> <<else>> <<if random(1,100) <= 75>> During the fighting a group of slaves assaulted the penthouse. Isolated and alone, you stood strong against the furious attack. <<set _woundChance = 0>> <<if $PC.career == "mercenary" || $PC.career == "gang">> <<set _woundChance -= 5>> <<elseif $PC.skill.warfare >= 75>> <<set _woundChance -= 3>> <</if>> <<if $personalArms >= 1>> <<set _woundChance -= 5>> <</if>> <<if $PC.physicalAge >= 60>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.belly > 5000>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.boobs >= 1000>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.butt >= 4>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.preg >= 30>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.balls >= 20>> <<set _woundChance += random(1,5)>> <</if>> <<if $PC.balls >= 9>> <<set _woundChance += random(1,5)>> <</if>> <<set _woundChance *= random(1,2)>> <<if random(1,100) <= _woundChance>> A lucky shot managed to find its way to you, leaving a painful, but thankfully nonlethal, wound. <<run healthDamage($PC, 60)>> <<else>> Fortunately you managed to avoid injury. <</if>> <<if _S.Concubine>> <<setLocalPronouns _S.Concubine>> <<set _woundChance = 0>> <<if _S.Concubine.skill.combat == 1>> <<set _woundChance -= 2>> <</if>> <<set _woundChance -= 0.25 * (getLimbCount(_S.Concubine, 105))>> <<if _S.Concubine.health.condition >= 50>> <<set _woundChance -= 1>> <</if>> <<if _S.Concubine.weight > 130>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.muscles < -30>> <<set _woundChance += 1>> <</if>> <<if getBestVision(_S.Concubine) === 0>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.heels == 1>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.boobs >= 1400>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.butt >= 6>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.belly >= 10000>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.dick >= 8>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.balls >= 8>> <<set _woundChance += 1>> <</if>> <<if _S.Concubine.intelligence+_S.Concubine.intelligenceImplant < -95>> <<set _woundChance += 1>> <</if>> <<set _woundChance *= random(2,4)>> <<if random(1,100) <= _woundChance>> Your Concubine was unfortunately caught in the crossfire and <<set _woundType = App.SecExp.inflictBattleWound(_S.Concubine)>> <<if _woundType == "voice">> a splinter pierced $his throat, severing $his vocal cords. <<elseif _woundType == "eyes">> a splinter hit $his face, severely damaging $his eyes. <<elseif _woundType == "legs">> an explosion near $him caused the loss of both of $his legs. <<elseif _woundType == "arm">> an explosion near $him caused the loss of one of $his arms. <<elseif _woundType == "flesh">> a stray shot severely wounded $him. <</if>> <</if>> <</if>> <<else>> There was no sizable assault against the penthouse. Let's hope we'll always be this lucky. <</if>> <</if>> <<include "unitsRebellionReport">> /* resets variables and flags */ <<set $attackTroops = 0>> <<set $attackEquip = 0>> <<set $enemyLosses = 0>> <<set $losses = 0>> <<set $battleTurns = 0>> <<set $irregulars = 0>> <<if $slaveRebellion == 1>> <<set $SecExp.rebellions.slaveProgress = 0>> <<set $SecExp.rebellions.citizenProgress = Math.clamp($SecExp.rebellions.citizenProgress - random(50,100), 0, 100)>> <<else>> <<set $SecExp.rebellions.citizenProgress = 0>> <<set $SecExp.rebellions.slaveProgress = Math.clamp($SecExp.rebellions.slaveProgress - random(50,100), 0, 100)>> <</if>> <<set $slaveRebellion = 0>> <<set $citizenRebellion = 0>> <<set $SecExp.rebellions.tension = Math.clamp($SecExp.rebellions.tension - random(50,100), 0, 100)>>
MonsterMate/fc
src/Mods/SecExp/rebellionReport.tw
tw
mit
43,409
:: secExpSmilingMan [nobr] <h2>The Smiling Man</h2> <<set $nextButton = "Continue", $nextLink = "Random Nonindividual Event">> <<setAssistantPronouns>> <<if $seeDicks != 100>> <<set _activeSlave = GenerateNewSlave("XX",{minAge: 16, maxAge: 18, ageOverridesPedoMode: 1, disableDisability: 1, race: "asian", nationality: "Japanese"})>> <<set _activeSlave.faceShape = "cute">> <<set _activeSlave.boobs = 450>> <<set _activeSlave.vagina = 0>> <<set _activeSlave.ovaries = 1>> <<else>> <<set _activeSlave = GenerateNewSlave("XY",{minAge: 16, maxAge: 18, ageOverridesPedoMode: 1, disableDisability: 1, race: "asian", nationality: "Japanese"})>> <<set _activeSlave.boobs = 250>> <<set _activeSlave.faceShape = "androgynous">> <</if>> <<set _activeSlave.boobShape = "perky">> <<set _activeSlave.nipples = "cute">> <<set _activeSlave.origin = "$He was a criminal mastermind, captured shortly after completing $his master plan.">> <<set _activeSlave.career = "a student from a private school">> <<set _activeSlave.intelligence = 100>> <<set _activeSlave.intelligenceImplant = 30>> <<set _activeSlave.slaveSurname = "Yamadera">> <<set _activeSlave.birthSurname = "Yamadera">> <<set _activeSlave.origSkin = "pale">> <<run applyGeneticColor(_activeSlave)>> <<set _activeSlave.devotion = 5 * $SecExp.smilingMan.relationship>> <<set _activeSlave.trust = 5 * $SecExp.smilingMan.relationship>> <<set _activeSlave.face = random(10,50)>> <<run setHealth(_activeSlave, 70, 0, 0, 0, 0)>> <<set _activeSlave.teeth = "normal">> <<set _activeSlave.areolae = 0>> <<set _activeSlave.anus = 0>> <<set _activeSlave.butt = 3>> <<set _activeSlave.lips = 15>> <<set _activeSlave.behavioralFlaw = "odd">> <<set _activeSlave.skill.vaginal = 0>> <<set _activeSlave.skill.oral = 0>> <<set _activeSlave.skill.anal = 0>> <<set _activeSlave.skill.whoring = 0>> <<set _activeSlave.skill.entertainment = 0>> <<set _activeSlave.birthWeek = random(0,50)>> <<set _activeSlave.voice = 2>> <<set _activeSlave.weight = -20>> <<set _activeSlave.muscles = 0>> <<set _activeSlave.shoulders = -1>> <<set _activeSlave.hips = 0>> <<set _activeSlave.clit = 0>> <<set _activeSlave.labia = 0>> <<set _activeSlave.waist = 10>> <<set _activeSlave.preg = 0>> <<set _activeSlave.prestige = 3>> <<set _activeSlave.prestigeDesc = "$He was the famous Smiling Man.">> <<set _activeSlave.clothes = "a military uniform">> /*closest thing to commie/punk we have at the moment*/ <<if $SecExp.smilingMan.progress === 0>> <<set $SecExp.smilingMan.relationship = 0>> <<set $fcnn.push("...encryption techniques: how to protect you and your loved ones from hackers ...")>> <p> During your morning routine, a peculiar report appears: it's been several weeks since your arcology was the victim of a series of cyber-crimes conducted by a mysterious figure. The egocentric criminal apparently took great pride in their acts, to the point of signing them with a symbol: a stylized smiling face. Your arcology was not the only one under assault by the machinations of the one the media quickly nicknamed <span style="font-style:italic">the Smiling Man</span>. </p> <p> Despite the sheer damage this criminal did, you cannot help but admire the skill with which every misdeed was performed — the worst white collar crimes of the century, carried out with such elegance that they almost seemed the product of natural laws, rather than masterful manipulation of the digital market. While sifting through the report, $assistant.name remains strangely quiet. "I'm worried, <<= properTitle()>> — this individual seems to be able to penetrate whichever system garners his attention. I... feel vulnerable," _heA says. "It's not something I'm used to." </p> <p> Fortunately you have not been hit directly by this criminal — yet. Still, the repercussions of numerous bankruptcies take their toll on your arcology, whose <span class="red">prosperity suffers.</span> <<set $arcologies[0].prosperity *= random(80,90) * 0.01>> </p> <p id="result"> <<if $cash >= 10000>> <div> <<link "Devote funds to the search for this dangerous criminal">> <<run cashX(-10000, "event")>> <<set $SecExp.smilingMan.investedFunds = 1>> <<set $SecExp.smilingMan.relationship++, $SecExp.smilingMan.progress++>> <<replace "#result">> You devote funds to capture and neutralize the threat. You cannot help but wonder what the end game of this "smiling man" is. Money? Fame? Or is he on an ideological crusade? <</replace>> <</link>> </div> <div> <<link "Attempt to contact the mysterious figure">> <<run cashX(-10000, "event")>> <<set $SecExp.smilingMan.investedFunds = 1>> <<set $SecExp.smilingMan.relationship += 2, $SecExp.smilingMan.progress++>> <<replace "#result">> You devote funds to an attempt at communicating with the smiling man. You cannot help but wonder what the end game of this "smiling man" is. Money? Fame? Or is he on an ideological crusade? <</replace>> <</link>> </div> <div> <<link "Invest funds to increase the cyber-security of the arcology">> <<run cashX(-10000, "event")>> <<set $SecExp.smilingMan.investedFunds = 1>> <<set $SecExp.smilingMan.relationship += random(5,10), $SecExp.smilingMan.progress++>> <<replace "#result">> You devote funds to the improvement of the cyber-security of your arcology. You cannot help but wonder what the end game of this "smiling man" is. Money? Fame? Or is he on an ideological crusade? <</replace>> <</link>> </div> <<else>> <div> Not enough funds to take further action. </div> <</if>> <div> <<link "Ignore the issue">> <<set $SecExp.smilingMan.progress++>> <<replace "#result">> You do not consider this individual a threat. <</replace>> <</link>> </div> </p> <<elseif $SecExp.smilingMan.progress === 1>> <<set $fcnn.push("...cybersecurity market is booming thanks to a series of recent high-profile attacks...")>> <p> You have just reached your penthouse when your faithful assistant appears in front of you, evidently excited. "<<= properTitle()>>, I have just received news of a new attack by the Smiling Man. It appears a few hours ago he infiltrated another arcology and caused a catastrophic failure of its power plant. Between old debts and the loss of value for his shares, the owner went bankrupt in minutes. It seems the Smiling Man managed to keep a small auxiliary generator functioning enough to project a giant holographic picture of his symbol on the arcology's walls. Say what you will about his actions, but you can't deny he has style... Anyways, this opens up a great opportunity to gain control of the structure for ourselves." It is indeed a great opportunity, one you cannot resist. You quickly organize the affair and in a few minutes a message reaches your assistant. </p> <p> "Should I open it?" your assistant asks. You silently nod. </p> <p> Suddenly the room flashes red, while your assistant fades for half a second. When _heA reappears, _hisA face has been replaced by a stylized smiling face. </p> <p> "Hello, my dear $PC.birthName. I can call you $PC.birthName, right? I've been keeping an eye on you for so long now, it feels like we're friends! I am terribly sorry for my unannounced visit, but I wanted to meet face to face... well, face to hologram." it says, letting out a childlike giggle. "I'm sure you're aware of my recent activities around this rock of ours, and, well, to put it simply, it's your turn to contribute to my great project! You'll love it when you see it, I'm sure! By the way, thanks for the offer — it's so nice to see people contribute to a worthy cause so generously! Well, I've taken enough of your time, see you soon!" </p> <p> The lights flicker once more and an instant later your assistant returns to _hisA usual self. </p> <p> "I... I — I couldn't stop him! I'm sorry, <<= properTitle()>>." </p> <p> You waste no time in rushing to the console and checking your finances. It's as you feared, <span class="cash.dec">you have been robbed.</span> </p> <<set _lostCash = Math.clamp(50000 * Math.trunc($week / 20), 50000, 1000000)>> <<if $assistant.power >= 1>> <p> Fortunately, the computing power available to $assistant.name allowed _himA to <<if $assistant.power == 1>> <<set _lostCash -= Math.min(20000, _lostCash)>> somewhat <<elseif $assistant.power == 2>> <<set _lostCash -= Math.min(30000, _lostCash)>> <<elseif $assistant.power >= 3>> <<set _lostCash -= Math.min(40000, _lostCash)>> significantly <</if>> limit the damage. </p> <</if>> <p> <<if $SecExp.buildings.secHub && $SecExp.buildings.secHub.upgrades.security.cyberBots == 1>> <<set _lostCash -= Math.min(30000, _lostCash)>> The additional cyber defenses acquired and running in the security HQ <<if _lostCash < 200000>>further<</if>> limit the damage. <</if>> <<if $SecExp.smilingMan.investedFunds>> <<set _lostCash -= Math.min(20000, _lostCash)>> The funding you dedicated to the Smiling Man case saved some of the assets that would have been otherwise lost. <<run delete $SecExp.smilingMan.investedFunds>> <</if>> </p> <<run cashX(forceNeg(_lostCash), "event")>> <p id="result"> <div> <<link "&quot;I want him dead. Now.&quot;">> <<set $SecExp.smilingMan.relationship--, $SecExp.smilingMan.progress++>> <<replace "#result">> You command your loyal operatives to double down on the search and elimination of the threat. <</replace>> <</link>> </div> <div> <<link "&quot;I want him, dead or alive!&quot;">> <<set $SecExp.smilingMan.relationship++, $SecExp.smilingMan.progress++>> <<replace "#result">> You command your loyal operatives to double down on the search and capture of the threat. <</replace>> <</link>> </div> <div> <<link "&quot;If we don't find him soon, we will regret it.&quot;">> <<set $SecExp.smilingMan.relationship += 2, $SecExp.smilingMan.progress++>> <<replace "#result">> You command your loyal operatives to double down on the search and neutralization of the threat. <</replace>> <</link>> </div> <div> <<link "&quot;He got what he wanted. Hopefully, we will be left in peace.&quot;">> <<set $SecExp.smilingMan.progress++>> <<set $nextButton = "Continue", $nextLink = "Random Nonindividual Event">> <<replace "#result">> You take no further action. Hopefully this ordeal is over. <</replace>> <</link>> </div> </p> <<elseif $SecExp.smilingMan.progress === 2>> <<set $fcnn.push("...my money safe the old-fashioned way: I store it all underneath my mattress...")>> <p style="margin-bottom: 2em"> When $assistant.name violently wakes you up, _hisA worried expression can mean only one thing: the Smiling Man had been back. "We were anonymously sent a link to a new website: it's a very simple site, no visuals, no text; only a countdown ticking away. It will reach zero this evening." your assistant says. This is troubling, yet somewhat exciting. The Smiling Man never failed to cause damage, but his ego had gotten the best of him this time — having time to prepare before their attack will give you a chance to find them. For the rest of the day you do your best to plan, prepare and focus. </p> <p> Evening came faster than you anticipated. Your security team was already at full alert, waiting for any signal on the horizon. The die was cast. </p> <p> Suddenly all the computers in the room begin to act strangely, and then it happened. On all of the screens across the arcology the Smiling Man's icon appears, then every speaker begins broadcasting the same voice, one that you have already heard once before: </p> <p> "Hello citizens of $arcologies[0].name! I am here on this special day to relay to you a very important message: we find ourselves in very peculiar times, times of strife and suffering! But these are also times of change and regeneration! Indeed, I say humanity itself is regenerating, turning into a new being for which the ideals of the old world no longer hold meaning. A new blank page from which humanity can begin to prosper again. </p> <p> Alas, my friends, not all is good, as in this rebirth a great injustice is being perpetrated. If we truly want to ascend to this new form of humanity the old must give way to the new. If we must cleanse our mind of old ideas, our world must cleanse itself of them as well. It's to fix this injustice, that I worked so hard all this time! To cleanse the world of the old, we must get rid of our precious, precious data. At the end of this message every digital device will see its memory erased, every archive cleaned, every drive deleted. </p> <p> It will be a true rebirth! A true new beginning! No longer will the chains of the past keep humanity anchored!" </p> <p> The voice stopped for a second. </p> <p> "Have a good day," it simply concluded. </p> <p>Then it happened.</p> <p> In little more than seconds all the data collected in the years past vanished. It's a disaster. The vast majority of currency is digital, so the actions of the Smiling Man have a devastating effect on the money supply. <<if $cash < 0>> Luckily for you this means that your <span class="cash.inc">debt is reduced.</span> <<else>> Unfortunately this means that your <span class="cash.dec">cash reserves are gutted.</span> <</if>> <<run cashX(($cash * 0.2)-$cash, "event")>> You are not the only one affected by this however. <span class="red">The economy of the entire world is severely affected</span> by the loss of vast quantities of currency. Who knows how long will it take for the global economy to recover. <<set $SecExp.smilingMan.globalCrisisWeeks = random(8,16)>> Trade is <span class="red">severely affected.</span> <<set $SecExp.core.trade *= 0.2>> With the loss of so much information, most of your accomplishments are simply forgotten, so <span class="reputation.dec">your reputation suffers.</span> <<run repX(($rep * 0.6)-$rep, "event")>> <<if $arcologies[0].ownership >= 60>> <<if $SecExp.core.authority <= 10000>> <<set _cells = $building.findCells(cell => cell.canBeSold())>> <<set jsEither(_cells).owner = 0>> Vast amount of data relative to the ownership of the arcology is lost. You lost all legal claims to one of the sectors. <<else>> Vast amount of data relative to the ownership of the arcology is lost. You would've run the risk of losing ownership of one of the sectors, but fortunately your authority is so high your citizens do not dare question your claims even in the absence of a valid legal case. <</if>> <</if>> <<if $SecExp.buildings.secHub>> <<if $SecExp.buildings.secHub.coldstorage > 3>> Your cold storage facility has ensured that the Smiling Man's destruction of the primary archives was unable to damage the security of your arcology. <<elseif $SecExp.buildings.secHub.coldstorage == 0>> Your security department sees its archives butchered by the Smiling Man. Almost all data on criminals, citizens, and operations are lost. The <span class="red">security of the arcology is greatly reduced.</span> Criminals, on the other hand, with their past erased, cannot wait to join this new world, so <span class="red">crime will inevitably increase.</span> <<set $SecExp.core.security = Math.clamp($SecExp.core.security * 0.2,0,100)>> <<set $SecExp.core.crimeLow = Math.clamp($SecExp.core.crimeLow * 1.5, 20,100)>> <</if>> <</if>> </p> <p> A short, meek man approaches you with a weak smile. "Not all is lost, <<= properTitle()>>. We have a lead on him — he is here, in $arcologies[0].name." </p> <p>Despite the bleak situation, you cannot help but smile back.</p> <p id="result"> <div> <<link "&quot;Eliminate the threat, once and for all.&quot;">> <<set $SecExp.smilingMan.relationship--, $SecExp.smilingMan.progress++>> <<replace "#result">> You command your loyal operatives to prepare for a manhunt. <</replace>> <</link>> </div> <div> <<link "&quot;Bring him to me.&quot;">> <<set $SecExp.smilingMan.relationship++, $SecExp.smilingMan.progress++>> <<replace "#result">> You command your loyal operatives to prepare for a manhunt. <</replace>> <</link>> </div> <div> <<link "&quot;Such skill on my side would be a great boon. Find him.&quot;">> <<set $SecExp.smilingMan.relationship += 2, $SecExp.smilingMan.progress++>> <<replace "#result">> You command your loyal operatives to prepare for a manhunt. <</replace>> <</link>> </div> <div> <<link "&quot;He finally got what he always wanted. Let him have his victory, we have better things to do.&quot;">> <<set $SecExp.smilingMan.progress++>> <<set $nextButton = "Continue", $nextLink = "Random Nonindividual Event">> <<replace "#result">> You take no further action. Hopefully this ordeal is finally over. <</replace>> <</link>> </div> </p> <<elseif $SecExp.smilingMan.progress === 3>> <<set $nextButton = " ">> <<set $fcnn.push("...sometimes high-tech problems have low-tech solutions. Back to you in the...")>> <<setLocalPronouns _activeSlave>> <p> The day has come to finally put an end to this story. Your men are ready to go, waiting only on your signal. You quickly don your protective gear and proceed down the busy streets of your arcology. You carefully planned the day so that nothing could exit the arcology without being scanned at least three times and poked twice. The Smiling Man has no escape. </p> <p> After a short walk you are in front of the criminal's lair, a rundown old apartment in a scarcely populated part of the arcology. You give the order to breach and your men rush inside without problems. After a couple of seconds pass without a single noise coming from the apartment, you begin to worry. Then you hear the captain <span id="continue"> <<link "calling you inside.">> <<replace "#continue">> calling you inside. <p> <<if $seeImages == 1>> <div class="imageRef medImg"><<= SlaveArt(_activeSlave, 2, 0)>></div> <</if>> "So it was you to find me first. <<if $SecExp.smilingMan.relationship > 2>> I was hoping you would be the one! <<else>> I expected you would be the one. <</if>> Well, I hope I'm everything you expected," you hear a voice say. Despite recognizing it, you struggle to convince yourself that the little $girl in front of you is indeed the famous criminal mastermind. </p> <p style="margin-bottom: 2em"> "As you can see, I have no intention of escaping. I knew my life was over the second my plan went into effect. I accepted my end a long time ago, so feel free to do your worst; my life has already ended in triumph." </p> <p> You evaluate the situation: the burning desire of vengeance for all the damage that little twerp caused is hard to ignore, but equally so is the admiration for $his skill and determination. Indeed, $he would be a great addition to your court, as a free individual or not. </p> <p id="result"> <div> <<link "Offer $him a new life">> <<replace "#result">> <div> You decide it would be criminally wasteful to throw away such talent. You offer $him a new life at your side. $His expertise will surely guarantee safety, if not supremacy, to your arcology in cyberspace, while $he will have safety and luxury in the physical world. </div> <div> [[Continue|secExpSmilingMan][$SecExp.smilingMan.progress = 10]] </div> <</replace>> <</link>> </div> <div> <<link "Make $him pay">> <<replace "#result">> <div> You decide to end $his pitiful life. $He has crossed the wrong master of the new world $he worked so hard to create. No mercy was asked for and no mercy will be given. </div> <div> [[Continue|secExpSmilingMan][$SecExp.smilingMan.progress = 20]] </div> <</replace>> <</link>> </div> <div> <<link "Enslave $him">> <<replace "#result">> <div> You decide to enslave the $girl. $His skill may be great, but $his crimes are equally so, which makes it all the sweeter to turn $him into an obedient little toy to play with. </div> <div> [[Continue|secExpSmilingMan][$SecExp.smilingMan.progress = 30]] </div> <</replace>> <</link>> </div> </p> <</replace>> /* closes replace "#continue" */ <</link>> </span> /* closes id="continue" */ </p> <<elseif $SecExp.smilingMan.progress > 3>> <<if $SecExp.smilingMan.progress < 30>> /* 000-250-006 */ <<if $seeImages == 1>> <div class="imageRef medImg"><<= SlaveArt(_activeSlave, 2, 0)>></div> <</if>> /* 000-250-006 */ <<if $SecExp.smilingMan.progress === 10>> <p> The $girl asks for a few minutes to think about your offer, <<if $SecExp.smilingMan.relationship >= 4>> but $he quickly comes to terms with the situation and accepts. <<else>> and after some time $he reluctantly accepts. <</if>> In the following weeks $he will get acquainted with the security network of the arcology and work to protect $his new home in the new world $he has created. The world will never find out the truth of the Smiling Man and his legend will only grow with time, outliving his creator and maybe even $his new employer. </p> <p> The collaboration of the ex-Smiling Man permanently increases <span class="green">security and the rate of prosperity growth.</span> <span class="cash.inc">Cash will be also provided,</span> but you're better off not knowing the sources. </p> <<elseif $SecExp.smilingMan.progress === 20>> <<set _activeSlave.clothes = "no clothing">> <p> For such a criminal a simple execution is not enough. You order the $girl captured and crucified outside the city, with a mask resembling $his famous symbol. Your men quickly obey. $He never once shows sign of pain or fear, remaining stoic and proud to the end. Once $his life ends, you order a statue erected in commemoration of the death of the Smiling Man. From this day forward the statue of the crucified criminal will adorn your arcology and his legend will be forever entangled with yours. </p> <p> Having dealt with the Smiling Man will provide <span class="reputation.inc">a large boost to your reputation, as well as a moderate amount of reputation each week.</span> </p> <<run repX(10000, "architecture")>> <</if>> <<elseif $SecExp.smilingMan.progress === 30>> <<set _activeSlave.clothes = "no clothing">> <p style="margin-bottom: 2em"> Your men move to immobilize $him. Terror flashes through $his eyes for <<if $SecExp.smilingMan.relationship >= 4>> a second, but $he quickly recovers $his usual demeanor. <<else>> a second — $he barely manages to recover $his usual demeanor. <</if>> </p> <<includeDOM App.Desc.longSlave(_activeSlave)>> <<includeDOM App.UI.newSlaveIntro(_activeSlave)>> <</if>> <<run delete $SecExp.smilingMan.relationship>> <</if>>
MonsterMate/fc
src/Mods/SecExp/secExpSmilingMan.tw
tw
mit
23,348
:: securityReport [nobr] /* init */ <<if $ACitizens > $oldACitizens>> <<set _immigration = $ACitizens - $oldACitizens, _emigration = 0>> <<else>> <<set _emigration = $oldACitizens - $ACitizens, _immigration = 0>> /*takes into account citizens leaving and those getting enslaved*/ <</if>> <<set _secGrowth = 0>> <<set _crimeGrowth = 0>> <<set _recruitsMultiplier = 1>> <<if $useTabs == 0>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>__Security__<br><</if>> <<if $terrain === "oceanic">> Due to the @@.green;massive economic and logistical challenges@@ of attacking an oceanic arcology, your security force(s) <<else>> The @@.red;easily manageable economic and logistical challenges@@ of attacking an $terrain arcology ensure that your security force(s) do not <</if>> have the luxury of focusing exclusively on internal matters.<br> <<if (def $SecExp.buildings.secHub) && ($SecExp.buildings.secHub.menials > 0)>> <<print num($SecExp.buildings.secHub.menials)>> slaves work to improve the security of your arcology, while your <<else>> Your <</if>> <<if $mercenaries >= 1 && $arcologyUpgrade.drones == 1>> mercenaries and security drones tirelessly patrol the streets to keep them safe. <<elseif $arcologyUpgrade.drones == 1>> security drones tirelessly patrol the arcology to keep it safe. <<else>> loyal subordinates try to keep the arcology safe to the best of their abilities. <</if>> /* security modifiers */ <<if $PC.career == "mercenary">> Your past life as a mercenary makes it easier to manage the security of the arcology. <<set _secGrowth += 1>> <</if>> <<if $SecExp.smilingMan.progress === 10>> The ex-criminal known to the world as The Smiling Man puts their impressive skills to work, dramatically increasing the efficiency of your security measures. <<set _secGrowth += 2>> <</if>> <<if $ACitizens + $ASlaves <= 5000>> The small number of residents makes their job easier. <<set _secGrowth += 2>> <<elseif $ACitizens + $ASlaves <= 7500>> The fairly low number of residents makes their job a little easier. <<set _secGrowth += 1>> <<elseif $ACitizens + $ASlaves <= 10000>> The fairly high number of residents makes their job a little harder. <<set _secGrowth -= -0.5>> <<elseif $ACitizens + $ASlaves <= 15000>> The high number of residents makes their job harder. <<set _secGrowth -= 1>> <<else>> The extremely high number of residents makes their job a lot harder. <<set _secGrowth -= 2>> <</if>> <<if _immigration >= 0 && _emigration == 0>> <<if _immigration < 50>> The limited number of immigrants that reached the arcology this week does not have any serious impact on the efficiency of current security measures. <<set _secGrowth += 0.5>> <<elseif _immigration < 150>> The number of immigrants that reached the arcology this week is high enough to complicate security protocols. <<set _secGrowth -= 0.2>> <<elseif _immigration < 300>> The high number of immigrants that reached the arcology this week complicates security protocols. <<set _secGrowth -= 0.5>> <<elseif _immigration < 500>> The high number of immigrants that reached the arcology this week severely complicates security protocols. <<set _secGrowth -= 1>> <<else>> The extremely high number of immigrants that reached the arcology this week severely complicates security protocols. <<set _secGrowth -= 2>> <</if>> <</if>> <<if $visitors < 300>> The limited number of visitors coming and going did not have any serious impact on the efficiency of current security measures. <<set _secGrowth += 0.5>> <<elseif _immigration < 750>> The number of visitors coming and going somewhat complicates security protocols. <<set _secGrowth -= 0.2>> <<elseif _immigration < 1500>> The high number of visitors coming and going complicates security protocols. <<set _secGrowth -= 0.5>> <<elseif _immigration < 2500>> The high number of visitors coming and going greatly complicates security protocols. <<set _secGrowth -= 1>> <<else>> The extremely high number of visitors coming and going severely complicates security protocols. <<set _secGrowth -= 2>> <</if>> <<if _emigration != 0 && _immigration == 0>> <<if _emigration < 100>> The limited reduction in citizens this week does not have any serious impact on the efficiency of current security measures. <<set _secGrowth += 0.5>> <<elseif _emigration < 300>> The reduction in citizens this week is high enough to complicate security protocols. <<set _secGrowth -= 0.2>> <<elseif _emigration < 600>> The large reduction in citizens this week complicates security protocols. <<set _secGrowth -= 0.5>> <<elseif _emigration < 1000>> The huge reduction in citizens this week severely complicates security protocols. <<set _secGrowth -= 1>> <<else>> The extreme reduction in citizens this week severely complicates security protocols. <<set _secGrowth -= 2>> <</if>> <</if>> <<if $SecExp.core.crimeLow < 20>> Crime is a distant problem in the arcology, which makes improving security easier. <<set _secGrowth += 1>> <<elseif $SecExp.core.crimeLow < 40>> Crime is a minor problem in the arcology, not serious enough to disrupt security efforts. <<elseif $SecExp.core.crimeLow < 60>> Crime is an issue in the arcology, which makes improving security harder. <<set _secGrowth -= 0.5>> <<elseif $SecExp.core.crimeLow < 80>> Crime is an overbearing problem in the arcology, which makes improving security a lot harder. <<set _secGrowth -= 1>> <<else>> Crime is sovereign in the arcology, which makes improving security extremely difficult. <<set _secGrowth -= 2>> <</if>> <<if $SecExp.core.authority < 5000>> The low authority you hold on the arcology hampers the efforts of your security department. <<set _secGrowth -= 1>> <<elseif $SecExp.core.authority < 7500>> The limited authority you hold on the arcology hampers the efforts of your security department. <<set _secGrowth -= 0.5>> <<elseif $SecExp.core.authority < 10000>> The authority you hold on the arcology does not significantly impact the efforts of your security department. <<elseif $SecExp.core.authority < 15000>> The high authority you hold on the arcology facilitates the security department's work. <<set _secGrowth += 0.5>> <<else>> The absolute authority you hold on the arcology makes the security department's work a lot easier. <<set _secGrowth += 1>> <</if>> <<if App.SecExp.battle.activeUnits() >= 6>> Your military is the size of a small army. Security is easier to maintain with such forces at your disposal. <<set _secGrowth += 0.5>> <</if>> <<set _count = $SecExp.battles.victories + $SecExp.battles.losses>> <<if $SecExp.battles.lastEncounterWeeks < 3 && _count > 0>> The recent attack has a negative effect on the security of the arcology. <<set _secGrowth -= 1>> <<elseif $SecExp.battles.lastEncounterWeeks < 5 && _count > 0>> While some time has passed, the last attack still has a negative effect on the security of the arcology. <<set _secGrowth -= 0.5>> <<elseif _count > 0>> The arcology has not been attacked in a while, which has a positive effect on security. <<set _secGrowth += 0.5>> <</if>> <<if $SecExp.buildings.transportHub>> <<set _secGrowth -= ($SecExp.buildings.transportHub.airport + $SecExp.buildings.transportHub.surfaceTransport - $SecExp.buildings.transportHub.security * 3) / 2>> The transport hub, for all its usefulness, is a hotspot of malicious <<if $SecExp.buildings.transportHub.airport + $SecExp.buildings.transportHub.surfaceTransport > $SecExp.buildings.transportHub.security * 3>> activity and hub security forces are not sufficient to keep up with all threats. <<else>> activity, but the hub security forces are up to the task. <</if>> <</if>> <<if $SecExp.buildings.propHub && $SecExp.buildings.propHub.upgrades.blackOps > 0>> Your black ops team proves to be a formidable tool against anyone threatening the security of your arcology. <<set _secGrowth += 0.5 * random(1,2)>> <</if>> <<if $garrison.assistantTime > 0>> With the central CPU core of the assistant down, managing security is a much harder task. Inevitably some little but important details will slip past your agents. It will still take <<if $garrison.assistantTime> 1>>$garrison.assistantTime weeks<<else>>a week<</if>> to finish repair works. <<set _secGrowth-->> <<set _crimeGrowth++>> <<set $garrison.assistantTime--, IncreasePCSkills('engineering', 0.1)>> <</if>> <<if $SF.Toggle && $SF.Active >= 1>> <<if $SecExp.edicts.SFSupportLevel >= 3>> The two squads of $SF.Lower assigned to the Security HQ provide an essential help to the security department. <</if>> <<if $SecExp.edicts.SFSupportLevel >= 2>> The training officers of $SF.Lower assigned to the Security HQ improve its effectiveness. <</if>> <<if $SecExp.edicts.SFSupportLevel >= 1>> Providing your Security Department with equipment from $SF.Lower slightly boosts the security of your arcology. <</if>> <<set _secGrowth *= 1+($SecExp.edicts.SFSupportLevel/10)>> <</if>> /* resting point */ <<set _secRest = App.SecExp.Check.secRestPoint() * (Math.clamp($SecExp.buildings.secHub ? $SecExp.buildings.secHub.menials : 0 ,0 , App.SecExp.Check.reqMenials()) / App.SecExp.Check.reqMenials())>> <<if _secRest < 0>> <<set _secRest = 20>> <</if>> <<if _secRest < App.SecExp.Check.reqMenials() && $SecExp.buildings.secHub>> The limited staff assigned to the HQ hampered the improvements to security achieved this week. <<elseif _secRest < App.SecExp.Check.reqMenials()>> The limited infrastructure available slowly erodes away the security level of the arcology. <</if>> The security level of the arcology is <<if $SecExp.core.security > (_secRest + 5)>> over its effective resting point, limiting the achievable growth this week. <<set _secGrowth *= 0.5>> <<elseif $SecExp.core.security < (_secRest - 5)>> under its effective resting point, speeding up its growth. <<set _secGrowth *= 1.5>> <<elseif $SecExp.core.security == _secRest>> at its effective resting point, this severely limits the influence of external factors on the change achievable this week. <<set _secGrowth *= 0.3>> <<else>> near its effective resting point, this severely limits the influence of external factors on the change achievable this week. <<if _secGrowth < 0>> <<set _secGrowth *= 0.3>> <</if>> <</if>> <<set _restGrowth = (_secRest - $SecExp.core.security) * 0.2>> <<set _newSec = Math.trunc($SecExp.core.security + _secGrowth + _restGrowth)>> <<if _newSec < $SecExp.core.security>> This week @@.red;security decreased.@@ <<elseif _newSec == $SecExp.core.security>> This week @@.yellow;security did not change.@@ <<else>> This week @@.green;security improved.@@ <</if>> <<set $SecExp.core.security = Math.clamp(_newSec, 0, 100)>> <br><br> <strong>Crime</strong>: /* crime modifiers */ Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous Free Cities, yours included. This has a <<if $week < 30>> small <<set _crimeGrowth += 0.5>> <<elseif $week < 60>> noticeable <<set _crimeGrowth += 1>> <<elseif $week < 90>> moderate <<set _crimeGrowth += 1.5>> <<elseif $week < 120>> big <<set _crimeGrowth += 2>> <<else>> huge <<set _crimeGrowth += 2.5>> <</if>> impact on the growth of criminal activities in your arcology. <<if $arcologies[0].prosperity < 50>> The low prosperity of the arcology facilitates criminal recruitment and organization. <<set _crimeGrowth += 1>> <<elseif $arcologies[0].prosperity < 80>> The fairly low prosperity of the arcology facilitates criminal recruitment and organization. <<set _crimeGrowth += 0.5>> <<elseif $arcologies[0].prosperity < 120>> The prosperity of the arcology is not high or low enough to have significant effects on criminal recruitment and organization. <<elseif $arcologies[0].prosperity < 160>> The prosperity of the arcology is high enough to provide its citizens a decent life, hampering criminal recruitment and organization. <<set _crimeGrowth -= 0.5>> <<elseif $arcologies[0].prosperity < 180>> The prosperity of the arcology is high enough to provide its citizens a decent life, significantly hampering criminal recruitment and organization. <<set _crimeGrowth -= 1>> <<else>> The prosperity of the arcology is high enough to provide its citizens a very good life, significantly hampering criminal recruitment and organization. <<set _crimeGrowth -= 2>> <</if>> <<if $ASlaves < 1000>> The low number of slaves in the arcology does not hinder the activity of law enforcement, limiting crime growth. <<set _crimeGrowth -= 1>> <<elseif $ASlaves < 2000>> The fairly low number of slaves in the arcology does not hinder significantly the activity of law enforcement, limiting crime growth. <<set _crimeGrowth -= 0.5>> <<elseif $ASlaves < 3000>> The number of slaves in the arcology is becoming an impediment for law enforcement, facilitating crime growth. <<set _crimeGrowth += 1>> <<else>> The number of slaves in the arcology is becoming a big issue for law enforcement, facilitating crime growth. <<set _crimeGrowth += 1.5>> <</if>> <<if $SecExp.core.security <= 20>> The security measures in place are severely limited, allowing crime to grow uncontested. <<elseif $SecExp.core.security <= 50>> The security measures in place are of limited effect and use, giving only mixed results in their fight against crime. <<set _crimeGrowth -= 1.5>> <<elseif $SecExp.core.security <= 75>> The security measures in place are well developed and effective, making a serious dent in the profitability of criminal activity in your arcology. <<set _crimeGrowth -= 3>> <<else>> The security measures in place are extremely well developed and very effective, posing a serious threat even to the most powerful criminal organizations in existence. <<set _crimeGrowth -= 5.5>> <</if>> <<if $SecExp.core.authority < 5000>> Your low authority allows crime to grow undisturbed. <<set _crimeGrowth += 1>> <<elseif $SecExp.core.authority < 7500>> Your relatively low authority facilitates criminal activities. <<set _crimeGrowth += 0.5>> <<elseif $SecExp.core.authority < 10000>> Your authority is not high enough to discourage criminal activity. <<elseif $SecExp.core.authority < 15000>> Your high authority is an effective tool against crime. <<set _crimeGrowth -= 1>> <<else>> Your absolute authority is an extremely effective tool against crime. <<set _crimeGrowth -= 2>> <</if>> <<if $cash >= 100000>> Your great wealth acts as a beacon for the greediest criminals, calling them to your arcology as moths to a flame. <<set _crimeGrowth += 0.5>> <</if>> <<if $SecExp.buildings.propHub && $SecExp.buildings.propHub.upgrades.marketInfiltration > 0>> <<set _crimeGrowth += 0.5 * random(1,2)>> <</if>> /* crime cap */ <<set _crimeCap = Math.trunc(Math.clamp(App.SecExp.Check.crimeCap() + (App.SecExp.Check.crimeCap() - App.SecExp.Check.crimeCap() * (($SecExp.buildings.secHub ? $SecExp.buildings.secHub.menials : 0) / App.SecExp.Check.reqMenials())), 0, 100))>> <<if _crimeCap > App.SecExp.Check.crimeCap() && $SecExp.buildings.secHub>> The limited staff assigned to the HQ allows more space for criminals to act. <</if>> <<if $SecExp.core.authority > 12000>> <<if $SecExp.buildings.secHub.coldstorage < 6>> <<if $SecExp.buildings.secHub.coldstorage === 0>>Adding a facility<<else>>Improving the cold storage facility attached<</if>> to the SecurityHQ should allow the staff to be more efficient in dealing with crime. <<else>> The cold storage facility attached to SecurityHQ allows the staff to be more efficient in dealing with crime. <</if>> <</if>> <<set _newCrime = Math.trunc(Math.clamp($SecExp.core.crimeLow + _crimeGrowth,0,_crimeCap))>> <<if _newCrime > $SecExp.core.crimeLow>> This week @@.red;crime increased.@@ <<elseif _newCrime == $SecExp.core.crimeLow>> This week @@.yellow;crime did not change.@@ <<else>> This week @@.green;crime decreased.@@ <</if>> <<set $SecExp.core.crimeLow = Math.clamp(_newCrime,0,100)>> <<if $SecExp.edicts.defense.militia >= 1 || App.SecExp.battle.activeUnits() >= 1>> <<set _size = App.SF.upgrades.total()>> <br><br> <strong>Military</strong>: <<if $SecExp.edicts.defense.militia >= 1>> <<if $SF.Toggle && $SF.Active >= 1 && _size > 10>> Having a powerful special force attracts a lot of citizens, hopeful that they may be able to fight along side it. <<set _recruitsMultiplier *= 1 + (random(1, (Math.round(_size / 10))) / 20)>> /* not sure how high _size goes, so I hope this makes sense */ <</if>> <<set _propagandaEffects = App.SecExp.propagandaEffects("recruitment")>> _propagandaEffects.text <<set _recruitsMultiplier *= (1 + _propagandaEffects.effect)>> <<if $SecExp.edicts.defense.militia === 2>> Your militia accepts only volunteering citizens, ready to defend their arcology. <<set _recruitLimit = App.SecExp.militiaCap(), _adjst = 0.0025>> <<if $rep >= 10000>> Many citizens volunteer just to fight for someone of your renown. <<set _recruitLimit += _adjst>> <</if>> <<if $SecExp.core.authority >= 10000>> Many citizens feel it is their duty to fight for you, boosting volunteer enrollment. <<set _recruitLimit += _adjst>> <</if>> <<elseif $SecExp.edicts.defense.militia === 3>> Adult citizens are required to join the militia for a period of time. <<set _recruitLimit = App.SecExp.militiaCap(), _adjst = 0.005>> <<elseif $SecExp.edicts.defense.militia === 4>> Adult citizens are required to register and serve in the militia whenever necessary. <<set _recruitLimit = App.SecExp.militiaCap(), _adjst = 0.01>> <<elseif $SecExp.edicts.defense.militia === 5>> Every citizen is required to train and participate in the military activities of the arcology. <<set _recruitLimit = App.SecExp.militiaCap(), _adjst = 0.02>> <</if>> <<if $SecExp.edicts.defense.lowerRequirements == 1>> Your lax physical requirements to enter the militia allows for a greater number of citizens to join. <<set _recruitLimit += _adjst>> <</if>> <<if $SecExp.edicts.defense.militia >= 3>> <<if $SecExp.edicts.defense.militaryExemption === 1>> Some citizens prefer to contribute to the arcology's defense through financial support rather than military service, making you @@.yellowgreen;a small sum.@@ <<set _recruitLimit -= _adjst>> <<run cashX(250, "securityExpansion")>> <</if>> <<if $SecExp.edicts.defense.noSubhumansInArmy === 1>> Guaranteeing the purity of your armed forces comes with a small loss of potential recruits. <<set _recruitLimit -= _adjst>> <</if>> <<if $SecExp.edicts.defense.pregExemption === 1>> Many pregnant citizens prefer to avoid military service not to endanger themselves and their children. <<set _recruitLimit -= _adjst>> <</if>> <</if>> <<set _recruits = Math.trunc((_recruitLimit * $ACitizens - App.SecExp.Manpower.totalMilitia) / 20 * _recruitsMultiplier)>> <<if _recruits > 0>> <<set $militiaFreeManpower += _recruits>> This week <<print _recruits>> citizens joined the militia. <<elseif $SecExp.edicts.defense.militia === 5>> No citizens joined your militia this week because your society is as militarized as it can get. <<elseif $SecExp.edicts.defense.militia === 2>> There are no more citizens willing to join the arcology armed forces. You'll need to enact higher recruitment edicts if you need more manpower. <<else>> No more citizens could be drafted into your militia. You'll need to enact higher recruitment edicts if you need more manpower. <</if>> <br> <</if>> /* mercs */ <<if $mercenaries >= 1>> <<set _newMercs = random(0,3)>> <<if $rep < 6000>> Your low reputation turns some mercenaries away, hoping to find contracts that would bring them more renown. <<set _newMercs -= 1>> <<elseif $rep < 12000>> Your reputation is not high enough to attract many mercenaries to your free city. <<else>> Your reputation attracts many guns for hire who would be proud to have such distinct character on their resume. <<set _newMercs += 1>> <</if>> <<if $arcologies[0].prosperity < 50>> The low prosperity of the arcology discourages new guns for hire from coming to your arcology. <<set _newMercs -= 1>> <<elseif $arcologies[0].prosperity < 80>> The fairly low prosperity of the arcology discourages new guns for hire from coming to your arcology. <<set _newMercs += 1>> <<elseif $arcologies[0].prosperity < 120>> The prosperity of the arcology attracts a few mercenaries, hopeful to find lucrative contracts within its walls. <<set _newMercs += random(1,2)>> <<elseif $arcologies[0].prosperity < 160>> The fairly high prosperity of the arcology attracts some mercenaries, hopeful to find lucrative contracts within its walls. <<set _newMercs += random(2,3)>> <<elseif $arcologies[0].prosperity < 180>> The high prosperity of the arcology is attracts some mercenaries, hopeful to find lucrative contracts within its walls. <<set _newMercs += random(2,4)>> <<else>> The very high prosperity of the arcology attracts a lot of mercenaries, hopeful to find lucrative contracts within its walls. <<set _newMercs += random(3,5)>> <</if>> <<if $SecExp.core.crimeLow > 60>> The powerful crime organizations that nested themselves in the arcology have an unending need for cheap guns for hire, many mercenaries flock to your free city in search of employment. <<set _newMercs += random(1,2)>> <</if>> <<if $SF.Toggle && $SF.Active >= 1 && _size > 10>> Having a powerful special force attracts a lot of mercenaries, hopeful that they may be able to fight along side it. <<set _newMercs += random(1,Math.round(_size/10))>> <</if>> <<if $SecExp.edicts.defense.discountMercenaries > 0>> More mercenaries are attracted to your arcology as a result of the reduced rent. <<set _newMercs += random(2,4)>> <</if>> <<set _newMercs = Math.trunc(_newMercs / 2)>> <<if _newMercs > 0>> <<set $mercFreeManpower += _newMercs>> This week <<print _newMercs>> mercenaries reached the arcology. <<else>> This week no new mercenaries reached the arcology. <</if>> <<set $mercFreeManpower = Math.clamp($mercFreeManpower, 0, 2000)>> <br> <</if>> <<if App.SecExp.battle.activeUnits() > 0>> /* loyalty and training */ <<set _sL = $slaveUnits.length, _mL = $militiaUnits.length, _meL = $mercUnits.length>> <<for _i = 0; _i < _sL; _i++>> <<includeDOM App.SecExp.humanUnitLoyaltyChanges($slaveUnits[_i], 'slave')>> <</for>> <<for _i = 0; _i < _mL; _i++>> <<includeDOM App.SecExp.humanUnitLoyaltyChanges($militiaUnits[_i], 'citizens')>> <</for>> <<for _i = 0; _i < _meL; _i++>> <<includeDOM App.SecExp.humanUnitLoyaltyChanges($mercUnits[_i], 'mercenary')>> <</for>> <</if>> <</if>> <<if $SecExp.buildings.riotCenter && $SecExp.buildings.riotCenter.brainImplantProject > 0 && $SecExp.buildings.riotCenter.brainImplant < 106>> <br><br> <<set $SecExp.buildings.riotCenter.brainImplant += $SecExp.buildings.riotCenter.brainImplantProject>> <<if 100 - $SecExp.buildings.riotCenter.brainImplant <= 0>> The project has been completed! <<set $SecExp.buildings.riotCenter.brainImplant = 106>> <<else>> The great brain implant project is proceeding steadily. This week we made <<if $SecExp.buildings.riotCenter.brainImplantProject <= 2>> some small <<elseif $SecExp.buildings.riotCenter.brainImplantProject <= 4>> some <<else>> good <</if>> progress. <</if>> <</if>> <<if $SecExp.buildings.weapManu>> <<if App.SecExp.weapManuUpgrade.fully().bots && App.SecExp.weapManuUpgrade.fully().human>> <<run delete $SecExp.buildings.weapManu.upgrades.queue>> <</if>> <<if jsDef($SecExp.buildings.weapManu.upgrades.queue) && $SecExp.buildings.weapManu.upgrades.queue.length > 0 && $SecExp.buildings.weapManu.upgrades.queue[0].time > 0>> <<set _current = App.SecExp.weapManuUpgrade.current(), $SecExp.buildings.weapManu.upgrades.queue[0].time-->> <br>In the research lab, _current.dec <<switch _current.dec>> <<case "adaptive armored frames" "advanced synthetic alloys" "ceramo-metallic alloys" "rapid action stimulants" "universal cyber enhancements" "remote neural links" "combined training regimens with the special force">> are <<default>> is <</switch>> being developed with the aim of enhancing _current.unit' _current.purpose. <<if $SecExp.buildings.weapManu.upgrades.queue[0].time <= 0>> Reports indicate it is ready for deployment and will be issued in the following days. <<set $SecExp.buildings.weapManu.upgrades.completed.push(_current.ID)>> <<run $SecExp.buildings.weapManu.upgrades.queue.splice(0, 1)>> <<else>> It will be finished in <<= numberWithPluralOne($SecExp.buildings.weapManu.upgrades.queue[0].time, "week")>>. <</if>> <<for _i = 1; _i < $SecExp.buildings.weapManu.upgrades.queue.length; _i++>> <<set _current = App.SecExp.weapManuUpgrade.current($SecExp.buildings.weapManu.upgrades.queue[_i].ID)>> <br><<= ordinalSuffix(_i + 1)>> in queue: _current.dec for _current.unit. It will enhance their _current.purpose. <</for>> <</if>> <</if>>
MonsterMate/fc
src/Mods/SecExp/securityReport.tw
tw
mit
25,115
:: unitsBattleReport [nobr] <<if $losses == 0>> <<if App.SecExp.battle.deployedUnits('bots')>> <br>Security Drones: no casualties. <</if>> <<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> <br><<print num($SF.ArmySize)>> soldiers from $SF.Lower joined the battle: no casualties suffered. <</if>> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> <<for _j = 0; _j < $militiaUnits.length; _j++>> <<if $militiaUnits[_j].isDeployed == 1>> <br>$militiaUnits[_j].platoonName: no casualties. <<set $militiaUnits[_j].battlesFought++>> <<if $militiaUnits[_j].training < 100>> <<if random(1,100) > 60>> Experience has increased. <<set $militiaUnits[_j].training += random(5,15) + $majorBattle * random(5,15)>> <</if>> <</if>> <</if>> <</for>> <</if>> <<if App.SecExp.battle.deployedUnits('slaves') >= 1>> <<for _j = 0; _j < $slaveUnits.length; _j++>> <<if $slaveUnits[_j].isDeployed == 1>> <br>$slaveUnits[_j].platoonName: no casualties. <<set $slaveUnits[_j].battlesFought++>> <<if $slaveUnits[_j].training < 100>> <<if random(1,100) > 60>> Experience has increased. <<set $slaveUnits[_j].training += random(5,15) + $majorBattle * random(5,15)>> <</if>> <</if>> <</if>> <</for>> <</if>> <<if App.SecExp.battle.deployedUnits('mercs') >= 1>> <<for _j = 0; _j < $mercUnits.length; _j++>> <<if $mercUnits[_j].isDeployed == 1>> <br>$mercUnits[_j].platoonName: no casualties. <<set $mercUnits[_j].battlesFought++>> <<if $mercUnits[_j].training < 100>> <<if random(1,100) > 60>> Experience has increased. <<set $mercUnits[_j].training += random(5,15) + $majorBattle * random(5,15)>> <</if>> <</if>> <</if>> <</for>> <</if>> <<elseif $losses > 0>> /* if the losses are more than zero */ /* generates a list of randomized losses, from which each unit picks one at random */ <<set _losses = $losses>> <<set _averageLosses = Math.trunc(_losses / App.SecExp.battle.deployedUnits())>> <<set _lossesList = []>> <<set _validityCount = 0>> <<for _i = 0; _i < App.SecExp.battle.deployedUnits(); _i++>> <<set _assignedLosses = Math.trunc(Math.clamp(_averageLosses + random(-5,5), 0, 100))>> <<if _assignedLosses > _losses>> <<set _assignedLosses = _losses>> <<set _losses = 0>> <<else>> <<set _losses -= _assignedLosses>> <</if>> <<set _lossesList.push(_assignedLosses)>> <<set _validityCount += _assignedLosses>> <</for>> <<if _losses > 0>> <<set _lossesList[random(_lossesList.length - 1)] += _losses>> <</if>> <<set _lossesList.shuffle()>> /* sanity check for losses */ <<set _count = 0>> <<for _i = 0; _i < _lossesList.length; _i++>> <<if !Number.isInteger(_lossesList[_i])>> <<set _lossesList[_i] = 0>> <</if>> <<set _count += _lossesList[_i]>> <</for>> <<if _count < $losses>> <<set _rand = random(_lossesList.length - 1)>> <<set _lossesList[_rand] += $losses - _count>> <<elseif _count > $losses>> <<set _diff = _count - $losses>> <<set _rand = random(_lossesList.length - 1)>> <<set _lossesList[_rand] = Math.trunc(_lossesList[_rand]-_diff,0,100)>> <</if>> /* assigns the losses and notify the player */ <<if App.SecExp.battle.deployedUnits('bots')>> <<set _loss = _lossesList.pluck()>> <<set _loss = Math.clamp(_loss,0,$secBots.troops)>> <<set $secBots.troops -= _loss>> <br>Security drones: <<if _loss <= 0>> no casualties <<elseif _loss <= $secBots.troops * 0.2>> light casualties <<elseif _loss <= $secBots.troops * 0.4>> moderate casualties <<elseif _loss <= $secBots.troops * 0.6>> heavy casualties <<else>> catastrophic casualties <</if>> suffered. <<if $secBots.troops <= 5>> <<set $secBots.active = 0>> Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. It will take quite the investment to rebuild them. <<elseif $secBots.troops <= 10>> The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> <br> <</if>> <<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>> <<set _loss = _lossesList.pluck()>> <<set _loss = Math.clamp(_loss,0,$SF.ArmySize)>> <br> <<print num($SF.ArmySize)>> soldiers from $SF.Lower joined the battle: <<if _loss <= 0>> no casualties <<elseif _loss <= 10>> light casualties <<elseif _loss <= 30>> moderate casualties <<elseif _loss <= 60>> heavy casualties <<else>> catastrophic casualties <</if>> suffered. <<set $SF.ArmySize -= _loss>> <br> <</if>> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> <<for _j = 0; _j < $militiaUnits.length; _j++>> <<if $militiaUnits[_j].isDeployed == 1>> <<set $militiaUnits[_j].battlesFought++>> <<set _loss = _lossesList.pluck()>> <<set _loss = Math.clamp(_loss,0,$militiaUnits[_j].troops)>> <br>$militiaUnits[_j].platoonName: <<if _loss <= 0>> no casualties <<elseif _loss <= $militiaUnits[_j].troops * 0.2>> light casualties <<elseif _loss <= $militiaUnits[_j].troops * 0.4>> moderate casualties <<elseif _loss <= $militiaUnits[_j].troops * 0.6>> heavy casualties <<else>> catastrophic casualties <</if>> suffered. <<set _med = Math.round(Math.clamp(_loss * $militiaUnits[_j].medics * 0.25,1,_loss))>> <<if $militiaUnits[_j].medics == 1 && _loss > 0>> Some men were saved by their medics. <</if>> <<set $militiaUnits[_j].troops -= Math.trunc(Math.clamp(_loss - _med,0,$militiaUnits[_j].maxTroops))>> <<set $militiaTotalCasualties += Math.trunc(_loss - _med)>> <<if $militiaUnits[_j].training < 100>> <<if random(1,100) > 60>> Experience has increased. <<set $militiaUnits[_j].training += random(5,15) + $majorBattle * random(5,15)>> <</if>> <</if>> <<if $militiaUnits[_j].troops <= 5>> <<set $militiaUnits[_j].active = 0>> <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. <<elseif $militiaUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> <</if>> <</for>> <</if>> <<if App.SecExp.battle.deployedUnits('slaves') >= 1>> <<for _j = 0; _j < $slaveUnits.length; _j++>> <<if $slaveUnits[_j].isDeployed == 1>> <<set $slaveUnits[_j].battlesFought++>> <<set _loss = _lossesList.pluck()>> <<set _loss = Math.clamp(_loss,0,$slaveUnits[_j].troops)>> <br>$slaveUnits[_j].platoonName: <<if _loss <= 0>> no casualties <<elseif _loss <= $slaveUnits[_j].troops * 0.2>> light casualties <<elseif _loss <= $slaveUnits[_j].troops * 0.4>> moderate casualties <<elseif _loss <= $slaveUnits[_j].troops * 0.6>> heavy casualties <<else>> catastrophic casualties <</if>> suffered. <<set _med = Math.round(Math.clamp(_loss * $slaveUnits[_j].medics * 0.25,1,_loss))>> <<if $slaveUnits[_j].medics == 1 && _loss > 0>> Some men were saved by their medics. <</if>> <<set $slaveUnits[_j].troops -= Math.trunc(Math.clamp(_loss - _med,0,$slaveUnits[_j].maxTroops))>> <<set $slavesTotalCasualties += Math.trunc(_loss - _med)>> <<if $slaveUnits[_j].training < 100>> <<if random(1,100) > 60>> Experience has increased. <<set $slaveUnits[_j].training += random(5,15) + $majorBattle * random(5,15)>> <</if>> <</if>> <<if $slaveUnits[_j].troops <= 5>> <<set $slaveUnits[_j].active = 0>> <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The survivors will be sent home honored as veterans or reorganized in a new unit. <<elseif $slaveUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> <</if>> <</for>> <</if>> <<if App.SecExp.battle.deployedUnits('mercs') >= 1>> <<for _j = 0; _j < $mercUnits.length; _j++>> <<if $mercUnits[_j].isDeployed == 1>> <<set $mercUnits[_j].battlesFought++>> <<set _loss = _lossesList.pluck()>> <<set _loss = Math.clamp(_loss,0,$mercUnits[_j].troops)>> <br>$mercUnits[_j].platoonName: <<if _loss <= 0>> no casualties <<elseif _loss <= $mercUnits[_j].troops * 0.2>> light casualties <<elseif _loss <= $mercUnits[_j].troops * 0.4>> moderate casualties <<elseif _loss <= $mercUnits[_j].troops * 0.6>> heavy casualties <<else>> catastrophic casualties <</if>> suffered. <<set _med = Math.round(Math.clamp(_loss * $mercUnits[_j].medics * 0.25,1,_loss))>> <<if $mercUnits[_j].medics == 1 && _loss > 0>> Some men were saved by their medics. <</if>> <<set $mercUnits[_j].troops -= Math.trunc(Math.clamp(_loss - _med,0,$mercUnits[_j].maxTroops))>> <<set $mercTotalCasualties += Math.trunc(_loss - _med)>> <<if $mercUnits[_j].training < 100>> <<if random(1,100) > 60>> Experience has increased. <<set $mercUnits[_j].training += random(5,15) + $majorBattle * random(5,15)>> <</if>> <</if>> <<if $mercUnits[_j].troops <= 5>> <<set $mercUnits[_j].active = 0>> <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. <<elseif $mercUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> <</if>> <</for>> <</if>> <<else>> <br>@@.red;Error: losses are a negative number or NaN@@ <</if>> /* closes check for more than zero casualties */
MonsterMate/fc
src/Mods/SecExp/unitsBattleReport.tw
tw
mit
10,030
:: unitsRebellionReport [nobr] <<if $losses == 0>> <<if $irregulars > 0>> <p>The volunteering citizens were quickly organized into an irregular militia unit and deployed in the arcology. No casualties suffered.</p> <</if>> <<if App.SecExp.battle.deployedUnits('bots') >= 1>> <p>Security drones: no casualties suffered.</p> <</if>> <<if $SF.Toggle && $SF.Active >= 1>> <br>$SF.Lower, <<print num($SF.ArmySize)>> strong, was called to join the battle: no casualties suffered. <</if>> <<set _count = 0>> <<set _loyalUnits = $militiaUnits.length + $slaveUnits.length + $mercUnits.length - $rebellingID.length>> <<if _loyalUnits > 0>> <p> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].active == 1 && (!$rebellingID.includes($militiaUnits[_i].ID))>> <<set $militiaUnits[_i].battlesFought++>> <<set _count++>> <<if _count < _loyalUnits>> $militiaUnits[_i].platoonName, <<else>> $militiaUnits[_i].platoonName <</if>> <</if>> <</for>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].active == 1 && (!$rebellingID.includes($slaveUnits[_i].ID))>> <<set $slaveUnits[_i].battlesFought++>> <<set _count++>> <<if _count < _loyalUnits>> $slaveUnits[_i].platoonName, <<else>> $slaveUnits[_i].platoonName <</if>> <</if>> <</for>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].active == 1 && (!$rebellingID.includes($mercUnits[_i].ID))>> <<set $mercUnits[_i].battlesFought++>> <<set _count++>> <<if _count < _loyalUnits>> $mercUnits[_i].platoonName, <<else>> $mercUnits[_i].platoonName <</if>> <</if>> <</for>> participated in the battle without taking any casualties. They remained loyal until the end. </p> <</if>> <<elseif $losses > 0>> /* if the losses are more than zero */ /* generates a list of randomized losses, from which each unit picks one at random */ <<set _averageLosses = Math.trunc($losses / App.SecExp.battle.deployedUnits())>> <<set _lossesList = []>> <<for _i = 0; _i < App.SecExp.battle.deployedUnits(); _i++>> <<set _assignedLosses = Math.trunc(Math.clamp(_averageLosses + random(-5,5), 0, 100))>> <<if _assignedLosses > $losses>> <<set _assignedLosses = $losses>> <<set $losses = 0>> <<else>> <<set $losses -= _assignedLosses>> <</if>> <<set _lossesList.push(_assignedLosses)>> <</for>> <<if $losses > 0>> <<set _lossesList[random(_lossesList.length - 1)] += $losses>> <</if>> <<set _lossesList.shuffle()>> /* sanity check for losses */ <<set _count = 0>> <<for _i = 0; _i < _lossesList.length; _i++>> <<if !Number.isInteger(_lossesList[_i])>> <<set _lossesList[_i] = 0>> <</if>> <<set _count += _lossesList[_i]>> <</for>> <<if _count < $losses>> <<set _rand = random(_lossesList.length - 1)>> <<set _lossesList[_rand] += $losses - _count>> <<elseif _count > $losses>> <<set _diff = _count - $losses>> <<set _rand = random(_lossesList.length - 1)>> <<set _lossesList[_rand] = Math.trunc(_lossesList[_rand]-_diff,0,100)>> <</if>> /* assigns the losses and notify the player */ <<if $irregulars > 0>> <<set _loss = _lossesList.pluck()>> <<if _loss > $ACitizens * 0.95>> <<set _loss = Math.trunc($ACitizens * 0.95)>> /* this is unlikely to happen, but might as well be safe*/ <</if>> <p>The volunteering citizens were quickly organized into an irregular militia unit and deployed in the arcology: <<if _loss <= 0>> no casualties <<elseif _loss <= 10>> light casualties <<elseif _loss <= 30>> moderate casualties <<elseif _loss <= 60>> heavy casualties <<else>> catastrophic casualties <</if>> suffered. <<if _loss > $lowerClass * 0.95>> /*I suspect only lower class ever get to fight/die, but being safe*/ <<set $lowerClass = Math.trunc($lowerClass * 0.05), _loss -= Math.trunc($lowerClass * 0.95)>> <<if _loss > $middleClass * 0.95>> <<set $middleClass = Math.trunc($middleClass * 0.05), _loss -= Math.trunc($middleClass *0.95)>> <<if _loss > $upperClass * 0.95>> <<set $upperClass = Math.trunc($upperClass * 0.05), _loss -= Math.trunc($upperClass * 0.95)>> <<if _loss > $topClass * 0.95>> <<set $topClass = Math.trunc($topClass * 0.05)>> <<else>> <<set $topClass -= _loss>> <</if>> <<else>> <<set $upperClass -= _loss>> <</if>> <<else>> <<set $middleClass -= _loss>> <</if>> <<else>> <<set $lowerClass -= _loss>> <</if>> </p> <</if>> <<if $secBots.active == 1>> <<set _loss = _lossesList.pluck()>> <<set _loss = Math.clamp(_loss,0,$secBots.troops)>> <<set $secBots.troops -= _loss>> <p>Security drones: <<if _loss <= 0>> no casualties <<elseif _loss <= 10>> light casualties <<elseif _loss <= 30>> moderate casualties <<elseif _loss <= 60>> heavy casualties <<else>> catastrophic casualties <</if>> suffered. <<if $secBots.troops <= 0>> <<set $secBots.active = 0>> Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. It will take quite the investment to rebuild them. <<elseif $secBots.troops <= 10>> The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> </p> <</if>> <<if $SF.Toggle && $SF.Active >= 1>> <<set _loss = _lossesList.pluck()>> <<set _loss = Math.clamp(_loss,0,$SF.ArmySize)>> <p> <<= capFirstChar($SF.Lower || "the special force")>>, $SF.ArmySize strong, is called to join the battle: <<set $SF.ArmySize -= _loss>> <<if _loss <= 0>> no casualties <<elseif _loss <= 10>> light casualties <<elseif _loss <= 30>> moderate casualties <<elseif _loss <= 60>> heavy casualties <<else>> catastrophic casualties <</if>> suffered. </p> <</if>> <<if App.SecExp.battle.deployedUnits('militia') >= 1>> <p> <<set _med = 0>> <<for _j = 0; _j < $militiaUnits.length; _j++>> <<if $militiaUnits[_j].active == 1 && !$rebellingID.includes($militiaUnits[_j].ID)>> <<set $militiaUnits[_j].battlesFought++>> <<set _loss = _lossesList.pluck()>> <<set _loss = Math.clamp(_loss,0,$militiaUnits[_j].troops)>> <br>$militiaUnits[_j].platoonName participated in the battle. They remained loyal to you. <<if _loss <= 0>> No casualties <<elseif _loss <= $militiaUnits[_j].troops * 0.2>> Light casualties <<elseif _loss <= $militiaUnits[_j].troops * 0.4>> Moderate casualties <<elseif _loss <= $militiaUnits[_j].troops * 0.6>> Heavy casualties <<else>> Catastrophic casualties <</if>> suffered. <<set _med = Math.round(Math.clamp(_loss * $militiaUnits[_j].medics * 0.25,1,_loss))>> <<if $militiaUnits[_j].medics == 1 && _loss > 0>> Some men were saved by their medics. <</if>> <<set $militiaUnits[_j].troops -= Math.trunc(Math.clamp(_loss - _med,0,$militiaUnits[_j].maxTroops))>> <<set $militiaTotalCasualties += Math.trunc(_loss - _med)>> <<if $militiaUnits[_j].training < 100>> <<if random(1,100) > 60>> Experience has increased. <<set $militiaUnits[_j].training += random(5,15) + $majorBattle * random(5,15)>> <</if>> <</if>> <<if $militiaUnits[_j].troops <= 0>> <<set $militiaUnits[_j].active = 0>> <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. <<elseif $militiaUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> <</if>> <</for>> </p> <</if>> <<if App.SecExp.battle.deployedUnits('slaves') >= 1>> <p> <<set _med = 0>> <<for _j = 0; _j < $slaveUnits.length; _j++>> <<if $slaveUnits[_j].active == 1 && !$rebellingID.includes($slaveUnits[_j].ID)>> <<set $slaveUnits[_j].battlesFought++>> <<set _loss = _lossesList.pluck()>> <<if !(Number.isInteger(_loss))>> <br>@@.red;Error: failed to assign losses, input was negative or NaN@@ <<break>> <</if>> <<set _loss = Math.clamp(_loss,0,$slaveUnits[_j].troops)>> <br>$slaveUnits[_j].platoonName participated in the battle. They remained loyal to you. <<if _loss <= 0>> No casualties <<elseif _loss <= $slaveUnits[_j].troops * 0.2>> Light casualties <<elseif _loss <= $slaveUnits[_j].troops * 0.4>> Moderate casualties <<elseif _loss <= $slaveUnits[_j].troops * 0.6>> Heavy casualties <<else>> Catastrophic casualties <</if>> suffered. <<set _med = Math.round(Math.clamp(_loss * $slaveUnits[_j].medics * 0.25,1,_loss))>> <<if $slaveUnits[_j].medics == 1 && _loss > 0>> Some men were saved by their medics. <</if>> <<set $slaveUnits[_j].troops -= Math.trunc(Math.clamp(_loss - _med,0,$slaveUnits[_j].maxTroops))>> <<set $slavesTotalCasualties += _loss - _med>> <<if $slaveUnits[_j].training < 100>> <<if random(1,100) > 60>> Experience gained. <<set $slaveUnits[_j].training += random(5,15) + $majorBattle * random(5,15)>> <</if>> <</if>> <<if $slaveUnits[_j].troops <= 0>> <<set $slaveUnits[_j].active = 0>> <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The survivors will be sent home honored as veterans or reorganized in a new unit. <<elseif $slaveUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> <</if>> <</for>> </p> <</if>> <<if App.SecExp.battle.deployedUnits('mercs') >= 1>> <p> <<set _med = 0>> <<for _j = 0; _j < $mercUnits.length; _j++>> <<if $mercUnits[_j].active == 1 && !$rebellingID.includes($mercUnits[_j].ID)>> <<set $mercUnits[_j].battlesFought++>> <<set _loss = _lossesList.pluck()>> <<set _loss = Math.clamp(_loss,0,$mercUnits[_j].troops)>> <br>$mercUnits[_j].platoonName participated in the battle. They remained loyal to you. <<if _loss <= 0>> No casualties <<elseif _loss <= $mercUnits[_j].troops * 0.2>> Light casualties <<elseif _loss <= $mercUnits[_j].troops * 0.4>> Moderate casualties <<elseif _loss <= $mercUnits[_j].troops * 0.6>> Heavy casualties <<else>> Catastrophic casualties <</if>> suffered. <<set _med = Math.round(Math.clamp(_loss * $mercUnits[_j].medics * 0.25,1,_loss))>> <<if $mercUnits[_j].medics == 1 && _loss > 0>> Some men were saved by their medics. <</if>> <<set $mercUnits[_j].troops -= Math.trunc(Math.clamp(_loss - _med,0,$mercUnits[_j].maxTroops))>> <<set $mercTotalCasualties += Math.trunc(_loss - _med)>> <<if $mercUnits[_j].training < 100>> <<if random(1,100) > 60>> Experience gained. <<set $mercUnits[_j].training += random(5,15) + $majorBattle * random(5,15)>> <</if>> <</if>> <<if $mercUnits[_j].troops <= 0>> <<set $mercUnits[_j].active = 0>> <br>Unfortunately the losses they took were simply too great, their effective combatants are in so small number you can no longer call them a deployable unit. The remnants will be sent home honored as veterans or reorganized in a new unit. <<elseif $mercUnits[_j].troops <= 10>> <br>The unit has very few operatives left, it risks complete annihilation if deployed again. <</if>> <</if>> <</for>> </p> <</if>> <<else>> <br>@@.red;Error: losses are a negative number or NaN@@ <</if>> <<if $rebellingID.length > 0 && $battleResult >= 2>> /* rebellion win */ <br> <<set _militiaRebelledID = [], _militiaManpower = 0>> <<for _j = 0; _j < $militiaUnits.length; _j++>> <<if $militiaUnits[_j].active == 1 && $rebellingID.includes($militiaUnits[_j].ID)>> <br>$militiaUnits[_j].platoonName, <<set _militiaRebelledID.push($militiaUnits[_j].ID)>> <<set _militiaManpower += Math.clamp($militiaUnits[_j].troops - random(_averageLosses),0,$militiaUnits[_j].troops)>> <</if>> <</for>> <<if _militiaRebelledID.length > 0>> had the gall to betray you and join your enemies. <span id="militiaResult"> <br><<link "Dissolve the units">> <<run $militiaUnits.deleteWith((u) => _militiaRebelledID.includes(u.ID))>> <<set $militiaFreeManpower += _militiaManpower>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].active == 1>> <<set $militiaUnits[_i].loyalty = Math.clamp($militiaUnits[_i].loyalty - random(10,40),0,100)>> <</if>> <</for>> <<replace "#militiaResult">> <br>Units dissolved. <</replace>> <</link>> <br>//Manpower will be refunded, but will negatively influence the loyalty of the other units// <br><<link "Purge the dissidents and dissolve the units">> <<run $militiaUnits.deleteWith((u) => _militiaRebelledID.includes(u.ID))>> <<set $militiaFreeManpower += _militiaManpower * 0.5>> <<replace "#militiaResult">> <br>Dissidents purged and units dissolved. <</replace>> <</link>> <br>//Will not influence the loyalty of the other units, but only half the manpower will be refunded.// <br><<link "Execute them all">> <<run $militiaUnits.deleteWith((u) => _militiaRebelledID.includes(u.ID))>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $militiaUnits[_i].active == 1>> <<set $militiaUnits[_i].loyalty = Math.clamp($militiaUnits[_i].loyalty + random(10,40),0,100)>> <</if>> <</for>> <<replace "#militiaResult">> <br>Units executed. Dissent will not be tolerated. <</replace>> <</link>> <br>//Will positively influence the loyalty of the other units, but no manpower will be refunded.// </span> <</if>> <br> <<set _slaveRebelledID = [], _slaveManpower = 0>> <<for _j = 0; _j < $slaveUnits.length; _j++>> <<if $slaveUnits[_j].active == 1 && $rebellingID.includes($slaveUnits[_j].ID)>> <br>$slaveUnits[_j].platoonName, <<set _slaveRebelledID.push($slaveUnits[_j].ID)>> <<set _slaveManpower += Math.clamp($slaveUnits[_j].troops - random(_averageLosses),0,$slaveUnits[_j].troops)>> <</if>> <</for>> <<if _slaveRebelledID.length > 0>> decided in their blind arrogance to betray you. <span id="slaveResult"> <br><<link "Dissolve the units">> <<run $slaveUnits.deleteWith((u) => _slaveRebelledID.includes(u.ID))>> <<set $menials += _slaveManpower>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $slaveUnits[_i].active == 1>> <<set $slaveUnits[_i].loyalty = Math.clamp($slaveUnits[_i].loyalty - random(10,40),0,100)>> <</if>> <</for>> <<replace "#slaveResult">> <br>Units dissolved. <</replace>> <</link>> <br>//Manpower will be refunded, but will negatively influence the loyalty of the other units// <br><<link "Purge the dissidents and dissolve the units">> <<run $slaveUnits.deleteWith((u) => _slaveRebelledID.includes(u.ID))>> <<set $menials += _slaveManpower * 0.5>> <<replace "#slaveResult">> <br>Dissidents purged and units dissolved. <</replace>> <</link>> <br>//Will not influence the loyalty of the other units, but only half the manpower will be refunded.// <br><<link "Execute them all">> <<run $slaveUnits.deleteWith((u) => _slaveRebelledID.includes(u.ID))>> <<for _i = 0; _i < $slaveUnits.length; _i++>> <<if $slaveUnits[_i].active == 1>> <<set $slaveUnits[_i].loyalty = Math.clamp($slaveUnits[_i].loyalty + random(10,40),0,100)>> <</if>> <</for>> <<replace "#slaveResult">> <br>Units executed. Dissent will not be tolerated. <</replace>> <</link>> <br>//Will positively influence the loyalty of the other units, but no manpower will be refunded.// </span> <</if>> <br> <<set _mercRebelledID = [], _mercManpower = 0>> <<for _j = 0; _j < $mercUnits.length; _j++>> <<if $mercUnits[_j].active == 1 && $rebellingID.includes($mercUnits[_j].ID)>> <br>$mercUnits[_j].platoonName, <<set _mercRebelledID.push($mercUnits[_j].ID)>> <<set _mercManpower += Math.clamp($mercUnits[_j].troops - random(_averageLosses),0,$mercUnits[_j].troops)>> <</if>> <</for>> <<if _mercRebelledID.length > 0>> made the grave mistake of betraying you. <span id="mercResult"> <br><<link "Dissolve the units">> <<run $mercUnits.deleteWith((u) => _mercRebelledID.includes(u.ID))>> <<set $mercFreeManpower += _mercManpower>> <<for _i = 0; _i < $militiaUnits.length; _i++>> <<if $mercUnits[_i].active == 1>> <<set $mercUnits[_i].loyalty = Math.clamp($mercUnits[_i].loyalty - random(10,40),0,100)>> <</if>> <</for>> <<replace "#mercResult">> <br>Units dissolved. <</replace>> <</link>> <br>//Manpower will be refunded, but will negatively influence the loyalty of the other units// <br><<link "Purge the dissidents and dissolve the units">> <<run $mercUnits.deleteWith((u) => _mercRebelledID.includes(u.ID))>> <<set $mercFreeManpower += _mercManpower * 0.5>> <<replace "#mercResult">> <br>Dissidents purged and units dissolved. <</replace>> <</link>> <br>//Will not influence the loyalty of the other units, but only half the manpower will be refunded.// <br><<link "Execute them all">> <<run $mercUnits.deleteWith((u) => _mercRebelledID.includes(u.ID))>> <<for _i = 0; _i < $mercUnits.length; _i++>> <<if $mercUnits[_i].active == 1>> <<set $mercUnits[_i].loyalty = Math.clamp($mercUnits[_i].loyalty + random(10,40),0,100)>> <</if>> <</for>> <<replace "#mercResult">> <br>Units executed. Dissent will not be tolerated. <</replace>> <</link>> <br>//Will positively influence the loyalty of the other units, but no manpower will be refunded.// </span> <</if>> <<elseif $rebellingID.length > 0>> /* rebellion loss */ <br><br> <<set _militiaRebelledID = []>> <<for _j = 0; _j < $militiaUnits.length; _j++>> <<if $militiaUnits[_j].active == 1 && $rebellingID.includes($militiaUnits[_j].ID)>> <<set _militiaRebelledID.push($militiaUnits[_j].ID)>> $militiaUnits[_j].platoonName, <</if>> <</for>> <<if _militiaRebelledID.length > 0>> had the gall to betray you and join your enemies. They participated in the looting following the battle, then vanished in the wastes. <</if>> <<run cashX(forceNeg(1000 * _militiaRebelledID.length), "war")>> <<run $militiaUnits.deleteWith((u) => _militiaRebelledID.includes(u.ID))>> <br> <<set _slaveRebelledID = []>> <<for _j = 0; _j < $slaveUnits.length; _j++>> <<if $slaveUnits[_j].active == 1 && $rebellingID.includes($slaveUnits[_j].ID)>> <<set _slaveRebelledID.push($slaveUnits[_j].ID)>> $slaveUnits[_j].platoonName, <</if>> <</for>> <<if _slaveRebelledID.length > 0>> decided in their blind arrogance to betray you. They participated in the looting following the battle, then vanished in the wastes. <</if>> <<run cashX(forceNeg(1000 * _slaveRebelledID.length), "war")>> <<run $slaveUnits.deleteWith((u) => _slaveRebelledID.includes(u.ID))>> <br> <<set _mercRebelledID = []>> <<set _count = 0>> <<for _j = 0; _j < $mercUnits.length; _j++>> <<if $mercUnits[_j].active == 1 && $rebellingID.includes($mercUnits[_j].ID)>> <<set _mercRebelledID.push($mercUnits[_j].ID)>> <<set _count++>> $mercUnits[_j].platoonName, <</if>> <</for>> <<if _mercRebelledID.length > 0>> made the grave mistake of betraying you. They participated in the looting following the battle, then vanished in the wastes. <</if>> <<run cashX(forceNeg(1000 * _mercRebelledID.length), "war")>> <<run $mercUnits.deleteWith((u) => _mercRebelledID.includes(u.ID))>> <</if>>
MonsterMate/fc
src/Mods/SecExp/unitsRebellionReport.tw
tw
mit
19,853
:: SFColonelSexDec <<switch $SF.Colonel.Core>> <<case "shell shocked">> <span id="result7"> <br>The entire time it is obvious that The Colonel is reliving a horrible event. <br><<link "Try to bring her back">> <<replace "#result7">> "You made an attempt to try to bring her back to the present." <</replace>> <</link>> <br><<link "Leave her be">> <<replace "#result7">> "It is probably better that she tries to deal with her demons alone." <</replace>> <</link>> </span> <<default>> <br>Inset sex noises here. <</switch>>
MonsterMate/fc
src/Mods/SpecialForce/ColonelSexDec.tw
tw
mit
557
:: Firebase [nobr jump-to-safe jump-from-safe] <<set _max = App.SF.upgrades.max(), _Env = App.SF.env(), _size = App.SF.upgrades.total()>> <<if $SF.FS.Tension > 100>> <<= App.SF.fsIntegration.badOutcome()>> <<else>> <<set $nextButton = "Back", $nextLink = "Main">> <<if $cheatMode > 0 || $debugMode > 0>> [[Edit|editSF][]] <br> <</if>> The firebase of $arcologies[0].name's <<textbox "$SF.Lower" $SF.Lower "Firebase">> is located in the lower levels, occupying unneeded warehouse space. It is not accessible to the general citizenry, but your personal elevator has express service to it. As you step off, two soldiers in combat armor manning the entry checkpoint tense before recognizing their Marshal and stepping aside with a sharp salute.<br> You make your way to the operations center. The Colonel is <<if random(1,100) > 25>>glancing between her tablet and the large wallscreen, occasionally taking notes or barking orders. <<elseif random(1,100) > 25>>handling a minor issue.<<else>>examining a table with a map of the surrounding area, planning maneuvers in the event of an attack.<</if>> She notices your entrance and turns her attention to you. <<if $SF.Colonel.Core === "brazen">> She gives a textbook salute. "<<= properTitle()>>, how can I help you?" <<else>> "Hey boss, what do you need?" <</if>> <br> <<link "Tour the firebase" "FirebaseTour">> <</link>> <br> <<if _size === _max>> <br>There are no more upgrades available. <<run delete $SF.Upgrade>> <</if>> <<if $SF.FS.Tension !== -1>> The Colonel's current Tension: $SF.FS.Tension<</if>> <<run App.UI.tabBar.handlePreSelectedTab($tabChoice.Firebase)>> <div class="tab-bar"> <<if _size !== _max>> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Upgrades')" id="tab Upgrades">Upgrades</button> <</if>> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'Actions')" id="tab Actions">Actions</button> <button class="tab-links" onclick="App.UI.tabBar.openTab(event, 'FS')" id="tab FS">Future Societies</button> </div> <div id="Upgrades" class="tab-content"> <div class="content"> <<set _T1 = App.SF.unlocked.secondTier()>> Total upgrade progress: <<print App.SF.progress(_size,_max)>> _size/_max(<<print (_size/_max).toFixed(2)*100>>%) <<if _size < 30>> <br>//<<print (30-_size)>> more upgrades is needed until the next tier unlocks.// <</if>> <<if $SF.Upgrade > 0>> <<set _cost = Math.ceil(10000 + ((0.03 - (_size/_max)/100) * $SF.CreditsInvested))>> <br>[[Re-unlock upgrading.|Firebase][$SF.Upgrade = 0,cashX(-(_cost), "specialForcesCap")]] @@.red;<<print cashFormat(_cost)>>@@ <<elseif _size < 30 || _size !== _max>> <<include "Upgrades">> <</if>> </div> </div> <div id="Actions" class="tab-content"> <div class="content"> <<if $SF.MercCon.CanAttend === 0 || $SF.MercCon.History >= 1 && ((Math.trunc($week/24) === ($week/24)) && $SF.MercCon.CanAttend === -1)>> Her expression changes as something jogs her memory. "Before we begin <<if $SF.Colonel.Core == "brazen">><<= properTitle()>><<else>>boss<</if>> <<if $SF.MercCon.CanAttend === 0>> , back when I was a merc me and a couple of my old friends would have a meetup every several months. Drinking, fucking, drugs... a little poker. It eventually grew into a whole thing, and now we bring our latest and greatest toys to show off, maybe make some money off selling the schematics. I'd like to continue going, for old times' sake." <<elseif $SF.MercCon.History >= 1 && ((Math.trunc($week/24) === ($week/24)) && $SF.MercCon.CanAttend === -1)>> , that biannual merc meetup has come around again. You've already gave me leave to attend, but I just wanted to be sure I'm still clear to go." <</if>> <br>[[Grant leave|Firebase][$SF.MercCon.CanAttend = 1]] <br>[[Request she remain on site|Firebase][$SF.MercCon.CanAttend = -2]] <br> <</if>> <span id="result0"> <<if $SF.MercCon.History >= 1>> <<link "Mercenary meetup report">> <<replace "#result0">> While at the recent merc meetup, The Colonel made @@.yellowgreen;<<print cashFormat(Math.ceil($SF.MercCon.Income))>>@@ selling generic schematics to her friends, <<print num($SF.MercCon.Menials)>> menial slaves were won in a poker game, and <<print num($SF.MercCon.Mercs)>> mercenaries were persuaded to join $SF.Lower. <br>Total earnings thus far: @@.yellowgreen;<<print cashFormat(Math.ceil($SF.MercCon.Revenue))>>@@ in income, <<print num($SF.MercCon.TotalMenials)>> menial slaves and <<print num($SF.MercCon.TotalMercs)>> mercenaries joined across $SF.MercCon.History meetups. <<link "Back" "Firebase">> <</link>> <</replace>> <</link>> <br><br> <</if>> </span> <<if $SF.UC.Lock < 1>> <<switch $SF.UC.Assign>> <<case 0>> No soldiers are working undercover, which would primarily advance your cultural goals while also slightly boosting your reputation. <br>[[Full time assignment|Firebase][$SF.UC.Lock = 1]] <br>[[Reassign soldiers|Firebase][$SF.UC.Assign = -1]] <<case 1>> A small section of soldiers are working undercover, which will primarily advance your cultural goals while also slightly boosting your reputation. [[Full time assignment|Firebase][$SF.UC.Lock = 1]] <br>[[Reassign soldiers|Firebase][$SF.UC.Assign = -1]] <<case 2>> A large section of soldiers are working undercover, which will primarily advance your cultural goals while also slightly boosting your reputation. [[Full time assignment|Firebase][$SF.UC.Lock = 1]] <br>[[Reassign soldiers|Firebase][$SF.UC.Assign = -1]] <<default>> Would you like to assign soldiers to undercover duty, which will primarily advance your cultural goals while also slightly boosting your reputation? <br>[[Do not assign soldiers to work undercover|Firebase][$SF.UC.Assign = 0]] <br>[[Assign a small section of soldiers to work undercover|Firebase][$SF.UC.Assign = 1]] <br>[[Assign a large section of soldiers to work undercover|Firebase][$SF.UC.Assign = 2]] <</switch>> <<else>> <<if $SF.UC.Assign < 1>>''Zero''<<elseif $SF.UC.Assign < 2>>A ''small'' section<<else>>A ''large'' section<</if>> of the special force is assigned to undercover work, which will primarily advance your cultural goals while also slightly boosting your reputation. [[Re-allocate the units|Firebase][$SF.UC.Lock = 0]] <</if>> <<= App.SF.Interactions()>> <<include "WC">> </div> </div> <div id="FS" class="tab-content"> <div class="content"> <<= App.SF.fsIntegration.menu()>> </div> </div> <</if>>
MonsterMate/fc
src/Mods/SpecialForce/Firebase.tw
tw
mit
6,601
:: Security Force Naming-Colonel [nobr] <<set $nextButton = " ">> <<if $SF.IntroProgress === -1>> <<setNonlocalPronouns $seeDicks>> You instruct $assistant.name to announce to the arcology's citizenry that you will be making an important announcement in the near future regarding the security situation. Given the damage still present from the Daughters' attack, everyone will be tuning in. You also instruct your assistant to begin quietly investigating potential leadership figures for the force itself. It's been a short while since you told your citizens that you were going to talk to them about their security, and by all accounts, they've turned out in force to watch your address over the arcology's internal communications system. You wake up early, relieve your frustrations on a few slaves woken out of deep sleep, and take position behind your desk. You also call over a slave and push _himU under your desk. The unspoken instruction is clear, and _heU begins enthusiastically <<if $PC.dick > 0>> sucking your cock, taking it as deep as _heU can without gagging. <<else>> eating you out, pressing _hisU face into your pussy and forcing _hisU tongue deep inside you. <</if>> <br><br> A blinking light tells you that the channel is open. You take a deep breath, and begin. You greet your citizens and explain that while you believe deeply in the underlying principles of the Free Cities, recent events have forced you to modify some of your views. The old world attack from the outside and the more recent assault by the Daughters of Liberty from within has proven that some form of permanent, organized standing force is needed to ensure the personal safety of the citizen body. <br><br> You tell them that the old world continues to deteriorate. You tell them that it is only a matter of time before the poor, diseased, starving, and unwashed masses try their hand at invading the arcology again. You tell them that such a force would be good for business, securing trade routes and conducting slaving raids far greater in scale than those performed by private slaving corporations. And finally, to quell their greatest fear, you tell them that you would personally support the force financially. <br><br> As you speak, you carefully monitor the citizens' opinions as indicated on their communication devices. It is uniformly positive — they know whom they have to thank for their continued survival and dominance. You also monitor your arousal given the ministrations of your slave. A few small movements on your part communicate to your citizens what is happening without being too obvious. Free Cities business etiquette respects business conducted while being subtly serviced (and your doing so during such a public and important broadcast signals how seriously you are taking it), but a climax would be seen as a serious lack of discipline. <br><br> You finally wrap up your speech, declaring yourself Marshal of the newly-formed <<textbox "$SF.Lower" $SF.Lower "Security Force Naming-Colonel">> <br><br> You close the link to the communication system and read a message from your assistant that appeared during the last moments of your address. In consultation with major figures in the mercenary community, a suitable candidate for day-to-day command of the new unit has been found. Your instructions were to keep you in the dark about them so as to avoid prejudgment. They are waiting outside your office. <br><br> [[Invite them inside|Security Force Naming-Colonel][$SF.IntroProgress = 1]] <<elseif $SF.IntroProgress === 1>> The figure that enters is not what you were expecting, given your previous experiences with the mercenary groups that work with the arcology owners of the Free Cities. Most mercenaries you've worked with have been grizzled stout men, veterans of the old world militaries that finally had too much and went private. Instead, a woman walks in. <<if $SF.Colonel.Core === "">> She strikes you as someone who is likely to be: <br><br>[[Kind|Security Force Naming-Colonel][$SF.Colonel.Core = "kind"]] <br>[[Cruel and psychopathic|Security Force Naming-Colonel][$SF.Colonel.Core = "cruel"]] <br>[[A brazen warmonger|Security Force Naming-Colonel][$SF.Colonel.Core = "brazen"]] <br>[[Jaded|Security Force Naming-Colonel][$SF.Colonel.Core = "jaded"]] <br>[[Shell-shocked|Security Force Naming-Colonel][$SF.Colonel.Core = "shell shocked"]] <<else>> <<setNonlocalPronouns $seeDicks>> She is likely to be ''$SF.Colonel.Core''. <br><br> She strides in, stopping in front of your desk, <<switch $SF.Colonel.Core>> <<case "kind">> pulling off a laid-back salute with an easy grin. <<case "cruel">> her eyes flashing a hard glare in an instant before quickly softening into those of someone who wants something you have. <<case "brazen">> snapping off a textbook salute that decades of hard service grills into a veteran. <<default>> not bothering to put on even the semi-military air (complete with salute) that most mercenaries tend to adopt when meeting new clients. <</switch>> She is very tall and wearing the pants, boots, gloves, and the tank top undershirt of a standard female combat uniform. Her bare arms and upper body are corded with muscle, and through the tank top's thin fabric you can see both the shape of her muscled abdomen and the curves of her small but perky breasts, complete with what your experience tells you are barbell nipple piercings. Her eyes are alive with intelligence, and you can see her scanning your office, clearly impressed by its opulence. Her hair is shaved close to the scalp, and her ears and nose are heavily pierced. You can make out three long, ugly scars running over top of the mottled tissue of a previous, severe burn along one side of her face, as well as numerous smaller scars and burns on her bare arms. She's been disarmed prior to meeting you; the pistol holster on her hip lies empty, as do at least three knife holsters about her person. <br><br> Returning your gaze to her face, she crosses her arms underneath her chest, pressing her breasts up and forward. You have her measure. Given the generally patriarchal nature of both the mercenary community, and the same nature combined with the heavily sexualized lifestyle of the Free Cities, she's decided to embrace her position rather than fight it. <br><br> "So," she begins, "you're the boss." You invite her to sit down. "No thanks, boss. Besides," she <<switch $SF.Colonel.Core>> <<case "kind">> playfully <<case "shell shocked">> uncomfortably <</switch>> indicates the slave under your desk, "you look a little occupied." She nods at the camera across from you. "Saw the speech. Very nice. I'd heard you crazy bastards do business while getting <<if $PC.dick > 0>>sucked off<<else>>eaten out<</if>>, but I've never seen anyone actually do it. Hell, most of you people don't want to have to have too much to do with a merc like me. I usually get my instructions remotely." <<switch $SF.Colonel.Core>> <<case "brazen" "jaded">> A short, harsh laugh escapes her. "But I guess it keeps you focused. Can't have the entire arcology seeing you cum." <<case "kind">> She grins. "That kind of thing doesn't really bother me though." <<case "cruel">> She frowns. "The client always seems to be happier that way." <</switch>> <br><br> She moves a step closer. "Your computer-helper-thing told me you wanted me to be a surprise, so I guess I'll tell you why you want me to run $SF.Lower for you. I'm a killer, pure and simple,<<if $SF.Colonel.Core === "cruel">>" she smiles, "<</if>>and you need that. I looked into those attacks you've suffered. Nasty business. I'll make sure that an attack like that never happens again. I was a soldier out there, in charge of about a thousand men when the Free Cities first started going up, and I knew they were the future. Eventually I deserted, found the first refugee convoy I could, killed the moron protecting it, sold the girls off to slavers, and bought enough gear to start killing for people like you. Ran my own merc crew, did well till we tried to take on a bigger one and everyone died." <<switch $SF.Colonel.Core>> <<case "shell shocked">> She looks away, caught in her own memories. It takes a solid minute before she starts again. <<case "cruel">> Her smile grows. <<default>> She pauses for a moment. <</switch>> "Joined with another big outfit, became the number two, then shit went bad and I had to run. Been a solo fighter and slaver ever since. I know my work, and I know I can make this work." <br><br> You feel your climax approaching and hold up a finger. The merc pauses while you grab the slave's head <<if $PC.dick > 0>> then force your cock roughly down _hisU throat while you cum. _HeU swallows as much as _heU can before pulling <<else>> tightly with your thighs, pressing _hisU face tightly against your pussy as you cum. When you release _himU, _heU pulls <</if>> away, coughing. <br><br> <<if $SF.Colonel.Core === "shell shocked">> The merc looks away again, letting the _girlU settle down before continuing. <<else>> The merc laughs again. "I could get used to a place like this." <</if>> She waves her hand around the office. "I bet you want to know why I'd be trustworthy for something like this." You don't correct her. "Thought so." Her demeanor softens, and you can detect a hit of nervousness. "I would say that I've never turned on a client and leave it at that, but this is different. It's getting worse out there. I'm sure you know that." You give her a slight nod. "Four times now I've woken up in the middle of the night and had to kill <<if $SF.Colonel.Core == "shell shocked">> someone." <<else>> someone. Two of them were the people I'd taken to bed. You can't even trust your drunken fucks anymore. <<switch $SF.Colonel.Core>> <<case "kind">> It's a shame, but that's the world we live in." <<case "cruel">> Then again, who doesn't like a good hard fuck and stab?" <<default>> But what else is new?" <</switch>> <</if>> <br><br> <<if $SF.Colonel.Core == "jaded" || $SF.Colonel.Core == "shell shocked">> "All I know how to do at this point is fight, and that's kept me alive this far. <<else>> "I like fighting, but I want to live somewhere where I can relax from life out there. <</if>> You give me the job and a place to live, let me hang up the uncertainty of being a merc, and I'll die for you if it comes to that. I promise the people I recruit will feel the same. Besides," she grins, "I could get used to <<switch $SF.Colonel.Core>> <<case "brazen">> crushing any enemy that looks our way." <<case "cruel">> <<setNonlocalPronouns $seeDicks>> having my own stable to abuse as I see fit. A terrified little slave<<= _girlU>> locked between my legs, struggling to breathe?" <<default>> spending my R&R time with a cold beer in one hand, a few lines of coke or a stack of pills in front of me." <</switch>> A glint runs through her eyes. "Sounds like a good fucking time." <br><br> You quickly decide she'll do. You tap a few commands on your desk's console, assigning her personal quarters on the arcology's higher levels and transferring her first stipend to her new account. You also ask her what title she wants. <br><br> "Title?" Another short laugh. "I guess I do need one, given that I'm all official and shit now." She thinks for a moment. "I was a major before I went freelance, and I think I'd like a promotion. Colonel sounds good." You make a note of this in her file. "You people don't seal contracts with a fuck do you?" Reassuring her you don't, she laughs again. "Good. I make it a point never to fuck the boss. It's bad for business." She turns around. "Well, I guess I'd better get to it. Your helper-thing assigned me space on the lower levels for the firebase. I brought a few squads of guys I know from the old days to start, but we'll grow fast once I put the word out, I guarantee it." <br><br> [[Let her leave|Security Force Naming-Colonel][$SF.IntroProgress = 2]] <</if>> <<elseif $SF.IntroProgress === 2>> <<set $nextLink = "RIE Eligibility Check",$nextButton = "Continue">> <<run delete $SF.IntroProgress>> She turns and leaves, and you chase the slave out after her. A few minutes later, a soft chime announces the arrival of a message. It's from The Colonel. <br><br> //Hey boss, just wanted to mention something else. In your speech you said that you were going to be paying for $SF.Lower. In my mind that means it's yours, no matter what anyone else here might think. I do what you tell me to do. I make sure the troops behave as you want them to behave. I've worked for some 'nice guys' in the past, and I can do that job if you want. It's boring, but sustainable, and I'll have $SF.Lower turning a profit and supporting the arcology in good order. But if you let me <<if $SF.Colonel.Core === "cruel">>off the leash<<else>>do what I do<</if>> and throw any old world complaints in the trash where they belong, I promise you'll have money pouring into your coffers, even accounting for the good amounts me and my boys will pocket along the way. You'll have an empire in short order. <<if $mercenaries > 1>> Either way, I'll keep my hands off those mercs you've already installed. I figure that you've reasons for having two different death squads under contract. <</if>> <br><br> Oh, one last thing. I know you've got some kind of grand social experiment going on up there like all the other arc owners, and that's your own deal, but I'd appreciate it if you could keep that stuff out of the new barracks. I'll have a hard time approaching potential recruits and telling them they should come live in a Roman apartment, an Egyptian temple, a goddamn Japanese teahouse, or some of the other crazy shit I've seen in the past. They're hard, nasty people, and trust me, I can tell you from experience that changing that is just not going to happen. Like I said, though, I can hold them back a bit if you like. <br><br> Talk to you later, boss.// <</if>>
MonsterMate/fc
src/Mods/SpecialForce/NamingColonel.tw
tw
mit
14,189
:: Security Force Proposal [nobr] <<set $nextButton = " ", _price = 20000>> The Free Cities were founded on the principles of unrestrained anarcho-capitalism. To those with such beliefs, the very idea of possessing an armed force, a key tool of government control, or weapons at all, was anathema. <br><br> In the period since, however, your citizens have seen the value in weaponry. They watched on their news-feed as some Free Cities were sacked by the armies and mobs of the old world, driven by their hatred of the citizens' luxurious lifestyles. They've seen other Cities toppled from within, by slave conspiracies or infighting among citizen groupings with differing beliefs. They've witnessed the distressingly rapid rise of fanatical anti-slavery organizations, who would like nothing more than to see them slowly bled by their own chattel. They are learned people, and they know what happens to slaveowners who lose their power. <br><br> They've also seen the results of your policies. Your actions towards the arming of both yourself and the arcology proved critical, and ensured their safety when the old world came for them. And your victory over the Daughters of Liberty, who the citizens know would have executed every single one of them, has created an opportunity. If you insisted upon the creation of a standing 'special' force for the arcology, many would support you and, more importantly, nobody of note would object. <br><br> Such a force would solve many problems. More soldiers would mean more control, which is very good for you. More soldiers would mean more security for the arcology and the approaches to it, which is very good for business. More soldiers would mean more obedience from rebellious slaves who can see how powerless they truly are, which is very good for everybody. The force would be tiny compared to the old world militaries that still exist, but money and technology can, of course, overcome massive numerical inferiority. This being the Free Cities, they would have other uses besides security. Perhaps, in time, you could exert some manner of influence on the old world itself. <br><br> ''This is a unique and very important opportunity'', and is possible only because of your recent victory over the Daughters. If you do not seize it, the memories and fears of your citizens will fade, and you will not be able to raise the matter again. <<if $PC.skill.warfare >= 100>> <<set _price *= 0.5>> <<elseif $PC.skill.warfare >= 50 || $PC.career == "arcology owner">> <<set _price *= 0.75>> <</if>> <br>[[Prepare for an announcement.|Security Force Naming-Colonel][$SF.Active = 1, $SF.IntroProgress = -1, App.SF.Init(), cashX(forceNeg(_price), "specialForcesCap")]] <br>&nbsp;//Initial costs are @@.yellowgreen;<<print cashFormat(_price)>>@@ and upon establishment the force will have significant support costs until it is self-sufficient.// <br>[[The current measures are enough|RIE Eligibility Check][$SF.Active = 0, delete $SF.IntroProgress]]
MonsterMate/fc
src/Mods/SpecialForce/Proposal.tw
tw
mit
2,990
// @ts-nocheck /* no-usedOnce */ App.SF.BC = function() { function InitClean() { delete V.SFMODToggle; delete V.securityForceActive; delete V.securityForceCreate; delete V.securityForceEventSeen; } function MainClean() { delete V.securityForceActive; delete V.securityForceRecruit; delete V.securityForceTrade; delete V.securityForceBooty; delete V.securityForceIncome; delete V.securityForceMissionEfficiency; delete V.securityForceProfitable; delete V.TierTwoUnlock; delete V.securityForceDepravity; delete V.SFAO; delete V.securityForceUpgradeTokenReset; delete V.securityForceUpgradeToken; delete V.securityForceGiftToken; delete V.securityForceRulesOfEngagement; delete V.securityForceFocus; delete V.securityForceAccountability; delete V.securityForceName; delete V.SubsidyActive; delete V.securityForceSubsidyActive; } function ColonelClean() { delete V.ColonelCore; delete V.securityForceColonelToken; delete V.securityForceColonelSexed; delete V.ColonelRelationship; delete V.securityForceSexedColonelToken; } function TradeShowClean() { delete V.OverallTradeShowAttendance; delete V.CurrentTradeShowAttendance; delete V.TradeShowIncome; delete V.TotalTradeShowIncome; delete V.TradeShowHelots; delete V.TotalTradeShowHelots; } function UnitsClean() { delete V.securityForceInfantryPower; delete V.securityForceArcologyUpgrades; delete V.securityForceVehiclePower; delete V.securityForceDronePower; delete V.securityForceStimulantPower; delete V.securityForceHeavyBattleTank; delete V.securityForceAircraftPower; delete V.securityForceSpacePlanePower; delete V.securityForceAC130; delete V.securityForceSatellitePower; delete V.securityForceGiantRobot; delete V.securityForceMissileSilo; delete V.securityForceAircraftCarrier; delete V.securityForceSubmarine; delete V.securityForceHeavyAmphibiousTransport; delete V.securityForcePersonnel; delete V.securityForceFortressZeppelin; delete V.securityForceHeavyTransport; } if (typeof V.SF !== "object") { if (V.securityForceEventSeen < 1) { V.securityForceActive = -1; } else { V.securityForceActive = 2; } V.SF = {Toggle: V.SFMODToggle, Active: V.securityForceActive}; InitClean(); if (V.securityForceName === undefined) { V.securityForceName = "the special force"; } if (V.SF.Active >= 1) { Object.assign(V.SF, { Depravity: V.securityForceDepravity, Upgrade: V.securityForceUpgradeToken, Gift: V.securityForceGiftToken, UC: {Assign: V.SF.SpecOps, Lock: V.SF.SpecOpsLock}, ROE: V.securityForceRulesOfEngagement, Target: V.securityForceFocus, Regs: V.securityForceAccountability, Lower: V.securityForceName, }); MainClean(); if (V.ColonelCore === undefined) { V.ColonelCore = ""; } if (V.ColonelDiscussion === undefined) { V.ColonelDiscussion = 0; } if (V.ColonelSexed === undefined) { V.ColonelSexed = 0; } V.SF.Colonel = { Core: V.ColonelCore, Talk: V.securityForceColonelToken, Fun: V.securityForceColonelSexed, Status: V.ColonelRelationship }; ColonelClean(); if (V.TradeShowIncome === undefined) { V.TradeShowIncome = 0; } if (V.TotalTradeShowIncome === undefined) { V.TotalTradeShowIncome = 0; } if (V.TradeShowHelots === undefined) { V.TradeShowHelots = 0; } if (V.TotalTradeShowHelots === undefined) { V.TotalTradeShowHelots = 0; } V.SF.MercCon = { History: V.OverallTradeShowAttendance, CanAttend: V.CurrentTradeShowAttendance, Income: V.TradeShowIncome, Revenue: V.TotalTradeShowIncome, Menials: V.TradeShowHelots, TotalMenials: V.TotalTradeShowHelots, Mercs: 0, TotalMercs: 0 }; TradeShowClean(); if (V.SF.MercCon.History > 0) { V.SF.MercCon.CanAttend = 1; } if (V.securityForceHeavyBattleTank === undefined) { V.securityForceHeavyBattleTank = 0; } if (V.securityForceSpacePlanePower === undefined) { V.securityForceSpacePlanePower = 0; } if (V.securityForceAC130 === undefined) { V.securityForceAC130 = 0; } if (V.securityForceSatellitePower === undefined) { V.securityForceSatellitePower = 0; } if (V.securityForceGiantRobot === undefined) { V.securityForceGiantRobot = 0; } if (V.securityForceMissileSilo === undefined) { V.securityForceMissileSilo = 0; } if (V.securityForceAircraftCarrier === undefined) { V.securityForceAircraftCarrier = 0; } if (V.securityForceSubmarine === undefined) { V.securityForceSubmarine = 0; } if (V.securityForceHeavyAmphibiousTransport === undefined) { V.securityForceHeavyAmphibiousTransport = 0; } V.SF.ArmySize = V.securityForcePersonnel; V.SF.SatLaunched = 0; V.SF.Squad = { Armoury: V.securityForceInfantryPower, Firebase: V.securityForceArcologyUpgrades, AV: V.securityForceVehiclePower, TV: V.securityForceVehiclePower, Drones: V.securityForceDronePower, Drugs: V.securityForceStimulantPower, PGT: V.securityForceHeavyBattleTank, AA: V.securityForceAircraftPower, TA: V.securityForceAircraftPower, SpacePlane: V.securityForceSpacePlanePower, GunS: V.securityForceAC130, Satellite: V.securityForceSatellitePower, GiantRobot: V.securityForceGiantRobot, MissileSilo: V.securityForceMissileSilo, AircraftCarrier: V.securityForceAircraftCarrier, Sub: V.securityForceSubmarine, HAT: V.securityForceHeavyAmphibiousTransport }; UnitsClean(); } else { App.SF.Init(); } } else if (typeof V.SF === "object") { V.SF.FS = V.SF.FS || {}; V.SF.FS.Tension = V.SF.FS.Tension || -1; if (V.SF.Toggle && V.SF.Active >= 1) { const FS_OPTIONS = App.SF.fsIntegration.list().all; for (let i = 0; i < FS_OPTIONS.length; i++) { V.SF.FS[FS_OPTIONS[i]] = V.SF.FS[FS_OPTIONS[i]] || {}; V.SF.FS[FS_OPTIONS[i]].lv = V.SF.FS[FS_OPTIONS[i]].lv || 0; V.SF.FS[FS_OPTIONS[i]].gift = V.SF.FS[FS_OPTIONS[i]].gift || 0; delete V.SF.FS[FS_OPTIONS[i]].validOption; } V.SF.UC = V.SF.UC || {}; V.SF.Depravity = V.SF.Depravity || 0; V.SF.Upgrade = V.SF.Upgrade || 0; V.SF.CreditsInvested = V.SF.CreditsInvested || 0; V.SF.Gift = V.SF.Gift || 0; V.SF.UC.Assign = V.SF.UC.Assign || 0; V.SF.UC.Lock = V.SF.UC.Lock || 0; V.SF.ROE = V.SF.ROE || "hold"; V.SF.Target = V.SF.Target || "recruit"; V.SF.Regs = V.SF.Regs || "strict"; V.SF.Lower = V.SF.Lower || "the special force"; V.SF.ArmySize = V.SF.ArmySize || 40; V.SF.Squad = V.SF.Squad || {}; for (let i = 0; i < App.SF.upgrades.list('all').length; i++) { V.SF.Squad[App.SF.upgrades.list('all')[i]] = V.SF.Squad[App.SF.upgrades.list('all')[i]] || 0; } V.SF.SatLaunched = V.SF.SatLaunched || 0; V.SF.Colonel = V.SF.Colonel || {}; V.SF.Colonel.Core = V.SF.Colonel.Core || ""; V.SF.Colonel.Talk = V.SF.Colonel.Talk || 0; V.SF.Colonel.Fun = V.SF.Colonel.Fun || 0; V.SF.Colonel.Status = V.SF.Colonel.Status || 0; V.SF.MercCon = V.SF.MercCon || {}; V.SF.MercCon.History = V.SF.MercCon.History || 0; V.SF.MercCon.CanAttend = V.SF.MercCon.CanAttend || 0; if (V.SF.MercCon.History >= 1) { V.SF.MercCon.CanAttend = -1; } V.SF.MercCon.Income = V.SF.MercCon.Income || 0; V.SF.MercCon.Revenue = V.SF.MercCon.Revenue || 0; V.SF.MercCon.Mercs = V.SF.MercCon.Mercs || 0; V.SF.MercCon.Menials = V.SF.MercCon.Menials || 0; V.SF.MercCon.TotalMenials = V.SF.MercCon.TotalMenials || 0; V.SF.MercCon.TotalMercs = V.SF.MercCon.TotalMercs || 0; if (typeof V.SF.Squad.Satellite === "object") { if (V.SF.Squad.Satellite.InOrbit > 0) { V.SF.SatLaunched = V.SF.Squad.Satellite.InOrbit; delete V.SF.Squad.Satellite.InOrbit; } V.SF.Squad.Satellite = V.SF.Squad.Satellite.lv; } delete V.SF.FS.upgrade; delete V.SF.UC.num; if (jsDef(V.choice)) { V.SF.Gift = V.choice; } if (V.Tour !== undefined) { V.SF.tour = V.Tour || 0; } if (V.SF.Squad.Troops) { V.SF.ArmySize = V.SF.Squad.Troops; delete V.SF.Squad.Troops; } if (V.SF.MercCon !== undefined) { if( V.SF.MercCon.View !== undefined) { delete V.SF.MercCon.View; } if (V.SF.MercCon.Helots !== undefined) { V.SF.MercCon.Menials = V.SF.MercCon.Helots; delete V.SF.MercCon.Helots; } if (V.SF.MercCon.TotalHelots !== undefined) { V.SF.MercCon.TotalMenials = V.SF.MercCon.TotalHelots; delete V.SF.MercCon.TotalHelots; } } if (V.SF.SpecOps !== undefined && V.SF.SpecOpsLock !== undefined) { V.SF.UC = {Assign: V.SF.SpecOps, Lock: V.SF.SpecOpsLock}; } if (V.SFUC !== undefined) { V.SF.UC.num = V.SFUC || 0; } if (V.SpecOpsLock !== undefined) { V.SF.SpecOpsLock = V.SpecOpsLock; } if (V.SF.U !== undefined) { V.SF.Upgrade = V.SF.U || 0; } if (V.SF.WG !== undefined) { V.SF.Gift = V.SF.WG || 0; } if (V.SF.Depravity < 0) { V.SF.Depravity = 0; } if (V.SFUnit !== undefined) { if (V.SFUnit.AT !== undefined) { V.SFUnitTA = 0; } if (V.SFTradeShow !== undefined) { V.SF.MercCon = V.SFTradeShow; } delete V.SFTradeShow; if (V.SFColonel !== undefined) { V.SF.Colonel = V.SFColonel; } if (V.SF.Squad !== undefined && V.SF.Squad.Satellite !== undefined && V.SatLaunched !== undefined) { V.SF.Squad.Sat = {lv: V.SF.Squad.Satellite, InOrbit: V.SatLaunched}; V.SF.Squad.Satellite = V.SF.Squad.Sat; delete V.SF.Squad.Sat; delete V.SatLaunched; } } } // closes: V.SF.Toggle && V.SF.Active >= 1 } delete V.Tour; delete V.SFColonel; delete V.SFUnit; delete V.SF.tour; delete V.SF.Caps; delete V.SF.Size; delete V.choice; delete V.SF.Units; delete V.SpecOpsLock; delete V.SF.U; delete V.SF.WG; delete V.SF.Subsidy; delete V.SF.SpecOps; delete V.SF.SpecOpsLock; delete V.SFUC; if (V.SF.BadOutcome !== undefined) { delete V.SF.BadOutcome; } if (V.arcologies[0].SFRaid !== undefined) { delete V.arcologies[0].SFRaid; } if (V.arcologies[0].SFRaidTarget !== undefined) { delete V.arcologies[0].SFRaidTarget; } if (V.SF.Facility !== undefined) { delete V.SF.Facility; } if (V.SF.MWU !== undefined) { delete V.SF.MWU; } if (V.SF.Bonus !== undefined) { delete V.SF.Bonus; } InitClean(); MainClean(); ColonelClean(); TradeShowClean(); UnitsClean(); if (V.week < 72 && V.SF.Active !== -1) { V.SF.Active = -1; } }; /* usedOnce */
MonsterMate/fc
src/Mods/SpecialForce/SpecialForceBC.js
JavaScript
mit
10,492
:: Trick Shot Night [nobr] <<set $nextButton = "Continue", $nextLink = "RIE Eligibility Check", $returnTo = "RIE Eligibility Check">> <<setAssistantPronouns>> <<if $PC.skill.warfare == -100>> <<set _shootChance = 5>> <<elseif $PC.skill.warfare <= -75>> <<set _shootChance = 10>> <<elseif $PC.skill.warfare <= -50>> <<set _shootChance = 15>> <<elseif $PC.skill.warfare <= -25>> <<set _shootChance = 20>> <<elseif $PC.skill.warfare == 0>> <<set _shootChance = 25>> <<elseif $PC.skill.warfare <= 25>> <<set _shootChance = 45>> <<elseif $PC.skill.warfare <= 50>> <<set _shootChance = 60>> <<elseif $PC.skill.warfare <= 75>> <<set _shootChance = 85>> <<elseif $PC.skill.warfare >= 100>> <<set _shootChance = 90>> <</if>> Despite your direct elevator, interaction with the majority of your security force is relatively scarce. Aside from mutually exchanged nods in the firebase and the occasional briefing, your $SF.Lower enjoy a degree of autonomy. <br><br>On a particularly lackadaisical evening, you find yourself alerted to a message alert by $assistant.name. <<if $assistant.personality > 0>> "<<= properMaster()>>, a message from $SF.Lower." _HeA pauses before continuing. "It seems they're asking if you'd like to join their trick shot night." <<else>> It informs you that $SF.Lower have sent a message asking you to join them at their trick shot night. <</if>> <br><br> <span id="result"> <<link "Politely decline">> <<replace "#result">> You inform $SF.Lower that you aren't planning to attend. A short while later, you receive a message from them stating that their invitation is an open one and that you're welcome to join in another night. <</replace>> <</link>> <<if $cash < 50000>> <br>//You lack the necessary funds to attend.// <<else>> /* cash >= 50000 */ <br><<link "Attend the trick shot night">> <<replace "#result">> You instruct $assistant.name to inform $SF.Lower that you will be attending their trick shot night, and after settling your affairs in the penthouse you head down to the firebase. The atmosphere in the firebase is casual, especially in comparison to the usual situations you meet them, though your security force still maintain some measure of decorum towards you as their employer. Eventually, you settle in at the table with a handful of $SF.Lower officers and turn your @@.yellowgreen;<<print cashFormat(50000)>>@@ into bullets. All that remains is to decide your strategy for the night. <br><br> <span id="bounty-result"> <<link "Play it safe">> <<replace "#bounty-result">> <<if random(1,100) > _shootChance>> Despite your attempts to mitigate risk and play the safest shots possible, it seems lady luck has conspired against you this evening. However, even when your last bullet is shot, your security force pitch you a few bullets to keep you in the game for the rest of the night. You may have lost most of your ¤, but it seems you've @@.green;made some friends.@@ <<run repX(5000, "event")>> <<run cashX(-25000, "event")>> <<else>> While a careful eye for accuracy has buoyed you through the evening, ultimately lady luck is the decider in handing you the win in a number of close shots. Unfortunately your meticulous play limited your chance at a larger payout, and you only come away from the evening with @@.yellowgreen;<<print cashFormat(100000)>>@@ more than you arrived with and @@.green;the respect of your security force.@@ <<run repX(5000, "event")>> <<run cashX(100000, "event")>> <</if>> <</replace>> <</link>> <<if random(1,100) < _shootChance>> <br> <<link "Up the ante">> <<replace "#bounty-result">> <<if $arcologies[0].FSSupremacistLawME == 1>> <<set _race = $arcologies[0].FSSupremacistRace>> <<elseif $arcologies[0].FSSubjugationistLawME == 1>> <<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>> <<set _race = _races.random()>> <</if>> <<set _genParam = {minAge: 25, maxAge: 35, ageOverridesPedoMode: 1, race: _race, disableDisability: 1}>> <<if $seeDicks != 100>> <<set _soldier = GenerateNewSlave("XX", _genParam)>> <<else>> <<set _soldier = GenerateNewSlave("XY", _genParam)>> <</if>> <<set _soldier.origin = "$He put $himself up as collateral at a trick shot game, and lost.">> <<set _soldier.career = "a soldier">> <<set _soldier.indentureRestrictions = 2>> <<set _soldier.indenture = 52>> <<set _soldier.devotion = random(45,60)>> <<set _soldier.trust = random(55,65)>> <<run setHealth(_soldier, jsRandom(60, 80), 0, undefined, 0, jsRandom(10, 30))>> <<set _soldier.muscles = 60>> <<if _soldier.weight > 130>> <<set _soldier.weight -= 100>> <<set _soldier.waist = random(-10,50)>> <</if>> <<set _soldier.anus = 0>> <<set _soldier.skill.anal = 0>> <<set _soldier.skill.whoring = 0>> <<set _soldier.skill.combat = 1>> <<set _soldier.accent = random(0,1)>> <<set _soldier.behavioralFlaw = "arrogant">> <<set _soldier.hLength = 1>> <<set _soldier.hStyle = "buzzcut">> <<set _soldier.clothes = "a military uniform">> <<run App.Utils.setLocalPronouns(_soldier)>> <span id="art-frame"> /* 000-250-006 */ <<if $seeImages == 1>> <<if $imageChoice == 1>> <div class="imageRef medImg"><<= SlaveArt(_soldier, 2, 0)>></div> <<else>> <div class="imageRef medImg"><<= SlaveArt(_soldier, 2, 0)>></div> <</if>> <</if>> /* 000-250-006 */ </span> Some aggressive play and an eye for riling up your fellow players has resulted in an immense payout, and all but one of your adversaries have folded as the situation has escalated. The only player still in contention is a wily old mercenary, the veteran of $his fair share of battles on the battlefield and at the firing range. $He's short on bullets, however, and $he'll have to buy in with something else as collateral. <br><br> <span id="alive-result"> <<link "A year of servitude">> <<set _soldier.clothes = "no clothing">> <<replace "#alive-result">> <<if random(1,100) > _shootChance>> For all your skillful maneuvering to reach this position, ultimately the win comes down to chance. This time, however, luck was not on your side. As the victor sweeps up $his spoils, the other security force clap you on the back and offer their condolences for your defeat. Though you may have lost your ¤, it seems you've @@.green;made some friends.@@ <<run repX(5000, "event")>> <<run cashX(-50000, "event")>> <<else>> <<replace "#art-frame">> <span id="art-frame"> /* 000-250-006 */ <<if $seeImages == 1>> <<if $imageChoice == 1>> <div class="imageRef medImg"><<= SlaveArt(_soldier, 2, 0)>></div> <<else>> <div class="imageRef medImg"><<= SlaveArt(_soldier, 2, 0)>></div> <</if>> <</if>> /* 000-250-006 */ </span> <</replace>> For all your skillful maneuvering to reach this position, ultimately the win comes down to chance. This time, however, luck has rendered you the victor. A silence falls over the room as the result is declared, but after some time your opponent breaks the hush by joking that life as your slave is probably easier than fighting for $arcologies[0].name. After some awkward laughter the night continues, and at the end your former mercenary joins you on your trip back to the penthouse to submit to processing and to begin $his new life as your sexual servant. $He's not young, but $he's tough and not distrusting of you due to $his service in $SF.Lower. <br> <<includeDOM App.UI.newSlaveIntro(_soldier)>> <</if>> <<= IncreasePCSkills('warfare', 1)>> <</replace>> <</link>> <br> <<link "Dock $his wages">> <<replace "#alive-result">> <<if random(1,100) > _shootChance>> For all your skillful maneuvering to reach this position, ultimately the win comes down to chance. This time, however, luck was not on your side. As the victor sweeps up $his spoils, the other security force members clap you on the back and offer their condolences for your defeat. Though you may have lost your ¤, it seems you've @@.green;made some friends.@@ <<run repX(5000, "event")>> <<run cashX(-50000, "event")>> <<else>> For all your skillful maneuvering to reach this position, ultimately the win comes down to chance. This time, however, luck has rendered you the victor. Your opponent accepts $his defeat with grace and jokes to $his comrades that $he'll be fighting in $his underwear for the next few months, and their uproar of laughter fills the room. Though you take the lion's share of the ¤, your security force also @@.green;had a good time fraternizing with you.@@ <<run repX(10000, "event")>> <<run cashX(50000, "event")>> <</if>> <<= IncreasePCSkills('warfare', 1)>> <</replace>> <</link>> </span> <</replace>> <</link>> <</if>> </span> <</replace>> <</link>> // It will cost <<print cashFormat(50000)>> to participate in the trick shot night.// <</if>> </span>
MonsterMate/fc
src/Mods/SpecialForce/TrickShotNight.tw
tw
mit
9,476
:: Upgrades [nobr] <<set _upgradeDiv = 1.65>> <<set _fullyUpgraded = []>> <br>Which facility or equipment do you wish to upgrade this week? <br> <<if $SF.Squad.Firebase < App.SF.upgrades.currentUnitMax('Firebase')>> <<set _cF = App.SF.UpgradeCost(125000/_upgradeDiv,$SF.Squad.Firebase)>> <<if $cash >= _cF>> <br> [[Upgrade Firebase|Firebase][$SF.Upgrade = 1, $SF.Squad.Firebase++, $SF.CreditsInvested += (_cF), cashX(forceNeg(_cF), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Firebase.// <</if>> //Costs @@.red;<<print cashFormat(_cF)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.Firebase)>> </span> <br> <<elseif $SF.Squad.Firebase === 10>> <<set _fullyUpgraded.push('Firebase')>> <</if>> <<if $SF.Squad.Armoury < App.SF.upgrades.currentUnitMax('Armoury')>> <<set _cA = App.SF.UpgradeCost(40000/_upgradeDiv,$SF.Squad.Armoury)>> <<if $cash >= _cA>> [[Upgrade Armory|Firebase][$SF.Upgrade = 1, $SF.Squad.Armoury++, $SF.CreditsInvested += (_cA), cashX(forceNeg(_cA), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Armory.// <</if>> //Costs @@.red;<<print cashFormat(_cA)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.Armoury)>> </span> <br> <<elseif $SF.Squad.Armoury === 10>> <<set _fullyUpgraded.push('Armory')>> <</if>> <<if $SF.Squad.Drugs < App.SF.upgrades.currentUnitMax('Drugs')>> <<set _cDrugs = App.SF.UpgradeCost(40000/_upgradeDiv,$SF.Squad.Drugs)>> <<if $cash >= _cDrugs>> [[Upgrade Drug Lab|Firebase][$SF.Upgrade = 1, $SF.Squad.Drugs++, $SF.CreditsInvested += (_cDrugs), cashX(forceNeg(_cDrugs), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Drug Lab.// <</if>> //Costs @@.red;<<print cashFormat(_cDrugs)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.Drugs)>> </span> <br> <<elseif $SF.Squad.Drugs === 10>> <<set _fullyUpgraded.push('Drug Lab')>> <</if>> <<if $SF.Squad.Firebase >= 2 && $SF.Squad.Drones < App.SF.upgrades.currentUnitMax('Drones')>> <<set _cDrones = App.SF.UpgradeCost(45000/_upgradeDiv,$SF.Squad.Drones)>> <<if $cash >= _cDrones>> [[Upgrade Drone Bay|Firebase][$SF.Upgrade = 1, $SF.Squad.Drones++, $SF.CreditsInvested += (_cDrones), cashX(forceNeg(_cDrones), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Drone Bay.// <</if>> //Costs @@.red;<<print cashFormat(_cDrones)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.Drones)>> </span> <br> <<elseif $SF.Squad.Drones === 10>> <<set _fullyUpgraded.push('Drone Bay')>> <</if>> <<if App.SF.unlocked.garage()>> <br>''Garage''<br> <div style="margin-left:2em"> <<if $SF.Squad.AV < App.SF.upgrades.currentUnitMax('AV')>> <<set _cAV = App.SF.UpgradeCost(60000/_upgradeDiv,$SF.Squad.AV)>> <<if $cash >= _cAV>> [[Upgrade Attack Vehicle Fleet|Firebase][$SF.Upgrade = 1, $SF.Squad.AV++, $SF.CreditsInvested += (_cAV), cashX(forceNeg(_cAV), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Attack Vehicle Fleet.// <</if>> //Costs @@.red;<<print cashFormat(_cAV)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.AV)>> </span> <br> <<elseif $SF.Squad.AV === 10>> <<set _fullyUpgraded.push('Attack Vehicle Fleet')>> <</if>> </div> <div style="margin-left:2em"> <<if $SF.Squad.TV < App.SF.upgrades.currentUnitMax('TV')>> <<set _cTV = App.SF.UpgradeCost(60000/_upgradeDiv,$SF.Squad.TV)>> <<if $cash >= _cTV>> [[Upgrade Transport Vehicle Fleet|Firebase][$SF.Upgrade = 1, $SF.Squad.TV++, $SF.CreditsInvested += (_cTV), cashX(forceNeg(_cTV), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Transport Vehicle Fleet.// <</if>> //Costs @@.red;<<print cashFormat(_cTV)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.TV)>> </span> <br> <<elseif $SF.Squad.TV === 10>> <<set _fullyUpgraded.push('Transport Vehicle Fleet')>> <</if>> </div> <div style="margin-left:2em"> <<set _PGTU = App.SF.upgrades.currentUnitMax('PGT')>> <<if $SF.Squad.PGT < _PGTU>> <<set _cPGT = App.SF.UpgradeCost(735000/_upgradeDiv,$SF.Squad.PGT)>> <<if $cash >= _cPGT>> [[Upgrade Prototype Goliath tank|Firebase][$SF.Upgrade = 1, $SF.Squad.PGT++, $SF.CreditsInvested += (_cPGT), cashX(forceNeg(_cPGT), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Prototype Goliath Tank.// <</if>> //Costs @@.red;<<print cashFormat(_cPGT)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.PGT)>> </span> <br> <<elseif $SF.Squad.PGT === _PGTU && $PC.skill.warfare < 75>> //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.PGT)>> </span> <br> <<elseif $SF.Squad.PGT === _PGTU>> <<set _fullyUpgraded.push('Prototype Goliath Tank')>> <</if>> </div> <</if>> /*Closes garage.*/ <<if App.SF.unlocked.hangar()>>''Hangar''<br> <div style="margin-left:2em"> <<if $SF.Squad.AA < App.SF.upgrades.currentUnitMax('AA')>> <<set _cAA = App.SF.UpgradeCost(70000/_upgradeDiv,$SF.Squad.AA)>> <<if $cash >= _cAA>> [[Upgrade Attack Aircraft Fleet|Firebase][$SF.Upgrade = 1, $SF.Squad.AA++, $SF.CreditsInvested += (_cAA), cashX(forceNeg(_cAA), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Attack Aircraft Fleet.// <</if>> //Costs @@.red;<<print cashFormat(_cAA)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.AA)>> </span> <br> <<elseif $SF.Squad.AA === 10>> <<set _fullyUpgraded.push('Attack Aircraft Fleet')>> <</if>> </div> <div style="margin-left:2em"> <<if $SF.Squad.TA < App.SF.upgrades.currentUnitMax('TA')>> <<set _cTA = App.SF.UpgradeCost(70000/_upgradeDiv,$SF.Squad.TA)>> <<if $cash >= _cTA>> [[Upgrade Transport Aircraft Fleet|Firebase][$SF.Upgrade = 1, $SF.Squad.TA++, $SF.CreditsInvested += (_cTA), cashX(forceNeg(_cTA), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Transport Aircraft Fleet.// <</if>> //Costs @@.red;<<print cashFormat(_cTA)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.TA)>> </span> <br> <<elseif $SF.Squad.TA === 10>> <<set _fullyUpgraded.push('Transport Aircraft Fleet')>> <</if>> </div> <div style="margin-left:2em"> <<set _SPU = App.SF.upgrades.currentUnitMax('SpacePlane')>> <<if $SF.Squad.SpacePlane < _SPU>> <<set _cSP = App.SF.UpgradeCost(250000/_upgradeDiv,$SF.Squad.SpacePlane)>> <<if $cash >= _cSP>> [[Upgrade Spaceplane|Firebase][$SF.Upgrade = 1, $SF.Squad.SpacePlane++, $SF.CreditsInvested += (_cSP), cashX(forceNeg(_cSP), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Spaceplane.// <</if>> //Costs @@.red;<<print cashFormat(_cSP)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.SpacePlane)>> </span> <br> <<elseif $SF.Squad.SpacePlane === _SPU && $PC.skill.warfare < 75>> //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.SpacePlane)>> </span> <br> <<elseif $SF.Squad.SpacePlane === _SPU>> <<set _fullyUpgraded.push('Spaceplane')>> <</if>> </div> <div style="margin-left:2em"> <<set _GunSU = App.SF.upgrades.currentUnitMax('GunS')>> <<if $SF.Squad.GunS < _GunSU>> <<set _cGunS = App.SF.UpgradeCost(350000/_upgradeDiv,$SF.Squad.GunS)>> <<if $cash >= _cGunS>> [[Upgrade Gunship|Firebase][$SF.Upgrade = 1, $SF.Squad.GunS++, $SF.CreditsInvested += (_cGunS), cashX(forceNeg(_cGunS), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Gunship.// <</if>> //Costs @@.red;<<print cashFormat(_cGunS)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.GunS)>> </span> <br> <<elseif $SF.Squad.GunS === _GunSU && $PC.skill.warfare < 75>> //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.GunS)>> </span> <br> <<elseif $SF.Squad.GunS === _GunSU>> <<set _fullyUpgraded.push('Gunship')>> <</if>> </div> <</if>> /*Closes hangar.*/ <<if App.SF.unlocked.launchBay()>>''Launch Bay'' <div style="margin-left:2em"> <<set _SatU = App.SF.upgrades.currentUnitMax('Satellite')>> <<if $SF.Squad.Satellite < _SatU && $SF.SatLaunched < 1>> <<set _cSat = App.SF.UpgradeCost(525000/_upgradeDiv,$SF.Squad.Satellite)>> <<if $cash >= _cSat>> [[Upgrade Satellite|Firebase][$SF.Upgrade = 1, $SF.Squad.Satellite++, $SF.CreditsInvested += (_cSat), cashX(forceNeg(_cSat), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Satellite.// <</if>> //Costs @@.red;<<print cashFormat(_cSat)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.Satellite)>> </span> <br> <<elseif $SF.Squad.Satellite === _SatU && $PC.skill.warfare < 75>> //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.Satellite)>> </span> <br> <<else>> <<set _fullyUpgraded.push('Satellite')>> <</if>> </div> <<if $terrain !== "oceanic">> <div style="margin-left:2em"> <<set _GRU = App.SF.upgrades.currentUnitMax('GiantRobot')>> <<if $SF.Squad.GiantRobot < _GRU>> <<set _cGR = App.SF.UpgradeCost(550000/_upgradeDiv,$SF.Squad.GiantRobot)>> <<if $cash >= _cGR>> [[Upgrade Giant Robot|Firebase][$SF.Upgrade = 1, $SF.Squad.GiantRobot++, $SF.CreditsInvested += (_cGR), cashX(forceNeg(_cGR), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Giant Robot.// <</if>> //Costs @@.red;<<print cashFormat(_cGR)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.GiantRobot)>> </span> <br> <<elseif $SF.Squad.GiantRobot === _GRU && $PC.skill.warfare < 75>> //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.GiantRobot)>> </span> <br> <<else>> <<set _fullyUpgraded.push('Giant Robot')>> <</if>> </div> <div style="margin-left:2em"> <<set _MSU = App.SF.upgrades.currentUnitMax('MissileSilo')>> <<if $SF.Squad.MissileSilo < _MSU>> <<set _cMS = App.SF.UpgradeCost(565000/_upgradeDiv,$SF.Squad.MissileSilo)>> <<if $cash >= _cMS>> [[Upgrade Cruise Missile|Firebase][$SF.Upgrade = 1, $SF.Squad.MissileSilo++, $SF.CreditsInvested += (_cMS), cashX(forceNeg(_cMS), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Cruise Missile.// <</if>> //Costs @@.red;<<print cashFormat(_cMS)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.MissileSilo)>> </span> <br> <<elseif $SF.Squad.MissileSilo === _MSU && $PC.skill.warfare < 75>> //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.MissileSilo)>> </span> <br> <<else>> <<set _fullyUpgraded.push('Cruise Missile')>> <</if>> </div> <</if>> <</if>> /*Closes Launch Bay.*/ <<if App.SF.unlocked.navalYard()>>''Naval Yard''<br> <div style="margin-left:2em"> <<set _ACU = App.SF.upgrades.currentUnitMax('AircraftCarrier')>> <<if $SF.Squad.AircraftCarrier < _ACU>> <<set _cAC = App.SF.UpgradeCost(650000/_upgradeDiv,$SF.Squad.AircraftCarrier)>> <<if $cash >= _cAC>> [[Upgrade Aircraft Carrier|Firebase][$SF.Upgrade = 1, $SF.Squad.AircraftCarrier++, $SF.CreditsInvested += (_cAC), cashX(forceNeg(_cAC), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Aircraft Carrier.// <</if>> //Costs @@.red;<<print cashFormat(_cAC)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.AircraftCarrier)>> </span> <br> <<elseif $SF.Squad.AircraftCarrier === _ACU && $PC.skill.warfare < 75>> //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.AircraftCarrier)>> </span> <br> <<else>> <<set _fullyUpgraded.push('Aircraft Carrier')>> <</if>> </div> <div style="margin-left:2em"> <<set _SubU = App.SF.upgrades.currentUnitMax('Sub')>> <<if $SF.Squad.Sub < _SubU>> <<set _cSub = App.SF.UpgradeCost(700000/_upgradeDiv,$SF.Squad.Sub)>> <<if $cash >= _cSub>> [[Upgrade Submarine|Firebase][$SF.Upgrade = 1, $SF.Squad.Sub++, $SF.CreditsInvested += (_cSub), cashX(forceNeg(_cSub), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Submarine// <</if>> //Costs @@.red;<<print cashFormat(_cSub)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.Sub)>> </span> <<elseif $SF.Squad.Sub === _SubU && $PC.skill.warfare < 75>> //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.Sub)>> </span> <<else>> <<set _fullyUpgraded.push('Submarine')>> <</if>> </div> <div style="margin-left:2em"> <<set _HATU = App.SF.upgrades.currentUnitMax('HAT')>> <<if $SF.Squad.HAT < _HATU>> <<set _cHAT = App.SF.UpgradeCost(665000/_upgradeDiv,$SF.Squad.HAT)>> <<if $cash >= _cHAT>> [[Upgrade Amphibious Transport|Firebase][$SF.Upgrade = 1, $SF.Squad.HAT++, $SF.CreditsInvested += (_cHAT), cashX(forceNeg(_cHAT), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Amphibious Transport.// <</if>> //Costs @@.red;<<print cashFormat(_cHAT)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.HAT)>> </span> <<elseif $SF.Squad.HAT === _HATU && $PC.skill.warfare < 75>> //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.HAT)>> </span> <br> <<else>> <<set _fullyUpgraded.push('Amphibious Transport')>> <</if>> </div> <</if>> /*Closes Naval Yard.*/ <<if _fullyUpgraded.length > 0>> <br>//The following units are fully upgraded: <<= _fullyUpgraded>>//. <</if>>
MonsterMate/fc
src/Mods/SpecialForce/Upgrades.tw
tw
mit
13,612
:: WC [nobr] <<set _Env = App.SF.env(), _size = App.SF.upgrades.total(), _colonelTalkTensionRuction = $SF.FS.Tension !== -1 ? 5 : 0>> <<switch _Env>> <<case 4>> <<set _EnvCash2 = 450,_EnvCash3 = 200,_EnvCash4 = 100>> <<case 3>> <<set _EnvCash2 = 500,_EnvCash3 = 250,_EnvCash4 = 150>> <<case 2>> <<set _EnvCash2 = 550,_EnvCash3 = 300,_EnvCash4 = 200>> <</switch>> <<if $SF.Gift === 0>> <<if $SF.Colonel.Talk + $SF.Colonel.Fun === 0>> The Colonel looks down a list on her tablet. "There's some things we can do to help you out, boss. <br>We've had some good prizes turn up, that's made us some extra money we could turn over. <<else>> <br>He looks down a list on his tablet. "<<= properTitle()>>, how can $SF.Lower help you this week? <br> <<= capFirstChar($SF.Lower || "the special force")>> can spare some profits from our recent operations. <</if>> | <<link "Request cash" "Firebase">> <<run cashX(App.SF.weeklyGift(1), "specialForcesCap")>> <</link>> <<if $rep < 20000>> <<if $SF.Colonel.Talk + $SF.Colonel.Fun === 0>> <br>If you want we could throw a quick military parade, get the people feeling extra patriotic. <<else>> <br>We can set some units aside for a ceremonial march through the arcology. <</if>> | <<link "Request military parade" "Firebase">> <<run repX(App.SF.weeklyGift(2), "specialForces")>> <</link>> <</if>> <<if $arcologies[0].prosperity < $AProsperityCap>> <<if $SF.Colonel.Talk + $SF.Colonel.Fun === 0>> <br>Or we could hit some businesses that rival the ones in $arcologies[0].name with some sabotage. <<else>> <br>Or we can target rival businesses for sabotage. <</if>> | <<link "Request sabotage" "Firebase">> <<set _GoodWords2 = App.SF.weeklyGift(3)>> <<if $arcologies[0].prosperity + _GoodWords2 * 0.8 > $AProsperityCap>> <<set $arcologies[0].prosperity = $AProsperityCap>> <<else>> <<set $arcologies[0].prosperity += Math.ceil(_GoodWords2 * 0.8)>> <</if>> <</link>> <</if>> <</if>> <span id="result1"> <<if $SF.Colonel.Talk + $SF.Colonel.Fun === 0>> <span id="result2"> <br><br>"If you need me for anything else, let me know." <<if $SF.Colonel.Status >= 25>> <br><<link "Walk with The Colonel on the surface" "Firebase">> <<set $SF.Colonel.Talk = 1, $SF.Colonel.Status += 2, $SF.FS.Tension -= _colonelTalkTensionRuction>> <</link>> <</if>> <br><<link "Talk in $SF.Lower's HQ">> <<replace "#result2">> <span id="result3"> <br><br>What do you want to do with The Colonel in the HQ? <br><<link "Talk" "Firebase">> <<set $SF.Colonel.Talk = 2, $SF.Colonel.Status += 3, $SF.FS.Tension -= _colonelTalkTensionRuction>> <</link>> <br><<link "Learn" "Firebase">> <<set $SF.Colonel.Talk = 3,$SF.Colonel.Status += 1, $SF.FS.Tension -= _colonelTalkTensionRuction>> <</link>> <<if $SF.Colonel.Status >= 45>> <br> <<link "Have some fun">> <<replace "#result3">> <span id="result4"> <<set $SF.Colonel.Fun = 1, $SF.Colonel.Status += 3, $SF.FS.Tension -= _colonelTalkTensionRuction>> <br><br>Where should this fun take place? <<link "Go back" "Firebase">> <<set $SF.Colonel.Fun = 0, $SF.Colonel.Talk = 0,$SF.Colonel.Status -= 3, $SF.FS.Tension += _colonelTalkTensionRuction>> <</link>> <br><<link "In private">> <<replace "#result4">> <span id="result6"> <br><br>Which orifice do you wish to target? <<link "Go back" "Firebase">> <</link>> <br><<link "Pussy">> <<replace "#result6">> <<include "SFColonelSexDec">> <</replace>> <<set $SF.Colonel.Fun += 1>> <</link>> <br><<link "Ass">> <<replace "#result6">> <<include "SFColonelSexDec">> <</replace>> <<set $SF.Colonel.Fun += 1>> <</link>> <br><<link "Both pussy and ass">> <<replace "#result6">> <<include "SFColonelSexDec">> <</replace>> <<set $SF.Colonel.Fun += 2>> <</link>> <br><<link "Mouth">> <<replace "#result6">> <<include "SFColonelSexDec">> <</replace>> <<set $SF.Colonel.Fun += 1>> <</link>> <br><<link "All three holes">> <<replace "#result6">> <<include "SFColonelSexDec">> <</replace>> <<set $SF.Colonel.Fun += 3>> <</link>> </span> <</replace>> <</link>> <br><<link "On The Colonel's throne">> <<replace "#result4">> <span id="result6"> <br><br>Which orifice do you wish to target? <<link "Go back" "Firebase">> <</link>> <br><<link "Pussy">> <<replace "#result6">> <<include "SFColonelSexDec">> <</replace>> <<set $SF.Colonel.Fun += 1>> <</link>> <br><<link "Ass">> <<replace "#result6">> <<include "SFColonelSexDec">> <</replace>> <<set $SF.Colonel.Fun += 1>> <</link>> <br><<link "Both pussy and ass">> <<replace "#result6">> <<include "SFColonelSexDec">> <</replace>> <<set $SF.Colonel.Fun += 2>> <</link>> <br><<link "Mouth">> <<replace "#result6">> <<include "SFColonelSexDec">> <</replace>> <<set $SF.Colonel.Fun += 1>> <</link>> <br><<link "All three holes">> <<replace "#result6">> <<include "SFColonelSexDec">> <</replace>> <<set $SF.Colonel.Fun += 3>> <</link>> </span> <</replace>> <</link>> </span> <</replace>> <</link>> <</if>> /*Closes fun*/ </span> <</replace>> <</link>> /*Closes talk*/ </span> <</if>> /*Closes spend time with The Colonel*/ </span> <<if $SF.Colonel.Talk === 1>> <br><br>You ask The Colonel if she would like to stretch her legs up on the surface. It doesn't take much effort for her to agree. <<if $PC.skill.warfare >= 100 && $PC.career == "mercenary">> Your mastery of wet work and prior experience in a PMC satisfies The Colonel that between you<<if _S.Bodyguard>>, _S.Bodyguard.slaveName,<</if>> and her, there should be little threat to walking around the arcology. Being able to see and interact with the arcology owner directly maintains the false idea that you're just like one of them while also giving them an increased opportunity to try gaining your favor. <<run repX(10, "specialForces"), cashX(_EnvCash2, "specialForces")>> <<elseif $PC.skill.warfare >= 100>> Your mastery of wet work satisfies The Colonel that you only need two soldiers <<if _S.Bodyguard>> plus _S.Bodyguard.slaveName<</if>> to walk safely around the arcology. Being able to see and interact with the arcology owner directly maintains the false idea that you're just like one of them while also giving them an increased opportunity to try gaining your favor. <<run repX(5, "specialForces"), cashX(_EnvCash3, "specialForces")>> <<elseif $PC.skill.warfare >= 60>> With some expertise in warfare, The Colonel believes <<if _S.Bodyguard>>with _S.Bodyguard.slaveName <</if>>you only need a squad of armed soldiers for a walk through the arcology. <<elseif $PC.skill.warfare >= 30>> As you have some skill in warfare, The Colonel believes<<if _S.Bodyguard>> with _S.Bodyguard.slaveName<</if>> you only need two full squads of armed soldiers for a walk around the arcology. <<elseif $PC.skill.warfare >= 10>> Your minor skill in warfare convinces The Colonel that <<if _S.Bodyguard>>in addition to _S.Bodyguard.slaveName, <</if>>you need two full squads of armed soldiers and an armored car escort for a simple walk around the arcology. <<else>> Your complete lack of combat skill convinces The Colonel that <<if _S.Bodyguard>>in addition to _S.Bodyguard.slaveName, <</if>>you need two full squads of armed soldiers, an armored car escort, and a sniper overwatch for a simple walk around the arcology. <</if>> <br>As you make your way through the arcology you stop at a <<if $arcologies[0].FSPaternalist != "unset">> paternalist shop, <<if $SF.Colonel.Core == "cruel">>earning a sneer from The Colonel<<else>>helping The Colonel select some luxurious and relaxing slave treatments<</if>>. <<elseif $arcologies[0].FSPastoralist != "unset">> pastoralist shop, helping The Colonel select a more comfortable breast pump. <<else>> shop that catches The Colonel's eye. <</if>> <<if $PC.skill.slaving >= 100 && $PC.career == "slaver">> Your mastery and extensive history of slaving allows you to assist The Colonel greatly. The shop owner is so impressed by your understanding of slavery that she asks you for some advice. Before you leave, you manage to pass on a few tips, helping the business with future customers. <<if $arcologies[0].prosperity < $AProsperityCap>> <<set $arcologies[0].prosperity++>> <</if>> <<elseif $PC.skill.slaving >= 100>> Your mastery and extensive history of slaving allows you to assist The Colonel greatly. The shop owner is so impressed by your understanding of slavery that she asks you for some advice. Before you leave, you manage to pass on a few tips, helping the business with future customers. <<if $arcologies[0].prosperity < $AProsperityCap>> <<set $arcologies[0].prosperity++>> <</if>> <<elseif $PC.skill.slaving >= 60>> Your expertise in slavery allows you to help The Colonel decide what to buy for her main slave. <<elseif $PC.skill.slaving >= 30>> Your moderate skill in slavery makes you somewhat helpful to The Colonel in deciding what to buy for her main slave. <<elseif $PC.skill.slaving >= 10>> Your basic skill level of slavery doesn't allow you to help The Colonel at all. <<elseif $PC.skill.slaving < 10>> Your total lack of slavery skill (which is very unusual and very concerning for an arcology owner) means that you are of little to no help or even a hindrance. The shopkeeper notices your complete ineptitude, and as soon as you've left the rumor mill begins. <<run repX(-20, "PCactions")>> <</if>> <br>Soon the entourage heads back to the HQ of $SF.Lower. <<if random(1,100) > 50>> Along the route you see a homeless citizen with a serious injury begging for help. <<if $PC.skill.medicine >= 100 && $PC.career == "medicine">> Your expertise in surgery ensures that the citizen receives the best care they'll ever experience in their life. 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. <<run repX(10, "specialForces")>> <<run cashX(_EnvCash4, "specialForces")>> <<elseif $PC.skill.medicine >= 100>> Your expertise in surgery ensures that the citizen receives the best care they'll ever experience in their life. Word quickly spreads of the kindly arcology owner who took the time to heal a citizen. <<run repX(5, "specialForces")>> <<elseif $PC.skill.medicine >= 60>> Your proficiency in surgery allows you to properly close their wound with minimal trauma to the patient. <<elseif $PC.skill.medicine >= 30>> Your moderate surgical skill ensures that you can close the citizen's wound, though not without likely scarring. <<elseif $PC.skill.medicine >= 10>> Your basic surgical skill in medicine is sufficient only to stabilize the citizen's wounds before medical assistance arrives. <<else>> Your total lack of surgical skill causes the death of the citizen through repeated medical blunders. <<set $arcologies[0].prosperity -= .25>> <</if>> <</if>> <<elseif $SF.Colonel.Talk === 2>> <br><br>You and The Colonel talk over some $PC.refreshment, where she ends up talking about her past. You learn a little more about her. <<switch random(1,6)>> <<case 1>> <<= IncreasePCSkills(['medicine', 'trading', 'slaving'], 1)>> <<case 2>> <<= IncreasePCSkills(['trading', 'slaving', 'engineering'], 1)>> <<case 3>> <<= IncreasePCSkills(['slaving', 'engineering', 'hacking'], 1)>> <<case 4>> <<= IncreasePCSkills(['engineering', 'hacking', 'warfare'], 1)>> <<case 5>> <<= IncreasePCSkills(['hacking', 'warfare', 'medicine'], 1)>> <<case 6>> <<= IncreasePCSkills(['warfare', 'medicine', 'trading'], 1)>> <</switch>> <<elseif $SF.Colonel.Talk === 3>> <br><br>"Sure boss, I can use a break from all of this," she laughs. The Colonel tells a story about one time when she <<switch random(1,6)>> <<case 1>> used field medicine to save another merc's life, teaching you some medical procedures in the process. <<= IncreasePCSkills('medicine', 5)>> <<case 2>> haggled for necessary gear with a stingy quartermaster, teaching you how to get what you want from traders. <<= IncreasePCSkills('trading', 5)>> <<case 3>> found a load of human chattel in a raid and had to manage them before they could later be unloaded, teaching you how to better care for your slaves. <<= IncreasePCSkills('slaving', 5)>> <<case 4>> was responsible for rebuilding a fort she had seized, teaching you how to better manage construction in your arcology. <<= IncreasePCSkills('engineering', 5)>> <<case 5>> was forced to hack her way out of a trap, teaching you how to better penetrate digital security. <<= IncreasePCSkills('hacking', 5)>> <<case 6>> fought off an entire battalion with only a small squad, teaching you how to think tactically in battle. <<= IncreasePCSkills('warfare', 5)>> <</switch>> <</if>>
MonsterMate/fc
src/Mods/SpecialForce/WeeklyChoices.tw
tw
mit
13,270
:: editSF [nobr] <<script>> for (let i in V.SF.Squad) { const v = String([i]); if (V.SF.Squad[i] > App.SF.upgrades.currentUnitMax(v)) { V.SF.Squad[i] = App.SF.upgrades.currentUnitMax(v); } } <</script>> <<set _max = App.SF.upgrades.max(), _T1 = App.SF.unlocked.secondTier(), _size = App.SF.upgrades.total(), $nextButton = "Back to $SF.Lower's Firebase", $nextLink = "Firebase", _options = new App.UI.OptionsGroup()>> __Upgrades__: _size/_max(<<= (_size/_max).toFixed(2)>>%) <<run _options.addOption("''Firebase: '' (current max <<= App.SF.upgrades.currentUnitMax('Firebase')>>)", "Firebase", V.SF.Squad).showTextBox()>> <<run _options.addOption("''Armoury: '' (current max <<= App.SF.upgrades.currentUnitMax('Armoury')>>)", "Armoury", V.SF.Squad).showTextBox()>> <<run _options.addOption("''Drugs: '' (current max <<= App.SF.upgrades.currentUnitMax('Drugs')>>)", "Drugs", V.SF.Squad).showTextBox()>> <<if $SF.Squad.Firebase >= 2>> <<run _options.addOption("''Drones: '' (current max <<= App.SF.upgrades.currentUnitMax('Drones')>>)", "Drones", V.SF.Squad).showTextBox()>> <</if>> <<if App.SF.unlocked.garage()>> <<run _options.addOption("''Garage:''<br>&nbsp;&nbsp;''Attack Vehicles: '' (current max <<= App.SF.upgrades.currentUnitMax('AV')>>)", "AV", V.SF.Squad).showTextBox()>> <<run _options.addOption("&nbsp;&nbsp;''Transport Vehicles: '' (current max <<= App.SF.upgrades.currentUnitMax('TV')>>)", "TV", V.SF.Squad).showTextBox()>> <<if _T1>> <<run _options.addOption("&nbsp;''Prototype Goliath Tank: '' (current max <<= App.SF.upgrades.currentUnitMax('PGT')>>)", "PGT", V.SF.Squad).showTextBox()>> <</if>> <</if>> <<if App.SF.unlocked.hangar()>> <<run _options.addOption("''Hangar:''<br>&nbsp;&nbsp;''Attack Planes: '' (current max <<= App.SF.upgrades.currentUnitMax('AA')>>)", "AA", V.SF.Squad).showTextBox()>> <<run _options.addOption("&nbsp;&nbsp;''Transport Planes: '' (current max <<= App.SF.upgrades.currentUnitMax('TA')>>)", "TA", V.SF.Squad).showTextBox()>> <<if _T1>> <<run _options.addOption("&nbsp;''Spaceplane: '' (current max <<= App.SF.upgrades.currentUnitMax('SpacePlane')>>)", "SpacePlane", V.SF.Squad).showTextBox()>> <<run _options.addOption("&nbsp;''Gunship: '' (current max <<= App.SF.upgrades.currentUnitMax('GunS')>>)", "GunS", V.SF.Squad).showTextBox()>> <</if>> <</if>> <<if App.SF.unlocked.launchBay()>> <<run _options.addOption("''Launch Bay:''<br>&nbsp;''Satellite: '' (current max <<= App.SF.upgrades.currentUnitMax('Satellite')>>)", "Satellite", V.SF.Squad).showTextBox()>> <<if $terrain != "oceanic">> <<run _options.addOption("&nbsp;''Giant Robot: '' (current max <<= App.SF.upgrades.currentUnitMax('GiantRobot')>>)", "GiantRobot", V.SF.Squad).showTextBox()>> <</if>> <<run _options.addOption("&nbsp;''Cruise Missile: '' (current max <<= App.SF.upgrades.currentUnitMax('MissileSilo')>>)", "MissileSilo", V.SF.Squad).showTextBox()>> <</if>> <<if App.SF.unlocked.navalYard()>> <<run _options.addOption("<br><br>''Naval Yard:''<br>&nbsp;''Aircraft Carrier: '' (current max <<= App.SF.upgrades.currentUnitMax('AircraftCarrier')>>)", "AircraftCarrier", V.SF.Squad).showTextBox()>> <<run _options.addOption("&nbsp;''Submarine: '' (current max <<= App.SF.upgrades.currentUnitMax('Sub')>>)", "Sub", V.SF.Squad).showTextBox()>> <<run _options.addOption("&nbsp;''Amphibious Transport: '' (current max <<= App.SF.upgrades.currentUnitMax('HAT')>>)", "HAT", V.SF.Squad).showTextBox()>> <</if>> <<includeDOM _options.render()>> <<if $SF.FS.Tension !== -1>> <br><br>The Colonel's current Tension: <<textbox "$SF.FS.Tension" $SF.FS.Tension "editSF">> <</if>>
MonsterMate/fc
src/Mods/SpecialForce/editSF.tw
tw
mit
3,618
App.Arcology.Cell.Apartment = class extends App.Arcology.Cell.BaseCell { /** * @param {number} owner * @param {number} type */ constructor(owner, type = 2) { super(owner); this.type = type; } static get cellName() { return "Apartments"; } /** * @returns {string} */ get colorClass() { switch (this.type) { case 1: return "luxuryApartments"; case 2: return "apartments"; case 3: return "denseApartments"; default: return super.colorClass; } } /** * @param {Array<number>} path * @returns {Node} */ cellContent(path) { let message = ""; switch (this.type) { case 1: message = "Luxury Apartments"; break; case 2: message = "Apartments"; break; case 3: message = "Dense Apartments"; break; } return App.Arcology.getCellLink(path, message); } /** * @returns {string|Node} * @override @protected */ _setting() { let r = ""; switch (this.type) { case 1: r = "improved for occupancy by the Free Cities' wealthiest citizens"; break; case 2: r = "occupied by citizens of varying wealth and social standing"; break; case 3: r = "upgraded for dense occupancy by as many citizens as possible"; break; } if (this.owner === 1) { r = `This is a sector of the arcology's living areas, ${r}. You control this part of the arcology and all these tenants pay you rent.`; } else { r = `This is a privately-owned sector of the arcology's living areas, ${r}.`; } return r; } /** * @returns {Node} * @override @protected */ _body() { const fragment = document.createDocumentFragment(); const cost = 10000 * V.upgradeMultiplierArcology; if (this.type !== 3) { fragment.append(this._makeUpgrade( "Upgrade this sector of apartments for dense occupancy by as many citizens as possible.", () => { this.type = 3; }, cost)); } if (this.type !== 1) { fragment.append(this._makeUpgrade( "Improve this sector of apartments for occupancy by the Free Cities' wealthiest citizens.", () => { this.type = 1; }, cost)); } if (this.type !== 2) { fragment.append(this._makeUpgrade( "Return this sector to standard, mixed housing.", () => { this.type = 2; }, cost)); } return fragment; } /** * @returns {boolean} */ canBeSold() { return true; } static _cleanupConfigScheme(config) { super._cleanupConfigScheme(config); // BC code } /** @returns {App.Arcology.Cell.Apartment} */ clone() { return (new App.Arcology.Cell.Apartment(this.owner))._init(this); } get className() { return "App.Arcology.Cell.Apartment"; } };
MonsterMate/fc
src/arcologyBuilding/apartments.js
JavaScript
mit
2,640
/** * @param {Array<number>} path * @param {string} message * @returns {Node} */ App.Arcology.getCellLink = function(path, message) { return App.UI.DOM.passageLink(message, "Cell", () => { V.cellPath = path; }); }; /** * Upgrades all instances of cellClass and cellType to newType. * Intended for use on guaranteed single hits. * * @param {App.Arcology.Building} building * @param {typeof App.Arcology.Cell.BaseCell} cellClass * @param {*} cellType * @param {*} newType * @param {string} [key="type"] */ App.Arcology.cellUpgrade = function(building, cellClass, cellType, newType, key = "type") { building.findCells(cell => cell instanceof cellClass && cell[key] === cellType) .forEach(cell => { cell[key] = newType; }); }; /** * Updates V.arcologies[0].ownership. */ App.Arcology.updateOwnership = function() { const allCells = V.building.findCells(cell => !(cell instanceof App.Arcology.Cell.Filler)); const ownedCells = allCells.filter(cell => cell.owner === 1); const ratio = ownedCells.length / allCells.length; V.arcologies[0].ownership = Math.round(100 * ratio); }; /** * @param {string} [terrain="default"] * @returns {App.Arcology.Building} */ App.Arcology.defaultBuilding = function(terrain = "default") { /** * @type {arcologyEnvironment} */ const env = {terrain: terrain, established: false, fs: ""}; const candidates = App.Arcology.presets.filter(preset => preset.isAllowed(env)); return candidates.pluck().construct(env).building; }; /** * Order of the building sections. All possible sections have to be added here. * * @type {string[]} */ App.Arcology.sectionOrder = ["fountain", "penthouse", "spire", "shops", "ravine-markets", "apartments", "markets", "manufacturing"]; /** * @param {App.Entity.Facilities.Facility} facility * @param {string} [passageName] * @param {string} [statsStr] * @returns {Node} */ App.Arcology.facilityCellContent = function(facility, passageName, statsStr) { const res = document.createDocumentFragment(); res.append(App.UI.DOM.passageLink(facility.UIName, passageName || facility.genericName)); const report = facility.occupancyReport(false); if (report !== "") { const stats = document.createElement("span"); stats.textContent = ` (${report})`; res.append(stats); } return res; }; App.Arcology.Section = class extends App.Entity.Serializable { /** * @param {string} id unique ID * @param {Array<Array<App.Arcology.Cell.BaseCell>>} rows * @param {boolean} [groundLevel=false] if the section the ground level, all lower layers are automatically in the * basement */ constructor(id, rows, groundLevel = false) { super(); /** * @type {string} */ this.id = id; /** * @type {Array<Array<App.Arcology.Cell.BaseCell>>} */ this.rows = rows; this.groundLevel = groundLevel; } get width() { let maxWidth = 0; this.rows.forEach(cells => { let width = 0; cells.forEach(cell => { width += cell.width; }); maxWidth = Math.max(maxWidth, width); }); return maxWidth; } /** * @param {number} elementWidth in % * @param {number} index * @returns {DocumentFragment} */ render(elementWidth, index) { /** * @param {App.Arcology.Cell.BaseCell} cell * @param {number} rowIndex * @param {number} cellIndex * @returns {HTMLDivElement} */ function createCell(cell, rowIndex, cellIndex) { return cell.renderCell([index, rowIndex, cellIndex], elementWidth); } /** * @param {Array<App.Arcology.Cell.BaseCell>} row * @param {number} rowIndex * @returns {HTMLDivElement} */ function createRow(row, rowIndex) { const div = document.createElement("div"); div.classList.add("row"); row.forEach((cell, cellIndex) => { div.append(createCell(cell, rowIndex, cellIndex)); }); return div; } const fragment = document.createDocumentFragment(); this.rows.forEach((row, rowIndex) => { fragment.append(createRow(row, rowIndex)); }); return fragment; } /** * @param {Array<number>} path of the form [i, j] * @param {App.Arcology.Building} containingBuilding * @returns {Node} */ renderCell(path, containingBuilding) { return this.rows[path[0]][path[1]].cellPassage(containingBuilding); } /** * @param {function(App.Arcology.Cell.BaseCell): boolean} predicate * @returns {Array<App.Arcology.Cell.BaseCell>} */ findCells(predicate) { const cells = []; for (const row of this.rows) { for (const cell of row) { if (predicate(cell)) { cells.push(cell); } } } return cells; } /** * Replaces the first occurrence of oldCell with newCell * * @param {App.Arcology.Cell.BaseCell} oldCell * @param {App.Arcology.Cell.BaseCell} newCell * @returns {boolean} */ replaceCell(oldCell, newCell) { for (const row of this.rows) { for (let i = 0; i < row.length; i++) { if (row[i] === oldCell) { row[i] = newCell; return true; } } } return false; } static _cleanupConfigScheme(config) { super._cleanupConfigScheme(config); // BC code } clone() { return (new App.Arcology.Section())._init(this); } get className() { return "App.Arcology.Section"; } }; App.Arcology.Building = class extends App.Entity.Serializable { /** * @param {string} layout reference to the used layout so we now how to do layout specific actions. (upgrading) * @param {Array<App.Arcology.Section>} sections */ constructor(layout, sections) { super(); /** * @type {string} */ this.layout = layout; /** * List of all already taken upgrades. * @type {Array<string>} */ this.usedUpgrades = []; /** * @type {Array<App.Arcology.Section>} */ this.sections = sections; } /** * @returns {DocumentFragment} */ render() { const fragment = document.createDocumentFragment(); let maxWidth = 0; this.sections.forEach(section => { maxWidth = Math.max(section.width, maxWidth); }); const elementWidth = 100 / maxWidth; const upperLevels = document.createElement("div"); upperLevels.classList.add("building"); const basement = document.createElement("div"); basement.classList.add("building", "basement"); let wrapper = upperLevels; sortArrayByArray(App.Arcology.sectionOrder, this.sections, "id") .forEach((section, index) => { wrapper.append(section.render(elementWidth, index)); if (section.groundLevel) { // if there are multiple sections that are ground level the first (highest) section wins and all // others are in the basement. wrapper = basement; } }); fragment.append(upperLevels, basement); return fragment; } /** * @param {Array<*>} path * @returns {Node} */ renderCell(path) { return this.sections[path[0]].renderCell(path.slice(1), this); } /** * @param {function(App.Arcology.Cell.BaseCell): boolean} predicate * @returns {Array<App.Arcology.Cell.BaseCell>} */ findCells(predicate) { return this.sections.reduce( (cells, section) => { cells.push(...section.findCells(predicate)); return cells; }, []); } /** * @param {App.Arcology.Cell.BaseCell} oldCell * @param {App.Arcology.Cell.BaseCell} newCell * @returns {boolean} */ replaceCell(oldCell, newCell) { for (let section of this.sections) { if (section.replaceCell(oldCell, newCell)) { return true; } } return false; } static _cleanupConfigScheme(config) { super._cleanupConfigScheme(config); if (config.layout === undefined) { config.layout = V.terrain; } } clone() { return (new App.Arcology.Building())._init(this); } get className() { return "App.Arcology.Building"; } };
MonsterMate/fc
src/arcologyBuilding/base.js
JavaScript
mit
7,616
:: Cell [nobr jump-from-safe no-history] <<set $nextButton = "Back", $nextLink = "Main">> <<includeDOM V.building.renderCell(V.cellPath)>>
MonsterMate/fc
src/arcologyBuilding/cell.tw
tw
mit
141
App.Arcology.Cell.Decorative = class extends App.Arcology.Cell.BaseCell { /** * @param {object} params * @param {number} [params.width] in cells * @param {number} [params.xOffset=0] in % * @param {number} [params.yOffset=0] in px * @param {number} [params.rotation=0] in deg * @param {number} [params.cellHeight=0] in px, if default height is not enough to stop stuff going offscreen * @param {number} [params.absoluteWidth=0] 0/1, if width and xOffset should be read as absolute pixels */ constructor({width = 1, xOffset = 0, yOffset = 0, rotation = 0, cellHeight = 0, absoluteWidth = 0} = {}) { super(1); this._width = width; this._xOffset = xOffset; this._yOffset = yOffset; this._rotation = rotation; this._cellHeight = cellHeight; this._absoluteWidth = absoluteWidth; } get width() { return this._absoluteWidth ? 0 : this._width; } renderCell(path, width) { const outerCell = document.createElement("div"); outerCell.style.width = `${width * this.width}%`; if (this._cellHeight > 0) { outerCell.style.height = `${this._cellHeight}px`; } const innerCell = document.createElement("div"); innerCell.classList.add("decorative"); if (this._absoluteWidth) { innerCell.style.width = `${this._width}px`; } innerCell.style.transform = `translate(${this._xOffset}${this._absoluteWidth ? "px" : "%"}, ${this._yOffset}px) rotate(${this._rotation}deg)`; outerCell.append(innerCell); return outerCell; } get className() { return "App.Arcology.Cell.Decorative"; } static _cleanupConfigScheme(config) { super._cleanupConfigScheme(config); // BC code } clone() { return (new App.Arcology.Cell.Decorative())._init(this); } };
MonsterMate/fc
src/arcologyBuilding/decorative.js
JavaScript
mit
1,699
App.Arcology.Cell.Filler = class extends App.Arcology.Cell.BaseCell { constructor(width) { super(1); this._width = width; } get width() { return this._width; } renderCell(path, width) { const outerCell = document.createElement("div"); outerCell.style.width = `${width * this.width}%`; return outerCell; } get className() { return "App.Arcology.Cell.Filler"; } static _cleanupConfigScheme(config) { super._cleanupConfigScheme(config); // BC code } clone() { return (new App.Arcology.Cell.Filler())._init(this); } };
MonsterMate/fc
src/arcologyBuilding/filler.js
JavaScript
mit
549
App.Arcology.Cell.Manufacturing = class extends App.Arcology.Cell.BaseCell { /** * @param {number} owner * @param {string} type */ constructor(owner, type = "Manufacturing") { super(owner); this.type = type; } static get cellName() { return "Manufacturing"; } /** * @returns {string} */ get colorClass() { switch (this.type) { case "Manufacturing": return "manufacturing"; case "Dairy": return "dairy"; case "Farmyard": return "farmyard"; case "Barracks": return "barracks"; case "Weapon Manufacturing": return "weaponsManufacturing"; case "Pens": return "pens"; case "Sweatshops": return "sweatshops"; default: return super.colorClass; } } /** * @returns {boolean} */ isBaseType() { return this.type === "Manufacturing"; } /** * @param {Array<number>} path * @returns {Node} */ cellContent(path) { if (this.type === "Dairy") { return App.Arcology.facilityCellContent(App.Entity.facilities.dairy); } if (this.type === "Farmyard") { return App.Arcology.facilityCellContent(App.Entity.facilities.farmyard); } switch (this.type) { case "Manufacturing": case "Pens": case "Sweatshops": return App.Arcology.getCellLink(path, this.type); case "Barracks": return App.UI.DOM.passageLink("Barracks", "Barracks"); case "Weapon Manufacturing": return App.UI.DOM.passageLink("Weapons Manufacturing", "weaponsManufacturing"); default: return App.UI.DOM.makeElement("span", `ERROR: invalid type: ${this.type}`, "error"); } } /** * @returns {string|Node} * @protected @override */ _setting() { let r = ""; switch (this.type) { case "Manufacturing": r = "rented to a variety of tenants for manufacturing purposes"; if (this.owner === 1) { r += ". You control this part of the arcology and all these tenants pay you rent"; } break; case "Sweatshops": if (this.owner === 1) { r = "designed for labor intensive manufacturing by menial slaves"; } else { r = "rented to a variety of tenants for manufacturing purposes"; } break; case "Pens": r = "designed to house hundreds of slaves for paying owners"; if (this.owner === 1) { r += ". You control this part of the arcology. If you own menial slaves, they will be kept here; otherwise, unused space will be rented to other slave brokers"; } break; } if (this.owner === 1) { return `This is a space in the arcology's service areas, ${r}.`; } return `This is a privately-owned space in the arcology's service areas, ${r}.`; } /** * @returns {Node} * @protected @override */ _body() { const fragment = document.createDocumentFragment(); const pensDOM = pens(this); if (pensDOM !== null) { console.log("if"); fragment.append(pensDOM); const p = document.createElement("p"); p.append(upgrades(this)); console.log("up"); fragment.append(p); } else { console.log("bor"); fragment.append(upgrades(this)); } return fragment; /** * @param {App.Arcology.Cell.Manufacturing} thisCell this is apparently undefined inside??? * @returns {null|HTMLParagraphElement} */ function pens(thisCell) { if (thisCell.type !== "Pens") { return null; } const paragraph = document.createElement("p"); const popCap = menialPopCap(); paragraph.append(App.UI.DOM.makeElement("div", popCap.text), App.UI.DOM.makeElement("div", `In total you are able to personally house a total of ${num(popCap.value)} menial slaves.`)); if (V.menials + V.menialBioreactors + V.fuckdolls > 0) { let r = "You own "; let list = []; if (V.menials > 0) { list.push(numberWithPluralOne(V.menials, "menial slave")); } if (V.menialBioreactors > 0) { list.push(numberWithPluralOne(V.menialBioreactors, "standard bioreactor")); } if (V.fuckdolls > 0) { list.push(numberWithPluralOne(V.fuckdolls, "standard Fuckdoll")); } r += `${list.toStringExt()}, `; if (V.menials + V.menialBioreactors + V.fuckdolls > 500) { r += "partially "; } r += "housed in this sector."; if (V.menials > 0 && V.Sweatshops > 0) { r += ` The simple labor slaves toil in ${V.arcologies[0].name}'s sweatshops, and only return here to sleep.`; } if (V.fuckdolls > 0 && V.arcade > 0) { r += ` The menial Fuckdolls are endlessly cycled through ${V.arcadeName}. They're restrained there and used by the public until their holes are no longer appealing, and then cycled back down here to rest until they've tightened up again.`; } if (V.menialBioreactors && V.dairyUpgradeMenials) { r += ` Whenever there's space in ${V.dairyName}, menial Bioreactors are taken out of storage here and restrained there, with ${V.dairyName}'s powerful hookups draining them of their useful fluids and feeding them generously so they can produce more.`; } paragraph.append(r); } return paragraph; } /** * @param {App.Arcology.Cell.Manufacturing} thisCell * @returns {DocumentFragment} */ function upgrades(thisCell) { const fragment = document.createDocumentFragment(); const cost = Math.trunc(10000 * V.upgradeMultiplierArcology); if (V.dairy === 0) { fragment.append(thisCell._makeUpgrade( "Construct a dairy to milk slaves on an industrial scale", () => { V.dairy = 5; thisCell.type = "Dairy"; }, cost, "and will incur upkeep costs" )); } if (V.experimental.food === 1) { if (V.farmyard === 0) { fragment.append(thisCell._makeUpgrade( "Construct a farming facility to grow food for your arcology and house animals", () => { V.farmyard = 5; thisCell.type = "Farmyard"; }, cost, "and will incur upkeep costs" )); } } if (V.mercenaries) { if (V.barracks !== 1) { fragment.append(thisCell._makeUpgrade( "Build an armory to properly house your mercenaries", () => { V.barracks = 1; thisCell.type = "Barracks"; }, cost, "but will reduce mercenary upkeep" )); } } if (V.secExpEnabled > 0 && !V.SecExp.buildings.weapManu) { fragment.append(thisCell._makeUpgrade( "Convert this sector to weapons manufacturing", () => { App.SecExp.weapManu.Init(); thisCell.type = "Weapon Manufacturing"; }, cost, "but will provide a weekly income and will unlock upgrades for our troops" )); } if (thisCell.type !== "Pens") { fragment.append(thisCell._makeUpgrade( "Convert to pens to increase the number of menial slaves you can house", () => { thisCell.type = "Pens"; }, cost )); } if (thisCell.type !== "Sweatshops") { fragment.append(thisCell._makeUpgrade( "Convert these facilities to use the labor of menial slaves", () => { thisCell.type = "Sweatshops"; }, cost )); } if (thisCell.type !== "Manufacturing") { fragment.append(thisCell._makeUpgrade( "Return this sector to standard manufacturing", () => { thisCell.type = "Manufacturing"; }, cost )); } return fragment; } } /** * @returns {boolean} */ canBeSold() { return ["Manufacturing", "Sweatshops", "Pens"].includes(this.type); } static _cleanupConfigScheme(config) { super._cleanupConfigScheme(config); // BC code } /** @returns {App.Arcology.Cell.Manufacturing} */ clone() { return (new App.Arcology.Cell.Manufacturing(this.owner))._init(this); } get className() { return "App.Arcology.Cell.Manufacturing"; } };
MonsterMate/fc
src/arcologyBuilding/manufacturing.js
JavaScript
mit
7,611
App.Arcology.Cell.Market = class extends App.Arcology.Cell.BaseCell { /** * @param {number} owner * @param {string} type */ constructor(owner, type = "Markets") { super(owner); this.type = type; } static get cellName() { return "Markets"; } /** * @returns {string} */ get colorClass() { switch (this.type) { case "Markets": return "markets"; case "Arcade": return "arcade"; case "Pit": return "pit"; case "Transport Hub": return "transportHub"; case "Corporate Market": return "corporateMarket"; default: return super.colorClass; } } isBaseType() { return this.type === "Markets"; } /** * @param {Array<number>} path * @returns {Node} */ cellContent(path) { switch (this.type) { case "Arcade": return App.Arcology.facilityCellContent(App.Entity.facilities.arcade); case "Pit": return App.Arcology.facilityCellContent(App.Entity.facilities.pit); case "Markets": return App.Arcology.getCellLink(path, "Markets"); case "Transport Hub": return App.UI.DOM.passageLink("Transport Hub", "transportHub"); case "Corporate Market": return App.UI.DOM.passageLink( "Corporate Market", "Market", () => { V.market = new App.Markets.GlobalVariable(); V.market.slaveMarket = "corporate"; V.market.newSlaves = []; V.market.numArcology = 1; V.nextButton = "Back to Main"; V.nextLink = "Main"; V.returnTo = "Main"; } ); default: return App.UI.DOM.makeElement("span", "ERROR: invalid type: " + this.type, "error"); } } /** * @returns {string|Node} * @protected @override */ _setting() { /* no need to check type, since you can only get here with the basic type */ let r = "area of the concourse occupied by large stores and markets, many of which sell slaves"; if (this.owner === 1) { return `This is an ${r}. You control this part of the arcology and all these tenants pay you rent.`; } return `This is a privately-owned ${r}.`; } /** * @returns {Node} * @protected @override */ _body() { const fragment = document.createDocumentFragment(); const cost = Math.trunc(10000 * V.upgradeMultiplierArcology); if (V.arcade === 0) { fragment.append(this._makeUpgrade( "Construct a sex arcade to present slaves' holes for public use", () => { this.type = "Arcade"; V.arcade = 10; }, cost, "and will incur upkeep costs" )); } if (!V.pit) { fragment.append(this._makeUpgrade( "Build a pit to host proper slave fights", () => { this.type = "Pit"; App.Facilities.Pit.init(); }, cost )); } if (V.secExpEnabled > 0 && !V.SecExp.buildings.transportHub) { fragment.append(this._makeUpgrade( "Centralize and modernize the transport hub", () => { this.type = "Transport Hub"; App.SecExp.transportHub.Init(); }, cost )); } const corpCost = Math.trunc(10000 * V.upgradeMultiplierArcology); if (V.corp.Market === 0 && V.corp.Incorporated === 1) { fragment.append(this._makeUpgrade( "Create a flagship slave market for your corporation here", () => { this.type = "Corporate Market"; V.corp.Market = 1; V.corp.Cash -= corpCost; }, 0, ` Costs ${cashFormat(corpCost)} of the corporation's money` )); } return fragment; } /** * @returns {boolean} */ canBeSold() { return this.type === "Markets"; } static _cleanupConfigScheme(config) { super._cleanupConfigScheme(config); // BC code } /** @returns {App.Arcology.Cell.Market} */ clone() { return (new App.Arcology.Cell.Market(this.owner))._init(this); } get className() { return "App.Arcology.Cell.Market"; } };
MonsterMate/fc
src/arcologyBuilding/markets.js
JavaScript
mit
3,719
App.Arcology.Cell.Penthouse = class extends App.Arcology.Cell.BaseCell { constructor() { super(1); } /** * @returns {string} */ get colorClass() { return "penthouse"; } /** * @returns {number} */ get width() { return 2; } /** * @param {Array<number>} path * @returns {Node} */ cellContent(path) { const fragment = document.createDocumentFragment(); const link = App.UI.DOM.passageLink("Penthouse", "Manage Penthouse"); const hotkey = App.UI.DOM.makeElement("span", App.UI.Hotkeys.hotkeys("Manage Penthouse"), "hotkey"); if (V.verticalizeArcologyLinks === 0) { const div = document.createElement("div"); div.append(link, " ", hotkey); fragment.append(div); } else { fragment.append(link, " ", hotkey); } const wrapper = getWrapper(fragment); const fcs = App.Entity.facilities; /** * @param {App.Entity.Facilities.Facility} facility * @param {string} [passageName] */ function addFacility(facility, passageName) { if (facility.established) { const report = facility.occupancyReport(false); wrapper.append(createFacilityDiv( App.UI.DOM.passageLink(facility.UIName, passageName || facility.genericName), report ? `(${report})` : null )); } } addFacility(fcs.masterSuite); addFacility(fcs.headGirlSuite, "Head Girl Suite"); addFacility(fcs.armory, "BG Select"); addFacility(fcs.servantsQuarters); addFacility(fcs.spa); addFacility(fcs.nursery); addFacility(fcs.clinic); addFacility(fcs.schoolroom); addFacility(fcs.cellblock); if (V.incubator) { const inc = App.Entity.facilities.incubator; const link = App.UI.DOM.passageLink(inc.UIName, "Incubator"); const desc = `(${numberWithPluralOne(inc.capacity - V.tanks.length, "empty tank")})`; if (V.readySlaves > 0) { wrapper.append(createFacilityDiv(link, desc, App.UI.DOM.makeElement("span", "[!]", "noteworthy"))); } else { wrapper.append(createFacilityDiv(link, desc)); } } if (V.researchLab.level > 0) { wrapper.append(createFacilityDiv(App.UI.DOM.passageLink("Prosthetic Lab", "Prosthetic Lab"))); } return fragment; /** * @param {ParentNode} outer * @returns {HTMLDivElement} */ function getWrapper(outer) { const wrapper = document.createElement("div"); if (V.verticalizeArcologyLinks !== 0) { let gridClass = `grid${V.verticalizeArcologyLinks}`; wrapper.classList.add("gridWrapper", gridClass); } outer.append(wrapper); return wrapper; } /** * * @param {HTMLElement} link * @param {(Node|string)} [content] * @returns {HTMLDivElement} */ function createFacilityDiv(link, content) { const div = document.createElement("div"); div.append(link); // in collapsed mode additional information needs to be in it's own div to stop linebreaks at weird places if (V.verticalizeArcologyLinks === 0) { div.classList.add("collapsed"); if (content) { div.append(" ", content); } } else if (content) { const innerDiv = document.createElement("div"); innerDiv.append(content); div.append(" ", innerDiv); } return div; } } static _cleanupConfigScheme(config) { super._cleanupConfigScheme(config); // BC code } /** @returns {App.Arcology.Cell.Penthouse} */ clone() { return new App.Arcology.Cell.Penthouse()._init(this); } get className() { return "App.Arcology.Cell.Penthouse"; } };
MonsterMate/fc
src/arcologyBuilding/penthouse.js
JavaScript
mit
3,412
/** * @typedef {object} arcologyEnvironment * @property {string} terrain * @property {boolean} established * @property {string} fs */ /** * @typedef {object} buildingPreset * @property {function(arcologyEnvironment):boolean} isAllowed * @property {function(arcologyEnvironment):{building: App.Arcology.Building, apply: function():void}} construct */ /** * @type {Array<buildingPreset>} */ App.Arcology.presets = (function() { /** * @typedef {object} sectionTemplate * @property {string} id * @property {Array<string>} rows * @property {boolean} [ground] */ /** * @typedef {Array<sectionTemplate|string>} buildingTemplate first entry is template name */ /* NOTE: test new templates, broken templates WILL explode t is markets; () is possible values for a sector, first is default; [number] is for filler space, must be parsable by Number(), 1 equals the width of a normal cell */ const templates = { default: ["default", {id: "penthouse", rows: ["p"]}, {id: "shops", rows: ["sss"]}, {id: "apartments", rows: ["aaaa", "aaaa", "aaaa"]}, {id: "markets", rows: ["ttttt"], ground: true}, {id: "manufacturing", rows: ["mmmmm"]}], urban: ["urban", {id: "penthouse", rows: ["p"]}, {id: "shops", rows: ["sss"]}, {id: "apartments", rows: ["aaaa", "aaaa", "dddd"]}, {id: "markets", rows: ["(dt)tt(dt)", "t(tm)(tm)t"], ground: true}, {id: "manufacturing", rows: ["mmmm"]}], rural: ["rural", {id: "penthouse", rows: ["p"]}, {id: "shops", rows: ["sss"]}, {id: "apartments", rows: ["aaaaa", "aaaaa"]}, {id: "markets", rows: ["tt(mt)(mt)tt"], ground: true}, {id: "manufacturing", rows: ["mmmmm"]}], ravine: ["ravine", {id: "penthouse", rows: ["p"]}, {id: "shops", rows: ["sss"]}, {id: "ravine-markets", rows: ["ttttt"], ground: true}, {id: "apartments", rows: ["aaaa", "aaaa", "aaaa"]}, {id: "manufacturing", rows: ["mmmmm"]}], marine: ["marine", {id: "penthouse", rows: ["p"]}, {id: "shops", rows: ["ssss"]}, {id: "apartments", rows: ["laal", "aaaa", "aaaa"]}, {id: "markets", rows: ["tt(mt)tt"], ground: true}, {id: "manufacturing", rows: ["(tm)mmm(tm)"]}], oceanic: ["oceanic", {id: "penthouse", rows: ["p"]}, {id: "shops", rows: ["sss"]}, {id: "apartments", rows: ["llll", "aaaa", "aaaa"]}, {id: "markets", rows: ["ttttt"], ground: true}, {id: "manufacturing", rows: ["mmmmm"]}], dick: ["dick", // yes, this is a giant dick {id: "penthouse", rows: ["l", "p"]}, {id: "apartments", rows: ["a", "a", "a", "d[0.75]a[0.75]d", "dd[0.25]s[0.25]dd"]}, {id: "markets", rows: ["ttsstt"], ground: true}, {id: "manufacturing", rows: ["tm[0.25]m[0.25]mt", "m[0.75]m[0.75]m"]}], }; /** * @param {sectionTemplate[]} template * @returns {App.Arcology.Building} */ function templateToBuilding(template) { const sections = []; const layout = template[0]; for (let i = 1; i < template.length; i++) { sections.push(getSection(template[i])); } return new App.Arcology.Building(layout, sections); /** * @param {sectionTemplate} section * @returns {App.Arcology.Section} */ function getSection(section) { const rows = []; for (const row of section.rows) { rows.push(getRow(row)); } return new App.Arcology.Section(section.id, rows, section.ground === true /* to ensure no undefined gets through */); } /** * @param {string} rowTemplate * @returns {App.Arcology.Cell.BaseCell[]} */ function getRow(rowTemplate) { const cells = []; const iter = rowTemplate[Symbol.iterator](); let next = iter.next(); while (!next.done) { if (next.value === "(") { next = iter.next(); const cell = charToCell(next.value).cell; do { cell.allowedConversions.push(charToCell(next.value).code); next = iter.next(); } while (next.value !== ")"); cells.push(cell); } else if (next.value === "[") { let number = ""; next = iter.next(); while (next.value !== "]") { number += next.value; next = iter.next(); } cells.push(new App.Arcology.Cell.Filler(Number(number))); } else { cells.push(charToCell(next.value).cell); } next = iter.next(); } return cells; } /** * @param {string} char * @returns {{cell: App.Arcology.Cell.BaseCell, code:string}} */ function charToCell(char) { switch (char) { case "p": return {cell: new App.Arcology.Cell.Penthouse(), code: "Penthouse"}; case "s": return {cell: new App.Arcology.Cell.Shop(1), code: "Shop"}; case "l": return {cell: new App.Arcology.Cell.Apartment(1, 1), code: "Apartment"}; case "a": return {cell: new App.Arcology.Cell.Apartment(1), code: "Apartment"}; case "d": return {cell: new App.Arcology.Cell.Apartment(1, 3), code: "Apartment"}; case "t": return {cell: new App.Arcology.Cell.Market(1), code: "Market"}; case "m": return {cell: new App.Arcology.Cell.Manufacturing(1), code: "Manufacturing"}; default: return {cell: new App.Arcology.Cell.BaseCell(1), code: "BaseCell"}; } } } /** * @param {App.Arcology.Building} building * @param {arcologyEnvironment} environment * @returns {{building: App.Arcology.Building, apply: function()}} */ function randomizeBuilding(building, environment) { const apply = []; if (Math.random() < 0.5) { apply.push(addFsShop(building, environment.fs)); } return {building: building, apply: () => { apply.forEach(a => { a(); }); }}; } /** * @param {App.Arcology.Building} building * @param {string} fs * @returns {function():void} */ function addFsShop(building, fs) { function randomShop() { return /** @type {App.Arcology.Cell.Shop} */(building.findCells(cell => cell instanceof App.Arcology.Cell.Shop).random()); } switch (fs) { case "Supremacist": randomShop().type = "Supremacist"; return () => { V.FSPromenade.Supremacist = 1; }; case "Subjugationist": randomShop().type = "Subjugationist"; return () => { V.FSPromenade.Subjugationist = 1; }; case "GenderRadicalist": randomShop().type = "Gender Radicalist"; return () => { V.FSPromenade.GenderRadicalist = 1; }; case "GenderFundamentalist": randomShop().type = "Gender Fundamentalist"; return () => { V.FSPromenade.GenderFundamentalist = 1; }; case "Paternalist": randomShop().type = "Paternalist"; return () => { V.FSPromenade.Paternalist = 1; }; case "Degradationist": randomShop().type = "Degradationist"; return () => { V.FSPromenade.Degradationist = 1; }; case "AssetExpansionist": randomShop().type = "Asset Expansionist"; return () => { V.FSPromenade.AssetExpansionist = 1; }; case "SlimnessEnthusiast": randomShop().type = "Slimness Enthusiast"; return () => { V.FSPromenade.SlimnessEnthusiast = 1; }; case "TransformationFetishist": randomShop().type = "Transformation Fetishist"; return () => { V.FSPromenade.TransformationFetishist = 1; }; case "BodyPurist": randomShop().type = "Body Purist"; return () => { V.FSPromenade.BodyPurist = 1; }; case "MaturityPreferentialist": randomShop().type = "Maturity Preferentialist"; return () => { V.FSPromenade.MaturityPreferentialist = 1; }; case "YouthPreferentialist": randomShop().type = "Youth Preferentialist"; return () => { V.FSPromenade.YouthPreferentialist = 1; }; case "Pastoralist": randomShop().type = "Pastoralist"; return () => { V.FSPromenade.Pastoralist = 1; }; case "PhysicalIdealist": randomShop().type = "Physical Idealist"; return () => { V.FSPromenade.PhysicalIdealist = 1; }; case "ChattelReligionist": randomShop().type = "Chattel Religionist"; return () => { V.FSPromenade.ChattelReligionist = 1; }; case "RomanRevivalist": randomShop().type = "Roman Revivalist"; return () => { V.FSPromenade.RomanRevivalist = 1; }; case "NeoImperialist": randomShop().type = "Neo-Imperialist"; return () => { V.FSPromenade.NeoImperialist = 1; }; case "AztecRevivalist": randomShop().type = "Aztec Revivalist"; return () => { V.FSPromenade.AztecRevivalist = 1; }; case "EgyptianRevivalist": randomShop().type = "Egyptian Revivalist"; return () => { V.FSPromenade.EgyptianRevivalist = 1; }; case "EdoRevivalist": randomShop().type = "Edo Revivalist"; return () => { V.FSPromenade.EdoRevivalist = 1; }; case "ArabianRevivalist": randomShop().type = "Arabian Revivalist"; return () => { V.FSPromenade.ArabianRevivalist = 1; }; case "ChineseRevivalist": randomShop().type = "Chinese Revivalist"; return () => { V.FSPromenade.Degradationist = 1; }; case "Repopulationist": randomShop().type = "Repopulationist"; return () => { V.FSPromenade.Repopulationist = 1; }; case "Eugenics": randomShop().type = "Eugenics"; return () => { V.FSPromenade.Eugenics = 1; }; case "HedonisticDecadence": randomShop().type = "Hedonism"; return () => { V.FSPromenade.Hedonism = 1; }; case "IntellectualDependency": randomShop().type = "Intellectual Dependency"; return () => { V.FSPromenade.IntellectualDependency = 1; }; case "SlaveProfessionalism": randomShop().type = "Slave Professionalism"; return () => { V.FSPromenade.SlaveProfessionalism = 1; }; case "PetiteAdmiration": randomShop().type = "Petite Admiration"; return () => { V.FSPromenade.PetiteAdmiration = 1; }; case "StatuesqueGlorification": randomShop().type = "Statuesque Glorification"; return () => { V.FSPromenade.StatuesqueGlorification = 1; }; default: return () => {}; } } return [ /* basic types for controlled start */ { isAllowed: env => !env.established && env.terrain === "default", construct: () => { return {building: templateToBuilding(templates.default), apply: () => {}}; } }, { isAllowed: env => !env.established && env.terrain === "urban", construct: () => { return {building: templateToBuilding(templates.urban), apply: () => {}}; } }, { isAllowed: env => !env.established && env.terrain === "rural", construct: () => { return {building: templateToBuilding(templates.rural), apply: () => {}}; } }, { isAllowed: env => !env.established && env.terrain === "ravine", construct: () => { return {building: templateToBuilding(templates.ravine), apply: () => {}}; } }, { isAllowed: env => !env.established && env.terrain === "marine", construct: () => { return {building: templateToBuilding(templates.marine), apply: () => {}}; } }, { isAllowed: env => !env.established && env.terrain === "oceanic", construct: () => { return {building: templateToBuilding(templates.oceanic), apply: () => {}}; } }, /* crazy presets for established arcologies TODO */ { isAllowed: env => env.established && env.terrain === "default", construct: env => { return randomizeBuilding(templateToBuilding(templates.default), env); } }, { isAllowed: env => env.established && env.terrain === "urban", construct: env => { return randomizeBuilding(templateToBuilding(templates.urban), env); } }, { isAllowed: env => env.established && env.terrain === "rural", construct: env => { return randomizeBuilding(templateToBuilding(templates.rural), env); } }, { isAllowed: env => env.established && env.terrain === "ravine", construct: env => { return randomizeBuilding(templateToBuilding(templates.ravine), env); } }, { isAllowed: env => env.established && env.terrain === "marine", construct: env => { return randomizeBuilding(templateToBuilding(templates.marine), env); } }, { isAllowed: env => env.established && env.terrain === "oceanic", construct: env => { return randomizeBuilding(templateToBuilding(templates.oceanic), env); } }, { isAllowed: env => env.established && Math.random() < 0.1, construct: env => { return randomizeBuilding(templateToBuilding(templates.dick), env); } }, ]; }()); /** * @param {arcologyEnvironment} environment * @returns {buildingPreset} */ App.Arcology.randomPreset = function(environment) { return App.Arcology.presets.filter(p => p.isAllowed(environment)).random(); }; /** * Shows all possible upgrades for a given building. * @param {App.Arcology.Building} building * @returns {HTMLElement} */ App.Arcology.upgrades = function(building) { const outerDiv = document.createElement("div"); /** * @typedef upgrade * @property {string} id used to identify already build upgrades, unique! * @property {Array<string>} layouts * @property {Array<string>} exclusive any upgrade is always exclusive to itself. NOTE: keep in mind that * exclusiveness has to be added to both upgrades! * @property {string} name as shown to player. * @property {string} desc Fits in a sentence like this: The next major upgrade needed is "desc" * @property {number} cost * @property {function():void} apply */ /** @type {Array<upgrade>} */ const upgrades = [ { id: "spire", layouts: ["default", "urban", "rural", "ravine", "marine", "oceanic"], exclusive: [], name: "spire", desc: "the addition of a spire at the top of the arcology to increase the space available for the wealthiest citizens to own whole floors", cost: 250000, apply: () => { building.sections.push(new App.Arcology.Section("spire", [ [new App.Arcology.Cell.Apartment(1, 1), new App.Arcology.Cell.Apartment(1, 1)], [new App.Arcology.Cell.Apartment(1, 1), new App.Arcology.Cell.Apartment(1, 1)] ])); V.spire = 1; } }, { id: "fountain", layouts: ["dick"], exclusive: [], name: "fountain", desc: "a monumental fountain on top of the arcology using the latest advancements in building technology making your arcology known far and wide as a great supporter of modern architecture", cost: 250000, apply: () => { V.building.sections.push(new App.Arcology.Section("fountain", [[ new App.Arcology.Cell.Decorative({ width: 170, rotation: 70, xOffset:-130, yOffset: 220, absoluteWidth:1, cellHeight: 330 }), new App.Arcology.Cell.Decorative({ width: 250, rotation: 95, xOffset:-110, yOffset: 80, absoluteWidth:1 }), new App.Arcology.Cell.Decorative({ width: 190, rotation: 115, xOffset:-30, yOffset: 190, absoluteWidth:1 }), ]])); V.spire = 1; } } ]; let count = 0; for (let upgrade of upgrades) { if (upgrade.layouts.includes(building.layout) && !building.usedUpgrades.includesAny(upgrade.id, ...upgrade.exclusive)) { const div = document.createElement("div"); div.classList.add("choices"); const cost = upgrade.cost * V.upgradeMultiplierArcology; div.append(`...${upgrade.desc}. `, App.UI.DOM.makeElement("span", `This huge project will cost ${cashFormat(cost)} `, "note"), App.UI.DOM.passageLink(`Build ${upgrade.name}`, passage(), () => { if (building.usedUpgrades.length === 0) { // the first major upgrade gives skill, successive ones not, mainly because there might be a // different number depending on layout. V.PC.skill.engineering++; } building.usedUpgrades.push(upgrade.id); upgrade.apply(); cashX(-cost, "capEx"); })); outerDiv.append(div); count++; } } if (count === 0) { return App.UI.DOM.makeElement("span", "The arcology structure is fully upgraded.", "note"); } else { if (count === 1) { outerDiv.prepend("The next major upgrade is..."); } else { outerDiv.prepend("Possible major upgrades to the arcology are ..."); } return outerDiv; } };
MonsterMate/fc
src/arcologyBuilding/presets.js
JavaScript
mit
15,578
App.Arcology.Cell.Shop = class extends App.Arcology.Cell.BaseCell { /** * @param {number} owner * @param {string} type */ constructor(owner, type = "Shops") { super(owner); this.type = type; } static get cellName() { return "Shops"; } /** * @returns {string} */ get colorClass() { switch (this.type) { case "Shops": return "shops"; case "Brothel": return "brothel"; case "Club": return "club"; default: return "fsShops"; } } isBaseType() { return this.type === "Shops"; } /** * @param {Array<number>} path * @returns {Node} */ cellContent(path) { if (this.type === "Brothel") { return App.Arcology.facilityCellContent(App.Entity.facilities.brothel); } else if (this.type === "Club") { return App.Arcology.facilityCellContent(App.Entity.facilities.club); } else if (this.type === "Shops") { return App.Arcology.getCellLink(path, this.type); } else { return App.Arcology.getCellLink(path, `${this.type} Shops`); } } /** * @returns {DocumentFragment} * @protected @override */ _setting() { const A = V.arcologies[0]; const fragment = document.createDocumentFragment(); const {he, himself, He, girl, him, his, woman} = getNonlocalPronouns(V.seeDicks); const {his: hisP} = getPronouns(V.PC); // is this correct?, was <<setPlayerPronouns>> if (this.owner === 1) { fragment.append("This is a sector of the arcology's living areas, "); } else { fragment.append("This is a privately-owned sector of the arcology's living areas, "); } switch (this.type) { case "Shops": fragment.append("filled with a variety of small, higher-end shops, salons, brothels, and clubs."); break; case "Subjugationist": fragment.append(`dedicated to ${A.FSSubjugationistRace} subjugationism. There are genteel dining establishments with ${A.FSSubjugationistRace} wait staff. Shops offer traditional slaving implements, including fine bespoke leather whips. To go by the shrieking, one of these is being tried on a shop's complimentary whipping targets. `, App.UI.DOM.linkReplace("Shop there", `Interested, you head in to see how the latest styles feel in hand. The fearful slave sales${girl}s offer you complimentary tries at the targets, of course. They barely manage to avoid bursting into tears, knowing that if they make the slightest mistake representing the shop to the arcology owner, they'll be chained up for whip trials, too. The rich handmade leather is supple and handy, and readily extracts throat rending screams from the slaves you're encouraged to try it on.`)); break; case "Supremacist": fragment.append(`dedicated to ${A.FSSupremacistRace} supremacism. There are some select social establishments here which don't actually use any slaves at all, offering a surprisingly egalitarian atmosphere in which citizens of the master race can relax in each others' company without any subhuman filth present. `, App.UI.DOM.linkReplace("Put in an appearance", `You decide to stop in at one of these establishments, and of course your money's no good. You're welcomed with considerable bonhomie, and much less formality than you usually receive at social events in your arcology. Everyone's ${A.FSSupremacistRace} here, and in that you're all equal, and all good friends. Everyone wants to have at least a quick word, and you stay longer than you originally meant to.`)); break; case "Gender Radicalist": fragment.append("dedicated to Gender Radicalism. The shops here offer a bewildering cornucopia of sex toys. Citizens can kit themselves and their slaves out for anything, regardless of bodily layout. A female citizen is looking over the latest strap-ons, while a male peer is considering versions designed to enable double penetration by one person. ", App.UI.DOM.linkReplace("Try one", `You decide to try one of the latest models. Naturally, the store is eager to have you seen considering their products. The harness is very comfortable, and it ${ V.PC.dick !== 0 ? `equips you with a second phallus. The slave sales${girl} lacks a vagina, but encourages you to try the setup on ${him} anyway, promising that ${his} backpussy can accept double penetration. It can.` : `provides you with an extremely large phallus, which cums from an internal reservoir. The slave sales${girl} encourages you to try the setup on ${him}, promising that ${his} holes can accommodate it. They can.`}` )); break; case "Gender Fundamentalist": fragment.append(`dedicated to Gender Fundamentalism. The establishments here are mostly focused on ${A.FSRestart !== "unset" ? "keeping slaves attractively feminine. There are shops offering all kinds of treatments, drugs, clothes, and furniture to satisfy even the most discerning lady " : "citizen reproduction with slaves. There are shops offering all kinds of treatments, drugs, clothes, and furniture to facilitate the successful impregnation of one's chattel, along with a variety of beauty products to keep them soft and feminine"}. `, App.UI.DOM.linkReplace("Get a massage", `You decide to put in an appearance at a tenant business, and the massage parlors are of course very eager to offer you complimentary services. The masseuse is very well-trained, and not at all a sex toy with poor massage skills as a veneer for handjob services. ${He} releases the muscle soreness from your latest workout, and uses ${his} delicate touch to bring you to an enjoyable orgasm; ${he} ${ V.PC.dick !== 0 ? `catches your cum in ${his} mouth and swallows it` : "swallows your femcum" } with every appearance of appetite.`)); break; case "Paternalist": fragment.append(`dedicated to Paternalism. Many of the establishments here cater to slaves, some even to slaves exclusively. They offer luxurious and relaxing treatment for good ${girl}s whose owners send them here as rewards. Trusted slaves enter and exit these without any visible restraint or accompaniment, looking for all the world like pretty ${girl}s on a day out. `, App.UI.DOM.linkReplace("Tour the area", "You decide to put in an appearance at these establishments, and tour their front lobbies, listening politely to the educated slave receptionists' polished descriptions of the services offered. You stay out of the back areas, of course; those are for relaxing slaves, and owners typically leave them be while they're there. Most of the slaves moving through the area know who you are, and many of them are confident enough to give you respectful smiles.")); break; case "Degradationist": fragment.append("dedicated to Degradationism. The stores for slaveowners sell all sorts of inventive restraints and punishments. There are also a few of a uniquely Degradationist establishment: torture parlors, where any citizen can send a slave for punishment by paying customers, within bounds defined by the owner. ", App.UI.DOM.linkReplace("Try a round", `You decide to put in an appearance at a tenant business and show off your skills, and the torture parlors are very eager to have you accept a complimentary round. You select a pretty ${girl} sent to a torture parlor for some unknown failing by ${his} owner, and use a switch to flog ${his} calves, inner thighs, and breasts until ${he} ${ V.seePee === 1 ? `loses control of ${his} bladder` : "passes out" }. ${ V.PC.skill.slaving >= 100 ? "You're skilled at this. The trick is to stop just short of blows that will break the skin, applying all possible pain without any inconvenient blood." : `There's a bit of blood, but ${his} owner will expect that.`}`)); break; case "Body Purist": fragment.append("dedicated to Body Purism. There are high end clinics for citizens, with medical specialists skilled in the latest longevity treatments. Shops offer beauty treatments, anti-aging products, and personal massage services. The slave masseuses are naturally beautiful, and their bodies are obviously part of the services offered. ", App.UI.DOM.linkReplace("Get a massage", `You decide to put in an appearance at a tenant business, and the massage parlors are of course very eager to offer you complimentary services. The masseuse is very well-trained, and not at all a sex toy with poor massage skills as a veneer for handjob services. ${He} releases the muscle soreness from your latest workout, and uses ${his} delicate touch to bring you to an enjoyable orgasm; ${he} ${ V.PC.dick !== 0 ? `catches your cum in ${his} mouth and swallows it` : "swallows your femcum" } with every appearance of appetite.`)); break; case "Transformation Fetishist": fragment.append("dedicated to Transformation Fetishism. Autosurgeries are expensive, and require a lot of infrastructure, so almost all of your citizens have to send their slaves to clinics for surgical transformation. These establishments attempt to differentiate themselves by specializing in different surgeries, and advertising what they're best at. ", App.UI.DOM.linkReplace("Shop around", `You decide to shop around the best surgery clinics, to put in an appearance and check out the latest developments available to citizens less exalted than yourself. The slave sales${girl}s are all heavily modified silicone bimbos, with an emphasis on whatever their owner's surgical specialty is. The lip specialists' sales${girl}s have facepussies so huge they can't talk at all, so they wear touchscreens around their necks that do the talking for them.`)); break; case "Youth Preferentialist": fragment.append(`dedicated to Youth Preferentialism. The shops here are quite varied. Some, like the tailors, only betray their focus on young slaves by their selections of school${girl} outfits, girlish leotards, and the like. There are several high-end slave trainers who specialize in maximizing slaves' ${ V.seeDicks < 100 ? "vaginal and" : ""} anal skills while they're still virgins, with instruction only. `, App.UI.DOM.linkReplace("Look in on the classes", `You decide to put in an appearance and look into the training sessions. Of course, the trainers are very eager to share all the details with the arcology owner, and have you seen displaying an interest in their work. You're shown a classroom of obedient young slaves, right at sale age, paying rapt attention to a male trainer and a slave at the head of the classroom. He's reviewing how to relax during one's first time before 'deflowering' the teacher's assistant, whose ${ V.seeDicks > 25 ? "asshole is allowed to rest and return to virgin tightness" : "hymen is surgically restored" } between sessions.`)); break; case "Maturity Preferentialist": fragment.append("dedicated to Maturity Preferentialism. It's not immediately apparent, though the stores here offer fashions that are obviously designed to flatter mature women, and anti-aging products of all kinds are prominently displayed. What there are, though, are quite a number of pretty, scantily clad female citizens here, obviously retired from sexual slavery and looking to slake their still trained libidos with any handsome fellow citizen interested. ", App.UI.DOM.linkReplace("Hook up with a MILF", `Many of them recognize you, and it's immediately apparent that you have your choice of pretty much every retired slave present. You select the prettiest and make out with ${him} for a while, among many admirers, until you feel like bringing ${him} over to a nearby bench and doing ${him}. ${ V.PC.dick === 0 ? `${He}'s as eager as a teenager to have a lesbian experience in public, and can't stop giggling as you fuck.` : A.FSGenderFundamentalist !== "unset" ? `Like many recently retired slaves in your arcology, ${he}'s gotten pregnant as a free ${woman}, and it's supercharged ${his} sex drive. No matter what you do to ${him}, ${he} just wants more.` : A.FSGenderRadicalist !== "unset" ? `${He}'s got a big dick, and clearly has close friends among the other recently retired ${girl}s, but is very willing to be your bottom, especially in public.` : `${He} was horny to begin with, but the foreplay and the naughtiness of doing it out in public has ${him} as eager as a teenager, and ${he} goes wild.` }`)); break; case "Slimness Enthusiast": fragment.append("dedicated to Slimness Enthusiasm. The shops here are quite varied. Some, like the tailors, only betray their focus on slim slaves by their selections of lingerie for petite breasts and trim hips. There are a large number of contract slave exercisers and slave dietitians, since many citizens who can afford a slave need assistance there. ", App.UI.DOM.linkReplace("Tour the trainers", "You decide to put in an appearance and look around the trainers. They're very eager to show you around, of course, and have you seen looking around; your expertise in keeping slaves slender is well known. The most inspiring sight you're shown is a long row of slaves on treadmills, running as fast as their individual fitness can support. They do this nude, since none of them have boobs big enough to require support, offering the sight of a long row of cute butts covered in a sheen of feminine sweat.")); break; case "Asset Expansionist": fragment.append(`dedicated to Asset Expansionism. The sector's focus is unmissable, even in the clothes stores. Many of the bras on offer look like a cross between an engineering marvel and a bad joke, and there are dresses that look like parachutes when they aren't on a mannequin or worn by a slave sales${girl}. Then there's the crane store. `, App.UI.DOM.linkReplace("Shop there", `You decide to look in on the crane showroom, to see how citizens who don't own enough slaves to do the lifting and carrying are served. The huge-boobed slave sales${girl}s show you a variety of wheeled cranes that can help support a slave's breasts if they get too big for ${him} to walk, and ${he} needs to go somewhere. You have other slaves to help with that, and mechanical assistance built into your penthouse, but not everyone does. The sales${girl}s work in pairs, so one of them can unbutton ${his} tent-like blouse and demonstrate the merchandise with ${his} monstrous udders.`)); break; case "Pastoralist": fragment.append(`dedicated to Pastoralism. Milking is mostly done elsewhere, so the establishments here are a curious mix of farm supply stores and eateries. You can sample all kinds of ice cream, shakes, smoothies, cheeses, butter, and other dairy products here, all made from creamy human milk drawn from a busty slave${girl}'s breasts. ${ V.seeDicks > 0 ? `There are also all kinds of slave beauty products and foods made from 'the other slave${girl} milk,' cum.` : ""} `, App.UI.DOM.linkReplace("Tour the kitchens", "The eateries are very eager to have you seen inspecting their equipment and methods, and roll out the red carpet for you as they show you around. All kinds of old world culinary skill is on display here: artisan cheesemaking, butter hand-churned by muscular slaves, sweet custards and delicate flans that could compete in any dessert contest in the world. It's all so very refined and normal that it's quite easy to forget completely that the milk that is the basis of all this food comes from slaves.")); break; case "Physical Idealist": fragment.append("dedicated to Physical Idealism. There are supplement shops and workout equipment stores here, but they're small and packed into the spaces between all the gyms. These are some of the best patronized gyms in the world, because not only do physical idealists work out, there's a strong inclination to work out in public. ", App.UI.DOM.linkReplace("Leg day", `It's all very positive, and the one unspoken rule is not to disparage others, but there's definitely competition. So when you step forward and get a complimentary day pass from one of the bubbly, permed slave${girl} receptionists, you have an audience. What kind of definition you've got in your quads is going to be a subject of conversation today, but you've got confidence. You lift, and receive respectful complements and bro-fists. Then you take your turn spotting others, an honor your citizens greatly appreciate.`)); break; case "Chattel Religionist": fragment.append("dedicated to Chattel Religionism. The stores offer all the items useful to a slaveowner who holds the new faith: proper slave restraints and penitent slave garments, of course, but also fine oils and incense, candles, tapers, and other devotional necessities. There are also correctional convents for the assistance of citizens with wayward slaves. ", App.UI.DOM.linkReplace("Visit the convents", `As a leader of the new faith, your visitation rights on these convents are unquestioned, and their owners are indeed eager to have you look around and offer your revered advice. The average citizen with only a slave or two often needs help keeping ${girl}s within the faith. The convents are severe houses of correction, and the sounds of prayer and penitence are omnipresent. In one nave, a slave prostrates ${himself} before a religious icon, praying in a loud, desperate tone while ${ V.seeDicks === 0 ? "a woman in nun's attire holding a ribbed vibrating dildo" : V.seeDicks < 100 ? "futanari in nun's attire" : "a man in monk's attire" } fucks ${him} mercilessly from behind.`)); break; case "Roman Revivalist": fragment.append("dedicated to Roman Revivalism. Since the forums are out on the arcology's plazas, there are fewer stores here. There are eateries, from which the sharp smell of ", App.UI.DOM.makeElement("span", "garum", "note"), " is distinctly identifiable, but most of the space is occupied by hypocaust baths, which are free to enter but include various concession stands run by slaves.", App.UI.DOM.linkReplace("Clean yourself", "A good Roman trip to the baths serves to cleanse, but it's a social experience, too. After being oiled down by a skilled slave, you work out in the proper nude, and then have the oil and any dirt scraped off your skin with by another slave. Then you make your way across the heated floor through a set of baths of varying temperatures, ending in a large and egalitarian space where many naked citizens of the new Rome are sharing the news of the day. You're welcomed with surprise, but also with comradeship, and made to feel welcome.")); break; case "Aztec Revivalist": fragment.append("dedicated to Aztec Revivalism. There are a variety of stores selling tools of worship ranging from bloodletting daggers to sacrificial altars, some even open for public use. Any blood spilt here flows to a shallow reflecting pool in the middle of the plaza. ", App.UI.DOM.linkReplace("Pay tribute", "You decide to pay tribute to the gods and draw your preferred tool for bloodletting. You run it across your hand and watch as your blood begins to flow. You let several drops fall into the pool before stemming the flow as a good feeling washes over you.")); break; case "Egyptian Revivalist": fragment.append(`dedicated to Egyptian Revivalism. There are a bewildering multiplicity of shops here; ancient Egypt is wonderfully fertile of linen fashion, fine jewelry, perfumes, incense, and other luxury goods. Beautiful warm-skinned slave${girl}s of all races have wares in hand to offer citizens who pass by, and they seem well-treated. `, App.UI.DOM.linkReplace("Shop around", `You decide to tour the shops; with so much fine merchandise on offer, it's possible that someone's selling something that even you haven't heard of, and it's always good to see and be seen. The slave sales${girl}s are welcoming, and most are so well-trained that despite knowing who you are, they treat you with the same friendly courtesy that they offer everyone. They all offer you the peculiar straight-down curtsey that allows them to keep their necks straight, since they're all wearing gradually melting perfume cakes atop their hair, making them glisten with beguiling scent.`)); break; case "Neo-Imperialist": fragment.append("typical of your Neo-Imperial society. There is a nearly endless variety of shops here with an equally endless variety of goods; high-tech nanofabrics and the latest fashions from what remains of the old world stand side-by-side with jewelry, slave collars, fine metal blades, and noodle shops. Bright neon signs light up every inch of every street corner, and guards with heavy battle armor painted in the colors of your house stand watch over shouting merchants and crowded stalls. It's like a medieval town square transported to the twenty-second century. Everyone here has something to sell, and at your appearance they almost immediately begin to clamor for your attention.", App.UI.DOM.linkReplace("Wander the Streets", "You take some time to look for an interesting ware; someone at every stall insists that they have what you need, even before you know what you're looking for. The slave salesgirls immediately recognize you and all but grovel at your feet as you enter their shops, smelling of eloquent prefumes and skin that glistens beneath the neon glow of the streets. Despite how crowded this distrct is, people move to the side when you walk through, and many bow as you walk by with mumbles of hierarchical respect. In the end, you purchase a supposedly magical trinket from a street shaman and a particularly elegant nanolinen shirt from what used to be France and head home, the sights and sounds of your bustling new marketplace fading behind you.")); break; case "Edo Revivalist": fragment.append("dedicated to Edo Revivalism. There are strict restrictions on the establishments' décor here, so ", App.UI.DOM.makeElement("span", "tatami", "note"), " mats and paper partitions are ubiquitous. There are handsome ", App.UI.DOM.makeElement("span", "sake", "note"), " shops and tea rooms offering the traditional ceremony, and ", App.UI.DOM.makeElement("span", "kabuki", "note"), " theaters offering the traditional performance, with modern plots and themes. ", App.UI.DOM.linkReplace("See a show", "As soon as you enter a theater, the play stops, and refined slave attendants usher you forward to the place of honor. None of the citizens present resent the interruption; having you here is a great addition to the performance. The actors bow deeply to you and resume. The classical dance drama is almost impenetrable to outsiders, and the modernity of the characters and events would not be at all decipherable. Once you catch the thread, though, the richness of the allegory towards Free Cities personages and events is quite enjoyable.")); break; case "Arabian Revivalist": fragment.append(`dedicated to Arabian Revivalism. The thriving mercantilism isn't limited to the slave markets, so many floors below; there are a bewildering variety of shops and stalls here, in no discernible order. Particolored cloth awnings, stacked goods, and bustling menial slaves constantly obscure your view, as pretty slave${girl}s hawking luxurious goods do their best to catch your eye. `, App.UI.DOM.linkReplace("Visit a coffee house", "But you disappoint them, even though some of them artfully manage to fall out of their slinky silk garments as you pass. You look into a little coffeehouse, densely packed with citizens drinking the strong, hot beverage out of tiny china and discussing the news of the day. Coffeehouses are democratic sorts of places and you're welcomed with comradely warmth; prosperous citizens shuffle and pack a little closer to make you a space, and a steaming cup full of almost midnight black coffee appears before you, as if from nowhere.")); break; case "Chinese Revivalist": fragment.append("dedicated to Chinese Revivalism. The longest continuous cultural history humanity has provides so much material that no two establishments here fill quite the same niche. There are calligraphy schools and Confucian academies to teach ignorant citizens how to fit in. There are shops selling traditional cures and the latest pharmacological wonders side by side. There are even martial arts schools. ", App.UI.DOM.linkReplace("Exercise yourself", `You look into one of these. The students are exercising, moving through a series of forms in unison. The teacher recognizes you, ${ V.PC.skill.warfare >= 100 ? "and eagerly beckons you to join. Your martial skill is well known, and he's not disappointed. You're familiar with the forms, and join them seamlessly. Much later, when the exercise is done, the students are extremely pleased to discover exactly who their skillful temporary classmate was." : "and gives you a doubtful, questioning glance, politely asking whether you can join with credit to yourself, all without words. You nod and pick up the forms, having a basic familiarity with them. They're difficult, but you're able to get through the enjoyable exercise with credit." }`)); break; case "Repopulationist": fragment.append(`dedicated to Repopulationism. The shops here offer a lovely mix of sex toys, fertility agents, maternity wear and furniture to fit even the biggest pregnancy. An attractive slave salesgirl with a huge belly is demonstrating the proper use of a swing designed to accommodate ${his} added heft to a female citizen just beginning to show and her curious husband. `, App.UI.DOM.linkReplace("Give the swing a try", `You wait for the couple to leave before approaching the hapless ${girl} and placing a hand on ${his} vulnerable middle. ${He} squeaks in surprise before ${he} realizes just who is browsing ${his} toys and the goods between ${his} legs. ${ V.PC.belly >= 5000 ? `Spreading ${his} legs, you find that ${he} is suspended at the perfect height for you to comfortably penetrate ${him}; or ${he} would be, if your own rounded middle wasn't pushing into ${his} own. ${He} asks for a little help getting down, and afterwards, shows you to a series of harnesses designed to hold a ${girl} with ${his} belly dangling beneath ${him}. The perfect toy for the very pregnant slaveowner hoping to plow ${hisP} equally gravid chattel.` : V.PC.dick !== 0 ? `Spreading ${his} legs, you find that ${he} is suspended at the perfect height for you to comfortably penetrate ${him}.` : `Picking out an attractive strap-on, donning it, and spreading ${his} legs, you find that ${he} is suspended at the perfect height for you to comfortably penetrate ${him}.` } Even better, the swing handles ${his} weight, so no sprained back!`)); break; case "Eugenics": fragment.append("dedicated to Eugenics. You knew the individuals drawn into your society had connections, but you had no idea they were this extensive! If you can think of it, a shop here is selling it; though they are not cheap, only the finest available merchandise is for sale here. Numerous recognizable faces browse the storefronts, accompanied by their favorite chattel, and upon noticing you, vie for your valuable attention. "); if (V.PC.preg > 20 && (V.PC.pregSource === -1 || V.PC.pregSource === -6)) { fragment.append(App.UI.DOM.linkReplace("Shop around", `You decide to waddle between the shops; with so much fine merchandise on offer, it's possible that someone's selling something to fulfill your growing cravings, and it's always good to see and be seen, especially with a middle rounded with a superior child. The slave sales${girl}s are accommodating and welcoming; most are so well-trained that they treat you with the respect a member of the Societal Elite deserves. They all offer you a curtsey that allows them lift their skirts, revealing the appropriate chastity. You end up leaving the stores with bags and bags of exotic foods and treats as well as a cute dress that shows off your pregnancy.`)); } else if (V.PC.title === 1) { fragment.append(App.UI.DOM.linkReplace("Shop around", `You decide to wander between the shops; with so much fine merchandise on offer, it's possible that someone's selling something to catch your discerning eye, and it's always good to see and be seen. The slave sales${girl}s are welcoming and most are so well-trained that they treat you with the respect a member of the Societal Elite deserves. They all offer you a curtsey that allows them lift their skirts, revealing the appropriate chastity. You end up leaving the stores with several fancy chastity belts and an amazing suit you can't wait to debut at your next social meeting.`)); } else { fragment.append(App.UI.DOM.linkReplace("Shop around", `You decide to wander between the shops; with so much fine merchandise on offer, it's possible that someone's selling something to catch your discerning eye, and it's always good to see and be seen. The slave sales${girl}s are welcoming and most are so well-trained that they treat you with the respect a member of the Societal Elite deserves. They all offer you a curtsey that allows them lift their skirts, revealing the appropriate chastity. You end up leaving the stores with several fancy chastity belts, a bag of tasty treats and an alluring dress you can't wait to debut at your next social meeting.`)); } break; case "Hedonism": fragment.append(`dedicated to Hedonism. The establishments here are nearly all eateries, with a few sex shops and plus size clothing stores thrown in for good measure. Lovely smells fill the air, drawing your attention to the food vendors. Plump, cheerful slave${girl}s are present outside most of them offering free samples of the food sold within. You can't help but sample as you browse the menus. `, App.UI.DOM.linkReplace("Conduct a more thorough culinary inspection", "The eateries are very eager to have you seen enjoying their food, and go all out in their presentations. Plate after plate, vendor after vendor, you are treated to the best they can make and as much as you want, free of charge. You make sure to not go too crazy, but by the final restaurant, your clothing is definitely getting a little tight around your bloated belly. After a number of glowing reviews, you're left with making your way back home. Fortunately, your arcology features plenty of moving walkways and escalators, so you can relax as your infrastructure delivers you right back to your penthouse.")); break; case "Intellectual Dependency": fragment.append(`dedicated to Intellectual Dependency. The shops all have one thing in common, they are incredibly eye-catching in the hopes that a wanting bimbo will whine ${his} master into buy something to shut ${him} up. From skimpy outfits to simple to use sex toys, everything an airheaded slave may want on a whim is on display; unsurprisingly, the shop selling complex gags is also doing quite well. Most of the shops have slave sales${girl}s out front attempting to demonstrate the merchandise. `, App.UI.DOM.linkReplace("Take in a sales pitch", `You decide to stop and watch one try ${his} best to sell vibrating dildos. The toys are designed to automatically start vibrating when gripped so even the densest of slave${girl} can figure out how to work it. You know you picked a winner when ${he} grabs one and immediately flings it into the crowd in surprise when it activates. Completely undeterred by the laughter, ${he} makes for another, this time focusing entirely on not being shocked by it this time. ${He} stands there, completely fixated on the wiggling phallus in ${his} hands, until another onlooker prods ${him} to continue with ${his} advertising. Needless to say, yet another sex toy goes flying; this time, however, ${he} goes after it, giving the crowd a clear view up ${his} skirt at ${his} clear arousal. Enjoying the now masturbating slave's show, you pick out a few to humor your own slaves with.`)); break; case "Slave Professionalism": fragment.append("dedicated to Slave Professionalism. There are surprisingly wide selection of shops here, each designed to stimulate the minds of curious looky-loos. Well-trained slaves can often be spotted seeking out new ways to improve their Masters' reputations and lives. The pride of the strip is a slave run massage parlor featuring some of the most skilled hands the arcology has to offer. ", App.UI.DOM.linkReplace("Get a massage", `You decide to put in an appearance at the facility and the slaves in charge are of course very eager to offer you complimentary services. The masseuse is nothing short of a master of the art and knows how to balance relaxation and physical pleasure. ${He} releases the muscle soreness from your latest workout and throughout ${his} service uses ${his} delicate touch to keep you on the edge of orgasm until ${his} job is complete. The finale of ${his} work pushes you to an exquisite climax where ${he} ${ V.PC.dick !== 0 ? `catches your cum in ${his} mouth and swallows it` : "swallows your femcum" } with a grace only found among your slave population.`)); break; case "Petite Admiration": fragment.append("dedicated to Petite Admiration. The shops here are mostly focused on providing the tools and equipment a short slave will need to properly care for their Master and his abode. Several fashion lines have cropped up to provide matching clothing tailored to the shorter clientele and their often taller owners. There's even a sex shop that specializes in extreme differences in height. "); if (V.PC.height >= 170) { fragment.append(App.UI.DOM.linkReplace("Take a harness out for a spin", `The shop has a selection of harnesses available for testing and a number of minuscule slave${girl}s to try out. You fasten one on and carry on browsing the rest of the stores. ${ V.PC.dick > 0 ? `The squirming ${girl} currently housing your cock makes it very difficult to focus on anything else, so you mostly just walk the hall, busting load after load into the overstimulated slave and effectively giving the store free advertisement.` : `The squirming ${girl} currently wrapped around a strap-on makes it very difficult to focus on anything else, so you mostly just walk the hall, further over stimulating the panting slave and effectively giving the store free advertisement.` } By the time you return, you aren't the only one interested in purchasing a harness for home use.`)); } else { fragment.append(App.UI.DOM.linkReplace("Pay it a visit", "As you browse their goods, it becomes more and more apparent that you yourself are too short to really make use of any of them.")); } break; case "Statuesque Glorification": fragment.append("dedicated to Statuesque Glorification. The shops here are overwhelmingly dedicated to the tall; not a single shop caters the slightest to anyone below the height threshold. Most of the shops sell clothing specially tailored to their towering patrons, though a handful also sell furniture and appliances made to comfortably accommodate a more lengthy population. The crown attraction, however, is a modest indoor amusement park designed both to make the most of a rider's height and invoke a sense of envy in those unable to ride. "); if (V.PC.height >= 170) { fragment.append(App.UI.DOM.linkReplace("Give the roller coaster a spin", "While it isn't the most thrilling ride, given the constraints it has to work with, but it does wind through the various footpaths of the promenade to maximize visibility and to remind those too short to ride of their place.")); } else { fragment.append("You can only watch as your citizens have fun and savor the bitter feeling of them looking down on their hilariously short leader."); } break; default: App.UI.DOM.appendNewElement("span", fragment, `ERROR: bad shop type: ${this.type}`, "error"); } if (this.owner === 1 && this.type === "Shops") { fragment.append("You control this part of the arcology and all these businesses pay you rent."); } return fragment; } /** * @returns {Node} * @protected @override */ _body() { const fragment = document.createDocumentFragment(); const A = V.arcologies[0]; const cost = Math.trunc(10000 * V.upgradeMultiplierArcology); if (V.brothel === 0) { fragment.append(this._makeUpgrade( "Convert this sector of the promenade into a brothel.", () => { this._clearFsStyle(); V.brothel = 5; this.type = "Brothel"; }, cost, "and will incur upkeep costs" )); } if (V.club === 0) { fragment.append(this._makeUpgrade( "Build a club to serve as a focal point for public sluts.", () => { this._clearFsStyle(); V.club = 5; this.type = "Club"; }, cost, "and will incur upkeep costs" )); } if (A.FSSubjugationist !== "unset") { if (V.FSPromenade.Subjugationist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Subjugationist establishments.", () => { this._clearFsStyle(); V.FSPromenade.Subjugationist = 1; this.type = "Subjugationist"; }, cost )); } } if (A.FSSupremacist !== "unset") { if (V.FSPromenade.Supremacist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Supremacist establishments.", () => { this._clearFsStyle(); V.FSPromenade.Supremacist = 1; this.type = "Supremacist"; }, cost )); } } if (A.FSGenderRadicalist !== "unset") { if (V.FSPromenade.GenderRadicalist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Gender Radicalist establishments.", () => { this._clearFsStyle(); V.FSPromenade.GenderRadicalist = 1; this.type = "Gender Radicalist"; }, cost )); } } else if (A.FSGenderFundamentalist !== "unset") { if (V.FSPromenade.GenderFundamentalist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Gender Fundamentalist establishments.", () => { this._clearFsStyle(); V.FSPromenade.GenderFundamentalist = 1; this.type = "Gender Fundamentalist"; }, cost )); } } if (A.FSPaternalist !== "unset") { if (V.FSPromenade.Paternalist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Paternalist establishments.", () => { this._clearFsStyle(); V.FSPromenade.Paternalist = 1; this.type = "Paternalist"; }, cost )); } } else if (A.FSDegradationist !== "unset") { if (V.FSPromenade.Degradationist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Degradationist establishments.", () => { this._clearFsStyle(); V.FSPromenade.Degradationist = 1; this.type = "Degradationist"; }, cost )); } } if (A.FSIntellectualDependency !== "unset") { if (V.FSPromenade.IntellectualDependency === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Intellectual Dependency establishments.", () => { this._clearFsStyle(); V.FSPromenade.IntellectualDependency = 1; this.type = "Intellectual Dependency"; }, cost )); } } else if (A.FSSlaveProfessionalism !== "unset") { if (V.FSPromenade.SlaveProfessionalism === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Slave Professionalism establishments.", () => { this._clearFsStyle(); V.FSPromenade.SlaveProfessionalism = 1; this.type = "Slave Professionalism"; }, cost )); } } if (A.FSBodyPurist !== "unset") { if (V.FSPromenade.BodyPurist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Body Purist establishments.", () => { this._clearFsStyle(); V.FSPromenade.BodyPurist = 1; this.type = "Body Purist"; }, cost )); } } else if (A.FSTransformationFetishist !== "unset") { if (V.FSPromenade.TransformationFetishist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Transformation Fetishist establishments.", () => { this._clearFsStyle(); V.FSPromenade.TransformationFetishist = 1; this.type = "Transformation Fetishist"; }, cost )); } } if (A.FSYouthPreferentialist !== "unset") { if (V.FSPromenade.YouthPreferentialist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Youth Preferentialist establishments.", () => { this._clearFsStyle(); V.FSPromenade.YouthPreferentialist = 1; this.type = "Youth Preferentialist"; }, cost )); } } else if (A.FSMaturityPreferentialist !== "unset") { if (V.FSPromenade.MaturityPreferentialist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Maturity Preferentialist establishments.", () => { this._clearFsStyle(); V.FSPromenade.MaturityPreferentialist = 1; this.type = "Maturity Preferentialist"; }, cost )); } } if (A.FSPetiteAdmiration !== "unset") { if (V.FSPromenade.PetiteAdmiration === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Petite Admiration establishments.", () => { this._clearFsStyle(); V.FSPromenade.PetiteAdmiration = 1; this.type = "Petite Admiration"; }, cost )); } } else if (A.FSStatuesqueGlorification !== "unset") { if (V.FSPromenade.StatuesqueGlorification === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Statuesque Glorification establishments.", () => { this._clearFsStyle(); V.FSPromenade.StatuesqueGlorification = 1; this.type = "Statuesque Glorification"; }, cost )); } } if (A.FSSlimnessEnthusiast !== "unset") { if (V.FSPromenade.SlimnessEnthusiast === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Slimness Enthusiast establishments.", () => { this._clearFsStyle(); V.FSPromenade.SlimnessEnthusiast = 1; this.type = "Slimness Enthusiast"; }, cost )); } } else if (A.FSAssetExpansionist !== "unset") { if (V.FSPromenade.AssetExpansionist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Asset Expansionist establishments.", () => { this._clearFsStyle(); V.FSPromenade.AssetExpansionist = 1; this.type = "Asset Expansionist"; }, cost )); } } if (A.FSPastoralist !== "unset") { if (V.FSPromenade.Pastoralist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Pastoralist establishments.", () => { this._clearFsStyle(); V.FSPromenade.Pastoralist = 1; this.type = "Pastoralist"; }, cost )); } } if (A.FSPhysicalIdealist !== "unset") { if (V.FSPromenade.PhysicalIdealist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Physical Idealist establishments.", () => { this._clearFsStyle(); V.FSPromenade.PhysicalIdealist = 1; this.type = "Physical Idealist"; }, cost )); } } else if (A.FSHedonisticDecadence !== "unset") { if (V.FSPromenade.Hedonism === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Hedonistic establishments.", () => { this._clearFsStyle(); V.FSPromenade.Hedonism = 1; this.type = "Hedonism"; }, cost )); } } if (A.FSRepopulationFocus !== "unset") { if (V.FSPromenade.Repopulationist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Repopulationist establishments.", () => { this._clearFsStyle(); V.FSPromenade.Repopulationist = 1; this.type = "Repopulationist"; }, cost )); } } else if (A.FSRestart !== "unset") { if (V.FSPromenade.Eugenics === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Eugenics establishments.", () => { this._clearFsStyle(); V.FSPromenade.Eugenics = 1; this.type = "Eugenics"; }, cost )); } } if (A.FSChattelReligionist !== "unset") { if (V.FSPromenade.ChattelReligionist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Chattel Religionist establishments.", () => { this._clearFsStyle(); V.FSPromenade.ChattelReligionist = 1; this.type = "Chattel Religionist"; }, cost )); } } if (A.FSRomanRevivalist !== "unset") { if (V.FSPromenade.RomanRevivalist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Roman Revivalist establishments.", () => { this._clearFsStyle(); V.FSPromenade.RomanRevivalist = 1; this.type = "Roman Revivalist"; }, cost )); } } else if (A.FSAztecRevivalist !== "unset") { if (V.FSPromenade.AztecRevivalist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Aztec Revivalist establishments.", () => { this._clearFsStyle(); V.FSPromenade.AztecRevivalist = 1; this.type = "Aztec Revivalist"; }, cost )); } } else if (A.FSNeoImperialist !== "unset") { if (V.FSPromenade.NeoImperialist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Neo-Imperialist establishments.", () => { this._clearFsStyle(); V.FSPromenade.NeoImperialist = 1; this.type = "Neo-Imperialist"; }, cost )); } } else if (A.FSEgyptianRevivalist !== "unset") { if (V.FSPromenade.EgyptianRevivalist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Egyptian Revivalist establishments.", () => { this._clearFsStyle(); V.FSPromenade.EgyptianRevivalist = 1; this.type = "Egyptian Revivalist"; }, cost )); } } else if (A.FSEdoRevivalist !== "unset") { if (V.FSPromenade.EdoRevivalist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Edo Revivalist establishments.", () => { this._clearFsStyle(); V.FSPromenade.EdoRevivalist = 1; this.type = "Edo Revivalist"; }, cost )); } } else if (A.FSArabianRevivalist !== "unset") { if (V.FSPromenade.ArabianRevivalist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Arabian Revivalist establishments.", () => { this._clearFsStyle(); V.FSPromenade.ArabianRevivalist = 1; this.type = "Arabian Revivalist"; }, cost )); } } else if (A.FSChineseRevivalist !== "unset") { if (V.FSPromenade.ChineseRevivalist === 0) { fragment.append(this._makeUpgrade( "Upgrade this sector to appeal to Chinese Revivalist establishments.", () => { this._clearFsStyle(); V.FSPromenade.ChineseRevivalist = 1; this.type = "Chinese Revivalist"; }, cost )); } } if (this.type !== "Shops") { fragment.append(this._makeUpgrade( "Return this sector to standard outlets", () => { this._clearFsStyle(); this.type = "Shops"; }, cost )); } return fragment; } _clearFsStyle() { if (!["Shops", "Brothel", "Club"].includes(this.type)) { const currentFSStyle = this.type.replace(/\s+/g, ''); V.FSPromenade[currentFSStyle] = 0; } } /** * @returns {boolean} */ canBeSold() { return this.type === "Shops"; } static _cleanupConfigScheme(config) { super._cleanupConfigScheme(config); // BC code } /** @returns {App.Arcology.Cell.Shop} */ clone() { return (new App.Arcology.Cell.Shop(this.owner))._init(this); } get className() { return "App.Arcology.Cell.Shop"; } };
MonsterMate/fc
src/arcologyBuilding/shops.js
JavaScript
mit
48,400
Are you adding a new outfit to the game, but don't have SVG art for it? If so, you MUST modify the following functions in VectorArtJS.js. 1. ArtVectorBalls() 2. ArtVectorBelly() 3. ArtVectorBoob() 4. ArtVectorBoobAddons() (in two different places) 5. ArtVectorChastityBelt() 6. ArtVectorFeet() 7. ArtVectorPussyPiercings() 8. ArtVectorTorsoOutfit() Still don't know where to add your edits? Just search the file for the string "no clothing". Anywhere you see this string you must add your new clothing.
MonsterMate/fc
src/art/Instructions for modifying the art files when adding a new outfit.txt
Text
mit
504
globalThis.VectorArt = function(artSlave, artSize) { return App.Art.elementToMarkup(App.Art.SlaveArtElement(artSlave, artSize)); }; globalThis.LegacyVectorArt = function(slave, artSize) { return App.Art.elementToMarkup(App.Art.legacyVectorArtElement(slave, artSize)); }; /** * @param {App.Entity.SlaveState} slave * @param {number} artSize * @returns {{styleClass: string, styleCSS: string}} style parameters to pass on to the renderer, and CSS string */ App.Art.makeVectorArtStyle = function(slave, artSize) { let slaveHeightScale, margin; let skinColor, outfitBaseColor, hairColor, pubicHairColor, underarmHairColor, eyebrowHairColor, shoeColor, shoeShadowColor, glassesColor, eyeColor, sclerae; let headSkinStyle, torsoSkinStyle, boobSkinStyle, penisSkinStyle, scrotumSkinStyle, bellySkinStyle, areolaStyle, bellybuttonStyle, labiaStyle; /* prepare HTML color codes for slave display */ /* note: latex clothing is mostly emulated by rubber color for skin (and shoes) */ ArtVectorColor(); const displayClass = App.Art.generateDisplayClass(); if (V.seeHeight === 0 || (V.seeHeight === 1 && artSize === 3)) { slaveHeightScale = 1; margin = 0; } else { slaveHeightScale = slave.height / 200; margin = Math.max(50 - (50 * slaveHeightScale), 0); } const css = []; css.push(`.${displayClass} {\ position: absolute;\ height: 100%;\ transform: scale(${slaveHeightScale});\ margin-top: ${margin}%;\ margin-left: auto;\ margin-right: auto;\ left: 0;\ right: 0;\ }`); css.push(`.${displayClass} .white{ fill:#FFFFFF; }`); css.push(`.${displayClass} .skin{ fill:${skinColor}; }`); if (headSkinStyle) { css.push(`.${displayClass} .head{ ${headSkinStyle} }`); } if (torsoSkinStyle) { css.push(`.${displayClass} .torso{ ${torsoSkinStyle} }`); } if (boobSkinStyle) { css.push(`.${displayClass} .boob{ ${boobSkinStyle} }`); } if (penisSkinStyle) { css.push(`.${displayClass} .penis{ ${penisSkinStyle} }`); } if (scrotumSkinStyle) { css.push(`.${displayClass} .scrotum{ ${scrotumSkinStyle} }`); } if (bellySkinStyle) { css.push(`.${displayClass} .belly{ ${bellySkinStyle} }`); } if (areolaStyle) { css.push(`.${displayClass} .areola{ ${areolaStyle} }`); } css.push(`.${displayClass} .bellybutton{ ${bellybuttonStyle} }`); css.push(`.${displayClass} .labia{ ${labiaStyle} }`); css.push(`.${displayClass} .hair{ fill:${hairColor}; }`); css.push(`.${displayClass} .pubic_hair{ fill:${pubicHairColor}; }`); css.push(`.${displayClass} .underarm_hair{ fill:${underarmHairColor}; }`); css.push(`.${displayClass} .eyebrow_hair{ fill:${eyebrowHairColor}; }`); css.push(`.${displayClass} .shoe{ fill:${shoeColor}; }`); css.push(`.${displayClass} .shoe_shadow{ fill:${shoeShadowColor}; }`); css.push(`.${displayClass} .smart_piercing{ fill:#4DB748; }`); css.push(`.${displayClass} .steel_piercing{ fill:#787878; }`); css.push(`.${displayClass} .steel_chastity{ fill:#BABABA; }`); if (outfitBaseColor) { css.push(`.${displayClass} .outfit_base{ fill:${outfitBaseColor}; }`); } css.push(`.${displayClass} .gag{ fill:#BF2126; }`); css.push(`.${displayClass} .shadow{ fill:#010101; }`); if (glassesColor) { css.push(`.${displayClass} .glasses{ fill:${glassesColor}; }`); } css.push(`.${displayClass} .eye{ fill:${eyeColor}; }`); css.push(`.${displayClass} .sclera{ fill:${sclerae}; }`); return {styleClass: displayClass, styleCSS: css.join('\n')}; function ArtVectorColor() { const wearingLatex = slave.clothes === "a Fuckdoll suit" || slave.clothes === "restrictive latex" || slave.clothes === "a latex catsuit"; setOutfitColor(); setSkinColor(); setHairColor(); setShoeColor(); function setOutfitColor() { /* TODO: rewrite all textual descriptions not to explicitly mention the latex being of black color. */ if (wearingLatex === true || slave.clothes === "a cybersuit") { outfitBaseColor = slave.clothingBaseColor || "#515351"; /* use custom color, or use default latex color */ } else if (slave.clothes === "a comfortable bodysuit") { outfitBaseColor = slave.clothingBaseColor || "#464646"; /* use custom color, or use default bodysuit color */ } else if (slave.clothes === "a tight Imperial bodysuit") { outfitBaseColor = slave.clothingBaseColor || "#464646"; /* use custom color, or use default bodysuit color */ } /* head addons */ if (slave.faceAccessory === "porcelain mask") { glassesColor = slave.glassesColor || "#FFFFFF"; /* use custom color or white */ } else if (slave.eyewear !== "none") { glassesColor = slave.glassesColor || "#010101"; /* use custom color or default */ } if (hasAnyEyes(slave)) { eyeColor = extractColor(hasLeftEye(slave) ? getLeftEyeColor(slave) : getRightEyeColor(slave), 1); } else { eyeColor = extractColor("brown"); } } function setSkinColor() { const colorSlave = skinColorCatcher(slave); /* setting default values */ areolaStyle = `fill:${colorSlave.areolaColor};`; bellybuttonStyle = `fill:${colorSlave.areolaColor};`; labiaStyle = `fill:${colorSlave.labiaColor};`; skinColor = colorSlave.skinColor; /* BEGIN SKIN COLOR OVERRIDES FOR LATEX CLOTHING EMULATION */ if (slave.clothes === "a Fuckdoll suit") { /* slave is a fuckdoll - display all skin as if it was black rubber */ skinColor = outfitBaseColor; areolaStyle = "fill:rgba(81,83,81,1);"; labiaStyle = areolaStyle; bellybuttonStyle = areolaStyle; } else if (slave.clothes === "restrictive latex") { /* slave wears restrictive latex - display most skin as if it was rubber */ /* nice latex does not cover any privates. */ boobSkinStyle = `fill:${skinColor};`; penisSkinStyle = `fill:${skinColor};`; scrotumSkinStyle = `fill:${skinColor};`; torsoSkinStyle = `fill:${skinColor};`; /* rest of body is covered in latex */ skinColor = outfitBaseColor; bellybuttonStyle = `fill:${outfitBaseColor};`; } else if (slave.clothes === "a latex catsuit") { /* nice latex does not cover head. */ headSkinStyle = `fill:${skinColor};`; /* rest of body is covered in latex */ skinColor = outfitBaseColor; /* catsuit covers areolae and crotch, too */ bellybuttonStyle = `fill:${outfitBaseColor};`; } else if (slave.clothes === "a cybersuit") { /* rest of body is covered in latex */ skinColor = outfitBaseColor; bellybuttonStyle = `fill:${outfitBaseColor};`; } else if (slave.clothes === "a comfortable bodysuit") { /* nice bodysuit does not cover head. */ headSkinStyle = `fill:${skinColor};`; /* rest of body is covered in bodysuit */ skinColor = outfitBaseColor; bellySkinStyle = `fill:${outfitBaseColor};`; bellybuttonStyle = `fill:${outfitBaseColor};`; } else if (slave.clothes === "a tight Imperial bodysuit") { /* imperial bodysuit does not cover head. */ headSkinStyle = `fill:${skinColor};`; /* rest of body is covered in bodysuit */ skinColor = outfitBaseColor; bellySkinStyle = `fill:${outfitBaseColor};`; bellybuttonStyle = `fill:${outfitBaseColor};`; } /* END SKIN COLOR OVERRIDES FOR LATEX CLOTHING EMULATION */ /* outfit dick coloring to match outfit rgba in svg */ switch (slave.clothes) { case "a cheerleader outfit": scrotumSkinStyle = "fill:rgba(95,110,160,1);"; bellySkinStyle = "fill:rgba(95,110,160,1);"; break; case "cutoffs and a t-shirt": scrotumSkinStyle = "fill:rgba(81,124,211,1);"; break; case "a halter top dress": scrotumSkinStyle = "fill:rgba(94,51,124,1);"; bellySkinStyle = "fill:rgba(94,51,124,1);"; break; case "a burqa": case "a hijab and abaya": case "a niqab and abaya": scrotumSkinStyle = "fill:rgba(51,51,51,1);"; bellySkinStyle = "fill:rgba(51,51,51,1);"; break; case "a hijab and blouse": scrotumSkinStyle = "fill:rgba(51,51,51,1);"; bellySkinStyle = "fill:rgba(85,0,34,1);"; break; case "a burkini": scrotumSkinStyle = "fill:rgba(0,97,158,1);"; bellySkinStyle = "fill:rgba(0,97,158,1);"; break; case "a klan robe": scrotumSkinStyle = "fill:rgba(236,236,236,1);"; bellySkinStyle = "fill:rgba(236,236,236,1);"; break; case "a nice maid outfit": case "a slutty maid outfit": scrotumSkinStyle = "fill:rgba(225,225,225,1);"; bellySkinStyle = "fill:rgba(225,225,225,1);"; break; case "a leotard": scrotumSkinStyle = "fill:rgba(120,15,55,1);"; bellySkinStyle = "fill:rgba(120,15,55,1);"; break; case "a military uniform": scrotumSkinStyle = "fill:rgba(34,42,18,1);"; bellySkinStyle = "fill:rgba(34,42,18,1);"; break; case "a mini dress": scrotumSkinStyle = "fill:rgba(26,26,26,1);"; bellySkinStyle = "fill:rgba(26,26,26,1);"; break; case "a nice nurse outfit": scrotumSkinStyle = "fill:rgba(0,128,128,1);"; bellySkinStyle = "fill:rgba(0,128,128,1);"; break; case "a slutty nurse outfit": scrotumSkinStyle = "fill:rgba(255,255,255,1);"; break; case "a scalemail bikini": scrotumSkinStyle = "fill:rgba(133,146,158,1);"; break; case "striped panties": scrotumSkinStyle = "fill:rgba(255,255,255,1);"; break; case "a schoolgirl outfit": scrotumSkinStyle = "fill:rgba(28,31,36,1);"; bellySkinStyle = "fill:rgba(28,31,36,1);"; break; case "a ball gown": scrotumSkinStyle = "fill:rgba(128,0,0,1);"; bellySkinStyle = "fill:rgba(128,0,0,1);"; break; case "battledress": scrotumSkinStyle = "fill:rgba(34,42,18,1);"; bellySkinStyle = "fill:rgba(34,42,18,1);"; break; case "a slave gown": scrotumSkinStyle = "fill:rgba(200,200,200,1);"; bellySkinStyle = "fill:rgba(200,200,200,1);"; break; case "a slutty outfit": scrotumSkinStyle = "fill:rgba(63,126,181,1);"; break; case "spats and a tank top": scrotumSkinStyle = "fill:rgba(51,51,51,1);"; break; case "a succubus outfit": scrotumSkinStyle = "fill:rgba(128,0,0,1);"; bellySkinStyle = "fill:rgba(128,0,0,1);"; break; case "nice business attire": scrotumSkinStyle = "fill:rgba(51,51,51,1);"; bellySkinStyle = "fill:rgba(51,51,51,1);"; break; case "slutty business attire": scrotumSkinStyle = "fill:rgba(51,51,51,1);"; break; case "attractive lingerie for a pregnant woman": scrotumSkinStyle = "fill:rgba(153,153,153,1);"; break; case "a bunny outfit": scrotumSkinStyle = "fill:rgba(51,51,51,1);"; bellySkinStyle = "fill:rgba(51,51,51,1);"; break; case "conservative clothing": scrotumSkinStyle = "fill:rgba(51,51,51,1);"; bellySkinStyle = "fill:rgba(51,51,51,1);"; break; case "harem gauze": scrotumSkinStyle = "fill:rgba(0,168,131,1);"; break; case "a huipil": scrotumSkinStyle = "fill:rgba(200,200,200,1);"; bellySkinStyle = "fill:rgba(200,200,200,1);"; break; case "a kimono": scrotumSkinStyle = "fill:rgba(0,91,150,1);"; bellySkinStyle = "fill:rgba(0,91,150,1);"; break; case "a maternity dress": scrotumSkinStyle = "fill:rgba(48,54,72,1);"; bellySkinStyle = "fill:rgba(48,54,72,1);"; break; case "a slutty qipao": scrotumSkinStyle = "fill:rgba(204,177,68,1);"; bellySkinStyle = "fill:rgba(204,177,68,1);"; break; case "stretch pants and a crop-top": scrotumSkinStyle = "fill:rgba(51,51,51,1);"; break; case "a toga": scrotumSkinStyle = "fill:rgba(200,200,200,1);"; bellySkinStyle = "fill:rgba(200,200,200,1);"; break; case "a penitent nuns habit": scrotumSkinStyle = "fill:rgba(114,93,73,1);"; break; case "a fallen nuns habit": bellySkinStyle = "fill:rgba(51,51,51,1);"; break; case "a chattel habit": scrotumSkinStyle = "fill:rgba(200,200,200,1);"; break; case "a monokini": scrotumSkinStyle = "fill:rgba(33,47,61,1);"; break; case "a schutzstaffel uniform": case "a slutty schutzstaffel uniform": scrotumSkinStyle = "fill:rgba(51,51,51,1);"; bellySkinStyle = "fill:rgba(51,51,51,1);"; break; case "a red army uniform": scrotumSkinStyle = "fill:rgba(114,93,73,1);"; bellySkinStyle = "fill:rgba(114,93,73,1);"; break; case "an apron": scrotumSkinStyle = "fill:rgba(255,105,180,1);"; bellySkinStyle = "fill:rgba(255,105,180,1);"; break; case "a dirndl": scrotumSkinStyle = "fill:rgba(128,0,51,1);"; bellySkinStyle = "fill:rgba(128,0,51,1);"; break; case "lederhosen": scrotumSkinStyle = "fill:rgba(93,83,108,1);"; break; case "a long qipao": scrotumSkinStyle = "fill:rgba(0,128,0,1);"; break; case "a mounty outfit": scrotumSkinStyle = "fill:rgba(51,51,51,1);"; bellySkinStyle = "fill:rgba(128,0,0,1);"; break; case "battlearmor": case "Imperial Plate": scrotumSkinStyle = "fill:rgba(200,200,200,1);"; break; case "striped underwear": scrotumSkinStyle = "fill:rgba(255,255,255,1);"; break; case "panties": scrotumSkinStyle = "fill:rgba(255,170,238,1);"; break; case "a thong": scrotumSkinStyle = "fill:rgba(34,28,36,1);"; break; case "a button-up shirt and panties": case "a t-shirt and panties": scrotumSkinStyle = "fill:rgba(255,255,255,1);"; bellySkinStyle = "fill:rgba(255,255,255,1);"; break; case "a slutty klan robe": scrotumSkinStyle = "fill:rgba(128,0,0,1);"; break; case "cutoffs": scrotumSkinStyle = "fill:rgba(81,124,211,1);"; break; case "sport shorts": case "sport shorts and a sports bra": scrotumSkinStyle = "fill:rgba(51,51,51,1);"; break; case "a t-shirt and thong": scrotumSkinStyle = "fill:rgba(200,55,171,1);"; bellySkinStyle = "fill:rgba(200,55,171,1);"; break; case "jeans": scrotumSkinStyle = "fill:rgba(81,124,211,1);"; break; case "leather pants": case "leather pants and a tube top": scrotumSkinStyle = "fill:rgba(26,26,26,1);"; break; case "leather pants and pasties": scrotumSkinStyle = "fill:rgba(85,0,0,1);"; break; case "a t-shirt and jeans": scrotumSkinStyle = "fill:rgba(81,124,211,1);"; bellySkinStyle = "fill:rgba(255,255,255,1);"; break; case "a tank-top and panties": scrotumSkinStyle = "fill:rgba(26,26,26,1);"; bellySkinStyle = "fill:rgba(26,26,26,1);"; break; case "a tank-top": bellySkinStyle = "fill:rgba(255,255,255,1);"; break; case "a tube top and thong": scrotumSkinStyle = "fill:rgba(34,28,36,1);"; break; case "boyshorts": scrotumSkinStyle = "fill:rgba(26,26,26,1);"; break; case "an oversized t-shirt and boyshorts": bellySkinStyle = "fill:rgba(255,255,255,1);"; scrotumSkinStyle = "fill:rgba(26,26,26,1);"; break; case "a sweater and panties": scrotumSkinStyle = "fill:rgba(26,26,26,1);"; bellySkinStyle = "fill:rgba(212,170,0,1);"; break; case "a sweater and cutoffs": scrotumSkinStyle = "fill:rgba(77,77,77,1);"; bellySkinStyle = "fill:rgba(85,0,0,1);"; break; case "a police uniform": scrotumSkinStyle = "fill:rgba(11,23,40,1);"; bellySkinStyle = "fill:rgba(11,23,40,1);"; break; case "a one-piece swimsuit": scrotumSkinStyle = "fill:rgba(22,45,80,1);"; bellySkinStyle = "fill:rgba(22,45,80,1);"; break; case "a skimpy loincloth": scrotumSkinStyle = "fill:rgba(145,124,111,1);"; break; case "kitty lingerie": scrotumSkinStyle = "fill:rgba(255,170,238,1);"; break; case "an oversized t-shirt": bellySkinStyle = "fill:rgba(255,255,255,1);"; break; case "a hanbok": bellySkinStyle = "fill:rgba(255,109,182,1);"; break; case "a gothic lolita dress": bellySkinStyle = "fill:rgba(26,26,26,1);"; break; case "a sweater": bellySkinStyle = "fill:rgba(85,0,0,1);"; break; case "sport shorts and a t-shirt": scrotumSkinStyle = "fill:rgba(200,55,171,1);"; bellySkinStyle = "fill:rgba(200,55,171,1);"; break; case "a biyelgee costume": scrotumSkinStyle = "fill:rgba(33,68,120,1);"; break; case "panties and pasties": scrotumSkinStyle = "fill:rgba(26,26,26,1);"; break; case "clubslut netting": scrotumSkinStyle = "fill:rgba(248,175,206,1);"; } } function setHairColor() { hairColor = extractColor(slave.hColor); pubicHairColor = extractColor(slave.pubicHColor); underarmHairColor = extractColor(slave.underArmHColor); eyebrowHairColor = extractColor(slave.eyebrowHColor); if (hasAnyEyes(slave)) { sclerae = extractColor(hasLeftEye(slave) ? slave.eye.left.sclera : slave.eye.right.sclera); } else { sclerae = extractColor("white"); } } function setShoeColor() { /* override color in case of full body latex outfit, or custom color*/ if (slave.clothes === "a Fuckdoll suit" || slave.clothes === "restrictive latex") { shoeColor = skinColor; shoeShadowColor = `${shoeColor};opacity: 0.5`; /* TODO: do not abuse "color" variable for style definitions. do not rely on dark background for shadow effect either. */ } else if (slave.shoeColor !== undefined) { shoeColor = `${slave.shoeColor};opacity: 0.4`; /* shoe color selected by user */ shoeShadowColor = `${shoeColor};opacity: 0.5`; /* TODO: do not abuse "color" variable for style definitions. do not rely on dark background for shadow effect either. */ } else { shoeShadowColor = "#616a6b"; if (slave.shoes === "none") { shoeColor = "#595959"; } else { shoeColor = "#80808080"; } } } } }; App.Art.vectorArtElement = (function() { "use strict"; let slave; let leftArmType, rightArmType, legSize, torsoSize, buttSize, penisSize, hairLength, wearingLatex; let bellyScaleFactor, ballsScaleFactor, boobScaleFactor, heightScaleFactor; let penisDrawtime, penisArt; let svgQueue; function VectorArt(artSlave, artSize, styleClass) { /* set constants */ slave = artSlave; wearingLatex = slave.clothes === "a Fuckdoll suit" || slave.clothes === "restrictive latex" || slave.clothes === "a latex catsuit"; const res = document.createDocumentFragment(); const displayClass = styleClass || setStylesheet(artSize, res); // setup transforms if (V.seeHeight === 0) { heightScaleFactor = 1; } else { heightScaleFactor = 200 / slave.height; } const xform = setupTransforms(); // set up SVG queues svgQueue = new App.Art.SvgQueue(xform, App.Data.Art.Vector, displayClass); penisArt = new App.Art.SvgQueue([] /* no transforms for penises? */, App.Data.Art.Vector, displayClass); setArmType(); setButtSize(); setHairLength(); setLegSize(); setPenisSize(); penisArtControl(); /* depends on setPenisSize and setBoobScaling, sets penisDrawtime and penisArtString */ setTorsoSize(); /* each function adds one layer of vector art vector art added later is drawn over previously added art (what is listed on the bottom in the code appears on the top of the image) */ ArtVectorHairBack(); ArtVectorArm(); ArtVectorAnalAccessories(); ArtVectorButt(); ArtVectorLeg(); if (hasAnyLegs(slave)) { ArtVectorFeet(); /* includes shoes and leg outfits*/ } ArtVectorTorso(); ArtVectorPussy(); ArtVectorPubicHair(); if (slave.vaginaPiercing !== 0 || slave.clitPiercing !== 0) { ArtVectorPussyPiercings(); } ArtVectorChastityBelt(); ArtVectorTorsoOutfit(); /* note: clothing covers chastity belts */ if (slave.scrotum > 0 && slave.balls > 0) { ArtVectorBalls(); } if (penisDrawtime === 0) { /* for dicks behind boobs */ svgQueue.concat(penisArt); } ArtVectorBelly(); /* includes navel piercing and belly-related clothing options */ ArtVectorBoob(); /* includes areolae and piercings */ if (penisDrawtime === 1) { /* for dicks in front of boobs */ svgQueue.concat(penisArt); } ArtVectorBoobAddons(); /* piercings always appear in front of boobs AND dick */ ArtVectorCollar(); /* includes clavicle artwork */ ArtVectorHead(); /* glasses are drawn here */ ArtVectorHairFore(); res.appendChild(svgQueue.output()); return res; } function setupTransforms() { function boobScaling() { /* Prepare SVG transform matrix for continuous boob scaling. This transform affects boobs, areolae and piercings. The parameters were fit by points (300,1.0) and (15000,2.5). See https://www.wolframalpha.com/input/?i=log+fit+%7B%7B300,1%7D,%7B15000,2.5%7D%7D . Boobs start at 300cc as of "flesh description widgets". Upper value was discussed at https://github.com/Free-Cities/Free-Cities/issues/950#issuecomment-321359466 . */ let translationX, translationY; if (slave.boobs < 300) { boobScaleFactor = 1; translationX = 22; /* a little shift to the right is needed due to perspective */ translationY = 0; } else { boobScaleFactor = 0.383433 * Math.log(0.0452403 * slave.boobs) * heightScaleFactor; translationX = -282.841 * boobScaleFactor + 292.349; translationY = -225.438 * boobScaleFactor + 216.274; } return `matrix(${boobScaleFactor},0,0,${boobScaleFactor},${translationX},${translationY})`; } function ballsScaling() { ballsScaleFactor = (slave.scrotum / 3) * heightScaleFactor; const translationX = -271 * (ballsScaleFactor - 1); const translationY = -453 * (ballsScaleFactor - 1); return `matrix(${ballsScaleFactor},0,0,${ballsScaleFactor},${translationX},${translationY})`; } function bellyScaling() { /* add pregnancy belly, scale dynamically (clothing and addons can be scaled, too) */ bellyScaleFactor = 0.300 * Math.log(0.011 * slave.belly) * heightScaleFactor; const translationX = -262 * (bellyScaleFactor - 1); const translationY = -284 * (bellyScaleFactor - 1); return `matrix(${bellyScaleFactor},0,0,${bellyScaleFactor},${translationX},${translationY})`; } const transformRules = [ {trigger: "boob", action: "transform", value: boobScaling()}, {trigger: "balls", action: "transform", value: ballsScaling()} ]; /* belly scaling threshold must match the pregnancy belly threshold in ArtVectorBelly */ if (slave.belly >= 2000) { transformRules.push({trigger: "belly", action: "transform", value: bellyScaling()}); } /* TODO: pussy tattoo text has been broken for a long time... * the SVGs contain SugarCube syntax in their textPath elements and therefore rely on <<print>>, but they're almost always output in raw DOM now * We should adopt the method used by revamped vector art and use a data-transform="pussy_tattoo_text" attribute in the SVG * This block sets up the necessary transform to happen automatically but none of the SVGs actually use it yet */ if (V.showBodyMods === 1 && slave.vaginaTat === "rude words") { transformRules.push({trigger: "pussy_tattoo_text", action: "text-content", value: slave.dick !== 0 ? "Useless" : "Fucktoy"}); } return transformRules; } /** calculate and write the stylesheet for this art * @param {number} artSize * @param {DocumentFragment} res */ function setStylesheet(artSize, res) { const {styleClass, styleCSS} = App.Art.makeVectorArtStyle(slave, artSize); let st = document.createElement("style"); st.innerHTML = styleCSS; res.appendChild(st); return styleClass; } function setArmType() { if (hasAnyArms(slave)) { if (slave.devotion > 50) { leftArmType = "High"; rightArmType = "High"; } else if (slave.trust >= -20) { if (slave.devotion < -20) { leftArmType = "Rebel"; rightArmType = "Low"; } else if (slave.devotion <= 20) { leftArmType = "Low"; rightArmType = "Low"; } else { leftArmType = "Mid"; rightArmType = "High"; } } else { leftArmType = "Mid"; rightArmType = "Mid"; } if (!hasLeftArm(slave)) { leftArmType = "None"; } else if (!hasRightArm(slave)) { rightArmType = "None"; } } else { leftArmType = "None"; rightArmType = "None"; } } function setButtSize() { /* Size calculations - needs to be done even for amputees */ buttSize = Math.clamp(Math.trunc(slave.butt), 1, 7) - 1; } function setHairLength() { hairLength = undefined; if (slave.hLength >= 60) { hairLength = "Long"; } else if (slave.hLength >= 30) { hairLength = "Medium"; } else if (slave.hLength >= 10) { hairLength = "Short"; } } function setLegSize() { /* Leg wideness switch courtesy of Nov-X */ /* needs to be done even for amputees */ if (slave.hips === -2) { if (slave.weight <= 0) { legSize = "Narrow"; } else if (slave.weight < 161) { legSize = "Normal"; } else { legSize = "Wide"; } } else if (slave.hips === -1) { if (slave.weight <= -11) { legSize = "Narrow"; } else if (slave.weight < 96) { legSize = "Normal"; } else { legSize = "Wide"; } } else if (slave.hips === 0) { if (slave.weight <= -96) { legSize = "Narrow"; } else if (slave.weight < 11) { legSize = "Normal"; } else if (slave.weight < 131) { legSize = "Wide"; } else { legSize = "Thick"; } } else if (slave.hips === 1) { if (slave.weight <= -31) { legSize = "Normal"; } else if (slave.weight < 31) { legSize = "Wide"; } else { legSize = "Thick"; } } else { /* .hips === 2 or 3 */ if (slave.weight <= -11) { legSize = "Wide"; } else { legSize = "Thick"; } } } function setPenisSize() { penisSize = undefined; if ((slave.dick > 6 && slave.drugs !== "priapism agents") || (slave.dick > 0 && slave.belly <= 4000)) { penisSize = Math.clamp(slave.dick, 1, 11) - 1; } } function penisArtControl() { if (penisSize === undefined) { penisDrawtime = -1; /* no penis to draw */ } else if (V.showClothingErection) { penisDrawtime = 0; /* default is to draw before boobs/belly */ switch (slave.clothes) { /* BULGE OUTFITS WITH ERECTION: LONG OUTFITS */ case "an apron": case "a ball gown": case "a biyelgee costume": case "a comfortable bodysuit": case "a tight Imperial bodysuit": case "a burkini": case "a burqa": case "a halter top dress": case "a hijab and abaya": case "a klan robe": case "a leotard": case "a slutty maid outfit": case "a military uniform": case "a mini dress": case "a monokini": case "a niqab and abaya": case "a nice nurse outfit": case "a one-piece swimsuit": case "a red army uniform": case "a schutzstaffel uniform": case "a slutty schutzstaffel uniform": case "a slave gown": case "a succubus outfit": case "nice business attire": case "a bunny outfit": case "a chattel habit": case "a huipil": case "a kimono": case "a maternity dress": case "a slutty qipao": case "a long qipao": case "a toga": case "a penitent nuns habit": if ((canAchieveErection(slave)) && (slave.chastityPenis !== 1)) { penisArt.add(`Art_Vector_Bulge_Outfit_Hard_${penisSize}`); break; /* IN CASE OF NO ERECTION, SKIP TO A NORMAL BULGE */ // FIXME: having a break in an if is bad code } /* BULGE OUTFITS LONG OUTFITS */ // eslint-disable-next-line no-fallthrough case "a cheerleader outfit": case "battlearmor": case "Imperial Plate": case "battledress": case "cutoffs and a t-shirt": case "cutoffs": case "clubslut netting": case "a cybersuit": case "a latex catsuit": case "a nice maid outfit": case "a hijab and blouse": case "jeans": case "leather pants and a tube top": case "leather pants and pasties": case "leather pants": case "lederhosen": case "a slutty nurse outfit": case "a police uniform": case "a schoolgirl outfit": case "a slutty outfit": case "spats and a tank top": case "sport shorts": case "sport shorts and a sports bra": case "sport shorts and a t-shirt": case "slutty business attire": case "a sweater and cutoffs": case "a sweater and panties": case "a t-shirt and jeans": case "a t-shirt and panties": case "a tank-top and panties": case "conservative clothing": case "stretch pants and a crop-top": penisArt.add(`Art_Vector_Bulge_Outfit_${penisSize}`); break; /* SMALL BULGE ONLY (SHORT) OUTFITS */ case "boyshorts": case "a button-up shirt and panties": case "kitty lingerie": case "a slutty klan robe": case "a mounty outfit": case "panties and pasties": case "panties": case "an oversized t-shirt and boyshorts": case "a scalemail bikini": case "a skimpy loincloth": case "striped panties": case "striped underwear": case "a t-shirt and thong": case "a thong": case "a tube top and thong": case "attractive lingerie for a pregnant woman": case "harem gauze": if (slave.belly <= 4000) { if (slave.dick > 3) { penisArt.add("Art_Vector_Bulge_Outfit_3"); } else { penisArt.add(`Art_Vector_Bulge_Outfit_${penisSize}`); } } break; /* NO BULGE, EVERYTHING HIDDEN */ case "a dirndl": case "a gothic lolita dress": case "a hanbok": break; /* full frontal */ default: if ((canAchieveErection(slave)) && (slave.chastityPenis !== 1)) { penisDrawtime = 1; /* draw erect penis over boobs if boobs do not hide the penis' base */ if (boobScaleFactor < 3.7) { if (slave.foreskin !== 0) { penisArt.add(`Art_Vector_Penis_${penisSize}`); } else { penisArt.add(`Art_Vector_PenisCirc_${penisSize}`); } } } else { /* flaccid penises are drawn behind the boobs/belly */ if (slave.foreskin !== 0) { penisArt.add(`Art_Vector_Flaccid_${penisSize}`); } else { penisArt.add(`Art_Vector_FlaccidCirc_${penisSize}`); } /* this draws chastity OVER latex catsuit. prndev finds this alright. */ if (slave.chastityPenis === 1) { penisArt.add(`Art_Vector_Chastity_Cage_${penisSize}`); } } } } else { penisDrawtime = 0; /* default is to draw before boobs/belly */ switch (slave.clothes) { /* BULGE OUTFITS LONG+MEDIUM OUTFITS */ case "a ball gown": case "a biyelgee costume": case "a burkini": case "a burqa": case "a dirndl": case "a halter top dress": case "a hijab and abaya": case "a hijab and blouse": case "a kimono": case "a klan robe": case "a long qipao": case "a maternity dress": case "a military uniform": case "a mounty outfit": case "a nice maid outfit": case "a nice nurse outfit": case "a niqab and abaya": case "a police uniform": case "a red army uniform": case "a schutzstaffel uniform": case "a skimpy loincloth": case "a slave gown": case "a slutty nurse outfit": case "a slutty schutzstaffel uniform": case "a t-shirt and jeans": case "a toga": case "an apron": case "battlearmor": case "Imperial Plate": case "battledress": case "conservative clothing": case "jeans": case "leather pants": case "leather pants and a tube top": case "leather pants and pasties": case "lederhosen": case "nice business attire": case "slutty business attire": case "spats and a tank top": case "sport shorts": case "sport shorts and a sports bra": case "sport shorts and a t-shirt": case "stretch pants and a crop-top": penisArt.add(`Art_Vector_Bulge_Outfit_${penisSize}`); break; /* BULGE OUTFITS SHORT OUTFITS */ case "a bunny outfit": case "a button-up shirt and panties": case "a chattel habit": case "a huipil": case "a leotard": case "a mini dress": case "a monokini": case "a one-piece swimsuit": case "a penitent nuns habit": case "a scalemail bikini": case "a slutty klan robe": case "a slutty maid outfit": case "a slutty outfit": case "a slutty qipao": case "a succubus outfit": case "a sweater and cutoffs": case "a sweater and panties": case "a t-shirt and panties": case "a t-shirt and thong": case "a tank-top and panties": case "a thong": case "a tube top and thong": case "an oversized t-shirt and boyshorts": case "attractive lingerie for a pregnant woman": case "boyshorts": case "cutoffs": case "cutoffs and a t-shirt": case "harem gauze": case "kitty lingerie": case "panties": case "panties and pasties": case "striped panties": case "striped underwear": if (slave.belly <= 4000) { if (slave.dick > 3) { penisArt.add("Art_Vector_Bulge_Outfit_3"); } else { penisArt.add(`Art_Vector_Bulge_Outfit_${penisSize}`); } } break; /* hide everything */ case "a cheerleader outfit": case "a gothic lolita dress": case "a hanbok": case "a schoolgirl outfit": break; /* full frontal */ default: if ((canAchieveErection(slave)) && (slave.chastityPenis !== 1)) { penisDrawtime = 1; /* draw erect penis over boobs if boobs do not hide the penis' base */ if (boobScaleFactor < 3.7) { if (slave.foreskin !== 0) { penisArt.add(`Art_Vector_Penis_${penisSize}`); } else { penisArt.add(`Art_Vector_PenisCirc_${penisSize}`); } } } else { /* flaccid penises are drawn behind the boobs/belly */ if (slave.foreskin !== 0) { penisArt.add(`Art_Vector_Flaccid_${penisSize}`); } else { penisArt.add(`Art_Vector_FlaccidCirc_${penisSize}`); } /* this draws chastity OVER latex catsuit. prndev finds this alright. */ if (slave.chastityPenis === 1) { penisArt.add(`Art_Vector_Chastity_Cage_${penisSize}`); } } } } } function setTorsoSize() { /* Torso size switch courtesy of Nov-X */ if (slave.waist >= 96) { if (slave.weight >= 96) { torsoSize = "Obese"; } else if (slave.weight >= 11) { torsoSize = "Fat"; } else if (slave.weight > -31) { torsoSize = "Chubby"; } else { torsoSize = "Normal"; } } else if (slave.waist >= 41) { if (slave.weight >= 131) { torsoSize = "Obese"; } else if (slave.weight >= 31) { torsoSize = "Fat"; } else if (slave.weight >= 0) { torsoSize = "Chubby"; } else if (slave.weight > -96) { torsoSize = "Normal"; } else { torsoSize = "Hourglass"; } } else if (slave.waist >= 11) { if (slave.weight >= 161) { torsoSize = "Obese"; } else if (slave.weight >= 96) { torsoSize = "Fat"; } else if (slave.weight >= 11) { torsoSize = "Chubby"; } else if (slave.weight > -31) { torsoSize = "Normal"; } else { torsoSize = "Hourglass"; } } else if (slave.waist > -11) { if (slave.weight >= 191) { torsoSize = "Obese"; } else if (slave.weight >= 131) { torsoSize = "Fat"; } else if (slave.weight >= 31) { torsoSize = "Chubby"; } else if (slave.weight >= 0) { torsoSize = "Normal"; } else if (slave.weight > -96) { torsoSize = "Hourglass"; } else { torsoSize = "Unnatural"; } } else if (slave.waist > -41) { if (slave.weight >= 161) { torsoSize = "Fat"; } else if (slave.weight >= 96) { torsoSize = "Chubby"; } else if (slave.weight >= 11) { torsoSize = "Normal"; } else if (slave.weight > -31) { torsoSize = "Hourglass"; } else { torsoSize = "Unnatural"; } } else if (slave.waist > -96) { if (slave.weight >= 191) { torsoSize = "Fat"; } else if (slave.weight >= 131) { torsoSize = "Chubby"; } else if (slave.weight >= 31) { torsoSize = "Normal"; } else if (slave.weight > -11) { torsoSize = "Hourglass"; } else { torsoSize = "Unnatural"; } } else { if (slave.weight >= 161) { torsoSize = "Chubby"; } else if (slave.weight >= 96) { torsoSize = "Normal"; } else if (slave.weight > 0) { torsoSize = "Hourglass"; } else { torsoSize = "Unnatural"; } } } function ArtVectorAnalAccessories() { if (slave.buttplug === "long plug") { svgQueue.add("Art_Vector_Plug_Long"); } else if (slave.buttplug === "large plug") { svgQueue.add("Art_Vector_Plug_Large"); } else if (slave.buttplug === "long, large plug") { svgQueue.add("Art_Vector_Plug_Large_Long"); } else if (slave.buttplug === "huge plug") { svgQueue.add("Art_Vector_Plug_Huge"); } else if (slave.buttplug === "long, huge plug") { svgQueue.add("Art_Vector_Plug_Huge_Long"); } if (slave.buttplugAttachment === "tail") { svgQueue.add("Art_Vector_Plug_Tail"); } else if (slave.buttplugAttachment === "cat tail") { svgQueue.add("Art_Vector_Cat_Tail"); } } function ArtVectorArm() { /* Arms position switch courtesy of Nov-X */ /* Updated 2018-10-25 by Fr0g */ /* - changed arm calculation block position*/ /* - added brackets to make boolean logic run */ /* Many amputee clothing art files exist, but draw nothing.They are excluded for now to reduce on rendering time. This is usually indicated by hasLeftArm(slave) checks and similar. svgQueue.add("Art_Vector_Arm_Right_None"); svgQueue.add("Art_Vector_Arm_Left_None"); */ /* left */ if (hasLeftArm(slave)) { if (getLeftArmID(slave) === 1) { svgQueue.add(`Art_Vector_Arm_Left_${leftArmType}`); if (slave.muscles >= 6) { if (leftArmType === "High") { svgQueue.add("Art_Vector_Arm_Left_High_MLight"); } else if (leftArmType === "Mid") { svgQueue.add("Art_Vector_Arm_Left_Mid_MLight"); } else if (leftArmType === "Low") { svgQueue.add("Art_Vector_Arm_Left_Low_MLight"); } else if (leftArmType === "Rebel") { svgQueue.add("Art_Vector_Arm_Left_Rebel_MLight"); } } } else if (getLeftArmID(slave) === 2) { svgQueue.add(`Art_Vector_Arm_Left_ProstheticBasic_${rightArmType}`); } else if (getLeftArmID(slave) === 3) { svgQueue.add(`Art_Vector_Arm_Left_ProstheticSexy_${rightArmType}`); } else if (getLeftArmID(slave) === 4) { svgQueue.add(`Art_Vector_Arm_Left_ProstheticBeauty_${rightArmType}`); } else if (getLeftArmID(slave) === 5) { svgQueue.add(`Art_Vector_Arm_Left_ProstheticCombat_${rightArmType}`); } else if (getLeftArmID(slave) === 6) { svgQueue.add(`Art_Vector_Arm_Left_ProstheticSwiss_${rightArmType}`); } } /* right */ if (hasRightArm(slave)) { if (getRightArmID(slave) === 1) { svgQueue.add(`Art_Vector_Arm_Right_${rightArmType}`); if (slave.muscles >= 6) { if (rightArmType === "High") { svgQueue.add("Art_Vector_Arm_Right_High_MLight"); } else if (rightArmType === "Mid") { svgQueue.add("Art_Vector_Arm_Right_Mid_MLight"); } else if (rightArmType === "Low") { svgQueue.add("Art_Vector_Arm_Right_Low_MLight"); } } } else if (getRightArmID(slave) === 2) { svgQueue.add(`Art_Vector_Arm_Right_ProstheticBasic_${rightArmType}`); } else if (getRightArmID(slave) === 3) { svgQueue.add(`Art_Vector_Arm_Right_ProstheticSexy_${rightArmType}`); } else if (getRightArmID(slave) === 4) { svgQueue.add(`Art_Vector_Arm_Right_ProstheticBeauty_${rightArmType}`); } else if (getRightArmID(slave) === 5) { svgQueue.add(`Art_Vector_Arm_Right_ProstheticCombat_${rightArmType}`); } else if (getRightArmID(slave) === 6) { svgQueue.add(`Art_Vector_Arm_Right_ProstheticSwiss_${rightArmType}`); } } /* shiny clothing */ if (V.seeVectorArtHighlights === 1) { if (wearingLatex === true || slave.clothes === "body oil") { /* only some arm positions have art (feel free to add more) */ if (leftArmType === "High") { svgQueue.add("Art_Vector_Arm_Outfit_Shine_Left_High"); } else if (leftArmType === "Mid") { svgQueue.add("Art_Vector_Arm_Outfit_Shine_Left_Mid"); } else if (leftArmType === "Low") { svgQueue.add("Art_Vector_Arm_Outfit_Shine_Left_Low"); } } } /* TODO: simplify selection (select prefix, infix and suffix and combine instead of using switch statements) */ switch (slave.clothes) { case "a biyelgee costume": case "a burkini": case "a button-up shirt": case "a button-up shirt and panties": case "a cheerleader outfit": case "a dirndl": case "a gothic lolita dress": case "a hanbok": case "a hijab and blouse": case "a huipil": case "a kimono": case "a klan robe": case "a long qipao": case "a military uniform": case "a mounty outfit": case "a nice maid outfit": case "a nice nurse outfit": case "a police uniform": case "a red army uniform": case "a schoolgirl outfit": case "a slutty klan robe": case "a slutty nurse outfit": case "a slutty qipao": case "a sweater": case "a sweater and cutoffs": case "a sweater and panties": case "a t-shirt": case "a t-shirt and jeans": case "a t-shirt and panties": case "a t-shirt and thong": case "an oversized t-shirt": case "an oversized t-shirt and boyshorts": case "battlearmor": case "battledress": case "clubslut netting": case "conservative clothing": case "cutoffs and a t-shirt": case "lederhosen": case "nice business attire": case "slutty business attire": case "slutty jewelry": case "sport shorts and a t-shirt": case "Western clothing": if (hasRightArm(slave)) { svgQueue.add(`Art_Vector_Arm_Outfit_${clothing2artSuffix(slave.clothes)}_Right_${rightArmType}`); } if (hasLeftArm(slave)) { svgQueue.add(`Art_Vector_Arm_Outfit_${clothing2artSuffix(slave.clothes)}_Left_${leftArmType}`); } break; /* manually handle special cases */ case "a schutzstaffel uniform": case "a slutty schutzstaffel uniform": if (hasRightArm(slave)) { svgQueue.add(`Art_Vector_Arm_Outfit_SchutzstaffelUniform_Right_${rightArmType}`); } if (hasLeftArm(slave)) { svgQueue.add(`Art_Vector_Arm_Outfit_SchutzstaffelUniform_Left_${leftArmType}`); } break; case "Imperial Plate": if (hasRightArm(slave)) { svgQueue.add(`Art_Vector_Arm_Outfit_Battlearmor_Right_${rightArmType}`); } if (hasLeftArm(slave)) { svgQueue.add(`Art_Vector_Arm_Outfit_Battlearmor_Left_${leftArmType}`); } break; case "a hijab and abaya": case "a niqab and abaya": case "a burqa": if (hasRightArm(slave)) { svgQueue.add(`Art_Vector_Arm_Outfit_HijabAndAbaya_Right_${rightArmType}`); } if (hasLeftArm(slave)) { svgQueue.add(`Art_Vector_Arm_Outfit_HijabAndAbaya_Left_${leftArmType}`); } break; case "a slave gown": /* only some arm positions have art (feel free to add more) */ if (hasLeftArm(slave)) { if (leftArmType !== "Rebel") { svgQueue.add(`Art_Vector_Arm_Outfit_SlaveGown_Left_${leftArmType}`); } } } } function ArtVectorBalls() { switch (slave.clothes) { case "a bimbo outfit": case "a bra": case "a button-up shirt": case "a comfortable bodysuit": case "a courtesan dress": case "a cybersuit": case "a fallen nuns habit": case "a latex catsuit": case "a nice pony outfit": case "a Santa dress": case "a slutty pony outfit": case "a sports bra": case "a string bikini": case "a striped bra": case "a sweater": case "a t-shirt": case "a tank-top": case "a tube top": case "an oversized t-shirt": case "attractive lingerie": case "body oil": case "chains": case "choosing her own clothes": case "clubslut netting": case "no clothing": case "overalls": case "pasties": case "petite admi outfit": case "restrictive latex": case "shibari ropes": case "slutty jewelry": case "uncomfortable straps": case "Western clothing": case "a tight Imperial bodysuit": svgQueue.add("Art_Vector_Balls"); } } function ArtVectorBelly() { if (slave.belly >= 2000) { /* TODO: add check in penis control. do not draw penis atop belly if _art_belly_scale_factor > 1. */ if (slave.navelPiercing === 1) { svgQueue.add("Art_Vector_Belly_Pregnant_Piercing"); } else if (slave.navelPiercing === 2) { svgQueue.add("Art_Vector_Belly_Pregnant_Piercing_Heavy"); } else { svgQueue.add("Art_Vector_Belly"); } switch (slave.clothes) { case "a bimbo outfit": case "a bra": case "a courtesan dress": case "a cybersuit": case "a Fuckdoll suit": case "a latex catsuit": case "a nice pony outfit": case "a Santa dress": case "a scalemail bikini": case "a skimpy loincloth": case "a slutty klan robe": case "a slutty outfit": case "a slutty pony outfit": case "a sports bra": case "a string bikini": case "a striped bra": case "a thong": case "a tube top": case "a tube top and thong": case "attractive lingerie": case "attractive lingerie for a pregnant woman": case "body oil": case "boyshorts": case "chains": case "choosing her own clothes": case "cutoffs": case "jeans": case "kitty lingerie": case "leather pants": case "leather pants and a tube top": case "leather pants and pasties": case "no clothing": case "overalls": case "panties": case "panties and pasties": case "pasties": case "petite admi outfit": case "restrictive latex": case "shibari ropes": case "slutty jewelry": case "sport shorts": case "sport shorts and a sports bra": case "stretch pants and a crop-top": case "striped panties": case "striped underwear": case "uncomfortable straps": break; /* do nothing for these choices */ /* manually handle special cases */ case "a slutty schutzstaffel uniform": svgQueue.add("Art_Vector_Belly_Outfit_SchutzstaffelUniform"); break; case "a niqab and abaya": case "a burqa": svgQueue.add("Art_Vector_Belly_Outfit_HijabAndAbaya"); break; case "Imperial Plate": svgQueue.add("Art_Vector_Belly_Outfit_Battlearmor"); break; case "a tight Imperial bodysuit": svgQueue.add("Art_Vector_Belly_Outfit_ComfortableBodysuit"); break; default: svgQueue.add(`Art_Vector_Belly_Outfit_${clothing2artSuffix(slave.clothes)}`); } /* shiny clothing */ if (V.seeVectorArtHighlights === 1) { if (wearingLatex === true || slave.clothes === "body oil") { svgQueue.add("Art_Vector_Belly_Outfit_Shine"); } } } /* belly piercings for flat bellies */ if (slave.belly === 0) { if (slave.navelPiercing === 1) { svgQueue.add("Art_Vector_Belly_Piercing"); } else if (slave.navelPiercing === 2) { svgQueue.add("Art_Vector_Belly_Piercing_Heavy"); } } /* Torso Accessories */ if ((slave.bellyAccessory === "a corset" || slave.bellyAccessory === "an extreme corset") && slave.belly <= 1500) { if (torsoSize === "Normal") { svgQueue.add("Art_Vector_Corsetnormal"); } else if (torsoSize === "Hourglass") { svgQueue.add("Art_Vector_Corsethourglass"); } else if (torsoSize === "Unnatural") { svgQueue.add("Art_Vector_Corsetunnatural"); } } else if (slave.bellyAccessory === "a small empathy belly") { svgQueue.add("Art_Vector_Empathy_Belly_Small"); } else if (slave.bellyAccessory === "a medium empathy belly") { svgQueue.add("Art_Vector_Empathy_Belly_Medium"); } else if (slave.bellyAccessory === "a large empathy belly") { svgQueue.add("Art_Vector_Empathy_Belly_Large"); } else if (slave.bellyAccessory === "a huge empathy belly") { svgQueue.add("Art_Vector_Empathy_Belly_Huge"); } } function ArtVectorBoob() { if (slave.boobs < 300) { /* BEWARE: this threshold may be used in other art-related code, too */ /* boobs too small - draw areolae directly onto torso */ } else { svgQueue.add("Art_Vector_Boob_Alt"); /* shiny clothing */ if (V.seeVectorArtHighlights === 1) { if (slave.fuckdoll !== 0 || slave.clothes === "a latex catsuit" || slave.clothes === "body oil") { svgQueue.add("Art_Vector_Boob_Outfit_Shine"); } } } switch (slave.clothes) { /* display nipples/areola for the following clothes */ case "a bimbo outfit": case "a chattel habit": case "a courtesan dress": case "a fallen nuns habit": case "a Fuckdoll suit": case "a monokini": case "a nice pony outfit": case "a Santa dress": case "a skimpy loincloth": case "a slutty pony outfit": case "a string bikini": case "a succubus outfit": case "a thong": case "a toga": case "attractive lingerie for a pregnant woman": case "body oil": case "boyshorts": case "chains": case "choosing her own clothes": case "clubslut netting": case "cutoffs": case "jeans": case "leather pants": case "no clothing": case "overalls": case "panties": case "petite admi outfit": case "restrictive latex": case "shibari ropes": case "slutty jewelry": case "sport shorts": case "striped panties": case "uncomfortable straps": if (slave.areolaeShape === "star") { svgQueue.add("Art_Vector_Boob_Areola_Star"); } else if (slave.areolaeShape === "heart") { svgQueue.add("Art_Vector_Boob_Areola_Heart"); } else if (slave.areolae === 0) { svgQueue.add("Art_Vector_Boob_Areola"); } else if (slave.areolae === 1) { svgQueue.add("Art_Vector_Boob_Areola_Large"); } else if (slave.areolae === 2) { svgQueue.add("Art_Vector_Boob_Areola_Wide"); } else if (slave.areolae >= 3) { svgQueue.add("Art_Vector_Boob_Areola_Huge"); } if (slave.nipples === "tiny") { svgQueue.add("Art_Vector_Boob_NippleTiny"); } else if (slave.nipples === "cute") { svgQueue.add("Art_Vector_Boob_NippleCute"); } else if (slave.nipples === "puffy") { svgQueue.add("Art_Vector_Boob_NipplePuffy"); } else if (slave.nipples === "inverted") { svgQueue.add("Art_Vector_Boob_NippleInverted"); } else if (slave.nipples === "huge") { svgQueue.add("Art_Vector_Boob_NippleHuge"); } else if (slave.nipples === "partially inverted") { svgQueue.add("Art_Vector_Boob_NipplePartiallyInverted"); } else if (slave.nipples === "fuckable") { svgQueue.add("Art_Vector_Boob_NippleFuckable"); } } } function ArtVectorBoobAddons() { if (slave.boobs < 300) { /* boobs too small: do not show boob-related art */ /* BEWARE: this threshold should be kept in sync with the one in Art_Vector_Boob_ */ } else { switch (slave.clothes) { case "a bimbo outfit": case "a chattel habit": case "a comfortable bodysuit": case "a courtesan dress": case "a cybersuit": case "a fallen nuns habit": case "a Fuckdoll suit": case "a latex catsuit": case "a nice pony outfit": case "a Santa dress": case "a skimpy loincloth": case "a slutty pony outfit": case "a succubus outfit": case "a thong": case "a tight Imperial bodysuit": case "body oil": case "boyshorts": case "choosing her own clothes": case "cutoffs": case "jeans": case "leather pants": case "no clothing": case "overalls": case "panties": case "petite admi outfit": case "restrictive latex": case "sport shorts": case "striped panties": break; /* do nothing for these choices */ /* manually handle special cases */ case "a slutty schutzstaffel uniform": svgQueue.add("Art_Vector_Boob_Outfit_SchutzstaffelUniform"); break; case "a niqab and abaya": case "a burqa": svgQueue.add("Art_Vector_Boob_Outfit_HijabAndAbaya"); break; case "pasties": svgQueue.add("Art_Vector_Boob_Outfit_PantiesAndPasties"); break; case "Imperial Plate": svgQueue.add("Art_Vector_Boob_Outfit_Battlearmor"); break; default: svgQueue.add(`Art_Vector_Boob_Outfit_${clothing2artSuffix(slave.clothes)}`); } } if (V.showBodyMods === 1 && (slave.nipplesPiercing > 0 || slave.areolaePiercing > 0)) { /* shows nipple piercings in game when selected; piercings will show on the outfits listed below */ switch (slave.clothes) { case "a bimbo outfit": case "a chattel habit": case "a comfortable bodysuit": case "a courtesan dress": case "a cybersuit": case "a fallen nuns habit": case "a latex catsuit": case "a monokini": case "a nice pony outfit": case "a Santa dress": case "a skimpy loincloth": case "a slutty pony outfit": case "a string bikini": case "a succubus outfit": case "a thong": case "a tight Imperial bodysuit": case "attractive lingerie": case "attractive lingerie for a pregnant woman": case "body oil": case "boyshorts": case "chains": case "choosing her own clothes": case "clubslut netting": case "cutoffs": case "jeans": case "leather pants": case "no clothing": case "overalls": case "panties": case "petite admi outfit": case "restrictive latex": case "shibari ropes": case "slutty jewelry": case "sport shorts": case "striped panties": case "uncomfortable straps": if (slave.nipplesPiercing === 1) { svgQueue.add("Art_Vector_Boob_Piercing"); } else if (slave.nipplesPiercing > 1) { svgQueue.add("Art_Vector_Boob_Piercing_Heavy"); } if (slave.areolaePiercing === 1) { svgQueue.add("Art_Vector_Boob_Areola_Piercing"); } else if (slave.areolaePiercing > 1) { svgQueue.add("Art_Vector_Boob_Areola_Piercingheavy"); } } } } function ArtVectorButt() { if (getLeftLegID(slave) === 1) { svgQueue.add(`Art_Vector_Butt_${buttSize}`); } else if (getLeftLegID(slave) === 2) { svgQueue.add(`Art_Vector_Butt_ProstheticBasic_${buttSize}`); } else if (getLeftLegID(slave) === 3) { svgQueue.add(`Art_Vector_Butt_ProstheticSexy_${buttSize}`); } else if (getLeftLegID(slave) === 4) { /* reverted to regular SVG to match description */ svgQueue.add(`Art_Vector_Butt_ProstheticBeauty_${buttSize}`); } else if (getLeftLegID(slave) === 5) { svgQueue.add(`Art_Vector_Butt_ProstheticCombat_${buttSize}`); } else if (getLeftLegID(slave) === 6) { svgQueue.add(`Art_Vector_Butt_ProstheticSwiss_${buttSize}`); } } function ArtVectorChastityBelt() { let bodySize = ""; if (slave.waist >= 96) { if (slave.weight >= 11) { bodySize = "Fat"; } else if (slave.weight > -31) { bodySize = "_Chubby"; } } else if (slave.waist >= 41) { if (slave.weight >= 31) { bodySize = "Fat"; } else if (slave.weight >= 0) { bodySize = "_Chubby"; } } else if (slave.waist >= 11) { if (slave.weight >= 96) { bodySize = "Fat"; } else if (slave.weight >= 11) { bodySize = "_Chubby"; } } else if (slave.waist > -11) { if (slave.weight >= 131) { bodySize = "Fat"; } else if (slave.weight >= 31) { bodySize = "_Chubby"; } } else if (slave.waist > -41) { if (slave.weight >= 161) { bodySize = "Fat"; } else if (slave.weight >= 96) { bodySize = "_Chubby"; } } else if (slave.waist > -96) { if (slave.weight >= 191) { bodySize = "Fat"; } else if (slave.weight >= 131) { bodySize = "_Chubby"; } } else { if (slave.weight >= 31) { bodySize = "_Chubby"; } } if (slave.chastityAnus === 1) { if (bodySize === "Fat") { svgQueue.add("Art_Vector_Chastity_Vagina_Fat"); } else { svgQueue.add("Art_Vector_Chastity_Anus"); svgQueue.add(`Art_Vector_Chastity_Base${bodySize}`); } } if (slave.chastityVagina === 1) { if (bodySize === "Fat") { svgQueue.add("Art_Vector_Chastity_Vagina_Fat"); } else { svgQueue.add("Art_Vector_Chastity_Vagina"); svgQueue.add(`Art_Vector_Chastity_Base${bodySize}`); } } if (slave.vaginalAccessory !== "none") { switch (slave.clothes) { /* shows vaginal accessories on the outfits below */ case "a bimbo outfit": case "a bra": case "a button-up shirt": case "a button-up shirt and panties": case "a chattel habit": case "a comfortable bodysuit": case "a courtesan dress": case "a fallen nuns habit": case "a Fuckdoll suit": case "a latex catsuit": case "a monokini": case "a nice pony outfit": case "a penitent nuns habit": case "a Santa dress": case "a slutty klan robe": case "a slutty outfit": case "a slutty pony outfit": case "a sports bra": case "a string bikini": case "a striped bra": case "a succubus outfit": case "a sweater": case "a t-shirt": case "a t-shirt and panties": case "a t-shirt and thong": case "a tank-top": case "a thong": case "a tube top": case "a tube top and thong": case "a tight Imperial bodysuit": case "an apron": case "an oversized t-shirt": case "attractive lingerie": case "attractive lingerie for a pregnant woman": case "body oil": case "chains": case "choosing her own clothes": case "clubslut netting": case "cutoffs": case "harem gauze": case "no clothing": case "overalls": case "panties": case "panties and pasties": case "pasties": case "petite admi outfit": case "restrictive latex": case "shibari ropes": case "slutty jewelry": case "striped underwear": case "uncomfortable straps": if (slave.vaginalAccessory === "dildo") { svgQueue.add("Art_Vector_Dildo_Short"); } else if (slave.vaginalAccessory === "long dildo") { svgQueue.add("Art_Vector_Dildo_Long"); } else if (slave.clothes !== "a comfortable bodysuit" && slave.clothes !== "a string bikini" && slave.clothes !== "attractive lingerie for a pregnant woman" && slave.clothes !== "restrictive latex" && slave.clothes !== "a tight Imperial bodysuit") { if (slave.vaginalAccessory === "large dildo") { /* additional outfits disabled due to the art breaking with the larger accessories */ svgQueue.add("Art_Vector_Dildo_Large"); } else if (slave.vaginalAccessory === "long, large dildo") { svgQueue.add("Art_Vector_Dildo_Large_Long"); } else if (slave.vaginalAccessory === "huge dildo") { svgQueue.add("Art_Vector_Dildo_Huge"); } else if (slave.vaginalAccessory === "long, huge dildo") { svgQueue.add("Art_Vector_Dildo_Huge_Long"); } } /* else if (slave.vaginalAccessory === "bullet vibrator" || slave.vaginalAccessory === "smart bullet vibrator") { svgQueue.add("Art_Vector_Bullet_Vibrator"); } */ } } } function ArtVectorCollar() { svgQueue.add("Art_Vector_Clavicle"); /* TODO: find out where "uncomfortable leather" collar art went */ switch (slave.collar) { case "leather with cowbell": svgQueue.add("Art_Vector_Collar_Cowbell"); break; case "heavy gold": svgQueue.add("Art_Vector_Collar_Gold_Heavy"); break; case "neck corset": svgQueue.add("Art_Vector_Collar_Neck_Corset"); break; case "pretty jewelry": svgQueue.add("Art_Vector_Collar_Pretty_Jewelry"); break; case "cruel retirement counter": svgQueue.add("Art_Vector_Collar_Retirement_Cruel"); break; case "nice retirement counter": svgQueue.add("Art_Vector_Collar_Retirement_Nice"); break; case "satin choker": svgQueue.add("Art_Vector_Collar_Satin_Choker"); break; case "shock punishment": svgQueue.add("Art_Vector_Collar_Shock_Punishment"); break; case "stylish leather": svgQueue.add("Art_Vector_Collar_Stylish_Leather"); break; case "tight steel": svgQueue.add("Art_Vector_Collar_Tight_Steel"); break; case "uncomfortable leather": svgQueue.add("Art_Vector_Collar_Leather_Cruel"); break; case "silk ribbon": svgQueue.add("Art_Vector_Collar_Silk_Ribbon"); break; case "bowtie": svgQueue.add("Art_Vector_Collar_Bowtie"); break; case "ancient Egyptian": svgQueue.add("Art_Vector_Collar_Ancientegyptian"); } } function ArtVectorFeet() { let outfit, stockings; if (slave.legAccessory === "short stockings") { stockings = "SS"; } else if (slave.legAccessory === "long stockings") { stockings = "LL"; } /* Updated 2018-10-25 by Fr0g */ /* - added brackets to make boolean logic run */ if (slave.shoes === "heels") { svgQueue.add("Art_Vector_Shoes_Heel"); } else if (slave.shoes === "pumps") { svgQueue.add("Art_Vector_Shoes_Pump"); } else if (slave.shoes === "extreme heels") { svgQueue.add(`Art_Vector_Shoes_Extreme_Heel_${legSize}`); } else if (slave.shoes === "boots") { svgQueue.add(`Art_Vector_Shoes_Boot_${legSize}`); } else if (slave.shoes === "flats") { svgQueue.add("Art_Vector_Shoes_Flat"); } else { if (hasBothNaturalLegs(slave)) { svgQueue.add("Art_Vector_Feet_Normal"); } else { if (getLeftLegID(slave) === 6 || getRightLegID(slave) === 6) { svgQueue.add("Art_Vector_Feet_ProstheticSwiss"); } else if (getLeftLegID(slave) === 5 || getRightLegID(slave) === 5) { svgQueue.add("Art_Vector_Feet_ProstheticCombat"); } else if (getLeftLegID(slave) === 4 || getRightLegID(slave) === 4) { svgQueue.add("Art_Vector_Feet_ProstheticBeauty"); } else if (getLeftLegID(slave) === 3 || getRightLegID(slave) === 3) { svgQueue.add("Art_Vector_Feet_ProstheticSexy"); } else if (getLeftLegID(slave) === 2 || getRightLegID(slave) === 2) { svgQueue.add("Art_Vector_Feet_ProstheticBasic"); } else if (getLeftLegID(slave) === 1 || getRightLegID(slave) === 1) { svgQueue.add("Art_Vector_Feet_Normal"); } } } if (stockings !== undefined && hasAnyLegs(slave)) { if (slave.shoes === "heels") { svgQueue.add(`Art_Vector_Shoes_Heel_${stockings}_${legSize}`); } else if (slave.shoes === "pumps") { svgQueue.add(`Art_Vector_Shoes_Pump_${stockings}_${legSize}`); } else if (slave.shoes === "flats") { svgQueue.add(`Art_Vector_Shoes_Flat_${stockings}_${legSize}`); } else if (slave.shoes === "none") { svgQueue.add(`Art_Vector_Shoes_Stockings_${stockings}_${legSize}`); } } switch (slave.clothes) { case "a bimbo outfit": case "a bra": case "a button-up shirt": case "a button-up shirt and panties": case "a chattel habit": case "a comfortable bodysuit": case "a courtesan dress": case "a cybersuit": case "a gothic lolita dress": case "a hanbok": case "a leotard": case "a nice pony outfit": case "a one-piece swimsuit": case "a penitent nuns habit": case "a Santa dress": case "a scalemail bikini": case "a skimpy loincloth": case "a slutty klan robe": case "a slutty outfit": case "a slutty pony outfit": case "a sports bra": case "a string bikini": case "a striped bra": case "a sweater": case "a sweater and panties": case "a t-shirt": case "a t-shirt and panties": case "a t-shirt and thong": case "a tank-top": case "a tank-top and panties": case "a thong": case "a tube top": case "a tube top and thong": case "a tight Imperial bodysuit": case "an oversized t-shirt": case "attractive lingerie for a pregnant woman": case "chains": case "choosing her own clothes": case "kitty lingerie": case "no clothing": case "overalls": case "panties": case "panties and pasties": case "pasties": case "petite admi outfit": case "shibari ropes": case "striped panties": case "striped underwear": case "uncomfortable straps": break; /* do nothing for these cases */ case "a Fuckdoll suit": case "a latex catsuit": case "body oil": case "restrictive latex": if (V.seeVectorArtHighlights === 1) { /* special case for shiny clothing */ outfit = "Shine"; } break; default: outfit = clothing2artSuffix(slave.clothes); } if (outfit !== undefined) { if (hasAnyLegs(slave)) { if (slave.clothes === "Imperial Plate"){ svgQueue.add(`Art_Vector_Butt_Outfit_Battlearmor_${buttSize}`); } else if (slave.clothes !== "a slutty qipao" && slave.clothes !== "harem gauze" && slave.clothes !== "slutty jewelry" && slave.clothes !== "Western clothing") { /* these clothes have a stump/leg outfit, but no butt outfit */ svgQueue.add(`Art_Vector_Butt_Outfit_${outfit}_${buttSize}`); } if (slave.clothes === "Imperial Plate"){ svgQueue.add(`Art_Vector_Leg_Outfit_Battlearmor_${legSize}`); } else if (slave.clothes !== "a schoolgirl outfit") { /* file is there, but contains no artwork */ svgQueue.add(`Art_Vector_Leg_Outfit_${outfit}_${legSize}`); } } else { if (outfit === "Shine") { /* the only stump outfit that does not draw an empty svg */ svgQueue.add(`Art_Vector_Leg_Outfit_${outfit}_Stump`); } } } } function ArtVectorHairBack() { if (hairLength !== undefined) { /* Don't draw hair if it isn't there */ if (slave.fuckdoll !== 0 || (slave.bald !== 0 && slave.hStyle === "bald")) { svgQueue.add("Art_Vector_Hair_Back_NoHair"); } else { switch (slave.clothes) { case "a biyelgee costume": case "a burkini": case "a burqa": case "a chattel habit": case "a cybersuit": case "a fallen nuns habit": case "a hijab and abaya": case "a hijab and blouse": case "a klan robe": case "a military uniform": case "a mounty outfit": case "a niqab and abaya": case "a penitent nuns habit": case "a police uniform": case "a red army uniform": case "a schutzstaffel uniform": case "a slutty klan robe": case "a slutty nurse outfit": case "a slutty schutzstaffel uniform": case "battlearmor": case "Imperial Plate": case "restrictive latex": case "Western clothing": break; /* do nothing */ default: switch (slave.hStyle) { case "buzzcut": case "shaved": case "shaved bald": svgQueue.add("Art_Vector_Hair_Back_NoHair"); break; case "afro": if (slave.hLength >= 150) { svgQueue.add("Art_Vector_Hair_Back_Afro_Giant"); } else { svgQueue.add(`Art_Vector_Hair_Back_Afro_${hairLength}`); } break; case "messy bun": svgQueue.add(`Art_Vector_Hair_Back_Ninja_${hairLength}`); break; case "strip": svgQueue.add("Art_Vector_Hair_Back_NoHair"); break; case "braided": case "bun": case "cornrows": case "curled": case "dreadlocks": case "eary": case "luxurious": case "messy": case "neat": case "permed": case "ponytail": case "tails": case "up": svgQueue.add(`Art_Vector_Hair_Back_${capFirstChar(slave.hStyle)}_${hairLength}`); break; default: svgQueue.add("Art_Vector_Hair_Back_Messy_Medium"); } } } } /* note: latex clothing actually shows some hair, but there is no appropriate art for it */ if (slave.faceAccessory === "cat ears") { svgQueue.add("Art_Vector_Cat_Ear_Back"); } } function ArtVectorHairFore() { if (hairLength !== undefined) { /* Don't draw hair if it isn't there */ if (slave.fuckdoll !== 0 || (slave.bald !== 0 && slave.hStyle === "bald")) { svgQueue.add("Art_Vector_Hair_Fore_NoHair"); } else { switch (slave.clothes) { case "a biyelgee costume": case "a burkini": case "a burqa": case "a chattel habit": case "a cybersuit": case "a fallen nuns habit": case "a hijab and abaya": case "a hijab and blouse": case "a klan robe": case "a military uniform": case "a mounty outfit": case "a niqab and abaya": case "a penitent nuns habit": case "a police uniform": case "a red army uniform": case "a schutzstaffel uniform": case "a slutty klan robe": case "a slutty nurse outfit": case "a slutty schutzstaffel uniform": case "battlearmor": case "Imperial Plate": case "restrictive latex": case "Western clothing": break; /* do nothing */ default: switch (slave.hStyle) { case "buzzcut": case "shaved": case "shaved bald": svgQueue.add("Art_Vector_Hair_Fore_NoHair"); break; case "afro": if (slave.hLength >= 150) { svgQueue.add("Art_Vector_Hair_Fore_Afro_Giant"); } else { svgQueue.add(`Art_Vector_Hair_Fore_Afro_${hairLength}`); } break; case "messy bun": svgQueue.add(`Art_Vector_Hair_Fore_Ninja_${hairLength}`); break; case "bun": case "neat": case "ponytail": svgQueue.add(`Art_Vector_Hair_Fore_${capFirstChar(slave.hStyle)}`); break; case "braided": case "cornrows": case "curled": case "dreadlocks": case "eary": case "luxurious": case "messy": case "permed": case "strip": case "tails": case "up": svgQueue.add(`Art_Vector_Hair_Fore_${capFirstChar(slave.hStyle)}_${hairLength}`); break; default: svgQueue.add("Art_Vector_Hair_Fore_Messy_Medium"); } } } } /* note: latex clothing actually shows some hair, but there is no appropriate art for it */ if (slave.faceAccessory === "cat ears") { svgQueue.add("Art_Vector_Cat_Ear_Fore"); } } function ArtVectorHead() { const eyebrowFullness = clothing2artSuffix(slave.eyebrowFullness); /* designed for clothing but works for eyebrows too. If other eyebrow styles are added, this may need to be changed. */ const hasEyebrows = slave.eyebrowHStyle !== "bald" && slave.eyebrowHStyle !== "shaved"; svgQueue.add("Art_Vector_Head"); /* shiny clothing */ if (V.seeVectorArtHighlights === 1) { if (wearingLatex === true) { svgQueue.add("Art_Vector_Head_Outfit_Shine"); } } if (slave.clothes !== "restrictive latex") { if (slave.markings === "beauty mark") { svgQueue.add("Art_Vector_Beauty_Mark"); } else if (slave.markings === "freckles") { svgQueue.add("Art_Vector_Freckles"); } else if (slave.markings === "heavily freckled") { svgQueue.add("Art_Vector_Freckles_Heavy"); } else if (slave.markings === "birthmark") { svgQueue.add("Art_Vector_Birthmark"); } else if (slave.minorInjury === "black eye") { svgQueue.add("Art_Vector_Black_Eye"); } } /* FACIAL APPEARANCE */ if (V.seeFaces === 1) { if (slave.fuckdoll === 0 && slave.clothes !== "restrictive latex") { switch (slave.race) { case "southern european": case "white": if (slave.faceShape === "normal") { svgQueue.add("Art_Vector_Eyes_TypeB"); svgQueue.add("Art_Vector_Mouth_TypeA"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } else if (slave.faceShape === "masculine") { svgQueue.add("Art_Vector_Eyes_TypeD"); svgQueue.add("Art_Vector_Mouth_TypeF"); svgQueue.add("Art_Vector_Nose_TypeF"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeE_${eyebrowFullness}`); } } else if (slave.faceShape === "androgynous") { svgQueue.add("Art_Vector_Eyes_TypeE"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeE"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeF_${eyebrowFullness}`); } } else if (slave.faceShape === "cute") { svgQueue.add("Art_Vector_Eyes_TypeB"); svgQueue.add("Art_Vector_Mouth_TypeB"); svgQueue.add("Art_Vector_Nose_TypeD"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } else if (slave.faceShape === "sensual") { svgQueue.add("Art_Vector_Eyes_TypeC"); svgQueue.add("Art_Vector_Mouth_TypeC"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } else if (slave.faceShape === "exotic") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeC"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } break; case "asian": case "malay": case "pacific islander": if (slave.faceShape === "normal") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeC"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeD_${eyebrowFullness}`); } } else if (slave.faceShape === "masculine") { svgQueue.add("Art_Vector_Eyes_TypeD"); svgQueue.add("Art_Vector_Mouth_TypeD"); svgQueue.add("Art_Vector_Nose_TypeB"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } else if (slave.faceShape === "androgynous") { svgQueue.add("Art_Vector_Eyes_TypeE"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } else if (slave.faceShape === "cute") { svgQueue.add("Art_Vector_Eyes_TypeC"); svgQueue.add("Art_Vector_Mouth_TypeC"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeF_${eyebrowFullness}`); } } else if (slave.faceShape === "sensual") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeA"); svgQueue.add("Art_Vector_Nose_TypeE"); if (slave.eyebrowFullness === "pencil-thin") { svgQueue.add("Art_Vector_Eyebrow_TypeC_Pencilthin"); } else if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeF_${eyebrowFullness}`); } } else if (slave.faceShape === "exotic") { svgQueue.add("Art_Vector_Eyes_TypeB"); svgQueue.add("Art_Vector_Mouth_TypeC"); svgQueue.add("Art_Vector_Nose_TypeF"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } break; case "amerindian": case "latina": if (slave.faceShape === "normal") { svgQueue.add("Art_Vector_Eyes_TypeB"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeD"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeB_${eyebrowFullness}`); } } else if (slave.faceShape === "masculine") { svgQueue.add("Art_Vector_Eyes_TypeE"); svgQueue.add("Art_Vector_Mouth_TypeD"); svgQueue.add("Art_Vector_Nose_TypeF"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } else if (slave.faceShape === "androgynous") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeD"); svgQueue.add("Art_Vector_Nose_TypeB"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeD_${eyebrowFullness}`); } } else if (slave.faceShape === "cute") { svgQueue.add("Art_Vector_Eyes_TypeF"); svgQueue.add("Art_Vector_Mouth_TypeB"); svgQueue.add("Art_Vector_Nose_TypeB"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeF_${eyebrowFullness}`); } } else if (slave.faceShape === "sensual") { svgQueue.add("Art_Vector_Eyes_TypeB"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeF_${eyebrowFullness}`); } } else if (slave.faceShape === "exotic") { svgQueue.add("Art_Vector_Eyes_TypeC"); svgQueue.add("Art_Vector_Mouth_TypeA"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeE_${eyebrowFullness}`); } } break; case "black": if (slave.faceShape === "normal") { svgQueue.add("Art_Vector_Eyes_TypeD"); svgQueue.add("Art_Vector_Mouth_TypeB"); svgQueue.add("Art_Vector_Nose_TypeF"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeF_${eyebrowFullness}`); } } else if (slave.faceShape === "masculine") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeD"); svgQueue.add("Art_Vector_Nose_TypeF"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeE_${eyebrowFullness}`); } } else if (slave.faceShape === "androgynous") { svgQueue.add("Art_Vector_Eyes_TypeF"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeB"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeE_${eyebrowFullness}`); } } else if (slave.faceShape === "cute") { svgQueue.add("Art_Vector_Eyes_TypeC"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeD"); if (slave.eyebrowFullness === "natural") { svgQueue.add("Art_Vector_Eyebrow_TypeB_Natural"); } else if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeD_${eyebrowFullness}`); } } else if (slave.faceShape === "sensual") { svgQueue.add("Art_Vector_Eyes_TypeC"); svgQueue.add("Art_Vector_Mouth_TypeF"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } else if (slave.faceShape === "exotic") { svgQueue.add("Art_Vector_Eyes_TypeE"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } break; case "middle eastern": if (slave.faceShape === "normal") { svgQueue.add("Art_Vector_Eyes_TypeB"); svgQueue.add("Art_Vector_Mouth_TypeA"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } else if (slave.faceShape === "masculine") { svgQueue.add("Art_Vector_Eyes_TypeD"); svgQueue.add("Art_Vector_Mouth_TypeF"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeB_${eyebrowFullness}`); } } else if (slave.faceShape === "androgynous") { svgQueue.add("Art_Vector_Eyes_TypeF"); svgQueue.add("Art_Vector_Mouth_TypeB"); svgQueue.add("Art_Vector_Nose_TypeF"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeF_${eyebrowFullness}`); } } else if (slave.faceShape === "cute") { svgQueue.add("Art_Vector_Eyes_TypeB"); svgQueue.add("Art_Vector_Mouth_TypeB"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } else if (slave.faceShape === "sensual") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeD"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } else if (slave.faceShape === "exotic") { svgQueue.add("Art_Vector_Eyes_TypeE"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeE"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeE_${eyebrowFullness}`); } } break; case "semitic": if (slave.faceShape === "normal") { svgQueue.add("Art_Vector_Eyes_TypeB"); svgQueue.add("Art_Vector_Mouth_TypeA"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } else if (slave.faceShape === "masculine") { svgQueue.add("Art_Vector_Eyes_TypeD"); svgQueue.add("Art_Vector_Mouth_TypeF"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeB_${eyebrowFullness}`); } } else if (slave.faceShape === "androgynous") { svgQueue.add("Art_Vector_Eyes_TypeF"); svgQueue.add("Art_Vector_Mouth_TypeB"); svgQueue.add("Art_Vector_Nose_TypeF"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeF_${eyebrowFullness}`); } } else if (slave.faceShape === "cute") { svgQueue.add("Art_Vector_Eyes_TypeB"); svgQueue.add("Art_Vector_Mouth_TypeB"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } else if (slave.faceShape === "sensual") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeD"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } else if (slave.faceShape === "exotic") { svgQueue.add("Art_Vector_Eyes_TypeE"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeE"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeE_${eyebrowFullness}`); } } break; case "indo-aryan": if (slave.faceShape === "normal") { svgQueue.add("Art_Vector_Eyes_TypeE"); svgQueue.add("Art_Vector_Mouth_TypeA"); svgQueue.add("Art_Vector_Nose_TypeD"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } else if (slave.faceShape === "masculine") { svgQueue.add("Art_Vector_Eyes_TypeF"); svgQueue.add("Art_Vector_Mouth_TypeD"); svgQueue.add("Art_Vector_Nose_TypeE"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } else if (slave.faceShape === "androgynous") { svgQueue.add("Art_Vector_Eyes_TypeC"); svgQueue.add("Art_Vector_Mouth_TypeB"); svgQueue.add("Art_Vector_Nose_TypeD"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeF_${eyebrowFullness}`); } } else if (slave.faceShape === "cute") { svgQueue.add("Art_Vector_Eyes_TypeC"); svgQueue.add("Art_Vector_Mouth_TypeD"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeD_${eyebrowFullness}`); } } else if (slave.faceShape === "sensual") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeD_${eyebrowFullness}`); } } else if (slave.faceShape === "exotic") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeC"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } break; case "mixed race": if (slave.faceShape === "normal") { svgQueue.add("Art_Vector_Eyes_TypeE"); svgQueue.add("Art_Vector_Mouth_TypeA"); svgQueue.add("Art_Vector_Nose_TypeD"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } else if (slave.faceShape === "masculine") { svgQueue.add("Art_Vector_Eyes_TypeF"); svgQueue.add("Art_Vector_Mouth_TypeD"); svgQueue.add("Art_Vector_Nose_TypeE"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } else if (slave.faceShape === "androgynous") { svgQueue.add("Art_Vector_Eyes_TypeC"); svgQueue.add("Art_Vector_Mouth_TypeB"); svgQueue.add("Art_Vector_Nose_TypeD"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeF_${eyebrowFullness}`); } } else if (slave.faceShape === "cute") { svgQueue.add("Art_Vector_Eyes_TypeC"); svgQueue.add("Art_Vector_Mouth_TypeD"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeD_${eyebrowFullness}`); } } else if (slave.faceShape === "sensual") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeD_${eyebrowFullness}`); } } else if (slave.faceShape === "exotic") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeC"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } break; default: if (slave.faceShape === "normal") { svgQueue.add("Art_Vector_Eyes_TypeB"); svgQueue.add("Art_Vector_Mouth_TypeA"); svgQueue.add("Art_Vector_Nose_TypeA"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } else if (slave.faceShape === "masculine") { svgQueue.add("Art_Vector_Eyes_TypeD"); svgQueue.add("Art_Vector_Mouth_TypeF"); svgQueue.add("Art_Vector_Nose_TypeF"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeE_${eyebrowFullness}`); } } else if (slave.faceShape === "androgynous") { svgQueue.add("Art_Vector_Eyes_TypeE"); svgQueue.add("Art_Vector_Mouth_TypeE"); svgQueue.add("Art_Vector_Nose_TypeE"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeF_${eyebrowFullness}`); } } else if (slave.faceShape === "cute") { svgQueue.add("Art_Vector_Eyes_TypeB"); svgQueue.add("Art_Vector_Mouth_TypeB"); svgQueue.add("Art_Vector_Nose_TypeD"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeA_${eyebrowFullness}`); } } else if (slave.faceShape === "sensual") { svgQueue.add("Art_Vector_Eyes_TypeC"); svgQueue.add("Art_Vector_Mouth_TypeC"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } else if (slave.faceShape === "exotic") { svgQueue.add("Art_Vector_Eyes_TypeA"); svgQueue.add("Art_Vector_Mouth_TypeC"); svgQueue.add("Art_Vector_Nose_TypeC"); if (hasEyebrows === true) { svgQueue.add(`Art_Vector_Eyebrow_TypeC_${eyebrowFullness}`); } } } } } /* END FACIAL APPEARANCE */ if (slave.eyebrowPiercing === 1) { svgQueue.add("Art_Vector_Eyebrow_Light"); } else if (slave.eyebrowPiercing === 2) { svgQueue.add("Art_Vector_Eyebrow_Heavy"); } if (slave.nosePiercing === 1) { svgQueue.add("Art_Vector_Nose_Light"); } else if (slave.nosePiercing === 2) { svgQueue.add("Art_Vector_Nose_Heavy"); } if (slave.lipsPiercing === 1) { svgQueue.add("Art_Vector_Lip_Light"); } else if (slave.lipsPiercing === 2) { svgQueue.add("Art_Vector_Lip_Heavy"); } /* ADDONS */ if (slave.fuckdoll === 0) { /* Fuckdolls cannot be decorated */ if (slave.mouthAccessory === "dildo gag") { svgQueue.add("Art_Vector_Dildo_Gag"); } else if (slave.mouthAccessory === "ball gag") { svgQueue.add("Art_Vector_Ball_Gag"); } else if (slave.mouthAccessory === "bit gag") { svgQueue.add("Art_Vector_Bit_Gag"); } else if (slave.mouthAccessory === "massive dildo gag") { svgQueue.add("Art_Vector_Massive_Dildo_Gag"); } if (slave.faceAccessory === "porcelain mask") { svgQueue.add("Art_Vector_Porcelain_Mask"); } if (slave.eyewear === "corrective glasses" || slave.eyewear === "glasses" || slave.eyewear === "blurring glasses") { svgQueue.add("Art_Vector_Glasses"); } /* head clothing */ switch (slave.clothes) { case "a biyelgee costume": case "a bunny outfit": case "a burkini": case "a burqa": case "a chattel habit": case "a cybersuit": case "a fallen nuns habit": case "a hijab and abaya": case "a hijab and blouse": case "a klan robe": case "a military uniform": case "a mounty outfit": case "a niqab and abaya": case "a penitent nuns habit": case "a police uniform": case "a red army uniform": case "a slutty klan robe": case "a slutty nurse outfit": case "a succubus outfit": case "battlearmor": case "harem gauze": case "Western clothing": svgQueue.add(`Art_Vector_Head_Outfit_${clothing2artSuffix(slave.clothes)}`); break; case "Imperial Plate": svgQueue.add("Art_Vector_Head_Outfit_Battlearmor"); break; case "a schutzstaffel uniform": case "a slutty schutzstaffel uniform": svgQueue.add("Art_Vector_Head_Outfit_SchutzstaffelUniform"); break; case "kitty lingerie": svgQueue.add("Art_Vector_Cat_Ear_Fore"); svgQueue.add("Art_Vector_Cat_Ear_Back"); } } } function ArtVectorLeg() { /* Selection of matching SVG based on amputee level */ if (hasBothNaturalLegs(slave)) { svgQueue.add(`Art_Vector_Leg_${legSize}`); if (slave.muscles >= 97) { svgQueue.add(`Art_Vector_Leg_${legSize}_MHeavy`); } else if (slave.muscles >= 62) { svgQueue.add(`Art_Vector_Leg_${legSize}_MMedium`); } else if (slave.muscles >= 30) { svgQueue.add(`Art_Vector_Leg_${legSize}_MLight`); } } else if (!hasAnyLegs(slave)) { svgQueue.add("Art_Vector_Stump"); } else { /* show the best leg */ if (getLeftLegID(slave) === 6 || getRightLegID(slave) === 6) { svgQueue.add(`Art_Vector_Leg_ProstheticSwiss_${legSize}`); } else if (getLeftLegID(slave) === 5 || getRightLegID(slave) === 5) { svgQueue.add(`Art_Vector_Leg_ProstheticCombat_${legSize}`); } else if (getLeftLegID(slave) === 4 || getRightLegID(slave) === 4) { svgQueue.add(`Art_Vector_Leg_ProstheticBeauty_${legSize}`); } else if (getLeftLegID(slave) === 3 || getRightLegID(slave) === 3) { svgQueue.add(`Art_Vector_Leg_ProstheticSexy_${legSize}`); } else if (getLeftLegID(slave) === 2 || getRightLegID(slave) === 2) { svgQueue.add(`Art_Vector_Leg_ProstheticBasic_${legSize}`); } else { svgQueue.add(`Art_Vector_Leg_${legSize}`); if (slave.muscles >= 97) { svgQueue.add(`Art_Vector_Leg_${legSize}_MHeavy`); } else if (slave.muscles >= 62) { svgQueue.add(`Art_Vector_Leg_${legSize}_MMedium`); } else if (slave.muscles >= 30) { svgQueue.add(`Art_Vector_Leg_${legSize}_MLight`); } } } } function ArtVectorPubicHair() { if (slave.fuckdoll !== 0 || slave.clothes !== "a latex catsuit") { if (V.showBodyMods === 1 && slave.vaginaTat === "rude words") { svgQueue.add("Art_Vector_Pussy_Tattoo"); } if (slave.physicalAge < 11) { /* these art files exist, but draw empty svg's. Commented out for now to save on rendering time svgQueue.add("Art_Vector_Pubic_Hair_None"); svgQueue.add("Art_Vector_Pubic_Hair_Underarm_None"); */ } else if (slave.physicalAge <= 13) { if (slave.pubicHStyle !== "waxed" && slave.pubicHStyle !== "bald" && slave.pubicHStyle !== "hairless") { svgQueue.add("Art_Vector_Pubic_Hair_Wispy"); } } else if (slave.clothes !== "a comfortable bodysuit") { switch (slave.pubicHStyle) { case "bald": case "hairless": case "waxed": /* commented out to save on rendering time svgQueue.add("Art_Vector_Pubic_Hair_None"); */ break; case "strip": case "in a strip": if (torsoSize === "Obese" || torsoSize === "Fat") { svgQueue.add("Art_Vector_Pubic_Hair_StripFat"); } else { svgQueue.add("Art_Vector_Pubic_Hair_Strip"); } break; case "neat": if (torsoSize === "Obese" || torsoSize === "Fat") { svgQueue.add("Art_Vector_Pubic_Hair_NeatFat"); } else { svgQueue.add("Art_Vector_Pubic_Hair_Neat"); } break; case "bushy in the front and neat in the rear": if (torsoSize === "Obese" || torsoSize === "Fat") { svgQueue.add("Art_Vector_Pubic_Hair_BushFat"); } else { svgQueue.add("Art_Vector_Pubic_Hair_Bush"); } break; case "bushy": if (torsoSize === "Obese" || torsoSize === "Fat") { svgQueue.add("Art_Vector_Pubic_Hair_BushyFat"); } else { svgQueue.add("Art_Vector_Pubic_Hair_Bushy"); } break; case "very bushy": if (torsoSize === "Obese" || torsoSize === "Fat") { svgQueue.add("Art_Vector_Pubic_Hair_Very_BushyFat"); } else { svgQueue.add("Art_Vector_Pubic_Hair_Very_Bushy"); } } switch (slave.underArmHStyle) { case "hairless": case "waxed": case "bald": /* commented out to save on rendering time svgQueue.add("Art_Vector_Pubic_Hair_Underarm_None"); */ break; case "shaved": svgQueue.add("Art_Vector_Pubic_Hair_Underarm_Shaved"); break; case "neat": svgQueue.add("Art_Vector_Pubic_Hair_Underarm_Neat"); break; case "bushy": svgQueue.add("Art_Vector_Pubic_Hair_Underarm_Bushy"); } } else if (slave.clothes !== "a tight Imperial bodysuit") { switch (slave.pubicHStyle) { case "bald": case "hairless": case "waxed": /* commented out to save on rendering time svgQueue.add("Art_Vector_Pubic_Hair_None"); */ break; case "strip": case "in a strip": if (torsoSize === "Obese" || torsoSize === "Fat") { svgQueue.add("Art_Vector_Pubic_Hair_StripFat"); } else { svgQueue.add("Art_Vector_Pubic_Hair_Strip"); } break; case "neat": if (torsoSize === "Obese" || torsoSize === "Fat") { svgQueue.add("Art_Vector_Pubic_Hair_NeatFat"); } else { svgQueue.add("Art_Vector_Pubic_Hair_Neat"); } break; case "bushy in the front and neat in the rear": if (torsoSize === "Obese" || torsoSize === "Fat") { svgQueue.add("Art_Vector_Pubic_Hair_BushFat"); } else { svgQueue.add("Art_Vector_Pubic_Hair_Bush"); } break; case "bushy": if (torsoSize === "Obese" || torsoSize === "Fat") { svgQueue.add("Art_Vector_Pubic_Hair_BushyFat"); } else { svgQueue.add("Art_Vector_Pubic_Hair_Bushy"); } break; case "very bushy": if (torsoSize === "Obese" || torsoSize === "Fat") { svgQueue.add("Art_Vector_Pubic_Hair_Very_BushyFat"); } else { svgQueue.add("Art_Vector_Pubic_Hair_Very_Bushy"); } } switch (slave.underArmHStyle) { case "hairless": case "waxed": case "bald": /* commented out to save on rendering time svgQueue.add("Art_Vector_Pubic_Hair_Underarm_None"); */ break; case "shaved": svgQueue.add("Art_Vector_Pubic_Hair_Underarm_Shaved"); break; case "neat": svgQueue.add("Art_Vector_Pubic_Hair_Underarm_Neat"); break; case "bushy": svgQueue.add("Art_Vector_Pubic_Hair_Underarm_Bushy"); } } } } function ArtVectorPussy() { if (slave.vagina >= 0 && slave.clothes !== "a latex catsuit" && slave.clothes !== "a comfortable bodysuit" && slave.clothes !== "a cybersuit" && slave.clothes !== "a tight Imperial bodysuit") { svgQueue.add("Art_Vector_Pussy"); } } function ArtVectorPussyPiercings() { switch (slave.clothes) { /* piercings display on these clothes */ case "a bimbo outfit": case "a bra": case "a button-up shirt": case "a courtesan dress": case "a fallen nuns habit": case "a Fuckdoll suit": case "a nice pony outfit": case "a Santa dress": case "a slutty pony outfit": case "a sports bra": case "a string bikini": case "a striped bra": case "a sweater": case "a t-shirt": case "a tank-top": case "a tube top": case "an oversized t-shirt": case "attractive lingerie": case "body oil": case "chains": case "choosing her own clothes": case "clubslut netting": case "no clothing": case "overalls": case "pasties": case "petite admi outfit": case "restrictive latex": case "shibari ropes": case "slutty jewelry": case "uncomfortable straps": case "Western clothing": /* piercinglevel = 1, Light; piercinglevel = 2, Heavy; piercinglevel = 3, Smart; piercinglevel = 0, None */ if (slave.vaginaPiercing === 1) { svgQueue.add("Art_Vector_Pussy_Piercing"); } else if (slave.vaginaPiercing === 2) { svgQueue.add("Art_Vector_Pussy_Piercing_Heavy"); } if (slave.clitPiercing === 1) { svgQueue.add("Art_Vector_Clit_Piercing"); } else if (slave.clitPiercing === 2) { svgQueue.add("Art_Vector_Clit_Piercing_Heavy"); } else if (slave.clitPiercing === 3) { svgQueue.add("Art_Vector_Clit_Piercing_Smart"); } } } function ArtVectorTorso() { svgQueue.add(`Art_Vector_Torso_${torsoSize}`); if (slave.muscles >= 97) { svgQueue.add(`Art_Vector_Torso_${torsoSize}_MHeavy`); } else if (slave.muscles >= 62) { svgQueue.add(`Art_Vector_Torso_${torsoSize}_MMedium`); } else if (slave.muscles >= 30) { svgQueue.add(`Art_Vector_Torso_${torsoSize}_MLight`); } } function ArtVectorTorsoOutfit() { /* TODO: latex catsuit should cover vagina and its piercings, too */ switch (slave.clothes) { case "a bimbo outfit": case "a courtesan dress": case "a Fuckdoll suit": case "a latex catsuit": case "a nice pony outfit": case "a Santa dress": case "a slutty pony outfit": case "choosing her own clothes": case "no clothing": case "overalls": case "pasties": case "petite admi outfit": break; /* no torso outfit */ /* manually handle special cases */ case "a cybersuit": svgQueue.add(`Art_Vector_Torso_Outfit_Latex_${torsoSize}`); break; case "a slutty schutzstaffel uniform": svgQueue.add(`Art_Vector_Torso_Outfit_SchutzstaffelUniform_${torsoSize}`); break; case "a niqab and abaya": case "a burqa": svgQueue.add(`Art_Vector_Torso_Outfit_HijabAndAbaya_${torsoSize}`); break; case "Imperial Plate": svgQueue.add(`Art_Vector_Torso_Outfit_Battlearmor_${torsoSize}`); break; case "a tight Imperial bodysuit": svgQueue.add(`Art_Vector_Torso_Outfit_ComfortableBodysuit_${torsoSize}`); break; default: svgQueue.add(`Art_Vector_Torso_Outfit_${clothing2artSuffix(slave.clothes)}_${torsoSize}`); } if (V.seeVectorArtHighlights === 1) { if (wearingLatex === true) { if (hasLeftArm(slave)) { svgQueue.add("Art_Vector_Torso_Outfit_Shine_Shoulder"); } if (slave.preg <= 0) { svgQueue.add(`Art_Vector_Torso_Outfit_Shine_${torsoSize}`); } } } } return VectorArt; }) (); App.Art.legacyVectorArtElement = function() { const filePath = "resources/vector"; /* const skinFilePath = `${filePath}/body/white`; */ /** * @param {App.Entity.SlaveState} slave * @param {number} artSize * @returns {DocumentFragment} */ function render(slave, artSize) { const wearingLatex = slave.clothes === "a Fuckdoll suit" || slave.clothes === "restrictive latex" || slave.clothes === "a latex catsuit"; let hairStyle, underArmHStyle, leftArmType, rightArmType, buttSize, legSize, shoesType, torsoSize, boobSize, ballSize, penisSize; let needBoobs = true; const res = document.createDocumentFragment(); res.appendChild(App.Utils.htmlToElement(App.Utils.passageElement("SVG filters").textContent)); /* Set skin color */ let skinFilter = `filter: url(#skin-${_.kebabCase(slave.skin)});`; /* Set hair color */ let hairFilter = `filter: url(#hair-${_.kebabCase(slave.hColor)});`; let underArmFilter = `filter: url(#hair-${_.kebabCase(slave.underArmHColor)});`; let pubesFilter = `filter: url(#hair-${_.kebabCase(slave.pubicHColor)});`; if (artSize === 1) { addImg(res, "test ui"); } if (slave.custom.hairVector) { hairStyle = slave.custom.hairVector; } else { hairStyle = (["afro", "braided", "bun", "buzzcut", "dreadlocks", "eary", "luxurious", "messy", "neat", "ponytail", "strip", "tails", "trimmed", "up"].includes(slave.hStyle) ? slave.hStyle : "neat"); } underArmHStyle = slave.underArmHStyle; /* Shoulder width and arm or no arm */ if (slave.devotion > 50) { leftArmType = "High"; rightArmType = "High"; } else if (slave.trust >= -20) { if (slave.devotion < -20) { leftArmType = "Rebel"; rightArmType = "Low"; } else if (slave.devotion <= 20) { leftArmType = "Low"; rightArmType = "Low"; } else { leftArmType = "Mid"; rightArmType = "High"; } } else { leftArmType = "Mid"; rightArmType = "Mid"; } if (wearingLatex === false) { if (!hasRightArm(slave)) { addSkinImg(res, `arm right ${rightArmType}`, skinFilter); } if (slave.underArmHStyle === "bushy") { addImg(res, `hair/underArm ${underArmHStyle} right`, underArmFilter); } } else if (!hasRightArm(slave)) { if (slave.fuckdoll !== 0) { rightArmType = "mid"; } addImg(res, `outfit/arm right ${rightArmType} latex`); } /* Hair Aft */ if (slave.fuckdoll === 0) { switch (slave.hStyle) { case "eary": case "luxurious": case "messy": case "neat": case "tails": case "trimmed": addImg(res, `hair/${hairStyle} back`, hairFilter); } } /* Tailed Plug */ if (slave.buttplugAttachment === "tail") { addImg(res, "outfit/tail plug", hairFilter); } /* Butt */ if (hasAnyLegs(slave)) { if (slave.butt > 6) { buttSize = 3; } else if (slave.butt > 4) { buttSize = 2; } else if (slave.butt > 2) { buttSize = 1; } else { buttSize = 0; } if (wearingLatex === true) { addImg(res, `outfit/butt ${buttSize} latex`, skinFilter); } else { addSkinImg(res, `butt ${buttSize}`, skinFilter); } } /* Leg + 1 size up when chubby or fat */ if (slave.hips < 0) { if (slave.weight > 95) { /* Chubby */ legSize = "normal"; } else { legSize = "narrow"; } } else if (slave.hips === 0) { if (slave.weight > 95) { /* Chubby */ legSize = "wide"; } else { legSize = "normal"; } } else { legSize = "wide"; } if (!hasAnyLegs(slave)) { legSize = `stump ${legSize}`; } if (wearingLatex === true && hasAnyLegs(slave)) { addImg(res, `outfit/leg ${legSize} latex`); } else { addSkinImg(res, `leg ${legSize}`, skinFilter); } /* Feet */ if (hasAnyLegs(slave)) { if (slave.shoes === "heels") { shoesType = "heel"; } else if (slave.shoes === "extreme heels") { if (slave.weight > 95) { /* Chubby */ shoesType = "extreme heel wide"; } else { shoesType = "extreme heel"; } } else if (slave.shoes === "boots") { if (slave.weight > 95) { /* Chubby */ shoesType = "boot wide"; } else { shoesType = "boot"; } } else if (slave.shoes === "flats") { shoesType = "flat"; } else { addSkinImg(res, "feet", skinFilter); } if (slave.shoes === "extreme heels" || slave.shoes === "boots") { addImg(res, `outfit/${shoesType}${wearingLatex ? " latex": ""}`); } else if (slave.shoes === "heels" || slave.shoes === "flats") { if (wearingLatex === true) { addImg(res, `outfit/${shoesType} latex`); } else { addSkinImg(res, `${shoesType}`, skinFilter); } } } /* Torso */ if (slave.waist < -40) { if (slave.weight > 30) { torsoSize = "hourglass"; } else { torsoSize = "unnatural"; } } else if (slave.waist <= 10) { if (slave.weight > 30) { torsoSize = "normal"; } else { torsoSize = "hourglass"; } } else { torsoSize = "normal"; } addSkinImg(res, `torso ${torsoSize}`, skinFilter); if (wearingLatex === true) { addImg(res, `outfit/torso ${torsoSize} latex`); } else if (slave.clothes === "uncomfortable straps") { addImg(res, `outfit/torso ${torsoSize} straps`); } if (wearingLatex === false) { if (hasLeftArm(slave) && leftArmType === "high") { addSkinImg(res, `arm left ${leftArmType}`, skinFilter); } if (slave.underArmHStyle === "bushy") { addImg(res, `hair/underArm ${underArmHStyle} left`, underArmFilter); } if (hasLeftArm(slave) && leftArmType !== "high") { addSkinImg(res, `arm left ${leftArmType}`, skinFilter); } } else if (hasLeftArm(slave)) { if (slave.fuckdoll !== 0) { leftArmType = "mid"; } addImg(res, `outfit/arm left ${leftArmType} latex`); } /* Vagina */ if (slave.vagina >= 0) { addSkinImg(res, "vagina", skinFilter); if (slave.clitPiercing === 1) { addImg(res, "body/addon/clit piercing"); } else if (slave.clitPiercing === 2) { addImg(res, "body/addon/clit piercing heavy"); } else if (slave.clitPiercing === 3) { addImg(res, "body/addon/clit piercing smart"); } if (slave.vaginaPiercing === 1) { addImg(res, "body/addon/pussy piercing"); } else if (slave.vaginaPiercing === 2) { addImg(res, "body/addon/pussy piercing heavy"); } } /* Collar */ switch (slave.collar) { case "nice retirement counter": case "cruel retirement counter": case "leather with cowbell": case "pretty jewelry": case "heavy gold": case "satin choker": case "stylish leather": case "neck corset": case "shock punishment": case "tight steel": case "uncomfortable leather": } /* Gag */ switch (slave.mouthAccessory ) { case "dildo gag": addImg(res, `outfit/${slave.collar}`); } /* Head base image */ if (wearingLatex === true) { addImg(res, "outfit/head latex"); } else { addSkinImg(res, "head", skinFilter); } /* Glasses */ if (slave.eyewear === "corrective glasses" || slave.eyewear === "glasses" || slave.eyewear === "blurring glasses") { addImg(res, "outfit/glasses"); } /* Chastity belt or Pubic hair */ if (slave.chastityPenis === 1 || slave.chastityVagina === 1 || slave.chastityAnus === 1) { if (slave.chastityPenis === 1) { addImg(res, "outfit/chastity male aft"); } if (slave.chastityVagina === 1) { addImg(res, "outfit/chastity female"); } addImg(res, "outfit/chastity base"); } else if (slave.pubicHStyle !== "waxed" && slave.pubicHStyle !== "bald" && slave.pubicHStyle !== "hairless") { let pubicHStyle = (slave.pubicHStyle === "in a strip" ? "strip" : slave.pubicHStyle); addImg(res, `hair/pubes ${pubicHStyle}`, pubesFilter); } /* if pregnant or has a belly */ if (slave.belly >= 5000) { addSkinImg(res, "preg belly 5000", skinFilter); if (slave.navelPiercing >= 1) { /* Navel Piercing*/ addImg(res, "body/addon/preg navel piercing"); } if (slave.navelPiercing === 2) { addImg(res, "body/addon/preg navel piercing heavy"); } } else if (slave.belly <= -100) { /* condition is currently reversed until the vector can be fixed */ addSkinImg(res, "preg belly 100", skinFilter); /* if (slave.navelPiercing >= 1)/Navel Piercing/ r += `<img class='paperdoll' src=${filePath}/body/addon/preg navel piercing.svg'/>`; if (slave.navelPiercing === 2) r += `<img class='paperdoll' src=${filePath}/body/addon/preg navel piercing heavy.svg'/>`; */ } else { if (slave.navelPiercing >= 1) { /* Navel Piercing*/ addImg(res, "body/addon/navel piercing"); } if (slave.navelPiercing === 2) { addImg(res, "body/addon/navel piercing heavy"); } } /* Boob */ if (slave.boobs < 300) { boobSize = 0; } else if (slave.boobs < 500) { boobSize = 1; } else if (slave.boobs < 800) { boobSize = 2; } else if (slave.boobs < 1600) { boobSize = 3; } else if (slave.boobs < 3200) { boobSize = 4; } else if (slave.boobs < 6400) { boobSize = 5; } else if (slave.boobs < 12000) { boobSize = 6; } else { boobSize = 7; } /* Scrotum */ if (slave.scrotum > 0) { if (slave.scrotum >= 6) { ballSize = 4; } else if (slave.scrotum >= 4) { ballSize = 3; } else if (slave.scrotum >= 3) { ballSize = 2; } else if (slave.scrotum >= 2) { ballSize = 1; } else { ballSize = 0; } } /* Penis */ if (slave.dick > 0) { if (slave.dick >= 8) { penisSize = 6; } else if (slave.dick >= 7) { penisSize = 5; } else if (slave.dick >= 6) { penisSize = 4; } else if (slave.dick >= 5) { penisSize = 3; } else if (slave.dick >= 4) { penisSize = 2; } else if (slave.dick >= 2) { penisSize = 1; } else { penisSize = 0; } } /* Boob */ if (slave.dick > 0) { if (canAchieveErection(slave)) { if (boobSize < 6) { if (wearingLatex === true) { /* normal case: outfit hides boobs */ addImg(res, `outfit/boob ${boobSize} latex`); if (slave.lactation > 0) { addSkinImg(res, `boob ${boobSize} areola`, skinFilter); } } else { addSkinImg(res, `boob ${boobSize}`, skinFilter); addSkinImg(res, `boob ${boobSize} areola`, skinFilter); } /* special case: straps are actually dawn over the boobs */ if (slave.clothes === "uncomfortable straps") { addImg(res, `outfit/boob ${boobSize} straps`); } needBoobs = false; } } } if (slave.vagina > 0) { if (slave.dick > 0) { const divPenis = document.createElement("div"); divPenis.className = "highPenis"; res.appendChild(divPenis); if (slave.scrotum > 0) { addSkinImg(divPenis, `ball ${ballSize}`, skinFilter); } if (canAchieveErection(slave)) { addSkinImg(divPenis, `penis ${penisSize}`, skinFilter); } else { addSkinImg(divPenis, `flaccid ${penisSize}`, skinFilter); if (slave.chastityPenis === 1) { addImg(divPenis, `outfit/chastity male fore ${penisSize}`); } } } } else { if (slave.dick > 0) { const divPenis = document.createElement("div"); divPenis.className = "lowPenis"; res.appendChild(divPenis); if (slave.scrotum > 0) { addSkinImg(divPenis, `ball ${ballSize}`, skinFilter); } if (canAchieveErection(slave)) { addSkinImg(divPenis, `penis ${penisSize}`, skinFilter); } else { addSkinImg(divPenis, `flaccid ${penisSize}`, skinFilter); if (slave.chastityPenis === 1) { addImg(divPenis, `outfit/chastity male fore ${penisSize}`); } } } } if (needBoobs === true) { if (wearingLatex === true) { addImg(res, `outfit/boob ${boobSize} latex`); if (slave.lactation > 0) { addSkinImg(res, `boob ${boobSize} areola`, skinFilter); } } else { addSkinImg(res, `boob ${boobSize}`, skinFilter); addSkinImg(res, `boob ${boobSize} areola`, skinFilter); } /* special case: straps are actually dawn over the boobs */ if (slave.clothes === "uncomfortable straps") { addImg(res, `outfit/boob ${boobSize} straps`); } } /* piercings */ if (slave.nipplesPiercing === 1) { addImg(res, `body/addon/boob ${boobSize} piercing`); } else if (slave.nipplesPiercing === 2) { addImg(res, `body/addon/boob ${boobSize} piercing heavy`); } if (slave.areolaePiercing === 1) { addImg(res, `body/addon/boob ${boobSize} areola piercing`); } /* clavicle */ addImg(res, "body/addon/clavicle"); /* Hair Foreground */ if (slave.hStyle !== "shaved" && slave.fuckdoll === 0) { addImg(res, `/hair/${hairStyle} front`, hairFilter); } return res; } /** * @param {Node} container * @param {string} artFile * @param {string} [style] */ function addImg(container, artFile, style) { const res = document.createElement("img"); res.setAttribute("class", "paperdoll"); res.setAttribute("src", `${filePath}/${artFile}.svg`); if (style !== undefined) { res.setAttribute("style", style); } container.appendChild(res); return res; } /** * @param {Node} container * @param {string} artFile * @param {string} [style] */ function addSkinImg(container, artFile, style) { return addImg(container, 'body/white/' + artFile, style); } return render; }();
MonsterMate/fc
src/art/vector/VectorArtJS.js
JavaScript
mit
112,965
<svg viewBox="0 0 560 1000"><path sodipodi:nodetypes="cccccccc" id="path7355" class="skin" d="m 359.7,208 c 16.38299,3.17157 64.84168,-35.50465 77.54168,-38.30465 -28.1,-11.8 -20.5169,-21.01665 -67.2169,-52.51665 0,0 -42.12478,8.1213 -43.52478,-7.6787 C 323,69.600003 357.6,87.000003 374.9,99.600003 389.7,100.8 486.3,157.4 482.3,170.9 c -6.1,20.6 -84.8,65.8 -114.7,81.4 -49.9,-6.5 -28.8,-47.8 -7.9,-44.3"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_ArmFat_Left_High.svg
svg
mit
414
<svg viewBox="0 0 560 1000"><path sodipodi:nodetypes="ccccccccc" id="path7359" class="skin" d="m 353.4,255 c 14.74021,27.56002 19.11226,59.16617 27.01226,77.36617 -15.30952,31.61467 -24.40245,54.91908 -28.06428,79.6298 0,0 -39.74798,-13.49597 -41.14798,2.30403 -3.5,39.9 28.5,17.8 48.4,9.9 12.4,-4.9 45.77506,-58.82967 55.78235,-97.15882 C 418.48235,315.74118 395.7,237.4 378,220 c -8.1,-7.9 -9.6,-4.9 -16.6,-9.2 -50.1,6.3 -29,47.7 -8,44.2"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_ArmFat_Left_Low.svg
svg
mit
449
<svg viewBox="0 0 560 1000"><path sodipodi:nodetypes="ccccccccc" id="path7363" class="skin" d="m 353.94055,255.75216 c 19.64921,17.70888 12.05649,49.19135 17.7,62.1 C 353.29271,310.35354 335.46811,312.4246 283,313.5 c 0,0 -36.7,-17.8 -37.9,-2.2 -3,39.3 20.4,22.7 37.9,14.8 15.01595,6.73485 120.8,33 124.8,16.6 2.8,-11.1 -12.7,-103.2 -28.2,-120.3 -7.1,-7.8 -8.4,-4.8 -14.5,-9.1 -43.7,6.4 -25.3,47.1 -7,43.7"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_ArmFat_Left_Mid.svg
svg
mit
415
<svg viewBox="0 0 560 1000"><path sodipodi:nodetypes="cccccccccccccccccccccc" id="path7367" class="skin" d="m 358.05,247.8 c 9.9,3.7 9.74165,11.18206 39.84165,25.68206 28.20186,16.59843 39.42329,23.06542 61.83652,29.41206 21.41162,8.84351 44.18778,4.09722 44.18778,4.09722 L 508.4,313.6 c 1.8,3.2 3.7,7.7 4.7,13.4 0.9,5.3 0.4,8.9 1.3,9.1 1.1,0.2 3.7,-4.2 3.9,-9.1 0.2,-5.5 -2.7,-8.8 -1.3,-10.3 1.3,-1.3 3.7,1 6.5,0.1 5.7,-1.8 9.04118,-14.01176 9.14118,-15.51176 C 532.74118,296.58824 530,290.1 526.4,286.7 c -4.4,-4.1 -10.6,-1 -20,-0.7 -9.4,0.4 -22.56378,-7.71162 -45.46378,-17.91162 -10.4,-4.6 -15.01269,-4.87073 -22.01269,-8.97073 C 425.52353,251.31765 416.9,243.9 410.6,238 384.4,219 375,213.3 372.3,212.6 c -0.4,-0.1 -3.1,-0.8 -6.5,-2.3 -0.9,-0.4 -2,-0.9 -3.2,-1.6 -11.7,3 -19,6.2 -23.5,9.2 -3.9,2.7 -6.8,5.7 -6.5,8.7 0.5,5.6 8.65,14.8 25.45,21.2 z"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_ArmFat_Left_Rebel.svg
svg
mit
862
<svg viewBox="0 0 560 1000"><path sodipodi:nodetypes="cccccccccccc" id="path7371" class="skin" d="m 354.7,252.8 c 16.27647,11.07059 4.68823,71.22941 12.58823,89.42941 13.9,6.4 33.92941,0.006 56.67647,-23.61764 0,0 15.25922,-35.57988 8.05922,-38.57988 C 430.32392,279.33189 424.8,278 424.8,278 c 0,-7.6 0.50588,-22.97754 -2.39412,-23.20146 -2.4,0.4 -1.10588,15.70146 -2.60588,23.10146 -16.91162,-0.17973 -7.6,20.6 -6.9,30.8 -7.17868,2.6967 -8.93604,0.37477 -18.03604,4.32183 3.1,-11.3 2.23604,-77.92183 -15.56396,-95.22183 -8.1,-7.9 -9.6,-4.9 -16.6,-9.2 -50,6.3 -29,47.6 -8,44.2"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_ArmFat_Left_Thumb_Down.svg
svg
mit
587
<svg viewBox="0 0 560 1000"><path sodipodi:nodetypes="cccccccc" id="path7343" class="skin" d="M 281.8,204.7 C 261.76777,199.61472 239.61677,170.01201 218.81677,162.21201 241.61347,150.76556 254.10229,134.05736 275.7,106.8 c 0,0 42,18 43.4,2.2 3.5,-39.9 -31.1,-22.5 -48.4,-9.9 -14.8,1.2 -92.9,44.3 -88.9,57.8 6.1,20.6 48.4,58 75.4,76 8.9,4.4 28.5,-13.6 24.6,-28.2"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_ArmFat_Right_High.svg
svg
mit
372
<svg viewBox="0 0 560 1000"><path sodipodi:nodetypes="ccccccccc" id="path7347" class="skin" d="m 266.2,253.7 c -28.3,-5.9 -23.73622,54.91595 -30.63622,72.61595 4.3,15.6 16.93052,44.23553 29.63622,84.28405 0,0 36.2,-17.5 37.3,-2.1 3,38.7 -24.5,17.2 -41.7,9.6 C 250.1,413.3 211.93661,341.6754 209.07647,321 206.37647,310.1 229.7,236.8 245,219.9 c 6.9,-7.7 8.3,-4.7 14.3,-8.9 43,6 24.9,46 6.9,42.7"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_ArmFat_Right_Low.svg
svg
mit
404
<svg viewBox="0 0 560 1000"><path sodipodi:nodetypes="ccccccccc" id="path7351" class="skin" d="m 267.4,253.7 c -28.3,-5.9 -22.8,53.7 -29.6,71.4 18.2,0.4 51.1,-12.2 103.6,-15.7 0,0 36.2,-17.5 37.3,-2.1 3,38.7 -20.2,22.3 -37.3,14.6 -18.04351,17.54942 -130.23052,37.90729 -134.13052,21.80729 C 204.56948,332.80729 230.9,236.6 246.2,219.8 c 6.9,-7.7 8.3,-4.7 14.3,-8.9 43.1,6.1 25,46.1 6.9,42.8"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_ArmFat_Right_Mid.svg
svg
mit
400
<svg viewBox="0 0 560 1000"><path d="m 359.7,208 c 33,6 74.74118,-36.21176 87.44118,-39.01176 -28.1,-11.8 -29.70929,-25.61284 -76.40929,-57.11284 0,0 -42.83189,13.4246 -44.23189,-2.3754 C 323,69.600003 357.6,87.000003 374.9,99.600003 389.7,100.8 486.3,157.4 482.3,170.9 c -6.1,20.6 -84.8,65.8 -114.7,81.4 -49.9,-6.5 -28.8,-47.8 -7.9,-44.3" class="skin" id="L_2_" sodipodi:nodetypes="cccccccc"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Left_High.svg
svg
mit
401
<svg viewBox="0 0 560 1000"><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:0.55642927" d="m 445.2694,168.63691 c 8.77984,3.56234 4.35147,6.65371 2.39624,10.57534 4.58829,-3.30987 7.13797,-8.80155 -2.39624,-10.57534 z" id="path4721-0-8-9-5-0" sodipodi:nodetypes="ccc"/><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:0.43258524" d="m 376.60561,242.90976 c -0.8171,0.59486 -8.00988,7.95841 -8.77642,10.43676 2.08476,-2.32285 8.92378,-9.6087 8.77642,-10.43676 z" id="path4721-0-8-9-5-4-8" sodipodi:nodetypes="ccc"/><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:1.38103116" d="m 377.89111,217.38932 c -3.90448,0.79816 -14.73264,7.6897 -16.99407,14.45277 7.05059,-8.55165 10.24744,-9.6259 16.99407,-14.45277 z" id="path4721-0-8-9-5-4-0-0" sodipodi:nodetypes="ccc"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Left_High_MLight.svg
svg
mit
863
<svg viewBox="0 0 560 1000"><path d="m 353.4,255 c 28.88235,9.88235 29.01176,54.92353 36.91176,73.12353 -18.13795,26.66492 -21.57403,55.62619 -37.96378,83.87244 0,0 -39.74798,-13.49597 -41.14798,2.30403 -3.5,39.9 28.5,17.8 48.4,9.9 12.4,-4.9 45.77506,-58.82967 55.78235,-97.15882 C 418.48235,315.74118 395.7,237.4 378,220 c -8.1,-7.9 -9.6,-4.9 -16.6,-9.2 -50.1,6.3 -29,47.7 -8,44.2" class="skin" id="L" sodipodi:nodetypes="ccccccccc"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Left_Low.svg
svg
mit
442
<svg viewBox="0 0 560 1000"><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:1.26945472" d="m 357.63595,248.24111 c 4.33436,5.11162 16.84522,16.30529 20.01625,15.24919 -8.57238,-4.69762 -12.16532,-8.61462 -20.01625,-15.24919 z" id="path4721-0-8-9-5-4-0-0-7" sodipodi:nodetypes="ccc"/><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:1.40373456" d="m 395.63392,259.57816 c 0.5966,-4.6854 -1.70908,-18.20825 -6.69749,-21.63442 4.94197,9.26476 4.80968,13.14857 6.69749,21.63442 z" id="path4721-0-8-9-5-4-0-0-7-6" sodipodi:nodetypes="ccc"/><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:0.86090791" d="m 396.15347,321.26916 c -3.28825,3.03574 -10.57821,11.92454 -10.019,14.31563 3.15753,-6.19601 5.68531,-8.72383 10.019,-14.31563 z" id="path4721-0-8-9-5-4-0-0-7-8" sodipodi:nodetypes="ccc"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Left_Low_MLight.svg
svg
mit
886
<svg viewBox="0 0 560 1000"><path d="m 353.94055,255.75216 c 19.64921,17.70888 18.05649,54.69135 28.7,67.6 C 362.79271,313.35354 335.46811,312.4246 283,313.5 c 0,0 -36.7,-17.8 -37.9,-2.2 -3,39.3 20.4,22.7 37.9,14.8 15.01595,6.73485 120.8,33 124.8,16.6 2.8,-11.1 -12.7,-103.2 -28.2,-120.3 -7.1,-7.8 -8.4,-4.8 -14.5,-9.1 -43.7,6.4 -25.3,47.1 -7,43.7" class="skin" id="L_1_" sodipodi:nodetypes="ccccccccc"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Left_Mid.svg
svg
mit
411
<svg viewBox="0 0 560 1000"><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:1.26945472" d="m 357.63595,251.99111 c 4.33436,5.11162 16.84522,16.30529 20.01625,15.24919 -8.57238,-4.69762 -12.16532,-8.61462 -20.01625,-15.24919 z" id="path4721-0-8-9-5-4-0-0-7-1" sodipodi:nodetypes="ccc"/><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:1.29628003" d="m 392.40324,263.56692 c 0.79685,-4.87992 -0.14274,-19.32087 -3.92316,-23.36967 3.34805,10.19152 2.9789,14.26865 3.92316,23.36967 z" id="path4721-0-8-9-5-4-0-0-7-6-2" sodipodi:nodetypes="ccc"/><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:0.64314759" d="m 390.37648,332.04167 c -1.73289,-2.85195 -7.16046,-9.49851 -9.0016,-9.44967 4.07429,3.2308 5.54905,5.45231 9.0016,9.44967 z" id="path4721-0-8-9-5-4-0-0-7-8-8" sodipodi:nodetypes="ccc"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Left_Mid_MLight.svg
svg
mit
889
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"><path d="m 361.3,240.3 c 9.9,3.7 9.74165,11.18206 39.84165,25.68206 28.20186,16.59843 39.42329,23.06542 61.83652,29.41206 21.41162,8.84351 33.73778,1.29722 40.93778,11.59722 3.9,5.5 4.48405,6.60866 4.48405,6.60866 1.8,3.2 3.7,7.7 4.7,13.4 0.9,5.3 0.4,8.9 1.3,9.1 1.1,0.2 3.7,-4.2 3.9,-9.1 0.2,-5.5 -2.7,-8.8 -1.3,-10.3 1.3,-1.3 3.7,1 6.5,0.1 5.7,-1.8 9.04118,-14.01176 9.14118,-15.51176 C 532.74118,296.58824 530,290.1 526.4,286.7 c -4.4,-4.1 -10.6,-1 -20,-0.7 -9.4,0.4 -22.56378,-7.71162 -45.46378,-17.91162 -10.4,-4.6 -15.01269,-4.87073 -22.01269,-8.97073 C 425.52353,251.31765 416.9,243.9 410.6,238 384.4,219 375,213.3 372.3,212.6 c -0.4,-0.1 -3.1,-0.8 -6.5,-2.3 -0.9,-0.4 -2,-0.9 -3.2,-1.6 -11.7,3 -19,6.2 -23.5,9.2 -3.9,2.7 -6.8,5.7 -6.5,8.7 0.5,5.6 11.9,7.3 28.7,13.7 z" class="skin" id="path4819" sodipodi:nodetypes="cccccccccccccccccccccc"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Left_Rebel.svg
svg
mit
884
<svg viewBox="0 0 560 1000"><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:1.26938391" d="m 386.01665,230.99685 c 5.14615,3.95336 19.04043,11.62855 21.51274,9.48901 -8.71918,-2.14047 -12.89872,-5.08157 -21.51274,-9.48901 z" id="path4721-0-8-9-5-4-0-0-7-1-5" sodipodi:nodetypes="ccc"/><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:1.29628003" d="m 379.06259,237.33744 c -4.88278,-0.77911 -19.32022,0.21295 -23.35526,4.00806 10.17929,-3.38506 14.25773,-3.03073 23.35526,-4.00806 z" id="path4721-0-8-9-5-4-0-0-7-6-2-2" sodipodi:nodetypes="ccc"/><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:0.51890343" d="m 428.68281,263.32624 c 3.15705,-1.00927 11.86552,-2.97642 13.63086,-2.44065 -5.62963,0.55822 -8.21029,1.30976 -13.63086,2.44065 z" id="path4721-0-8-9-5-4-0-0-7-8-8-7" sodipodi:nodetypes="ccc"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Left_Rebel_MLight.svg
svg
mit
902
<svg viewBox="0 0 560 1000"><path d="m 354.7,252.8 c 16.27647,11.07059 4.68823,71.22941 12.58823,89.42941 13.9,6.4 33.92941,0.006 56.67647,-23.61764 0,0 15.25922,-35.57988 8.05922,-38.57988 C 430.32392,279.33189 424.8,278 424.8,278 c 0,-7.6 0.50588,-22.97754 -2.39412,-23.20146 -2.4,0.4 -1.10588,15.70146 -2.60588,23.10146 -16.91162,-0.17973 -7.6,20.6 -6.9,30.8 -9.3,8 -15.3,8.15294 -24.4,12.1 3.1,-11.3 8.6,-85.7 -9.2,-103 -8.1,-7.9 -9.6,-4.9 -16.6,-9.2 -50,6.3 -29,47.6 -8,44.2" class="skin" id="path4821" sodipodi:nodetypes="cccccccccccc"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Left_Thumb_Down.svg
svg
mit
550
<svg viewBox="0 0 560 1000"><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:1.26945472" d="m 357.81165,248.0615 c 2.24527,6.31459 9.98603,21.21092 13.3256,21.34517 -6.35561,-7.42695 -8.33013,-12.36186 -13.3256,-21.34517 z" id="path4721-0-8-9-5-4-0-0-7-1-7" sodipodi:nodetypes="ccc"/><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:1.35790086" d="m 388.75092,263.22715 c 1.72267,-4.56849 3.20028,-18.73789 -0.24642,-23.40389 1.90473,10.52919 0.79109,14.40458 0.24642,23.40389 z" id="path4721-0-8-9-5-4-0-0-7-6-2-4" sodipodi:nodetypes="ccc"/><path style="display:inline;fill-opacity:1;fill:#464646;opacity:1;stroke-width:0.66225117" d="m 377.83935,328.32936 c 2.20933,-2.3718 9.12914,-7.89934 11.47647,-7.85872 -5.19446,2.68686 -7.07469,4.53436 -11.47647,7.85872 z" id="path4721-0-8-9-5-4-0-0-7-8-8-9" sodipodi:nodetypes="ccc"/></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Left_Thumb_Down_MLight.svg
svg
mit
895
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Battlearmor_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Battlearmor_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Battledress_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Battledress_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_BiyelgeeCostume_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_BiyelgeeCostume_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Burkini_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Burkini_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_ButtonupShirtAndPanties_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_ButtonupShirtAndPanties_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_ButtonupShirt_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_ButtonupShirt_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Cheerleader_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Cheerleader_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_ClubslutNetting_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_ClubslutNetting_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Conservative_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Conservative_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_CutoffsAndATshirt_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_CutoffsAndATshirt_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Dirndl_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Dirndl_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_GothicLolitaDress_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_GothicLolitaDress_Right_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Hanbok_Left_None.svg
svg
mit
35
<svg viewBox="0 0 560 1000"></svg>
MonsterMate/fc
src/art/vector/layers/Art_Vector_Arm_Outfit_Hanbok_Right_None.svg
svg
mit
35