From 967878df8d2a2ae4696920ead52784e599ba117f Mon Sep 17 00:00:00 2001 From: MouseOfLight <4144-MouseOfLight@users.noreply.gitgud.io> Date: Thu, 10 Oct 2019 19:27:57 -0700 Subject: [PATCH] induced NCS -> quick list Adds a game option to enable a jQuery in page scrolling link box for navigation to specific slaves (by name) in slave lists. Adds backwards compatibility for our option variable. Update the slave Summary to, if enabled, build a quick slave in-page jQuery scrollto navigation for getting to individual slaves quickly. While this may be overkill for facitlities with 1 to 5 slaves, more than that it becomes very useful. - modified: src/uncategorized/BackwardsCompatibility.tw - modified: src/uncategorized/options.tw - modified: src/uncategorized/slaveSummary.tw --- artTools/normalize_svg.py | 0 artTools/vector_layer_split.py | 0 artTools/vector_revamp_layer_split.py | 0 src/002-config/fc-js-init.js | 1 + src/Corporation/corporate-constants.js | 541 ++++ .../corporate-divisionAcquiring.js | 88 + src/Corporation/corporate-divisionBase.js | 205 ++ .../corporate-divisionProcessing.js | 92 + src/Corporation/corporate-divisionWorking.js | 91 + src/Corporation/corporate.js | 816 ++++++ .../corporateMarket.tw | 0 src/Corporation/corporationDevelopments.tw | 177 ++ src/Corporation/manageCorporation.tw | 1201 +++++++++ src/SecExp/attackReport.tw | 61 +- src/SecExp/rebellionReport.tw | 57 +- src/gui/css/mainStyleSheet.css | 33 + src/init/setupVars.tw | 1 + src/init/storyInit.tw | 5 - src/js/economyJS.js | 137 - src/js/playerJS.js | 10 +- src/js/proxies.js | 34 + src/js/utilJS.js | 148 +- src/pregmod/manageCorporation.tw | 2355 ----------------- src/uncategorized/BackwardsCompatibility.tw | 20 +- src/uncategorized/corporationDevelopments.tw | 718 ----- src/uncategorized/neighborsDevelopment.tw | 2 +- src/uncategorized/nextWeek.tw | 52 +- src/uncategorized/remMerger.tw | 251 +- src/uncategorized/storyCaption.tw | 4 +- 29 files changed, 3502 insertions(+), 3598 deletions(-) mode change 100755 => 100644 artTools/normalize_svg.py mode change 100755 => 100644 artTools/vector_layer_split.py mode change 100755 => 100644 artTools/vector_revamp_layer_split.py create mode 100644 src/Corporation/corporate-constants.js create mode 100644 src/Corporation/corporate-divisionAcquiring.js create mode 100644 src/Corporation/corporate-divisionBase.js create mode 100644 src/Corporation/corporate-divisionProcessing.js create mode 100644 src/Corporation/corporate-divisionWorking.js create mode 100644 src/Corporation/corporate.js rename src/{uncategorized => Corporation}/corporateMarket.tw (100%) create mode 100644 src/Corporation/corporationDevelopments.tw create mode 100644 src/Corporation/manageCorporation.tw create mode 100644 src/js/proxies.js delete mode 100644 src/pregmod/manageCorporation.tw delete mode 100644 src/uncategorized/corporationDevelopments.tw diff --git a/artTools/normalize_svg.py b/artTools/normalize_svg.py old mode 100755 new mode 100644 diff --git a/artTools/vector_layer_split.py b/artTools/vector_layer_split.py old mode 100755 new mode 100644 diff --git a/artTools/vector_revamp_layer_split.py b/artTools/vector_revamp_layer_split.py old mode 100755 new mode 100644 diff --git a/src/002-config/fc-js-init.js b/src/002-config/fc-js-init.js index bb5da157f6e..0a927718feb 100644 --- a/src/002-config/fc-js-init.js +++ b/src/002-config/fc-js-init.js @@ -38,6 +38,7 @@ App.Facilities = { App.Medicine = {}; App.RA = {}; App.SF = {}; +App.Corporate = {}; App.SecExp = {}; diff --git a/src/Corporation/corporate-constants.js b/src/Corporation/corporate-constants.js new file mode 100644 index 00000000000..30eb559ae1d --- /dev/null +++ b/src/Corporation/corporate-constants.js @@ -0,0 +1,541 @@ +App.Corporate.InitConstants = function () { + App.Corporate.payoutMinimumCash = 1000000; + App.Corporate.payoutCorpValueMultiplier = 0.05; + App.Corporate.dividendOptions = [0.75, 0.5, 0.25, 0.1, 0.05]; + App.Corporate.stockSplits = [ + { + 'newStocks': 3, + 'oldStocks': 2, + 'weeks': 1, + 'cost': 7.5 + }, + { + 'newStocks': 2, + 'weeks': 1, + 'cost': 10 + }, + { + 'newStocks': 3, + 'weeks': 2, + 'cost': 12.5 + }, + { + 'newStocks': 4, + 'weeks': 3, + 'cost': 15 + }, + { + 'oldStocks': 4, + 'weeks': 1, + 'cost': 15 + }, + { + 'oldStocks': 10, + 'weeks': 2, + 'cost': 25 + }, + ]; + /* + center/range object: The center value is the average or center value of the property, while range is the value range (centered on center). So if center is 1 and range is 0.5, the value can be anything from 0.75 to 1.25. + + == Base == + id: The variable ID for identifying the department. + name: The display name of the department. + focusDescription: The descriptive phrase of what the department does: + The department focuses on {breaking slaves}. + + sizeCost: How much a single development of the department costs in thousands. + maintenance: (object) Defines the amount paid each week. + linear: How much a single development costs to maintain each week in thousands. + quadratic: Development maintenance increases quadratically; this is the multiplier on the squared development component. + category: Which division maintenance category this division belongs to. Multiple divisions in a category increase overhead costs exponentially. + founding: (object) Defines information regarding the founding of the division. + corporateCash: Defines how much it costs the player to *found the corporation* with this department with a 2-to-1 split, in thousands. This will be the corporation's starting cash, from which the development and slaves will be purchased. + startingSize: How developed the department is upon founding, including how many active slaves the department starts with (Note that acquiring divisions don't start with slaves) + merger: A list of companies that can be purchased during the merger event. The event will collect all of these company objects associated with owned divisions and pick some at random. + name: The generic name of the company that is being purchased. This will have "the" put in front of it, so it must fit with the sentance "The {name} will be bought." + cost: How much, in thousands, it will cost to purchase this company. Default: 50. + text: An object with the flavor text of the event. + trouble: A description of the company and its troubles. Will be in the sentence "The first company is {trouble}" + acquire: The text that will be shown when the player chooses to acquire the company. Will be in the sentence "You acquire the {name}{acquire}". + result: The functional result of acquiring this company. + development: The number of developments that will be added to this division. + slaves: the number of activeSlaves that will be added to this division. If the division doesn't have enough room to store them you will have to purchase more development by the end of the week or they will be sold off. *WARNING* Do not provide this property if the division cannot have activeSlave set (Acquiring divisions, for example) + + == Acquiring == + An acquiring division generates new slaves. It can always sell to the market but cannot buy from the market. + slaveValue: How much value is added to a slave when it becomes a Held slave. + acquiring: (center/range) The percentage of development that can acquire a slave each week. + mercenaryHelp: (object) If present, defines how and when your mercenaries (not SF) assist this division in acquiring slaves. + level: What level the mercenaries must be above in order to assist. + cost: How much each level of mercenary above level costs the department for this assistance, in thousands. + nextDivision: (list) The ids of the divisions that acquired slaves can be sent directly to. Note that if any of these divisions can send slaves to a listed division, that division will block this division from sending to it. For example, if A->[B,C] and B->C, then A->C can only happen if B *has not* been founded. Once B is founded, slaves from A must proceed A->B->C and cannot skip to C. + + ==Processing== + A processing division enhances the value of slaves. It can always buy from the market and sell to the market. + addedValue: How much value is added to a slave when it becomes a Held slave. + processing: (center/range) The percentage of active slaves that become held slaves each week. + slaveProcessType: (text object) The verb used for the completion of the processing done on slaves. It will be used to explain when a slave moves from processed to held. + present: The department can {break} 5 slaves. + past:The department {broke} 5 slaves. + slaveProcessDescription: The descriptive phrase for what sort of processing is being done to the division's slaves. + present: the department is {breaking} 5 slaves. + future: the department will {break} 5 slaves. + past: Over the past week, the department {broke} 5 slaves. + market: The department bought {fresh slaves} from the market. + nextDivision: (list) The ids of the divisions that improved slaves can be sent directly to. Note that if any of these divisions can send slaves to a listed division, that division will block this division from sending to it. For example, if A->[B,C] and B->C, then A->C can only happen if B *has not* been founded. Once B is founded, slaves from A must proceed A->B->C and cannot skip to C. + + ==Working== + A working division produces revenue by working slaves. It can always buy from the market but cannot sell to the market. + attrition: (center/range) The percentage of active slaves that become no longer workable + revenue: (center/range) The amount of money generated by a slave. + slaveProcessDescription: The descriptive phrase for what sort of work is being done by the division's slaves and how they are removed from the workforce. + present: the department is {exploiting} 5 slaves. + future: the department will {exploit} 5 slaves. + past: Over the past week, the department {wore out} 5 slaves. + market: The department bought {menials} from the market. + + + */ + App.Corporate.divisionList = [ + new App.Corporate.Division.Acquiring( { + 'id':'Extra', + 'name':'Extralegal Enslavement', + 'focusDescription':'capturing and enslaving prisoners', + 'sizeCost': 20, + 'slaveValue':10, + 'acquiring': { + 'center':1, + 'range': 0.8, + }, + 'maintenance':{ + 'linear': 7.5, + 'quadratic': 5, + 'category':'acquision', + }, + 'founding':{ + 'corporateCash':100, + }, + 'mercenaryHelp': { + 'level': 2, + 'cost': 0.05 + }, + 'nextDivision': [ + "Break", + "Arcade" + ], + 'merger':[ + { + 'name': 'mercenary company', + 'cost': 50, + 'text': { + 'trouble':'a troubled mercenary company. After a spate of failed operations, the rank and file deposed their management and are now looking to merge with a better-run organization. The old leadership did not engage in enslavement activities, but the mercenaries have decided to turn their talents towards slaving for profit in conflict zones.', + 'acquire':' and ease their transition to conflict zone slaving.' + }, + 'result': { + 'development': 5 + } + } + ] + }), + new App.Corporate.Division.Acquiring( { + 'id': 'Legal', + 'name': 'Legal Enslavement', + 'focusDescription': 'legal enslavement', + 'sizeCost': 25, + 'slaveValue':15, + 'acquiring': { + 'center':1, + 'range': 0.5, + }, + 'maintenance':{ + 'linear': 12, + 'quadratic': 6, + 'category':'acquision', + }, + 'founding':{ + 'corporateCash':125, + }, + 'nextDivision': [ + "Train", + "Menial", + "Surgery" + ], + 'merger':[ + { + 'name':'telemarketing firm', + 'cost': 50, + 'text': { + 'trouble':'an old world telemarketing firm. In an attempt to survive in the changing economy, it turned its focus towards convincing desperate, ignorant, or stupid people from the old world to accept voluntary enslavement, through a variety of entrapment procedures. It failed to make the transition successfully, but you could certainly continue its operations under your aegis.', + 'acquire':' and clean out the deadwood, getting the business in Free Cities shape.' + }, + 'result': { + 'development':5 + } + } + ] + }), + new App.Corporate.Division.Processing( { + 'id': 'Break', + 'name': 'Slave Breaking', + 'focusDescription': 'breaking slaves', + 'sizeCost': 10, + 'addedValue': 5, + 'processing': { + 'center':0.3, + 'range':0.3, + }, + 'maintenance':{ + 'linear': 0.45, + 'quadratic': 0.6, + 'category':'processing', + }, + 'founding':{ + 'corporateCash':25, + }, + 'slaveProcessType':{ + 'present':'break', + 'past':'broke' + }, + 'slaveProcessDescription':{ + 'present':'attempting to break', + 'future':'break', + 'past':'broken', + 'market': { + single: 'slave that needs breaking', + plural: 'slaves that need breaking' + } + }, + 'nextDivision': [ + "Train", + "Menial", + "Surgery" + ], + 'merger':[ + { + 'name': 'slave breaking facility', + 'cost': 50, + 'text': { + 'trouble':'a small slave breaking firm. Despite a great need for obedient slaves the owner of this little establishment was unable to turn a profit. The facility has everything a respecting slave breaking could ever need, it seems the owner simply lacked the right character to apply effective breaking techniques. Your corporation knows perfectly well what it takes to achieve obedience and the assets can be put to great use.', + 'acquire':' and staff it with qualified personnel to make use of the new assets.' + }, + 'result': { + 'development':5, + 'slaves':5 + } + } + ] + }), + new App.Corporate.Division.Processing( { + 'id': 'Surgery', + 'name': 'Slave Modifications', + 'focusDescription': 'physical slave modifications', + 'sizeCost': 20, + 'addedValue':8, + 'processing': { + 'center':0.5, + 'range':0.2, + }, + 'maintenance':{ + 'linear': 2.4, + 'quadratic': 1, + 'category':'processing', + }, + 'founding':{ + 'corporateCash':55, + }, + 'slaveProcessType':{ + 'present':'modify', + 'past':'finished working on' + }, + 'slaveProcessDescription':{ + 'present':'working on', + 'future':'work on', + 'past':'improved', + 'market': { + single: 'slave that could use some work done to their body', + plural: 'slaves that could use some work done to their bodies' + } + }, + 'nextDivision': [ + "Train", + "Dairy" + ], + 'merger':[ + { + 'name': 'medical clinic', + 'cost': 50, + 'text': { + 'trouble':"a small medical clinic. Medical malpractice continues to be a major source of trouble for surgeons in the old world. A plastic surgeon has just suffered defeat in a major legal case over implant ruptures. He's looking to make the transition to a more enlightened area, along with his inventory and staff.", + 'acquire':" and the surgeon decides to retire on the proceeds of the sale, wishing your corporation well. It was a smart decision; he can retire to the Free Cities on that sum of money, and remote surgery is killing surgeons' wages." + }, + 'result': { + 'development': 3, + 'slaves':3 + } + } + ] + }), + new App.Corporate.Division.Processing( { + 'id': 'Train', + 'name': 'Slave Training', + 'focusDescription': 'training slaves', + 'sizeCost': 25, + 'addedValue': 11, + 'processing': { + 'center':0.2, + 'range':0.3, + }, + 'maintenance':{ + 'linear': 0.7, + 'quadratic': 1, + 'category':'processing', + }, + 'founding':{ + 'corporateCash':50, + }, + 'slaveProcessType':{ + 'present':'train', + 'past':'trained' + }, + 'slaveProcessDescription':{ + 'present':'training', + 'future':'train', + 'past':'trained', + 'market': { + single: 'slave that needs slave training', + plural: 'slaves that need slave training' + } + }, + 'nextDivision': [ + "Whore" + ], + 'merger':[ + { + 'name': 'slave training firm', + 'cost': 50, + 'text': { + 'trouble':"a small slave training firm. Slave training is a notoriously difficult business, since the maturation times on the merchandise can be extremely long, and the improvement in price can be marginal if the training does not prove highly successful. There's nothing inherently wrong with the business, they've simply hit a cash flow bottleneck and need to merge with a cash-rich organization like yours.", + 'acquire':". The previous owners are happy they'll be able to continue operations under the aegis of a better-run, richer corporation." + }, + 'result': { + 'development': 3, + 'slaves':3 + } + } + ] + }), + new App.Corporate.Division.Working( { + 'id': 'Arcade', + 'name': 'Sex Arcades', + 'focusDescription': 'operating sex arcades', + 'sizeCost': 5, + 'attrition': { + 'center':0.05, + 'range':0.2, + }, + 'maintenance':{ + 'linear': 0.2, + 'quadratic': 0.125, + 'category':'working', + }, + 'revenue':{ + 'center':1000, + 'range':0.1 + }, + 'founding':{ + 'corporateCash':15, + 'startingSize':20, + }, + 'slaveWorkDescription':{ + 'present':'exploiting', + 'future':'exploit', + 'past':'wore out', + 'market': 'fresh slave' + }, + 'merger':[ + { + 'name': 'café', + 'cost': 50, + 'text': { + 'trouble':"a quaint maid café. The prime location together with a popular concept should make for a bustling business and yet the owner is looking to get out of the business hoping to salvage some of his savings. Sadly there was a lack of capital to employ attractive servant slave maids. While someone might very well be more than willing to come in and invest in some better slaves, the place is so cheap you could easily replace the furniture and use the current assets to create a new arcade location for your corporation instead.", + 'acquire':". The old owner wishes his slaves luck under the new management, not knowing your plans for the place. A new sex arcade under your corporate umbrella will open shortly." + }, + 'result': { + 'development':5, + 'slaves':5 + } + } + ] + }), + new App.Corporate.Division.Working( { + 'id': 'Menial', + 'name': 'Menial Services', + 'focusDescription': 'offering menial services', + 'sizeCost': 6.5, + 'attrition': { + 'center':0.05, + 'range':0.2, + }, + 'maintenance':{ + 'linear': 0.2, + 'quadratic': 0.1, + 'category':'working', + }, + 'revenue':{ + 'center':1250, + 'range':0.2 + }, + 'founding':{ + 'corporateCash':20, + 'startingSize':20, + }, + 'slaveWorkDescription':{ + 'present':'exploiting', + 'future':'exploit', + 'past':'wore out', + 'market':'menial slave' + }, + 'merger':[ + { + 'name': 'slaveholding firm', + 'cost': 50, + 'text': { + 'trouble':"a minor slaveholding company. A major deal with a troubled government just fell through, and they had depended on it going through to an unwise degree. They need to merge with a larger slaving concern immediately, but there's nothing at all wrong with their significant inventory of slaves.", + 'acquire':", cash out its hapless staff, and absorb its stock into your corporation." + }, + 'result': { + 'development':5, + 'slaves':5 + } + } + ] + }), + new App.Corporate.Division.Working( { + 'id': 'Dairy', + 'name': 'Dairy', + 'focusDescription': 'milking slaves', + 'sizeCost': 15, + 'attrition': { + 'center':0.05, + 'range':0.2, + }, + 'maintenance':{ + 'linear': 0.85, + 'quadratic': 0.4, + 'category':'working', + }, + 'revenue':{ + 'center':3000, + 'range':0.2 + }, + 'founding':{ + 'corporateCash':25, + }, + 'slaveWorkDescription':{ + 'present':'milking', + 'future':'milk', + 'past':'ran dry', + 'market': 'cow' + }, + 'merger':[ + { + 'name': 'farm', + 'cost': 50, + 'text': { + 'trouble':"a dairy farm. Why a conventional dairy farm popped up as target confused you for a moment, but it quickly became clear the entire family was so deep in debt it would be a no brainer to buy the farm and start milking the large-uddered farmer's daughters as a great addition to your corporate dairy.", + 'acquire':" and your new slaves for the corporation. The family is not happy with your plans, but their approval is not required, you care only for their fluids." + }, + 'result': { + 'development':3, + 'slaves':3 + } + } + ] + }), + new App.Corporate.Division.Working( { + 'id': 'Whore', + 'name': 'Escort Service', + 'focusDescription': 'whoring out slaves', + 'sizeCost': 20, + 'attrition': { + 'center':0.05, + 'range':0.2, + }, + 'maintenance':{ + 'linear': 0.7, + 'quadratic': 0.25, + 'category':'working', + }, + 'revenue':{ + 'center':3000, + 'range':0.1 + }, + 'founding':{ + 'corporateCash':50, + }, + 'slaveWorkDescription':{ + 'present':'whoring out', + 'future':'whore out', + 'past':'lost their appeal', + 'market': 'trained whore' + }, + 'merger':[ + { + 'name': 'brothel', + 'cost': 50, + 'text': { + 'trouble':"a little brothel. With slave whores becoming the dominant force in sexual services the current madam lost her passion for the business. She's getting up there in age and has run a tight ship for many years so she deemed it the right time to bow out. All you need to do to add a new brothel location for your corporation is sign at the dotted line before anyone else has a chance to bite.", + 'acquire':" before anyone else can make an offer. The madam is surprised by your speed, but happily signs over the brothel." + }, + 'result': { + 'development':3, + 'slaves':3 + } + } + ] + }) + ]; + //divisionCategoriesList: Division maintenance categories are used to calculate the overhead that occurs from having multiple divisions within the same category. + // id: The identifier that will be used in division.maintenance.category + // freeDivisions: How many divisions must appear in this category before the overhead cost comes into play. For example, if this is 1, then the second division will cost divisionCost, and the third will bring the overhead up to four times divisionCost. + // divisionCost: How much to multiply the the overhead by in cash. The first division past the free divisions will cost this much, but the value will increase exponentially. + // freeDevelopment: How many developments, totaled across all divisions in the category, are ignored by this category before overhead comes into play. Note: freeDivisions does *not* affect this; if freeDevelopment is 100 and freeDivisions is 1, if you only have a single division with 110 developments, you will be charged for the 10 developments over. + // developmentCost: How much to multiply the squared developments by, in cash. The first development past the ignored value will cost this much, but the cost increases exponentially. + //corporate: The corporate-wide overhead for divisions, beyond the individual categories. + // freeDivisions: How many total divisions, across all categories, are ignored before charging corporate level overhead. + // divisionCost: How much to multiply the square of counted divisions in cash. The first counted division will cost this much, but the value increases exponentially. + //Equations: + // divisionBaseOverhead = (divisions - freeDivisions) ^ 2 * divisionCost + // divisionOperationOverhead = (sum(development) - freeDevelopment) ^ 2 * developmentCost + // corpOverhead = (divisions - 2) ^ 2 * 10000 + App.Corporate.maintenance = { + divisionCategoriesList: [ + { + id:'acquision', + freeDivisions: 0, + divisionCost: 25000, + freeDevelopment: 100, + developmentCost: 2 + }, + { + id:'processing', + freeDivisions: 0, + divisionCost: 25000, + freeDevelopment: 200, + developmentCost: 1 + }, + { + id:'working', + freeDivisions: 1, + divisionCost: 15000, + freeDevelopment: 800, + developmentCost: 0.1 + }, + ], + corporate: { + freeDivisions: 2, + divisionCost: 10000 + } + }; +}; diff --git a/src/Corporation/corporate-divisionAcquiring.js b/src/Corporation/corporate-divisionAcquiring.js new file mode 100644 index 00000000000..2118c6370c1 --- /dev/null +++ b/src/Corporation/corporate-divisionAcquiring.js @@ -0,0 +1,88 @@ +App.Corporate.Init_DivisionAcquiring = function(shared) { + + App.Corporate.Division.Acquiring = class extends App.Corporate.Division.Base { + constructor({slaveValue, acquiring, mercenaryHelp, nextDivision}) { + super(arguments[0]); + this._const.slaveValue = slaveValue; + this._const.acquiring = new averageRange(acquiring); + this._const.nextDivisions = nextDivision; + if(mercenaryHelp != null) { + this._const.mercenaryHelp = { + level: mercenaryHelp.level, + cost: mercenaryHelp.cost + } + } + } + //abstract virtual definitions + get fromMarket() { return false; } + get toMarket() { return true; } + get heldSlaves() { return this.getStored("Slaves"); } + set heldSlaves(value) { this.setStored("Slaves",Math.trunc(value)); } + get activeSlaves() { return 0; } + set activeSlaves(value) { throw "Cannot set active slaves for acquiring divisions"; } + get processRate() { return this._const.acquiring.center; } + get purchasedSlaveValue() { return null; } + get initialSlaveValue() { return this.soldSlaveValue; } + get soldSlaveValue() { return this._const.slaveValue; } + get nounFinishedSlave() { return "slave"; } + get nounSlaveFromMarket() { return "slave"; } + messageSlaveCount() { + return `It averages @@.green;${numberWithPluralNonZero(this.developmentCount, "new slave")}@@ each week.`; + } + messageSlaveOutput() { + return shared.MessageSlaveToMarket(this); + } + message_endWeek_Slaves(divLedger) { + let newSlaves = divLedger.slaves.value; + if(newSlaves > 0) { + return `@@.green;acquired ${numberWithPlural(newSlaves, "slave")}@@` + + (this.hadMercenaryHelp ? " with the help of your mercenaries" : ""); + } + else { + return `@@.red;failed to acquire any slaves@@` + + (this.hadMercenaryHelp ? " even with the help of your mercenaries" : ""); + } + } + endWeek_Slaves(divLedger) { + let slaves = shared.EndWeekProcessing_Slaves(this.developmentCount, this._const.acquiring); + this.heldSlaves += slaves.value; + return divLedger.slaves.apply(slaves); + } + //virtual overrides + get purchasedSlaveValue() { + return null; + } + get nextDivisions() { return this._const.nextDivisions; } + dissolve() { + super.dissolve(); + delete V[this.corpDiv + "Slaves"]; + } + getAutoBuyFromMarket() { + return false; + } + setAutoBuyFromMarket(value) { + throw "Acquiring divisions cannot acquire from the market"; + } + + get availableRoom() { return 0; } + get maintenanceSlaves() { return this.developmentCount; } + get maintenanceCost() { + //If it makes sense to have mercenaries help with other types of divisions, this code and the mercenaryHelp property will need to be moved into the super class. + let baseCost = super.maintenanceCost; + + if(this.hadMercenaryHelp) { + const mercHelpCost = Math.trunc((V.mercenaries - this.mercenaryHelp.level) * this.mercenaryHelp.cost * 1000); + baseCost += mercHelpCost; + } + return baseCost; + } + + create() { + super.create(); + this.heldSlaves = 0; + shared.FoundingSetupAutoSell(this); + } + + get hadMercenaryHelp() { return this.mercenaryHelp != null && V.mercenaries > this.mercenaryHelp.level;} + }; +} diff --git a/src/Corporation/corporate-divisionBase.js b/src/Corporation/corporate-divisionBase.js new file mode 100644 index 00000000000..2e840b48f80 --- /dev/null +++ b/src/Corporation/corporate-divisionBase.js @@ -0,0 +1,205 @@ +App.Corporate.Init_DivisionBase = function(shared) { + + App.Corporate.Division.Base = class { + constructor({id, name, focusDescription, sizeCost, maintenance, founding, merger}) { + this._const = {}; + this._const.id = id; + this._const.cost = sizeCost; + this._const.name = name; + this._const.focusDescription = focusDescription; + this._const.maintenance = { + quadratic: maintenance.quadratic, + linear: maintenance.linear, + category: maintenance.category + }; + if(founding != null) { + this._const.founding = new shared.FoundingType(this, founding); + } + if(merger != null && _.isObject(merger) || (Array.isArray(merger) && merger.length > 0)) { + if(!Array.isArray(merger)) { + merger = [merger]; + } + this._const.merger = merger; + } + this.relatedDivisions = new shared.RelatedDivisionType(); + } + //initialized data + get id() { return this._const.id; } + get sizeCost() { return this._const.cost; } + get name() { return this._const.name; } + get focusDescription() { return this._const.focusDescription; } + get founding() { return this._const.founding; } + get nextDivisions() { return null; } + get hasMergers() { return this._const.merger != null; } + get mergerChoices() { return this._const.merger; } + get maintenanceCategory() { return this._const.maintenance.category; } + + //stored variables + get founded() { return this.getStored('') == 1; } + get foundedDate() { return this.getStored('Founded');} + get developmentCount() { return this.getStored("Dev"); } + set developmentCount(value) { + if(value < 0) throw "Cannot set development count to less than 0"; + this.setStored("Dev", value); + if(value == 0) { + this.dissolve(); + } + } + + //calculated + get availableRoom() { return Math.max(0, this.developmentCount - this.activeSlaves); } + get maintenanceCost() { + return Math.trunc( this._const.maintenance.linear * 1000 * this.developmentCount + + this._const.maintenance.quadratic * Math.pow(this.activeSlaves, 2)); + } + get foundingCostDivision() { return this._const.founding.size * this.sizeCost; } + get foundingCost() { return this.foundingCostDivision; } + get canFoundCorporation() { return this._const.founding != null; } + get foundingCash() { + if(!this.canFoundCorporation) throw `${this.name} is not set up found a corporation` + return 1000 * this._const.founding.startingPrice; + } + get value() { + const developmentValue = this.developmentCount * this.sizeCost * 800; + let slaveProcValue = 0; + let slaveHeldValue = 0; + + if(this.activeSlaves > 0) + slaveProcValue = this.activeSlaves * this.purchasedSlaveValue * 1000; + if(this.heldSlaves > 0) + slaveHeldValue = this.heldSlaves * this.soldSlaveValue * 1000; + + return developmentValue + slaveProcValue + slaveHeldValue; + } + + //abstract virtual + get fromMarket() { throw "Must be defined"; } + get toMarket() { throw "Must be defined"; } + get heldSlaves() { throw "Must be defined"; } + set heldSlaves(value) { throw "Must be defined"; } + get activeSlaves() { throw "Must be defined"; } + set activeSlaves(value) { throw "Must be defined"; } + get processRate() { throw "Must be defined"; } + get initialSlaveValue() { throw "Must be defined"; } + get soldSlaveValue() { throw "Must be defined"; } + get slaveAction() { throw "Must be defined"; } + get nounFinishedSlave() { throw "Must be defined"; } + get nounSlaveFromMarket() { throw "Must be defined"; } + messageSlaveCount() { throw "Must be defined"; } + messageSlaveOutput() { throw "Must be defined"; } + message_endWeek_Slaves(divLedger) { throw "Must be defined"; } + endWeek_Slaves(ledger, divLedger) { throw "Must be defined"; } + + //The value of a slave ignoring enhancements from founded divisions + //The actual value of a slave after all improvements + get purchasedSlaveValue() { + let cheapest = { 'value':Number.MAX_VALUE, 'div': null}; + let expensive = { 'value': 0 , 'div': null}; + for(let fromDiv of this.relatedDivisions.from) { + let initialValue = fromDiv.initialSlaveValue; + if(initialValue < cheapest.value) { + cheapest.value = initialValue; + cheapest.div = fromDiv; + } + if(fromDiv.founded) { + let soldValue = fromDiv.soldSlaveValue; + if(soldValue > expensive.value) { + expensive.value = soldValue; + expensive.div = fromDiv; + } + } + } + if(expensive.div != null && expensive.value != cheapest.value) { + //The added value of an owned intermediary takes time to work its way through this division to the next + let expensiveDiv = expensive.div; + let valueDiff = expensive.value - cheapest.value; + let weeksSinceFounding = V.week - (expensiveDiv.foundedDate || 0); + let weeksToProcess = 10 * expensiveDiv.processRate; + let multiplier = Math.min(weeksSinceFounding / weeksToProcess, 1); + let finalAddedValue = valueDiff * multiplier; + return cheapest.value + finalAddedValue; + } + else if(cheapest.div != null) { + return cheapest.value; + } + throw "No route to acquisition found."; + } + get maintenanceSlaves() { return this.activeSlaves; } + getDisplayMaintenanceCost() { + const cost = this.maintenanceCost; + const processedCount = this.maintenanceSlaves * this.processRate; + + return { cost, perUnit: cost / processedCount }; + } + getAutoSendToDivision(division) { + return !App.Corporate.ownsIntermediaryDivision(this, division) + && this.getStored(`To${division.id}`) == 1; + } + setAutoSendToDivision(division, value) { + this.setStored(`To${division.id}`, value ? 1 : 0); + } + getAutoSendToMarket() { + return this.getStored("ToMarket") == 1; + } + setAutoSendToMarket(value) { + this.setStored("ToMarket", value ? 1 : 0); + } + getAutoBuyFromMarket() { + return this.getStored("FromMarket"); + } + setAutoBuyFromMarket(value) { + this.setStored("FromMarket", value ? 1 : 0); + } + endweek_Revenue(divLedger) { + //Unless otherwise specified, divisions don't produce revenue directly. + } + endWeek_Transfer(divLedger) { + let transferRetval = { total:0 }; + let divisions = []; + for(let otherDiv of this.relatedDivisions.to.filter(div=> div.founded && this.getAutoSendToDivision(div))) { + const otherLedger = divLedger.weekLedger.getDivision(otherDiv); + + const room = otherDiv.availableRoom - otherLedger.transfer.in; + if(room == 0) continue; + divisions.push({division: otherDiv, room}); + } + const fillDivisions = evenFillArray(divisions, this.heldSlaves, pair=>pair.room); + for(const filled of fillDivisions) { + const division = filled.item.division; + const value = filled.value; + divLedger.transfer.addDivision(division, value); + } + + } + endWeek_Market(divLedger) { + if(this.getAutoSendToMarket()) { + divLedger.market.sell = this.heldSlaves - divLedger.transfer.total; + } + if(this.getAutoBuyFromMarket()) { + divLedger.market.buy = this.availableRoom - divLedger.transfer.in; + } + shared.SellUnhousedSlaves(this, divLedger, this.processRate); + } + + create() { + if(this.founded) throw `${this.name} has already been founded.`; + + App.Corporate.expandedDivision(); + App.Corporate.chargeAsset(this.foundingCostDivision * 1000, "development"); + this.setStored('', 1); + this.developmentCount = this._const.founding.size; + this.setStored('Founded', V.week); + } + dissolve() { + this.setStored('', 0); + this.setStored('Dev', 0); + App.Corporate.dissolvedDivision(); + this.relatedDivisions.to.forEach(nextDep => delete V[`${this.corpDiv}To${nextDep.id}`]); + } + + //private helpers + get corpDiv() { return `corpDiv${this._const.id}`; } + getStored(key ) { return V[this.corpDiv + key]; } + setStored(key, value) { V[this.corpDiv + key] = value; } + }; +} diff --git a/src/Corporation/corporate-divisionProcessing.js b/src/Corporation/corporate-divisionProcessing.js new file mode 100644 index 00000000000..c2733275348 --- /dev/null +++ b/src/Corporation/corporate-divisionProcessing.js @@ -0,0 +1,92 @@ +App.Corporate.Init_DivisionProcessing = function(shared) { + + App.Corporate.Division.Processing = class extends App.Corporate.Division.Base { + constructor({founding, addedValue, processing, nextDivision, slaveProcessType, slaveProcessDescription}) { + super(arguments[0]); + this._const.addedValue = addedValue; + this._const.processing = new averageRange(processing); + this._const.nextDivisions = nextDivision; + this._const.slaveProcessType = slaveProcessType; + this._const.slaveProcessDescription = slaveProcessDescription; + } + + //abstract virtual definitions + get fromMarket() { return true; } + get toMarket() { return true; } + get heldSlaves() { return this.getStored("Slaves2" ); } + set heldSlaves(value) { this.setStored("Slaves2", Math.trunc(value)); } + get activeSlaves() { return this.getStored("Slaves" ); } + set activeSlaves(value) { this.setStored("Slaves" , Math.trunc(value)); } + get processRate() { return this._const.processing.center; } + get soldSlaveValue() { + //TODO: find a way to cache this. + return this.purchasedSlaveValue + this._const.addedValue; + } + get slaveAction() { + return this._const.slaveProcessDescription; + } + get nounFinishedSlave() { return `${this._const.slaveProcessDescription.past} slave`; } + get nounSlaveFromMarket() { return this._const.slaveProcessDescription.market; } + messageSlaveCount() { + return shared.MessageProcessedSlaves(this, `can ${this._const.slaveProcessType.present}`, 'green'); + } + messageSlaveOutput() { + return shared.MessageSlaveToMarket(this); + } + message_endWeek_Slaves(divLedger) { + let newSlaves = divLedger.slaves.value; + //The division + let retval = this._const.slaveProcessType.past; //exploited + if(newSlaves <= 0) { + retval += " @@.red;none of its slaves@@"; + } + else { + retval += ` @@.green;${numberWithPlural(newSlaves, 'slave')}@@`; + } + retval += ". The division "; + if(this.activeSlaves) { + retval += `is still ${this._const.slaveProcessDescription.present} ${numberWithPlural(this.activeSlaves, "slave")}`; + } + else { + retval += `doesn't have any slaves to ${this._const.slaveProcessDescription.future}`; + } + return retval; + } + endWeek_Slaves(divLedger) { + let slaves = shared.EndWeekProcessing_Slaves(this.activeSlaves, this._const.processing); + this.activeSlaves -= slaves.value; + this.heldSlaves += slaves.value; + return divLedger.slaves.apply(slaves); + } + get initialSlaveValue() { + const values = this.relatedDivisions.from + .map(fromDiv => fromDiv.initialSlaveValue); + if(values.length == 0) throw "No route to acquisition found."; + return Math.min(...values) + this._const.addedValue; + } + //virtual override + get nextDivisions() { return this._const.nextDivisions; } + get developmentCount() { return super.developmentCount; } + set developmentCount(value) { + super.developmentCount = value; + shared.SellOverflowSlaves(this); + } + dissolve() { + super.dissolve(); + delete V[this.corpDiv + "Slaves"]; + delete V[this.corpDiv + "Slaves2"]; + } + + + get foundingCostSlaves() { return this._const.founding.size * this.purchasedSlaveValue; } + get foundingCost() { return this.foundingCostDivision + this.foundingCostSlaves; } + create() { + super.create(); + App.Corporate.chargeAsset(this.foundingCostSlaves * 1000, "slaves"); + this.activeSlaves = this._const.founding.size; + this.heldSlaves = 0; + shared.FoundingSetupAutoBuy(this); + shared.FoundingSetupAutoSell(this); + } + }; +} diff --git a/src/Corporation/corporate-divisionWorking.js b/src/Corporation/corporate-divisionWorking.js new file mode 100644 index 00000000000..802414ff90b --- /dev/null +++ b/src/Corporation/corporate-divisionWorking.js @@ -0,0 +1,91 @@ +App.Corporate.Init_DivisionWorking = function(shared) { + + App.Corporate.Division.Working = class extends App.Corporate.Division.Base { + constructor({founding, attrition, revenue, slaveWorkDescription}) { + super(arguments[0]); + this._const.attrition = new averageRange(attrition); + this._const.revenue = new averageRange(revenue); + this._const.slaveWorkDescription = slaveWorkDescription; + } + + //abstract virtual definitions + get fromMarket() { return true; } + get toMarket() { return false; } + get heldSlaves() { return 0; } + set heldSlaves(value) { throw "Cannot set held slaves of working division"; } + get activeSlaves() { return this.getStored("Slaves"); } + set activeSlaves(value) { this.setStored("Slaves", Math.trunc(value)); } + get processRate() { return this._const.attrition.center; } + get initialSlaveValue() { return null; } + get soldSlaveValue() { return null; } + get slaveAction() { + return this._const.slaveWorkDescription; + } + get nounFinishedSlave() { throw "Cannot get finished slave in working division, since they don't produce finished slaves."; } + get nounSlaveFromMarket() { return this._const.slaveWorkDescription.market; } + messageSlaveCount() { + return shared.MessageProcessedSlaves(this, `has to replace`, 'red'); + } + messageSlaveOutput() { + /* TODO: originally some divisions had a slight description for what the work was; ie, "the escorts generate" */ + return `The division generates @@.yellowgreen;${cashFormat(this.slaveRevenue)}@@ per slave on average.`; + } + endWeek_Slaves(divLedger) { + let slaves = shared.EndWeekProcessing_Slaves(this.activeSlaves, this._const.attrition); + this.activeSlaves -= slaves.value; + return divLedger.slaves.apply(slaves); + } + message_endWeek_Slaves(divLedger) { + let lostSlaves = divLedger.slaves.value; + let retval = '';//The division + if(this.activeSlaves <= 0) { + retval += `has @@.red;no slaves@@ to ${this._const.slaveWorkDescription.future}`; + } + else { + retval += `is ${this._const.slaveWorkDescription.present} @@.green;${numberWithPlural(this.activeSlaves, 'slave')}@@`; + } + if(lostSlaves > 0) { + retval += `. During operations @@.red;${numberWithPlural(lostSlaves, 'slave')}@@ ${this._const.slaveWorkDescription.past}`; + } + return retval; + } + + //virtual override + get developmentCount() { return super.developmentCount; } + set developmentCount(value) { + super.developmentCount = value; + shared.SellOverflowSlaves(this); + } + dissolve() { + super.dissolve(); + delete V[this.corpDiv + "Slaves"]; + } + getAutoSendToMarket() { + return false; + } + setAutoSendToMarket(value) { + throw "Working divisions cannot sell to market"; + } + endweek_Revenue(divLedger) { + let {roll, value} = this._const.revenue.roll(); + let revenue = Math.trunc(this.activeSlaves * value); + divLedger.revenue.apply({value: revenue, efficiency: roll }); + } + endWeek_Transfer(divLedger) { + //Working divisions don't do transfers + } + + get slaveRevenue() { + return this._const.revenue.center; + } + + get foundingCostSlaves() { return this._const.founding.size * this.purchasedSlaveValue; } + get foundingCost() { return this.foundingCostDivision + this.foundingCostSlaves; } + create() { + super.create(); + App.Corporate.chargeAsset(this.foundingCostSlaves * 1000, "slaves"); + this.activeSlaves = this._const.founding.size; + shared.FoundingSetupAutoBuy(this); + } + }; +} diff --git a/src/Corporation/corporate.js b/src/Corporation/corporate.js new file mode 100644 index 00000000000..15d2135c865 --- /dev/null +++ b/src/Corporation/corporate.js @@ -0,0 +1,816 @@ + +window.averageRange = class { + constructor({center, range}) { + this._const = { + center, + range + }; + } + get center() { return this._const.center; } + get range() { return this._const.range; } + roll() { + let roll = Math.clamp(gaussianPair(0, 0.2)[0], -0.5, 0.5); + return { roll, value: (roll * this.range) + this.center}; + } + rollInt() { + let retval = this.roll(); + retval.value = Math.trunc(retval.value); + return retval; + } +} +window.evenFillArray = function(array, amount, lookupAmount) { + let perItem, changed; + let retval = []; + do { + let newArray = []; + changed = false; + perItem = Math.trunc(amount / array.length); + for(let item of array) { + let itemValue = lookupAmount(item); + if(itemValue >= perItem) { + newArray.push(item); + continue; + } + + amount -= itemValue; + retval.push({item, value:itemValue}); + changed = true; + } + array = newArray; + } while (changed); + let remainder = amount % array.length; + for(let item of array) { + let extra = 0; + if(remainder > 0) { + remainder--; + extra = 1; + } + retval.push({item, value: perItem + extra }); + } + return retval; +} +window.typeHiddenMembers = class { + constructor() { + this._const = {}; + this._var = {}; + this._cache = {}; + } +} +App.Corporate.Init = function() { + const Ledger = class { + constructor(corp, suffix="") { + this.corp = corp; + this.suffix = suffix; + this.clear(); + } + get operations( ) { return this.getStored('OpCost' ); } + set operations(value) { return this.setStored('OpCost' , value); } + + get revenue( ) { return this.getStored('Rev' ); } + set revenue(value) { return this.setStored('Rev' , value); } + + get development( ) { return this.getStored('AssetsDev' ); } + set development(value) { return this.setStored('AssetsDev' , value); } + + get slaves( ) { return this.getStored('AssetsSlave' ); } + set slaves(value) { return this.setStored('AssetsSlave', value); } + + get overhead( ) { return this.getStored('Overhead' ); } + set overhead(value) { return this.setStored('Overhead' , value); } + + copy(ledger) { + this.operations = ledger.operations; + this.revenue = ledger.revenue; + this.development = ledger.development; + this.slaves = ledger.slaves; + this.overhead = ledger.overhead; + } + clear() { + this.operations = 0; + this.revenue = 0; + this.development = 0; + this.slaves = 0; + this.overhead = 0; + } + getStored(key) { + return this.corp.getStored(key + this.suffix); + } + setStored(key, value) { + return this.corp.setStored(key + this.suffix, value); + } + }; + const WeekProcessingEffeciencyLine = class { + constructor() { + this.value = 0; + this.efficiency = 0; + } + apply(pair) { + this.value = pair.value; + this.efficiency = pair.efficiency; + } + }; + const WeekProcessingTransfer = class extends typeHiddenMembers { + constructor(divLedger) { + super(); + this._const.divLedger = divLedger; + this._var.divisions = []; + this._var.in = 0; + this._var.out = 0; + } + addDivision(division, fill) { + const otherLedger = this._const.divLedger.weekLedger.getDivision(division); + + this._var.out += fill; + otherLedger.transfer.in += fill; + + this._var.divisions.push({division, fill}); + } + get in() { + return this._var.in; + } + set in(value) { + if(value == this._var.in) return; + if(this._const.divLedger.market.canBuy) { + this._const.divLedger.market.buy -= value - this._var.in; + } + this._var.in = value; + } + get total() { + return this._var.out; + } + get divisions() { + return this._var.divisions; + } + } + const WeekProcessingMarket = class extends typeHiddenMembers { + constructor(divLedger) { + super(); + + this._const.divLedger = divLedger; + this._var.canBuy = false; + this._var.buy = 0; + this._var.sell = 0; + } + get buy() { + return this._var.buy; + } + set buy(value) { + //Note: canBuy merely means we've set buy to some value, even 0. + //Setting to 0 after setting to another value happens when we tried to buy some number, but couldn't afford it. + this._var.canBuy = true; + this._var.buy = value; + this._cache.buyValue = null; + } + get sell() { + return this._var.sell; + } + set sell(value) { + this._var.sell = value; + this._cache.sellValue = null; + } + get sellValue() { + if(this._cache.sellValue == null) + this._cache.sellValue = App.Corporate.slaveMarketSellValue(this.division, this.sell); + return this._cache.sellValue; + } + get buyValue() { + if(this._cache.buyValue == null) + this._cache.buyValue = App.Corporate.slaveMarketPurchaseValue(this.division, this.buy); + return this._cache.buyValue; + } + get canBuy() { + return this._var.canBuy; + } + + get divisionLedger() { + return this._const.divLedger; + } + get division() { + return this.divisionLedger.division; + } + }; + const WeekProcessingDivision = class extends typeHiddenMembers { + constructor(division, weekLedger) { + super(); + + this._const.division = division; + this._const.ledger = weekLedger; + this._var.slaves = new WeekProcessingEffeciencyLine(); + this._var.revenue = new WeekProcessingEffeciencyLine(); + this._var.transfer = new WeekProcessingTransfer(this); + this._var.market = new WeekProcessingMarket(this); + } + get slaves() { + return this._var.slaves; + } + get revenue() { + return this._var.revenue; + } + get transfer() { + return this._var.transfer; + } + get market() { + return this._var.market; + } + get division() { + return this._const.division; + } + get weekLedger() { + return this._const.ledger; + } + } + const WeekProcessingOverheadCategory = class extends typeHiddenMembers { + constructor(categoryId) { + super(); + + this._const.category = App.Corporate.maintenance.divisionCategories[categoryId]; + if(this._const.category == null) { debugger; throw new "Invalid category id: " + categoryId; } + this._var.divisions = []; + } + addDivision(division) { + this._var.divisions.push(division); + } + get cost() { + const category = this._const.category; + const ownedDivisionCount = this._var.divisions.length - category.freeDivisions; + const developmentCount = this._var.divisions.reduce((r, div) => r + div.developmentCount, 0) - category.freeDevelopment; + + const divisionCost = Math.trunc(Math.pow(Math.max(ownedDivisionCount, 0), 2) * category.divisionCost ); + const developmentCost = Math.trunc(Math.pow(Math.max(developmentCount , 0), 2) * category.developmentCost); + + return divisionCost + developmentCost; + } + }; + const WeekProcessingLedger = class extends typeHiddenMembers { + constructor() { + super(); + + this._var.divisions = {}; + this._var.maintenanceCategories = {}; + this._var.operatingCost = 0; + } + + getDivision(division) { + if(!(division.id in this._var.divisions)) { + this._var.divisions[division.id] = new WeekProcessingDivision(division, this); + } + return this._var.divisions[division.id]; + } + get divisionLedgers() { + return this._var.divisions; + } + + registerMaintenanceForDivision(division) { + let categoryId = division.maintenanceCategory; + if(!(categoryId in this._var.maintenanceCategories)) { + this._var.maintenanceCategories[categoryId] = new WeekProcessingOverheadCategory(categoryId); + } + let category = this._var.maintenanceCategories[categoryId]; + category.addDivision(division); + } + get maintenanceCategories() { + return this._var.maintenanceCategories; + } + + get operatingCost() { + return this._var.operatingCost; + } + set operatingCost(value) { + if(!Number.isFinite(value)) { debugger; throw "Operating cost wasn't finite "; } + this._var.operatingCost = Math.trunc(value); + } + get overhead() { + const divCount = App.Corporate.numDivisions; + if(divCount <= 1) return 0; + + const divisionOverhead = Object.values(this.maintenanceCategories).reduce((r, categoryLedger) => r + categoryLedger.cost, 0); + const corpMaintInfo = App.Corporate.maintenance.corporate; + let corpOverhead = Math.pow(Math.max(divCount - corpMaintInfo.freeDivisions, 0), 2) * corpMaintInfo.divisionCost; + let retval = divisionOverhead + corpOverhead; + if(App.Corporate.easyMode) { + retval /= 2; + } + return Math.trunc(retval); + } + } + App.Corporate.Division = {}; + const shared = { + RelatedDivisionType: class { + constructor() { + this._var = { + to: [], + from: [], + all: [] + }; + } + get to() { return this._var.to ; } + get from() { return this._var.from; } + get all() { return this._var.all ; } + addTo(value) { + this._var.to.push(value); + this._var.all.push(value); + } + addFrom(value) { + this._var.from.push(value); + this._var.all.push(value); + } + get anyFounded() { return this.all.some(div=>div.founded); } + }, + FoundingType: class { + constructor(division, {corporateCash, startingSize = 10}) { + this._const = { + division, + cash: corporateCash, + size: startingSize + }; + } + get cash() { return this._const.cash; } + get size() { return this._const.size; } + get startingPrice() { + let div = this._const.division; + return this._const.cash + div.foundingCost; + } + }, + SellOverflowSlaves: function(division) { + const slavesToSell = division.activeSlaves - division.developmentCount; + if(slavesToSell > 0) { + const slaveProcCost = Math.trunc(App.Corporate.slaveMarketPurchaseValue(this, -slavesToSell)); + App.Corporate.chargeAsset(slaveProcCost, "slaves"); + division.activeSlaves -= slavesToSell; + V.menialDemandFactor -= slavesToSell; + } + }, + SellUnhousedSlaves: function(division, divLedger, rate) { + if(divLedger.market.sell != 0) return; + + let housing = 2 * rate * division.developmentCount; + let unhoused = division.heldSlaves - housing; + if(unhoused <= 0) return; + + divLedger.market.sell = unhoused; + }, + MessageProcessedSlaves: function(division, verbPhrase, color) { + let procCount = Math.trunc(division.developmentCount * division.processRate); + let slaveCountedNoun = numberWithPluralNonZero(procCount, "slave"); + + return `It ${verbPhrase} approximately @@.${color};${slaveCountedNoun}@@ each week when operating at capacity (${division.developmentCount})`; + }, + MessageSlaveToMarket: function(division) { + return `The slaves from this division can be sold for @@.yellowgreen;${cashFormat(division.soldSlaveValue * menialSlaveCost())}@@ each.`; + }, + EndWeekProcessing_Slaves: function(processingCount, rate) { + const perDevPair = rate.roll(); + let slaveIncrease = perDevPair.value * processingCount; + if(slaveIncrease < 1) { + slaveIncrease = (slaveIncrease > Math.random() ? 1 : 0); + } + return {efficiency: perDevPair.roll, value: Math.trunc(slaveIncrease) }; + }, + FoundingSetupAutoBuy: function(division) { + let foundedFrom = division.relatedDivisions.from.filter(div=>div.founded); + if(foundedFrom.length == 0) { + division.setAutoBuyFromMarket(true); + } + else { + for(let otherDiv of foundedFrom) { + if(otherDiv.getAutoSendToMarket()) { + otherDiv.setAutoSendToDivision(division, true); + } + } + } + + }, + FoundingSetupAutoSell: function(division) { + let foundedTo = division.relatedDivisions.to.filter(div=>div.founded); + if(foundedTo.length == 0) { + division.setAutoSendToMarket(true); + } + else { + for(let otherDiv of foundedTo) { + if(otherDiv.getAutoBuyFromMarket()) { + division.setAutoSendToDivision(otherDiv, true); + } + } + } + } + }; + App.Corporate.Init_DivisionBase(shared); + App.Corporate.Init_DivisionAcquiring(shared); + App.Corporate.Init_DivisionProcessing(shared); + App.Corporate.Init_DivisionWorking(shared); + + App.Corporate.InitConstants(); + let divisions = App.Corporate.divisions = mapIdList(App.Corporate.divisionList); + App.Corporate.maintenance.divisionCategories = mapIdList(App.Corporate.maintenance.divisionCategoriesList); + + for(const divInfo of App.Corporate.divisionList.filter(div=>div.nextDivisions != null)) { + const div = divisions[divInfo.id]; + for(const nextDepId of divInfo.nextDivisions) { + let nextDiv = divisions[nextDepId]; + div.relatedDivisions.addTo(nextDiv); + nextDiv.relatedDivisions.addFrom(div); + } + } + let asDivision = function(division) { + if(_.isObject(division)) return division; + return App.Corporate.divisions[division]; + } + App.Corporate.getStored = function(key ) { return V[`corp${key}`]; } + App.Corporate.setStored = function(key, value) { V[`corp${key}`] = value; } + + //Integer properties starting with corp + const propertyToStoryInt = { + cash: "Cash", + numDivisions: 'Div', + foundedDate: 'Founded', + dividend: "Dividend", + specializationTimer: "SpecTimer", + } + for(const property in propertyToStoryInt) { + const key = propertyToStoryInt[property]; + Object.defineProperty(App.Corporate, property, { + get: function( ) { return this.getStored(key); }, + set: function(value) { + if(!Number.isFinite(value)) throw "Unreal number " + key; + this.setStored(key, Math.trunc(value)); + } + }); + } + + //Boolean properties starting with corp (true == 1, false == 0) + const propertyToStoryBool = { + founded: "Incorporated", + hasMarket: "Market", + payoutCash: "CashDividend", + easyMode: "Easy", + canExpand: 'ExpandToken', + } + for(const property in propertyToStoryBool) { + const key = propertyToStoryBool[property]; + Object.defineProperty(App.Corporate, property, { + get: function( ) { return this.getStored(key) === 1; }, + set: function(value) { this.setStored(key, value == true ? 1 : 0); } + }); + } + + //Abnormal properties + Object.defineProperty(App.Corporate, "value", { + get: function() { + if(!this.founded) return 0; + let corpAssets = App.Corporate.divisionList + .filter(div=>div.founded) + .reduce((v, div)=>v + div.value, 0); + return corpAssets + this.dividend + this.cash; + } + }); + Object.defineProperty(App.Corporate, "dividendRatio", { + get: function( ) { return V.dividendRatio ; }, + set: function(value) { V.dividendRatio = value; } + }); + Object.defineProperty(App.Corporate, "payoutAfterCash", { + get: function() { + return Math.max(Math.trunc(this.payoutCorpValueMultiplier * this.value), this.payoutMinimumCash); + } + }); + + const SharesType = class { + get personal() { return V.personalShares ; } + set personal(value) { V.personalShares = value; } + get public() { return V.publicShares ; } + set public(value) { V.publicShares = value; } + }; + App.Corporate.shares = new SharesType(); + App.Corporate.ledger = { + current: new Ledger(App.Corporate), + old: new Ledger(App.Corporate, "Old"), + swap: function() { + this.old.copy(this.current); + this.current.clear(); + }, + clear: function() { + this.old.clear(); + this.current.clear(); + } + }; + App.Corporate.foundingCostToPlayer = function(division, personalShares, publicShares) { + division = asDivision(division); + let costToPlayer = Math.trunc((division.foundingCash / (personalShares + publicShares)) * personalShares); + return costToPlayer; + } + App.Corporate.create = function(division, personalShares, publicShares) { + this.shares.personal = personalShares; + this.shares.public = publicShares; + V.dividendTimer = 13; + this.founded = true; + this.foundedDate = V.week; + this.dividend = 0; + this.dividendRatio = 0; + this.specializationTimer = 4; + + this.ledger.clear(); + + //this will be updated by division.create + this.numDivisions = 0; + this.expansionTokens = 1; + + division = asDivision(division); + cashX(forceNeg(App.Corporate.foundingCostToPlayer(division, personalShares, publicShares)), 'stocksTraded'); + this.cash = division.foundingCash; + + division.create(this); + App.Corporate.ledger.swap(); + }; + App.Corporate.dissolve = function() { + for(let division of this.divisionList) { + if(division.toMarket) { + this.sellSlaves(division, division.heldSlaves); + } + division.developmentCount = 0; + } + this.founded = false; + this.numDivisions = 0; + this.expansionTokens = 0; + this.setStored("Expand", 0); + this.setStored("Spec", 0); + this.setStored("SpecToken", 0); + this.setStored("SpecRaces", []); + + // Some of these will need to be refactored into App.Corporate.Specialization + const toDelete = [ + "corpCash", + "personalShares", + "publicShares", + "corpDividend", + "dividendTimer", + "corpRev", + "corpRevOld", + "corpAssetsDev", + "corpAssetsDevOld", + "corpAssetsSlave", + "corpAssetsSlaveOld", + "corpOverheadOld", + "corpOpCostOld", + "corpProfitOld", + "corpSpecAccent", + "corpSpecAge", + "corpSpecAmputee", + "corpSpecBalls", + "corpSpecDevotion", + "corpSpecDick", + "corpSpecEducation", + "corpSpecGender", + "corpSpecGenitalia", + "corpSpecWeight", + "corpSpecHeight", + "corpSpecHormones", + "corpSpecImplants", + "corpSpecInjection", + "corpSpecIntelligence", + "corpSpecMilk", + "corpSpecMuscle", + "corpSpecPussy", + "corpSpecSexEd", + "corpSpecTrust", + "corpSpecVirgin" + ]; + toDelete.forEach(id => delete V[id]); + + if(this.hasMarket) { + let corporateMarketIndex = V.sectors.findIndex(sector => sector.type === "CorporateMarket"); + V.sectors[corporateMarketIndex].type = "Markets"; + this.hasMarket = false; + } + }; + App.Corporate.expandedDivision = function() { + this.numDivisions += 1; + this.canExpand = false; + }; + App.Corporate.dissolvedDivision = function() { + this.numDivisions -= 1; + }; + App.Corporate.chargeAsset = function(cost, type) { + if(!Number.isFinite(cost)) throw "The cost provided was not a real number"; + if(!type in this.ledger.current) throw `Ledger doesn't record '${type}' category.`; + if(cost == 0) return; + + this.ledger.current[type] += cost; + this.cash -= cost; + }; + App.Corporate.earnRevenue = function(cost) { + if(!Number.isFinite(cost)) throw "The cost provided was not real" + this.ledger.current.revenue += cost; + this.cash += cost; + }; + /* Need to prevent skipping intermediaries if they exist, ie break->surgery->train, you can skip surgery only if you don't have it.*/ + App.Corporate.ownsIntermediaryDivision = function(fromDivision, toDivision) { + for(let intermediateDiv of toDivision.relatedDivisions + .from + .filter(iDep => iDep.id != fromDivision.id + && fromDivision.relatedDivisions.to.includes(iDep))) { + if(intermediateDiv.founded) return true; + } + return false; + }; + App.Corporate.slaveMarketPurchaseValue = function(division, count) { + division = asDivision(division); + let slaveValue = division.purchasedSlaveValue; + let totalValue = slaveValue * count * menialSlaveCost(count); + return Math.trunc(totalValue); + }; + App.Corporate.slaveMarketSellValue = function(division, count) { + division = asDivision(division); + let slaveValue = division.soldSlaveValue; + let totalValue = slaveValue * count * menialSlaveCost(count); + return Math.trunc(totalValue); + }; + App.Corporate.buySlaves = function(division, count) { + if(count <= 0) return 0; + + division = asDivision(division); + let purchasePrice = this.slaveMarketPurchaseValue(division, count); + if(this.cash < purchasePrice) { + throw "Attempted purchase without enough money"; + } + + this.chargeAsset(purchasePrice, "slaves"); + division.activeSlaves += count; + V.menialSupplyFactor -= count; + return purchasePrice; + }; + App.Corporate.sellSlaves = function(division, count) { + if(count <= 0) return 0; + + division = asDivision(division); + if(division.heldSlaves < count) { throw "Attempted to sell more slaves than held."; } + + let sellPrice = this.slaveMarketSellValue(division, count); + this.earnRevenue(sellPrice); + division.heldSlaves -= count; + V.menialDemandFactor -= count; + return sellPrice; + }; + App.Corporate.transferSlaves = function(fromDivision, toDivision, count) { + fromDivision = asDivision(fromDivision); + toDivision = asDivision(toDivision); + // TODO: validate the from and to departments are directly connected. + + if(fromDivision.heldSlaves < count) throw `Tried to move ${count} slaves out of ${fromDivision.name}, but it only had ${fromDivision.heldSlaves}`; + + fromDivision.heldSlaves -= count; + toDivision.activeSlaves += count; + }; + + App.Corporate.buyDevelopment = function(division, count) { + division = asDivision(division); + + let cost = Math.trunc(division.sizeCost * count * 1000); + + this.chargeAsset(cost, "development"); + division.developmentCount += count; + }; + App.Corporate.sellDevelopment = function(division, count) { + division = asDivision(division); + + const devCount = division.developmentCount; + count = count || devCount; + if(count > devCount) throw `Attempted to sell more of a division ${division.id} than exists (${count} of ${devCount})`; + const developmentCost = Math.trunc(count * division.sizeCost * 800); + this.chargeAsset(-developmentCost, "development"); + division.developmentCount -= count; + }; + App.Corporate.setAutoSendToDivision = function(fromDivision, toDivision, value) { + fromDivision = asDivision(fromDivision); + toDivision = asDivision(toDivision); + + fromDivision.setAutoSendToDivision(toDivision, value); + }; + App.Corporate.setAutoSendToMarket = function(division, value) { + division = asDivision(division); + division.setAutoSendToMarket(value); + }; + App.Corporate.setAutoBuyFromMarket = function(division, value) { + division = asDivision(division); + division.setAutoBuyFromMarket(value); + }; + App.Corporate.endWeek = function() { + let ledger = new WeekProcessingLedger(); + //Prepare requests + for(let div of this.divisionList.filter(div=>div.founded)) { + let divLedger = ledger.getDivision(div) + + ledger.operatingCost += div.maintenanceCost; + ledger.registerMaintenanceForDivision(div); + + div.endweek_Revenue(divLedger); + div.endWeek_Slaves(divLedger); + } + for(let divLedger of Object.values(ledger.divisionLedgers)) { + let div = divLedger.division; + div.endWeek_Transfer(divLedger); + div.endWeek_Market(divLedger); + } + this.chargeAsset(ledger.operatingCost, "operations"); + this.cash -= ledger.overhead; + //Execute sales requests, transfers, and earned revenue + for(let divLedger of Object.values(ledger.divisionLedgers)) { + let div = divLedger.division; + this.earnRevenue(divLedger.revenue.value); + if(div.activeSlaves > 0) + { + shared.SellOverflowSlaves(div); + } + + for(let otherDivPair of divLedger.transfer.divisions) { + let otherDiv = otherDivPair.division; + let count = otherDivPair.fill; + if(count == 0) continue; + + this.transferSlaves(div, otherDiv, count); + } + if(divLedger.market.sell > 0) { + divLedger.market.finalSale = this.sellSlaves(div, divLedger.market.sell); + } + } + + //Execute purchase requests + //todo: Make a switch to allow the user to control purchasing behavior. + //todo: Expensive first + //todo: Cheapest first + //Even purchase requsts: + let purchaseValues = evenFillArray(Object.values(ledger.divisionLedgers) + .filter(divLedger=>divLedger.market.buy > 0) + , this.cash + , divLedger=>divLedger.market.buyValue); + for(let divLedgerPair of purchaseValues) { + let divLedger = divLedgerPair.item; + let purchaseCost = divLedgerPair.value; + let div = divLedger.division; + + if(divLedger.market.buyValue > purchaseCost) { + //Estimate how many slaves we can afford within the purchase cost + let perSlaveEstimate = Math.trunc(divLedger.market.buyValue / divLedger.market.buy); + let numSlavesEstimate = Math.trunc(purchaseCost / perSlaveEstimate); + + if(numSlavesEstimate < 1) { + divLedger.market.originalBuy = divLedger.market.buy; + divLedger.market.buyShortMoney = divLedger.market.buyValue; + divLedger.market.buyShortSlaves = divLedger.market.buy; + divLedger.market.buy = 0; + } + else { + divLedger.market.originalBuy = divLedger.market.buy; + divLedger.market.buyShortMoney = divLedger.market.buyValue - purchaseCost; + divLedger.market.buyShortSlaves = divLedger.market.buy - numSlavesEstimate; + divLedger.market.buy = numSlavesEstimate; + } + } + divLedger.market.finalPurchase = this.buySlaves(div, divLedger.market.buy); + } + return ledger; + }; + App.Corporate.cheatCash = function(userCash) { + userCash = Math.trunc(Number(userCash)) + if(Number.isFinite(userCash)) { + this.cash = userCash; + V.cheater = 1 + } + } + + App.Corporate.Backcompat = function(){ + // Currently everything is compatible + }; + + if(V.corpDivTrainSurgeryTimer !== undefined) { + let timer = V.corpDivTrainSurgeryTimer; + // Note: originally the timer was capped at 20, so the founding week isn't guaranteed to be correct. + V.corpDivSurgeryFounded = V.week - timer; + delete V.corpDivTrainSurgeryTimer; + } +}; + + +// Corporation Share Price +// A positive q means adding shares to the market, negative means removing them + +window.corpSharePrice = function(q = 0, personalShares = null, publicShares = null) { + if (V.corpIncorporated === 0) { + return 0; + } + personalShares = personalShares || V.personalShares; + publicShares = publicShares || V.publicShares; + return Math.trunc(1000 * (App.Corporate.value / (personalShares + publicShares + q))); +}; + +// Corporation race blacklisting/whitelisting +// race is the lowercase string representing the race, 'blacklist' is either 1 or 0. 1 means we are blacklisting and 0 means we are whitelisting said race +window.corpBlacklistRace = function(race, blacklist) { + let raceArray = State.variables.corpSpecRaces; + if (raceArray.length > 0 && blacklist === 1) { + raceArray.delete(race); + } else if (blacklist === 1) { + raceArray = setup.filterRacesLowercase.filter(x => x !== race); + } else { + raceArray.push(race); + } + return raceArray; +}; diff --git a/src/uncategorized/corporateMarket.tw b/src/Corporation/corporateMarket.tw similarity index 100% rename from src/uncategorized/corporateMarket.tw rename to src/Corporation/corporateMarket.tw diff --git a/src/Corporation/corporationDevelopments.tw b/src/Corporation/corporationDevelopments.tw new file mode 100644 index 00000000000..3bdad3f57e3 --- /dev/null +++ b/src/Corporation/corporationDevelopments.tw @@ -0,0 +1,177 @@ +:: 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>> +<<set _corpOpCost = 0, +_corpRev = 0, +_corpAssetsSlave = 0>> + +__Corporation Management__ +<br>''Operational Results'' +/*Divisions doing their thing*/ +<<set _weekLedger = App.Corporate.endWeek()>> +/* TODO: I would like to move some of the following loop into a new loop. It should go Process -> Transfer -> Sell -> Buy (most expensive to least) to give the best chance of auto-buy having enough money to make purchases. */ +<<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*/ +<br><br>''Aggregate Results'' +<<set _corpOverhead = _weekLedger.overhead>> + +/*cash, rev and costs state variables get corrected here*/ +<<set _corpOpCost = _weekLedger.operatingCost + , _corpProfitProvisional = $corpRev - ($corpAssetsDev + $corpAssetsSlave + _corpOpCost + _corpOverhead)>> +<<if _corpProfitProvisional > 0>> + <<set $corpEcon = Math.trunc(_corpProfitProvisional / (100 / $localEcon) - _corpProfitProvisional), + $corpCash += $corpEcon, + $corpProfitOld = _corpProfitProvisional + $corpEcon>> /*this is probably the best place for the economy to show itself, the rest is finnicky enough as is*/ +<<else>> + <<set $corpProfitOld = _corpProfitProvisional>> +<</if>> +<br>Revenue: @@.yellowgreen;<<print cashFormat($corpRev)>>@@ +<<if ($cheatMode) && ($cheatModeM) && $corpNeighborBonus > 0>> + <br>Including Neighbor Bonus: @@.yellowgreen;<<print cashFormat($corpNeighborBonus)>>@@ +<</if>> +<br>Operating Expenses: @@.red;<<print cashFormat(_corpOpCost)>>@@ +<<if $corpAssetsSlave > 0>> + <br>Slave Expenses: @@.red;<<print cashFormat($corpAssetsSlave)>>@@ +<<else>> + <br>Slave Expenses: @@.yellowgreen;<<print cashFormat($corpAssetsSlave)>>@@ +<</if>> +<<if $corpAssetsDev > 0>> + <br>Asset Expenses: @@.red;<<print cashFormat($corpAssetsDev)>>@@ +<<else>> + <br>Asset Expenses: @@.yellowgreen;<<print cashFormat($corpAssetsDev)>>@@ +<</if>> +<<if ($cheatMode) && ($cheatModeM)>> + <<if $corpEcon < 0>> + <br>Economic Expenses: @@.red;<<print cashFormat(-$corpEcon)>>@@ + <<else>> + <br>Economic Windfall: @@.yellowgreen;<<print cashFormat($corpEcon)>>@@ + <</if>> +<</if>> +<<if _corpOverhead != 0>><br>Overhead: @@.red;<<print cashFormat(_corpOverhead)>>@@<</if>> +<br>Profit: <<if $corpProfitOld > 0>>@@.yellowgreen;<<print cashFormat($corpProfitOld)>>@@<<else>>@@.red;<<print cashFormat($corpProfitOld)>>@@<</if>> +<<if $localEcon > 100>> + <br>Your profits benefit from a strong economy. +<<elseif $localEcon < 60>> + <br>Your profits are severely depressed by the failing economy. +<<elseif $localEcon < 100>> + <br>Your profits are lowered by the weak economy. +<</if>> + +/*Division Expansion Tokens*/ +<<if App.Corporate.numDivisions < App.Corporate.divisionList.length && !App.Corporate.canExpand>> + <<set _corpDivs = App.Corporate.numDivisions>> + <<set _expansionValue = Math.trunc(Math.pow(_corpDivs, 1.5) + (5 * _corpDivs + 2) / 4)>> + <<if App.Corporate.value > _expansionValue * 1000000>> + <<set App.Corporate.canExpand = true>> + <div class="majorText">Your corporation is ready to start an additional division!</div> + <</if>> +<</if>> + +/*Specializations tokens*/ +<<if App.Corporate.value > 1600000 * Math.pow(1.25, $corpSpec) - 1200000>> + /*the spendable currency*/ <<set $corpSpecToken += 1, + $corpSpec += 1>> /*the amount unlocked*/ + <br><br>Your corporation is ready to specialize its slaves further! +<</if>> + +/*Specialization Cooldown*/ +<<if $corpSpecTimer > 0>> + <<set $corpSpecTimer-->> +<</if>> + +/*Calculating cash set aside for dividend*/ +<br><br>''Dividend'' +<<if $dividendRatio > 0>> + <br>The corporation is currently reserving <<= Math.floor($dividendRatio * 100)>>% of its profit to be paid out as dividends. +<<else>> + <br>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>> +<<set _dividendCashReserved = 0, +_dividendReserved = 0>> +<<if $corpProfitOld > 0 && $dividendRatio > 0 && $corpCash > $corpProfitOld * $dividendRatio>> + <<set _dividendReserved = Math.trunc($corpProfitOld * $dividendRatio), + $corpDividend += _dividendReserved, + $corpCash -= _dividendReserved>> +<</if>> +<<if App.Corporate.payoutCash>> + <<set _payoutAfter = App.Corporate.payoutAfterCash>> + <<if App.Corporate.cash > _payoutAfter>> + <<set _dividendCashReserved = App.Corporate.cash - _payoutAfter, + App.Corporate.dividend += _dividendCashReserved, + App.Corporate.cash -= _dividendCashReserved>> + <</if>> +<</if>> +<<if $corpDividend > 0 || $dividendRatio > 0 || _dividendCashReserved > 0>> + <<if _dividendReserved > 0 || _dividendCashReserved > 0>> + It reserved @@.yellowgreen;<<print cashFormat(_dividendReserved + _dividendCashReserved)>>@@ this week. + <</if>> + A total of @@.yellowgreen;<<print cashFormat($corpDividend)>>@@ has been put aside for its shareholders. +<</if>> + +/*The corporation pays out every quarter (13 weeks)*/ +<<if $dividendTimer == 1>> + <<set _dividendPayout = Math.trunc($corpDividend * $personalShares / ($personalShares + $publicShares)), + $corpDividend = 0, + $dividendTimer = 13, + cashX(_dividendPayout, "stocks")>> + <<if _dividendPayout > 0>> + <br>This week the dividends were paid out, you received @@.yellowgreen;<<print cashFormat(_dividendPayout)>>.@@ + <</if>> +<<elseif $corpIncorporated == 1>> + <<set $dividendTimer -= 1>> +<</if>> + +/*Bankrupted the Corporation*/ +<<if App.Corporate.value < 0>> + <<run App.Corporation.Dissolve()>> + <br>@@.red;Your corporation went bankrupt.@@ +<</if>> + +<<run App.Corporate.ledger.swap()>> /*This needs to be at the very end of the financials*/ diff --git a/src/Corporation/manageCorporation.tw b/src/Corporation/manageCorporation.tw new file mode 100644 index 00000000000..cd7dd4ddb79 --- /dev/null +++ b/src/Corporation/manageCorporation.tw @@ -0,0 +1,1201 @@ +:: Manage Corporation [nobr] + +<<set $nextButton = "Back", $nextLink = "Main", $showEncyclopedia = 1, $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>> +<<set _ledger = App.Corporate.ledger.old>> +<table class="corporate"> +<thead> +<tr><th colspan="2">Ledger for <<= asDateString($week - 1) >> - <<= asDateString($week, -1) >></th></tr> +</thead> +<tbody> +<tr><td>Revenue</td><td><<= cashFormatColor(_ledger.revenue)>></td></tr> +/*Returns last week's revenue, gets calculated in corporationDevelopments, but slaves sold here also added to it for next week*/ +<<if ($cheatMode) && ($cheatModeM) && $corpNeighborBonus > 0>> + <tr><td>Including Last Week's Neighbor Bonus</td><td>@@.yellowgreen;<<print cashFormat($corpNeighborBonus)>>@@</td></tr> +<</if>> +<tr><td>Operating Expenses</td><td><<= cashFormatColor(_ledger.operations, true)>></td></tr> /*Just like revenue, except for operating expenses (all calculated in corporationDevelopments)*/ +<tr><td>Slave Expenses</td><td><<= cashFormatColor(_ledger.slaves, true)>></td></tr> /*buying slaves to work on adds to this expense, works just like revenue*/ +<tr><td>Asset Expenses</td><td><<= cashFormatColor(_ledger.development, true)>></td></tr> /*costs associated with expanding divisions end up here, reports costs from last week, not current*/ +<<if $corpOverheadOld > 0>><tr><td>Last Week's Overhead</td><td><<= cashFormatColor(_ledger.operations, true)>></td></tr><</if>> +<<if ($cheatMode) && ($cheatModeM)>> + <<if $corpEcon <= 0>> + <tr><td>Economic Expenses</td><td>@@.red;<<print cashFormat(-$corpEcon)>>@@</td></tr> + <<else>> + <tr><td>Economic Windfall</td><td>@@.yellowgreen;<<print cashFormat($corpEcon)>>@@</td></tr> + <</if>> +<</if>> +<tr><td>Profit</td><td><<= cashFormatColor(_ledger.profit)>></td></tr> +</tbody> +<thead> +<tr><th colspan="2">Totals</th></tr> +</thead> +<tbody> +<tr> + <td>Liquidity</td> + <td> + <<if ($cheatMode) && ($cheatModeM)>> + <span id="corpCash"><<= cashFormatColor(App.Corporate.cash)>></span> + <<set _TcorpCash = $corpCash>> + <<textbox "_TcorpCash" _TcorpCash>> + <<link "Apply">> + <<set App.Corporate.cheatCash(_TcorpCash)>> + <<replace "#corpCash">><<= cashFormatColor($corpCash)>><</replace>> + <</link>> + <<else>> + <<= cashFormatColor($corpCash)>> + <</if>> + </td> +</tr> +<tr><td>Corporate Value</td><td><<= cashFormatColor(App.Corporate.value)>></td></tr> +<tr> +<td>Dividend for Payout</td> +<td> +<div><<= cashFormatColor($corpDividend)>></div> +<div class="note">Pays out on <<=asDateString($week + $dividendTimer, -1)>>, <<if $dividendTimer == 1>> + the end of this week +<<else>> + in $dividendTimer weeks +<</if>> +</div> +</td></tr> +</tbody> +</table> + +<br><br> + +<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 _divSentanceStart = ["Currently the division", "It also"]>> + <h3>Direct Control</h3> + <<if _div.fromMarket>> + <div> + <<= _divSentanceStart.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 $corpCash > _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 $corpCash < _slaveSetCost>> + <<continue>> + <</if>> + <<= Seperator(_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> + <<= _divSentanceStart.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)>> + <<= Seperator(_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)>> + <<= Seperator(_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 @@.red;<<print cashFormat(_depExpandCost)>>@@. 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)>> + <<= Seperator(_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)>> + <<= Seperator(_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.divisions > 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.sellDevelopment('" + _div.id + "', " + _div.developmentCount + ")]" + + "]">> + </div> + <</if>> +<</for>> + + +<<if App.Corporate.canExpand>> /*is the corporation large enough to expand into another division?*/ +<h1>Found New Division</h1> +<dev>The corporation can expand by founding a new division related to its current <<= onlyPlural(App.Corporate.divisionList.filter(div=>div.founded).length, "division") >>.</dev> + <<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>> + <<= Seperator(_sepObj)>> + <<= "[[Increase Ratio|Manage Corporation][App.Corporate.dividendRatio = " + _dividends[_index - 1] + "]]">> + <</if>> + <<if _nextIndex != _dividends.length>> + <<= Seperator(_sepObj)>> + <<= "[[Reduce Ratio|Manage Corporation][App.Corporate.dividendRatio = " + _dividends[_nextIndex] + "]]">> + <<else>> + <<= Seperator(_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 $corpCash > corpSharePrice(-1000)>> + <<if $publicShares <= $personalShares - 2000 && $publicShares > 0>> /*It won't buy back player shares if the corporation is entirely owned by the player*/ + <<set _persExtraShares = $personalShares % 1000 || 1000>> + <br>The corporation can buyback some of your shares. + <<= "[[Buyback "+ _persExtraShares + "|Manage Corporation][cashX(corpSharePrice(-"+_persExtraShares+"), 'stocksTraded'), $corpCash -= corpSharePrice(-"+_persExtraShares+"), $personalShares -= "+_persExtraShares+"]]">> + <</if>> + <<if $publicShares >= 1000>> + <<set _pubExtraShares = $publicShares % 1000 || 1000>> + <br>The corporation can buyback some of the public shares. + <<= "[[Buyback "+ _pubExtraShares + "|Manage Corporation][$corpCash -= corpSharePrice(-"+_pubExtraShares+"), $publicShares -= "+_pubExtraShares+"]]">> + <</if>> +<</if>> + +<<set _persLeftoverShares = 1000 - ($personalShares % 1000)>> +<<if $cash > corpSharePrice(_persLeftoverShares)>> + <br>The corporation can issue <<=_persLeftoverShares>> shares to you. + <<= "[[Issue " + _persLeftoverShares + "|Manage Corporation][cashX(forceNeg(corpSharePrice("+_persLeftoverShares+")), 'stocksTraded'), $corpCash += corpSharePrice("+_persLeftoverShares+"), $personalShares += "+_persLeftoverShares+"]]">> +<</if>> +<<set _pubLeftoverShares = 1000 - ($publicShares % 1000)>> +<<if $publicShares <= $personalShares - 2000>> + <br>The corporation can issue <<=_pubLeftoverShares>> shares onto the stock market. + <<= "[[Issue " + _pubLeftoverShares + "|Manage Corporation][$corpCash += corpSharePrice("+_pubLeftoverShares+"), $publicShares += "+_pubLeftoverShares+"]]">> +<</if>> +<<if $publicShares <= $personalShares - 3000>> + <br>You can sell some of your shares on the stock market. [[Sell 1000|Manage Corporation][cashX(corpSharePrice(), "stocksTraded"), $personalShares -= 1000, $publicShares += 1000]] +<</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.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 $corpSpecTimer > 0>> + <br>//The corporation has restructured too recently.// +<</if>> +<ul> +<<for _stockType range _splitStockConstants>> + <<set _splitInitial = _stockType['cost']>> + <<set _splitValue = _splitInitial>> + <<set _splitDenom = _stockType['oldStocks'] || 1>> + <<set _splitNumerator = _stockType['newStocks'] || 1>> + <<set _splitMultiplier = _splitNumerator / _splitDenom>> + <<set _splitTotal = _splitValue * ($publicShares + $personalShares) + _splitFeeValue>> + <<set _splitWeek = _stockType['weeks']>> + <li><<= _splitNumerator >>-for-<<= _splitDenom>> <<if _splitDenom > _splitNumerator>>inverse<</if>> stock split at @@.red;<<= cashFormat(_splitValue) >>@@ per share. + Including market fees, this will cost the corporation a total of @@.red;<<= cashFormat(_splitTotal)>>@@, + leaving the going rate for stock at @@.yellowgreen;<<= cashFormat(Math.floor(corpSharePrice(0, $personalShares * _splitMultiplier, $publicShares * _splitMultiplier))) >>@@ per 1000 shares. + <<if $corpSpecTimer == 0>> + <<if $publicShares % _splitDenom != 0 || $personalShares % _splitDenom != 0>> + //The number of shares cannot be evenly split// + <<elseif $corpCash > _splitTotal>> + <<= "[[Split Shares|Manage Corporation][$corpCash -= " + _splitTotal + ", $publicShares *= " + _splitMultiplier + ", $personalShares *= " + _splitMultiplier + ", $corpSpecTimer="+_splitWeek+"]]" >> + <<else>> + //The corporation cannot afford the fees.// + <</if>> + <</if>> + </li> +<</for>> +</ul> + +<h2>Slave specialization</h2> +<<if $corpSpecToken > 0>> /*Spending tokens on new specializations*/ + <<if $corpSpecToken > 1>> + Your corporation has $corpSpecToken specializations left. + <<else>> + Your corporation has one specialization left. + <</if>> + <<if $corpSpecTimer > 0>> + You have recently changed specializations and the corporation needs <<if $corpSpecTimer > 1>>$corpSpecTimer 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 $corpSpecRaces.length == 0 && ($corpDivExtra > 0 || $corpDivLegal > 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][$corpSpecRaces = corpBlacklistRace("amerindian", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> + <<if $arcologies[0].FSSubjugationistRace != "asian" || $arcologies[0].FSSubjugationist == "unset">>[[Asian|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> + <<if $arcologies[0].FSSubjugationistRace != "black" || $arcologies[0].FSSubjugationist == "unset">>[[Black|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> + <<if $arcologies[0].FSSubjugationistRace != "indo-aryan" || $arcologies[0].FSSubjugationist == "unset">>[[Indo-aryan|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> + <<if $arcologies[0].FSSubjugationistRace != "latina" || $arcologies[0].FSSubjugationist == "unset">>[[Latina|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> + <<if $arcologies[0].FSSubjugationistRace != "malay" || $arcologies[0].FSSubjugationist == "unset">>[[Malay|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> + <<if $arcologies[0].FSSubjugationistRace != "middle eastern" || $arcologies[0].FSSubjugationist == "unset">>[[Middle Eastern|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> + <<if $arcologies[0].FSSubjugationistRace != "mixed race" || $arcologies[0].FSSubjugationist == "unset">>[[Mixed Race|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> + <<if $arcologies[0].FSSubjugationistRace != "pacific islander" || $arcologies[0].FSSubjugationist == "unset">>[[Pacific Islander|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> + <<if $arcologies[0].FSSubjugationistRace != "semitic" || $arcologies[0].FSSubjugationist == "unset">>[[Semitic|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> + <<if $arcologies[0].FSSubjugationistRace != "southern european" || $arcologies[0].FSSubjugationist == "unset">>[[Southern European|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> + <<if $arcologies[0].FSSubjugationistRace != "white" || $arcologies[0].FSSubjugationist == "unset">>[[White|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]]<</if>> + — //additional races can be excluded. 4 races per token.// + <<if $corpSpecToken >= 3>> + <br>Only slaves who are + <<if $arcologies[0].FSSupremacistRace != "amerindian" || $arcologies[0].FSSubjugationist == "unset">>[[Amerindian|Manage Corporation][$corpSpecRaces = corpBlacklistRace("amerindian", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> + <<if $arcologies[0].FSSupremacistRace != "asian" || $arcologies[0].FSSubjugationist == "unset">>[[Asian|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> + <<if $arcologies[0].FSSupremacistRace != "black" || $arcologies[0].FSSubjugationist == "unset">>[[Black|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> + <<if $arcologies[0].FSSupremacistRace != "indo-aryan" || $arcologies[0].FSSubjugationist == "unset">>[[Indo-aryan|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> + <<if $arcologies[0].FSSupremacistRace != "latina" || $arcologies[0].FSSubjugationist == "unset">>[[Latina|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> + <<if $arcologies[0].FSSupremacistRace != "malay" || $arcologies[0].FSSubjugationist == "unset">>[[Malay|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> + <<if $arcologies[0].FSSupremacistRace != "middle eastern" || $arcologies[0].FSSubjugationist == "unset">>[[Middle Eastern|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> + <<if $arcologies[0].FSSupremacistRace != "mixed race" || $arcologies[0].FSSubjugationist == "unset">>[[Mixed Race|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> + <<if $arcologies[0].FSSupremacistRace != "pacific islander" || $arcologies[0].FSSubjugationist == "unset">>[[Pacific Islander|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> + <<if $arcologies[0].FSSupremacistRace != "semitic" || $arcologies[0].FSSubjugationist == "unset">>[[Semitic|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> + <<if $arcologies[0].FSSupremacistRace != "southern european" || $arcologies[0].FSSubjugationist == "unset">>[[Southern European|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> + <<if $arcologies[0].FSSupremacistRace != "white" || $arcologies[0].FSSubjugationist == "unset">>[[White|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]]<</if>> + <<else>> + <br>Only slaves of a particular race requires 3 tokens. + <</if>> + <</if>> + <<if $seeDicks != 0 && ndef $corpSpecGender && ($corpDivExtra > 0 || $corpDivLegal > 0)>> /*This used to be $captureUpgradeGender, it is a general acquisition specialization*/ + <br>Train only slaves with [[Pussies|Manage Corporation][$corpSpecGender = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Dicks|Manage Corporation][$corpSpecGender = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <</if>> + <<if ndef $corpSpecHeight && ($corpDivExtra > 0 || $corpDivLegal > 0)>> /*This is a general acquisition specialization*/ + <br>Slaves that are [[Short|Manage Corporation][$corpSpecHeight = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Tall|Manage Corporation][$corpSpecHeight = 4, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// + <</if>> + <<if ndef $corpSpecVirgin && ($corpDivExtra > 0 || $corpDivLegal > 0)>> /*This is a general acquisition specialization*/ + <br>Slaves that are [[Virgins|Manage Corporation][$corpSpecVirgin = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <</if>> + <<if ndef $corpSpecIntelligence && $corpDivLegal > 0 >> /*This used to be $entrapmentUpgradeIntelligence, it is a legal enslavement specialization*/ + <br>Slaves who are [[Stupid|Manage Corporation][$corpSpecIntelligence = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Intelligent|Manage Corporation][$corpSpecIntelligence = 3, $corpSpecToken -= 1, $corpSpecTimer = 2]] --//Further specializations possible// + <</if>> + <<if ndef $corpSpecAge && $corpDivExtra > 0>> /*This used to be $captureUpgradeAge, it is the extralegal enslavement specialization*/ + <br>Slaves who are [[Younger|Manage Corporation][$corpSpecAge = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Older|Manage Corporation][$corpSpecAge = 3, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <</if>> + <<if ndef $corpSpecWeight && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $generalUpgradeWeight, it is a general improvement specialization*/ + <br>Managing slaves' diets to achieve [[Thin Slaves|Manage Corporation][$corpSpecWeight = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Fat nor Thin Slaves|Manage Corporation][$corpSpecWeight = 3, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Fat Slaves|Manage Corporation][$corpSpecWeight = 5, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// + <</if>> + <<if ndef $corpSpecDevotion && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $entrapmentUpgradeDevotionOne/Two, it is a general improvement specialization*/ + <br>Slaves who are [[Reluctant|Manage Corporation][$corpSpecDevotion = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Obedient|Manage Corporation][$corpSpecDevotion = 4, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// + <</if>> + <<if ndef $corpSpecAccent && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $trainingUpgradeAccent, it is a general improvement specialization*/ + <br>Slaves are taught to [[Speak the Language|Manage Corporation][$corpSpecAccent = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Speak without Accent|Manage Corporation][$corpSpecAccent = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <</if>> + <<if ndef $corpSpecHormones && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $drugUpgradeHormones, it is a general improvement specialization*/ + <br>Slaves are given hormones to [[Feminize|Manage Corporation][$corpSpecHormones = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Masculinize|Manage Corporation][$corpSpecHormones = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <</if>> + <<if ndef $corpSpecInjection && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $drugUpgradeInjectionOne, it is a general improvement specialization*/ + <br>Slave assets are made to be [[Petite|Manage Corporation][$corpSpecInjection = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Tasteful|Manage Corporation][$corpSpecInjection = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Huge|Manage Corporation][$corpSpecInjection = 3, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// + <</if>> + <<if ndef $corpSpecCosmetics && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $surgicalUpgradeCosmetics, it is a general improvement specialization*/ + <br>Straightforward cosmetic procedures are [[Applied|Manage Corporation][$corpSpecCosmetics = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Not Applied|Manage Corporation][$corpSpecCosmetics = 0, $corpSpecTimer = 2]] + <</if>> + <<if ndef $corpSpecEducation && $corpDivTrain > 0>> /*This used to be $trainingUpgradeEducation, it is the training specialization*/ + <br>Slaves are given [[No Education|Manage Corporation][$corpSpecEducation == 0, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Basic Education|Manage Corporation][$corpSpecEducation = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// + <</if>> + <<if ndef $corpSpecImplants && $corpDivSurgery > 0>> /*This used to be $surgicalUpgradeImplants, it is the surgery specialization*/ + <br>Slave implants are [[Applied|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Not Applied|Manage Corporation][$corpSpecImplants = 0, $corpSpecTimer = 2]] -- //Further specializations possible// + <</if>> + <<if ndef $corpSpecGenitalia && $corpDivSurgeryDev > 100>> /*This used to be $surgicalUpgradeGenitalia, it is the surgery specialization*/ + <br>Slaves get their genitalia reconfigured [[Add Pussy|Manage Corporation][$corpSpecPussy = 1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Remove Pussy|Manage Corporation][$corpSpecPussy = -1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Add Dick|Manage Corporation][$corpSpecDick = 1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Remove Dick|Manage Corporation][$corpSpecDick = -1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Add Balls|Manage Corporation][$corpSpecBalls = 1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Remove Balls|Manage Corporation][$corpSpecBalls = -1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// + <</if>> + <<if ndef $corpSpecTrust && $corpDivBreak > 0>> /*This used to be $generalUpgradeBreaking, it is the slave breaking specific specialization*/ + <br>Breaking slaves with [[Brutality|Manage Corporation][$corpSpecTrust = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Care|Manage Corporation][$corpSpecTrust = 4, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// + <</if>> + <<if ndef $corpSpecAmputee && $corpDivArcade > 0 && $corpDivSurgeryDev > 100>> /*This is the arcade specialization*/ + <br>Slave limbs are categorically [[Removed|Manage Corporation][$corpSpecAmputee = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <</if>> + <<if ndef $corpSpecMuscle && $corpDivMenial > 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][$corpSpecMuscle = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | <</if>>[[Soft|Manage Corporation][$corpSpecMuscle = 3, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Toned|Manage Corporation][$corpSpecMuscle = 4, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// + <</if>> + <<if ndef $corpSpecMilk && $corpDivDairy > 0>> /*This is the dairy specialization*/ + <br>Slaves are made to be lactating [[Naturally|Manage Corporation][$corpSpecMilk = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Through Implant|Manage Corporation][$corpSpecMilk = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <</if>> + <<if ndef $corpSpecSexEd && $corpDivWhore > 0>> /*This used to be $trainingUpgradeSexEd, it is the escort division specialization*/ + <br>Slaves are sexually [[Clueless|Manage Corporation][$corpSpecSexEd = 0, $corpSpecToken -= 0, $corpSpecTimer = 2]] | [[Competent|Manage Corporation][$corpSpecSexEd = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// + <</if>> + <</if>> +<<else>> + <br>Your corporation cannot pick a new specialization at this time. +<</if>> + +<<if $corpSpec > $corpSpecToken>> /*Modifying specializations*/ + <br><br>You have chosen the following specializations; + <br>//You can choose to specialize further with additional tokens, specialize less, end the specialization or sometimes tweak them for free.// + <<if $corpSpecRaces.length == 12>> + <<set $corpSpecRaces = []>> + <</if>> + <<if $corpSpecRaces.length > 0>> + <br>The corporation enslaves people of the following race(s); + <<if $corpSpecRaces.includes("amerindian")>> + <br>Amerindian + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "amerindian")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("amerindian",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("amerindian",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==Amerindian== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("amerindian",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("amerindian",0)]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecRaces.includes("asian")>> + <br>Asian + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "asian")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==Asian== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian",0)]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecRaces.includes("black")>> + <br>Black + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "black")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==Black== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black",0)]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecRaces.includes("indo-aryan")>> + <br>Indo-Aryan + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "indo-aryan")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==Indo-Aryan== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan",0)]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecRaces.includes("latina")>> + <br>Latina + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "latina")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==Latina== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina",0)]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecRaces.includes("malay")>> + <br>Malay + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "malay")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==Malay== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay",0)]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecRaces.includes("middle eastern")>> + <br>Middle Eastern + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "middle eastern")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==Middle Eastern== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern",0)]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecRaces.includes("mixed race")>> + <br>Mixed Race + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "mixed race")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==Mixed Race== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race",0)]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecRaces.includes("pacific islander")>> + <br>Pacific Islander + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "pacific islander")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==Pacific Islander== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander",0)]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecRaces.includes("semitic")>> + <br>Semitic + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "semitic")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==Semitic== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic",0)]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecRaces.includes("southern european")>> + <br>Southern European + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "southern european")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==Southern European== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european",0)]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecRaces.includes("white")>> + <br>White + <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace == "white")>> + <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> + <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] + <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> + [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white",1)]] + <</if>> + <</if>> + <</if>> + <<else>> + <br>==White== + <<if $corpSpecTimer == 0>> + <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white",0), $corpSpecToken += 1, $corpSpecTimer = 1]] + <<else>> + [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white",0)]] + <</if>> + <</if>> + <</if>> + <</if>> + <<if $corpSpecGender == 1>> + <br>The corporation trains slaves with pussies. + <<if $corpSpecTimer == 0>> + <<link "No Focus">><<unset $corpSpecGender>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecGender == 2>> + <br>The corporation trains slaves with dicks. + <<if $corpSpecTimer == 0>> + <<link "No Focus">><<unset $corpSpecGender>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecHeight == 1>> + <br>The corporation is targeting tiny slaves. + <<if $corpSpecTimer == 0>> + [[Short Slaves|Manage Corporation][$corpSpecHeight = 2, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecHeight>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecHeight == 2>> + <br>The corporation is targeting short slaves. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0 && ($corpDivExtraDev + $corpDivLegalDev) > 50>> + [[Tiny Slaves|Manage Corporation][$corpSpecHeight = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecHeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecHeight == 4>> + <br>The corporation is targeting tall slaves. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0 && ($corpDivExtraDev + $corpDivLegalDev) > 50>> + [[Giant Slaves|Manage Corporation][$corpSpecHeight = 5, $corpSpecToken -= 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecHeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecHeight == 5>> + <br>The corporation is targeting giant slaves. + <<if $corpSpecTimer == 0>> + [[Tall Slaves|Manage Corporation][$corpSpecHeight = 4, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecHeight>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecVirgin == 1>> + <br>The corporation is ensuring slaves remain virgins. + <<if $corpSpecTimer == 0>> + <<link "No Focus">><<unset $corpSpecVirgin>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecTrust == 1>> + <br>The corporation is breaking slaves with extreme brutality. + <<if $corpSpecTimer == 0>> + [[Apply Less Brutality|Manage Corporation][$corpSpecTrust = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecTrust>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> /*Don't think this deserves the added cost of a token, unlike the 'utmost care' one*/ + <<elseif $corpSpecTrust == 2>> + <br>The corporation is breaking slaves with brutality. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0 && $arcologies[0].FSDegradationist > 20 && $corpDivBreakDev > 50>> + [[Apply Extreme Brutality|Manage Corporation][$corpSpecTrust = 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecTrust>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecTrust == 4>> + <br>The corporation is breaking slaves with care. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0 && $arcologies[0].FSPaternalist > 20 && $corpDivBreakDev > 50>> + [[Use the Utmost Care|Manage Corporation][$corpSpecTrust = 5, $corpSpecToken += 1, $corpSpecTimer == 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecTrust>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecTrust == 5>> + <br>The corporation is breaking slaves with the utmost care. + <<if $corpSpecTimer == 0>> + [[Use Less Care|Manage Corporation][$corpSpecTrust = 4, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecTrust>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecWeight == 1>> + <br>The corporation makes slaves follow incredibly strict diets. + <<if $corpSpecTimer == 0>> + [[Apply Looser Diet|Manage Corporation][$corpSpecWeight = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecWeight == 2>> + <br>The corporation makes slaves diet. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0 && $arcologies[0].FSHedonisticDecadence == "unset">> + [[Apply Strict Diet|Manage Corporation][$corpSpecWeight = 1, $corpSpecTimer = 2]] | + <</if>> + [[Aim for Healthy Weight|Manage Corporation][$corpSpecWeight = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecWeight == 3>> + <br>The corporation is aiming for slaves with a healthy weight. + <<if $corpSpecTimer == 0>> + [[Apply Diet|Manage Corporation][$corpSpecWeight = 2, $corpSpecTimer = 2]] | [[Plump up Slaves|Manage Corporation][$corpSpecWeight = 5, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> /*Perhaps 'plump up' is not the right phrase*/ + <<elseif $corpSpecWeight == 5>> + <br>The corporation aims for plump slaves. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0 && $arcologies[0].FSPhysicalIdealist == "unset">> + [[Fatten Slaves|Manage Corporation][$corpSpecWeight = 6, $corpSpecTimer = 2]] | + <</if>> + [[Aim for Healthy Weight|Manage Corporation][$corpSpecWeight = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecWeight == 6>> + <br>The corporation aims for fat slaves. + <<if $corpSpecTimer == 0>> + [[Settle for Plump|Manage Corporation][$corpSpecWeight = 5, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecMuscle == 1>> + <br>The corporation aims to have frail slaves. + <<if $corpSpecTimer == 0>> + [[Aim for Weak|Manage Corporation][$corpSpecMuscle = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecMuscle>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecMuscle == 2>> /*Don't think this deserves the added cost of a token, unlike slaves getting ripped*/ + <br>The corporation aims to have weak slaves. + <<if $corpSpecTimer == 0>> + <<if $arcologies[0].FSPhysicalIdealist == "unset">> + [[Aim for Frail|Manage Corporation][$corpSpecMuscle = 1, $corpSpecTimer = 2]] | + <</if>> + [[Aim for Soft|Manage Corporation][$corpSpecMuscle = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecMuscle == 3>> + <br>The corporation is aiming for slaves with soft muscles. + <<if $corpSpecTimer == 0>> + <<if $arcologies[0].FSPhysicalIdealist == "unset">> + [[Aim for Weak|Manage Corporation][$corpSpecMuscle = 2, $corpSpecTimer = 2]] | + <</if>> + [[Aim for Toned|Manage Corporation][$corpSpecMuscle = 4, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecMuscle == 4>> + <br>The corporation aims for toned muscles. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0 && ($corpDivBreakDev + $corpDivSurgeryDev + $corpDivTrainDev > 100)>> + [[Aim for Ripped|Manage Corporation][$corpSpecMuscle = 5, $corpSpecToken -= 1, $corpSpecTimer = 2]] | + <</if>> + [[Aim for Soft|Manage Corporation][$corpSpecMuscle = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecMuscle == 5>> + <br>The corporation aims for ripped slaves. + <<if $corpSpecTimer == 0>> + [[Aim for Toned|Manage Corporation][$corpSpecMuscle = 4, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecDevotion == 1>> + <br>The corporation keeps slaves extremely defiant. + <<if $corpSpecTimer == 0>> + [[Less Defiant|Manage Corporation][$corpSpecDevotion = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecDevotion>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> /*Don't think this deserves the added cost of a token, unlike the 'devoted' one*/ + <<elseif $corpSpecDevotion == 2>> + <br>The corporation keeps slaves reluctant. + <<if $corpSpecTimer == 0>> + [[Make them Defiant|Manage Corporation][$corpSpecDevotion = 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecDevotion>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecDevotion == 4>> + <br>The corporation is fostering obedience. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0 && $corpDivTrainDev > 100>> + [[Foster Devotion|Manage Corporation][$corpSpecDevotion = 5, $corpSpecToken += 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecDevotion>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecDevotion == 5>> + <br>The corporation is fostering devotion. + <<if $corpSpecTimer == 0>> + [[Settle for Obedience|Manage Corporation][$corpSpecDevotion = 4, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecDevotion>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecIntelligence == 1>> + <br>The corporation keeps stupid slaves. + <<if $corpSpecTimer == 0>> + <<link "No Focus">><<unset $corpSpecIntelligence>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecIntelligence == 3>> + <br>The corporation keeps intelligent slaves. + <<if $corpSpecTimer == 0>> + <<link "No Focus">><<unset $corpSpecIntelligence>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecAge == 1>> + <br>The corporation focuses on young slaves. + <<if $corpSpecTimer == 0>> + <<link "No Focus">><<unset $corpSpecAge>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecAge == 3>> + <br>The corporation focuses on older slaves. + <<if $corpSpecTimer == 0>> + <<link "No Focus">><<unset $corpSpecAge>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecAccent == 1>> + <br>The corporation teaches slaves to speak the lingua franca. + <<if $corpSpecTimer == 0>> + [[Eliminate Accents|Manage Corporation][$corpSpecAccent = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecAccent>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecAccent == 2>> + <br>The corporation teaches slaves to speak the lingua franca without an accent. + <<if $corpSpecTimer == 0>> + [[Just Teach Language|Manage Corporation][$corpSpecAccent = 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecAccent>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecEducation == 0>> + <br>The corporation focuses on uneducated slaves. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0>> + [[Basic Education|Manage Corporation][$corpSpecEducation = 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecEducation>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecEducation == 1>> + <br>The corporation makes sure all slaves have a basic education. + <<if $corpSpecTimer == 0>> + <<if $corpDivTrainDev > 200 && $corpSpecToken > 0>> + [[Advanced Education|Manage Corporation][$corpSpecEducation = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | + <</if>> + [[No Education|Manage Corporation][$corpSpecEducation = 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecEducation>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecEducation == 2>> + <br>The corporation makes sure all slaves have an advanced education. + <<if $corpSpecTimer == 0>> + [[Basic Education|Manage Corporation][$corpSpecEducation = 1, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecEducation>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecCosmetics == 1>> + <br>The corporation applies straightforward cosmetic procedures. + <<if $corpSpecTimer == 0>> + <<link "No Focus">><<unset $corpSpecCosmetics>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecCosmetics == 0>> + <br>The corporation doesn't apply cosmetic procedures. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0>> + [[Applied|Manage Corporation][$corpSpecCosmetics = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecCosmetics>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecImplants == 1>> + <br>The corporation applies tasteful implants to all slaves. + <<if $corpSpecTimer == 0>> + <<if $corpDivSurgeryDev > 100 && $corpSpecToken > 0>> + [[Absurd Implants|Manage Corporation][$corpSpecImplants = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecImplants>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecImplants == 2>> + <br>The corporation applies absurd implants to all slaves. + <<if $corpSpecTimer == 0>> + [[Tasteful Implants|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecImplants>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecImplants == 0>> + <br>The corporation keeps their slaves entirely implant free. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0>> + [[Tasteful Implants|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecImplants>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if ndef $corpSpecPussy && ndef $corpSpecDick && ndef $corpSpecBalls && $corpSpecGenitalia == 1>> + <<set ndef $corpSpecGenitalia, + $corpSpecToken += 1>> + <</if>> + <<if $corpSpecGenitalia == 1>> + <<if $corpSpecPussy == 1>> + <br>The corporation adds a pussy to all slaves. + <<if $corpSpecTimer == 0>> + <<link "Stop">><<unset $corpSpecPussy>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecPussy == -1>> + <br>The corporation removes pussies from all slaves. + <<if $corpSpecTimer == 0>> + <<link "Stop">><<unset $corpSpecPussy>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<else>> + <br>The corporation has no plans for pussies. + <<if $corpSpecTimer == 0>> + [[Add Pussy|Manage Corporation][$corpSpecPussy = 1, $corpSpecTimer = 2]] | [[Remove Pussy|Manage Corporation][$corpSpecPussy = -1, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <</if>> + <</if>> + <<if $corpSpecDick == 1>> + <br>The corporation adds a dick to all slaves. + <<if $corpSpecTimer == 0>> + <<link "Stop">><<unset $corpSpecDick>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecDick == -1>> + <br>The corporation removes dicks from all slaves. + <<if $corpSpecTimer == 0>> + <<link "Stop">><<unset $corpSpecDick>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<else>> + <br>The corporation has no plans for dicks. + <<if $corpSpecTimer == 0>> + [[Add Dick|Manage Corporation][$corpSpecDick = 1, $corpSpecTimer = 2]] | [[Remove Dick|Manage Corporation][$corpSpecDick = -1, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <</if>> + <</if>> + <<if $corpSpecBalls == 1>> + <br>The corporation adds balls to all slaves (penis required). + <<if $corpSpecTimer == 0>> + <<link "Stop">><<unset $corpSpecBalls>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecBalls == -1>> + <br>The corporation removes balls from all slaves. + <<if $corpSpecTimer == 0>> + <<link "Stop">><<unset $corpSpecBalls>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<else>> + <br>The corporation has no plans for balls. + <<if $corpSpecTimer == 0>> + [[Add Balls|Manage Corporation][$corpSpecBalls = 1, $corpSpecTimer = 2]] | [[Remove Balls|Manage Corporation][$corpSpecBalls = -1, $corpSpecTimer = 2]] + <</if>> + <</if>> + <</if>> + <<if $corpSpecInjection == 1>> + <br>The corporation aims for petite assets. + <<if $corpSpecTimer == 0>> + [[Tasteful Size|Manage Corporation][$corpSpecInjection = 2, $corpSpecTimer = 2]] | [[Huge Size|Manage Corporation][$corpSpecInjection = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecInjection>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecInjection == 2>> + <br>The corporation aims for tasteful assets. + <<if $corpSpecTimer == 0>> + [[Small Size|Manage Corporation][$corpSpecInjection = 1, $corpSpecTimer = 2]] | [[Huge Size|Manage Corporation][$corpSpecInjection = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecInjection>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecInjection == 3>> + <br>The corporation aims for huge assets. + <<if $corpSpecTimer == 0>> + [[Small Size|Manage Corporation][$corpSpecInjection = 1, $corpSpecTimer = 2]] | [[Tasteful Size|Manage Corporation][$corpSpecInjection = 2, $corpSpecTimer = 2]] | + <<if $corpDivSurgeryDev > 100 && $corpSpecToken > 0>> + [[Supermassive Size|Manage Corporation][$corpSpecInjection = 4, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <</if>> + <<if $corpDivDairyDev > 200 && $corpSpecToken > 0>> | + [[Pastoral Size|Manage Corporation][$corpSpecInjection = 5, $corpSpecToken -= 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecInjection>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecInjection == 4>> + <br>The corporation aims for supermassive assets. + <<if $corpSpecTimer == 0>> + [[Huge Size|Manage Corporation][$corpSpecInjection = 3, $corpSpecToken += 1, $corpSpecTimer = 2]] | + <<if $corpDivDairyDev > 200>> + [[Pastoral Size|Manage Corporation][$corpSpecInjection = 5, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecInjection>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecInjection == 5>> + <br>The corporation aims for pastoral assets. + <<if $corpSpecTimer == 0>> + [[Huge Size|Manage Corporation][$corpSpecInjection = 3, $corpSpecToken += 1, $corpSpecTimer = 2]] | + <<if $corpDivSurgeryDev > 50>> + [[Supermassive Size|Manage Corporation][$corpSpecInjection = 4, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecInjection>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecHormones == 1>> + <br>The corporation feminizes slaves with hormones. + <<if $corpSpecTimer == 0>> + [[Masculinize|Manage Corporation][$corpSpecHormones = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecHormones>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecHormones == 2>> + <br>The corporation masculinize slaves with hormones. + <<if $corpSpecTimer == 0>> + [[Feminize|Manage Corporation][$corpSpecHormones = 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecHormones>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecAmputee == 1>> + <br>The corporation removes all limbs from its slaves. + <<if $corpSpecTimer == 0>> + <<link "Stop">><<unset $corpSpecAmputee>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecMilk == 1>> + <br>The corporation makes sure all slaves are naturally lactating. + <<if $corpSpecTimer == 0>> + [[Lactation Implant|Manage Corporation][$corpSpecMilk = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecMilk>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecMilk == 2>> + <br>The corporation equips all slaves with lactation implants. + <<if $corpSpecTimer == 0>> + [[Natural Lactation|Manage Corporation][$corpSpecMilk = 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecMilk>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> + <<if $corpSpecSexEd == 1>> + <br>The corporation familiarizes slaves with sexual service. + <<if $corpSpecTimer == 0>> + <<if $corpSpecToken > 0 && $corpDivWhoreDev > 200>> + [[Advanced Training|Manage Corporation][$corpSpecSexEd = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | + <</if>> + <<link "No Focus">><<unset $corpSpecSexEd>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecSexEd == 2>> + <br>The corporation teaches advanced sexual techniques to its slaves. + <<if $corpSpecTimer == 0>> + [[Basic Training|Manage Corporation][$corpSpecSexEd = 1, $corpSpecToken +=1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecSexEd>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <<elseif $corpSpecSexEd == 0>> + <br>The corporation teaches no sexual techniques to its slaves. + <<if $corpSpecTimer == 0>> + [[Basic Training|Manage Corporation][$corpSpecSexEd = 1, $corpSpecToken -=1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecSexEd>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> + <</if>> +<</if>> /*End of activated specializations*/ + +<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*/ diff --git a/src/SecExp/attackReport.tw b/src/SecExp/attackReport.tw index 0eee28a4b50..e4126197a18 100644 --- a/src/SecExp/attackReport.tw +++ b/src/SecExp/attackReport.tw @@ -74,63 +74,10 @@ <<set $PCvictories++>> <</if>> <</if>> -<<set _day = $day + random(0,7)>> -<<set _month = $month>> -<<set _year = $year>> -<<switch _month>> -<<case "January">> - <<if _day > 31>> - <<set _day -= 31, _month = "February">> - <</if>> -<<case "February">> - <<if _day > 28>> - <<set _day -= 28, _month = "March">> - <</if>> -<<case "March">> - <<if _day > 31>> - <<set _day -= 31, _month = "April">> - <</if>> -<<case "April">> - <<if _day > 30>> - <<set _day -= 30, _month = "May">> - <</if>> -<<case "May">> - <<if _day > 31>> - <<set _day -= 31, _month = "June">> - <</if>> -<<case "June">> - <<if _day > 30>> - <<set _day -= 30, _month = "July">> - <</if>> -<<case "July">> - <<if _day > 31>> - <<set _day -= 31, _month = "August">> - <</if>> -<<case "August">> - <<if _day > 31>> - <<set _day -= 31, _month = "September">> - <</if>> -<<case "September">> - <<if _day > 30>> - <<set _day -= 30, _month = "October">> - <</if>> -<<case "October">> - <<if _day > 31>> - <<set _day -= 31, _month = "November">> - <</if>> -<<case "November">> - <<if _day > 30>> - <<set _day -= 30, _month = "December">> - <</if>> -<<default>> - <<if _day > 31>> - <<set _day -= 31, _month = "January", _year += 1>> - <</if>> -<</switch>> <hr> <<if $attackType == "raiders">> - Today, the _day of _month _year, our arcology was attacked by a band of wild raiders, <<print num(Math.trunc($attackTroops))>> men strong. + 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.conflict.troopCount()))>> strong, clashed with them <<if $battleTerrain == "urban">> @@ -192,7 +139,7 @@ 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, the _day of _month _year, our arcology was attacked by a contingent of mercenaries hired by a competing free city, <<print num(Math.trunc($attackTroops))>> men strong. + 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.conflict.troopCount()))>> strong, clashed with them <<if $battleTerrain == "urban">> @@ -254,7 +201,7 @@ 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, the _day of _month _year, 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. + 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.conflict.troopCount()))>> strong, clashed with them <<if $battleTerrain == "urban">> @@ -316,7 +263,7 @@ 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, the _day of _month _year, our arcology was attacked by an old world nation boasting a misplaced sense of superiority, <<print num(Math.trunc($attackTroops))>> men strong. + 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.conflict.troopCount()))>> strong, clashed with them <<if $battleTerrain == "urban">> diff --git a/src/SecExp/rebellionReport.tw b/src/SecExp/rebellionReport.tw index 5a7a341608d..37820e31fd6 100644 --- a/src/SecExp/rebellionReport.tw +++ b/src/SecExp/rebellionReport.tw @@ -26,63 +26,10 @@ <strong>We surrendered</strong> <<set $PCrebLoss++>> <</if>> -<<set _day = $day + random(0,7)>> -<<set _month = $month>> -<<set _year = $year>> -<<switch _month>> -<<case "January">> - <<if _day > 31>> - <<set _day -= 31, _month = "February">> - <</if>> -<<case "February">> - <<if _day > 28>> - <<set _day -= 28, _month = "March">> - <</if>> -<<case "March">> - <<if _day > 31>> - <<set _day -= 31, _month = "April">> - <</if>> -<<case "April">> - <<if _day > 30>> - <<set _day -= 30, _month = "May">> - <</if>> -<<case "May">> - <<if _day > 31>> - <<set _day -= 31, _month = "June">> - <</if>> -<<case "June">> - <<if _day > 30>> - <<set _day -= 30, _month = "July">> - <</if>> -<<case "July">> - <<if _day > 31>> - <<set _day -= 31, _month = "August">> - <</if>> -<<case "August">> - <<if _day > 31>> - <<set _day -= 31, _month = "September">> - <</if>> -<<case "September">> - <<if _day > 30>> - <<set _day -= 30, _month = "October">> - <</if>> -<<case "October">> - <<if _day > 31>> - <<set _day -= 31, _month = "November">> - <</if>> -<<case "November">> - <<if _day > 30>> - <<set _day -= 30, _month = "December">> - <</if>> -<<default>> - <<if _day > 31>> - <<set _day -= 31, _month = "January", _year += 1>> - <</if>> -<</switch>> <hr> <<if $slaveRebellion == 1>> - Today, the _day of _month _year, 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.conflict.troopCount()))>> strong, fought with them street by street + 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.conflict.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>> @@ -214,7 +161,7 @@ <<set $rebelDefeatAftermath = 5>> <</if>> <<else>> - Today, the _day of _month _year, 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.conflict.troopCount())>> strong, fought with them street by street + 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.conflict.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>> diff --git a/src/gui/css/mainStyleSheet.css b/src/gui/css/mainStyleSheet.css index 36f4b1034ae..269a6c10660 100644 --- a/src/gui/css/mainStyleSheet.css +++ b/src/gui/css/mainStyleSheet.css @@ -304,3 +304,36 @@ white-space: normal; .scroll { overflow: auto; } + +h1, h2, h3 { + margin-bottom: 0; + margin-top: 0.25em; +} +.founding { + font-size: 0.8em; + margin-top: -0.8em; + margin-left: 0.5em; + font-style: italic; +} +table.corporate { + border: 3px darkgreen double; + border-collapse: collapse; + min-width: 33%; +} +table.corporate tbody tr:nth-child(even) { + background-color: rgb(0, 30, 0); +} +table.corporate tbody tr:nth-child(odd) { + background-color: rgb(15, 40, 15); +} +table.corporate td { + vertical-align: top; +} +.note { + font-size: 0.75em; + font-style: italic; +} +.majorText { + margin-top: 0.5em; + margin-bottom: 1.5em; +} diff --git a/src/init/setupVars.tw b/src/init/setupVars.tw index 4aecda3b836..5885b453b2e 100644 --- a/src/init/setupVars.tw +++ b/src/init/setupVars.tw @@ -2280,3 +2280,4 @@ Then pick _namePool.random(), or display those names as possible choices, or do }>> <<run App.Art.cacheArtData()>> +<<run App.Corporate.Init()>> diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index 6174767faa6..168cd5787b3 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -794,11 +794,9 @@ You should have received a copy of the GNU General Public License along with thi <<set $corpEcon = 0>> <<set $corpCashDividend = 0>> <<set $corpDiv = 0>> -<<set $corpExpand = 0>> <<set $corpExpandToken = 0>> <<set $corpSpec = 0>> <<set $corpSpecToken = 0>> -<<set $corpDivTrainSurgerySwitch = 0>> <<set $corpDivExtra = 0>> <<set $corpDivLegal = 0>> <<set $corpDivBreak = 0>> @@ -963,9 +961,6 @@ You should have received a copy of the GNU General Public License along with thi <<set $nIDNumber = 1>> /* tracks children in the nursery */ <<set $week = 1>> -<<set $month = "January">> -<<set $day = 19>> -<<set $year = 2037>> <<set $weddingPlanned = 0>> <<set $personalAttention = "sex">> diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 44b14fd8952..8d99ccc0fe0 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -1226,143 +1226,6 @@ window.slaveJobValues = function() { return slaveJobValues; }; -// Corporation Value - -window.corpValue = function() { - const V = State.variables; - if (V.corpIncorporated === 0) { - return 0; - } - let corpAssets = 0; - if (V.corpDivExtra > 0) { - corpAssets += V.corpDivExtraDev * 16000 + V.corpDivExtraSlaves * 10000; - } - if (V.corpDivLegal > 0) { - corpAssets += V.corpDivLegalDev * 20000 + V.corpDivLegalSlaves * 15000; - } - if (V.corpDivBreak > 0) { - corpAssets += V.corpDivBreakDev * 7200 + V.corpDivBreakSlaves * 10000 + V.corpDivBreakSlaves2 * 15000; - } - if (V.corpDivSurgery > 0) { - corpAssets += V.corpDivSurgeryDev * 16000 + V.corpDivSurgerySlaves * 15000 + V.corpDivSurgerySlaves2 * 23000; - } - if (V.corpDivTrain > 0) { - if (V.corpDivSurgery + V.corpDivTrain < 2 && V.corpDivTrainSurgerySwitch === 0) { - corpAssets += V.corpDivTrainDev * 20000 + V.corpDivTrainSlaves * 15000 + V.corpDivTrainSlaves2 * 26000; - } else if (V.corpDivTrainSurgerySwitch === 1 && V.corpDivTrainSurgeryTimer < 5) { - corpAssets += V.corpDivTrainDev * 20000 + V.corpDivTrainSlaves * (15000 + 1600 * V.corpDivTrainSurgeryTimer) + V.corpDivTrainSlaves2 * (26000 + 1600 * V.corpDivTrainSurgeryTimer); - } else { - corpAssets += V.corpDivTrainDev * 20000 + V.corpDivTrainSlaves * 23000 + V.corpDivTrainSlaves2 * 34000; - } - } - if (V.corpDivArcade > 0) { - corpAssets += V.corpDivArcadeDev * 4000 + V.corpDivArcadeSlaves * 10000; - } - if (V.corpDivMenial > 0) { - corpAssets += V.corpDivMenialDev * 5200 + V.corpDivMenialSlaves * 15000; - } - if (V.corpDivDairy > 0) { - corpAssets += V.corpDivDairyDev * 12000 + V.corpDivDairySlaves * 23000; - } - if (V.corpDivWhore > 0) { - if (V.corpDivSurgery + V.corpDivTrain < 2 && V.corpDivTrainSurgerySwitch === 0) { - corpAssets += V.corpDivWhoreDev * 16000 + V.corpDivWhoreSlaves * 26000; - } else if (V.corpDivTrainSurgerySwitch === 1 && V.corpDivTrainSurgeryTimer < 20) { - corpAssets += V.corpDivWhoreDev * 16000 + V.corpDivWhoreSlaves * (26000 + 400 * V.corpDivTrainSurgeryTimer); - } else { - corpAssets += V.corpDivWhoreDev * 16000 + V.corpDivWhoreSlaves * 34000; - } - } - return corpAssets + V.corpDividend + V.corpCash; -}; - -// Corporation Share Price -// A positive q means adding shares to the market, negative means removing them - -window.corpSharePrice = function(q = 0, personalShares = null, publicShares = null) { - const V = State.variables; - if (V.corpIncorporated === 0) { - return 0; - } - personalShares = personalShares || V.personalShares; - publicShares = publicShares || V.publicShares; - return Math.trunc(1000 * (corpValue() / (personalShares + publicShares + q))); -}; - -// Corporation Division Slave room -// The amount of additional slaves you can fit in a division -// Can we condense this? - -window.corpDivBreakSlavesRoom = function() { - const V = State.variables; - if (V.corpDivBreak === 1 && V.corpDivBreakDev > V.corpDivBreakSlaves) { - return V.corpDivBreakDev - V.corpDivBreakSlaves; - } - return 0; -}; - -window.corpDivSurgerySlavesRoom = function() { - const V = State.variables; - if (V.corpDivSurgery === 1 && V.corpDivSurgeryDev > V.corpDivSurgerySlaves) { - return V.corpDivSurgeryDev - V.corpDivSurgerySlaves; - } - return 0; -}; - -window.corpDivTrainSlavesRoom = function() { - const V = State.variables; - if (V.corpDivTrain === 1 && V.corpDivTrainDev > V.corpDivTrainSlaves) { - return V.corpDivTrainDev - V.corpDivTrainSlaves; - } - return 0; -}; - -window.corpDivArcadeSlavesRoom = function() { - const V = State.variables; - if (V.corpDivArcade === 1 && V.corpDivArcadeDev > V.corpDivArcadeSlaves) { - return V.corpDivArcadeDev - V.corpDivArcadeSlaves; - } - return 0; -}; - -window.corpDivMenialSlavesRoom = function() { - const V = State.variables; - if (V.corpDivMenial === 1 && V.corpDivMenialDev > V.corpDivMenialSlaves) { - return V.corpDivMenialDev - V.corpDivMenialSlaves; - } - return 0; -}; - -window.corpDivDairySlavesRoom = function() { - const V = State.variables; - if (V.corpDivDairy === 1 && V.corpDivDairyDev > V.corpDivDairySlaves) { - return V.corpDivDairyDev - V.corpDivDairySlaves; - } - return 0; -}; - -window.corpDivWhoreSlavesRoom = function() { - const V = State.variables; - if (V.corpDivWhore === 1 && V.corpDivWhoreDev > V.corpDivWhoreSlaves) { - return V.corpDivWhoreDev - V.corpDivWhoreSlaves; - } - return 0; -}; - -// Corporation race blacklisting/whitelisting -// race is the lowercase string representing the race, 'blacklist' is either 1 or 0. 1 means we are blacklisting and 0 means we are whitelisting said race -window.corpBlacklistRace = function(race, blacklist) { - let raceArray = State.variables.corpSpecRaces; - if (raceArray.length > 0 && blacklist === 1) { - raceArray.delete(race); - } else if (blacklist === 1) { - raceArray = setup.filterRacesLowercase.filter(x => x !== race); - } else { - raceArray.push(race); - } - return raceArray; -}; - window.getSlaveStatisticData = function(s, facility) { if (!facility) { // Base data, even without facility return { diff --git a/src/js/playerJS.js b/src/js/playerJS.js index b51da427443..805e908896e 100644 --- a/src/js/playerJS.js +++ b/src/js/playerJS.js @@ -599,14 +599,14 @@ window.PCTitle = function PCTitle() { } else if (V.slaves.length > 10) { titles.push("owner of slaves"); } - - if (V.corpValue > 500000) { + const corpValue = App.Corporate.value; + if (corpValue > 500000) { titles.push("Corporate Titan"); - } else if (V.corpValue > 250000) { + } else if (corpValue > 250000) { titles.push("corporate innovator"); - } else if (V.corpValue > 100000) { + } else if (corpValue > 100000) { titles.push("corporate founder"); - } else if (V.corpValue > 0) { + } else if (corpValue > 0) { if (V.PC.title === 1) { titles.push("noted corporate businessman"); } else { diff --git a/src/js/proxies.js b/src/js/proxies.js new file mode 100644 index 00000000000..194ea9f1954 --- /dev/null +++ b/src/js/proxies.js @@ -0,0 +1,34 @@ +window.StoryProxyWritable = new Proxy({}, { + get:function(o, prop) { + return State.variables[prop]; + }, + set:function(o, prop, value) { + State.variables[prop] = value; + return true; + }, + deleteProperty:function(o, prop) { + delete State.variables[prop]; + return true; + } + }); +window.StoryProxyReadOnly = new Proxy({}, { + get:function(o, prop) { + return State.variables[prop]; + }, + set:function(o, prop, value) { + return false; + }, + deleteProperty:function(o, prop) { + return false; + } + }); +window.V = window.StoryProxyWritable; +window.runWithReadonlyProxy = function(callback) +{ + window.V = window.StoryProxyReadOnly; + try { + callback(); + } finally { + window.V = window.StoryProxyWritable; + } +} diff --git a/src/js/utilJS.js b/src/js/utilJS.js index 45ced4a9734..0469e837699 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -1064,8 +1064,95 @@ window.num = function(x) { return `negative ${numberAsString}`; } } + }; +window.asPlural = function(single, plural) +{ + if(typeof single !== 'string') + { + let asObj = single; + single = asObj.single; + plural = asObj.plural; + } + if(plural == null) + { + plural = single + "s"; + } + return plural; +}; +window.asSingular = function(single) +{ + if(typeof single !== 'string') + { + let asObj = single; + single = asObj.single; + } + return single; +}; +//When 1, shows "a (slave)" +window.numberWithPlural = function (number, single, plural) +{ + if(number == 0) + { + return "no " + asPlural(single, plural); + } + else if(number == 1) + { + return addA(asSingular(single)); + } + else if(number > 0 && number < 1) + { + return "less than one " + asSingular(single); + } + else + { + return number + " " + asPlural(single, plural); + } +} +//when 1, shows "one (slave)" +window.numberWithPluralOne = function (number, single, plural) +{ + if(number == 0) + { + return "no " + asPlural(single, plural); + } + else if(number == 1) + { + return "one " + asSingular(single); + } + else if(number > 0 && number < 1) + { + return "less than one " + asSingular(single); + } + else + { + return number + " " + asPlural(single, plural); + } +} +//shows "less than one (slave)" instead of "no (slaves)" when number is 0. +window.numberWithPluralNonZero = function (number, single, plural) +{ + if(number == 0) number = 0.1; + return numberWithPlural(number, single, plural); +} +window.onlyPlural = function(number, single, plural) +{ + if(number > 0 && number <= 1) + { + return asSingular(single); + } + return asPlural(single, plural); +} +window.Seperator = function(seperatorObject) +{ + if(seperatorObject.need) + { + return seperatorObject.text; + } + seperatorObject.need = true; + return ""; +} /** * Returns numbers with comma, e.g. 10000 as "10,000", according to the player's settings * @param {number} s @@ -1128,7 +1215,20 @@ window.years = function(weeks) { return r; }; - +window.asDate = function(weeks, bonusDay = 0) +{ + if(weeks == null) + { + weeks = State.variables.week; + } + let d = new Date(2037, 0, 12); + d.setDate(d.getDate() + weeks * 7 + bonusDay); + return d; +} +window.asDateString = function(weeks, bonusDay = 0) +{ + return asDate(weeks, bonusDay).toLocaleString(undefined, {year:'numeric', month:'long', day:'numeric'}); +} /** * Returns whether x is undefined * @param {any} x @@ -1149,6 +1249,14 @@ window.jsDef = function(x) { window.cashFormat = function(s) { return `¤${commaNum(s)}`; }; +window.cashFormatColor = function(s, invert = false) { + //Display red if the value is negative, unless invert is true + if((s > 0) == invert) + { + return `@@.red;${cashFormat(s)}@@`; + } + return `@@.yellowgreen;${cashFormat(s)}@@`; +}; /** * @param {number} s @@ -1634,6 +1742,14 @@ window.ordinalSuffix = function ordinalSuffix(i) { } return `${i}th`; }; +window.ordinalSuffixWords = function(i) { + const text = ["zeroth", "first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth", "thirteenth", "fourteenth", "fifteenth", "sixteenth", "seventeenth", "eighteenth", "nineteenth"]; + if(i < text.length) + { + return text[i]; + } + return ordinalSuffix(i); +}; /** * @param {Iterable<any>} array @@ -2330,7 +2446,24 @@ App.Utils.escapeHtml = function(text) { }; return text.replace(/[&<>"']/g, m => map[m]); }; - +/** + * Maps an index from one list onto a matching index on the other. + * The first and last indexes will be matched to the first and last indexes of the other list, + * while indexes in between will go to the nearest index. + * @param {number} index The index in original list to map to new list. + * @param {*} originalList The original list the index refers into. + * @param {*} newList The new list which we want an index for + * @returns {number} The new index into newList +*/ +App.Utils.mapIndexBetweenLists = function(index, originalList, newList) +{ + if(index == 0) return 0; + if(index == originalList.length - 1) return newList.length - 1; + index--; + const originalLimitedLength = originalList.length - 2; + const newLimitedLength = newList.length - 2; + return Math.round((index / originalLimitedLength) * newLimitedLength) + 1; +} /** * Creates a HTML element with custom SugarCube attributes which works as a passage link * @@ -3143,3 +3276,14 @@ window.moreNational = function(nation) { } return country; }; + +//Creates an object where the items are accessible via their ids. +window.mapIdList = function(list) +{ + let mappedList = {}; + for(const item of list) + { + mappedList[item.id] = item; + } + return mappedList; +} diff --git a/src/pregmod/manageCorporation.tw b/src/pregmod/manageCorporation.tw deleted file mode 100644 index 70555ea1051..00000000000 --- a/src/pregmod/manageCorporation.tw +++ /dev/null @@ -1,2355 +0,0 @@ -:: Manage Corporation [nobr] - -<<set $nextButton = "Back", $nextLink = "Main", $showEncyclopedia = 1, $encyclopedia = "The Corporation">> - -<<if $corpIncorporated == 0>> -__Incorporation__ -<br> -<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> - -<<if $vanillaShareSplit == 1>> /*Picking a starting division*/ - <<if $cash > 150000>> - You can lay the groundwork for a slave corporation and choose to start out with; - <br>A focus on breaking slaves. <<print cashFormat(150000)>> [[Slave Breaking|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(150000), "stocksTraded"), $corpDiv = 1, $corpDivBreak = 1, $corpDivBreakDev = 10, $corpDivBreakSlaves = 10, $corpDivBreakSlaves2 = 0, $corpDivBreakToMarket = 1, $corpDivBreakFromMarket = 1, $corpCash = 35000, $personalShares = 2000, $publicShares = 1000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 100000, $corpAssetsSlave = 0, $corpAssetsDevOld = 90000, $corpAssetsDev = 0]] - <<if $cash > 200000>> - <br>A focus on extralegal enslavement. <<print cashFormat(200000)>> [[Extralegal Enslavement|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(200000), "stocksTraded"), $corpDiv = 1, $corpDivExtra = 1, $corpDivExtraDev = 10, $corpDivExtraSlaves = 0, $corpDivExtraToMarket = 1, $corpCash = 100000, $personalShares = 2000, $publicShares = 1000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsDevOld = 200000, $corpAssetsDev = 0, $corpAssetsSlave = 0, $corpAssetsSlaveOld = 0]] - <<if $cash > 210000>> - <br>A focus on operating sex arcades. <<print cashFormat(210000)>> [[Sex Arcades|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(210000), "stocksTraded"), $corpDiv = 1, $corpDivArcade = 1, $corpDivArcadeDev = 20, $corpDivArcadeSlaves = 20, $corpDivArcadeFromMarket = 1, $corpCash = 15000, $personalShares = 2000, $publicShares = 1000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 200000, $corpAssetsSlave = 0, $corpAssetsDevOld = 100000, $corpAssetsDev = 0]] - <<if $cash > 250000>> - <br>A focus on legal enslavement. <<print cashFormat(250000)>> [[Legal Enslavement|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(250000), "stocksTraded"), $corpDiv = 1, $corpDivLegal = 1, $corpDivLegalDev = 10, $corpDivLegalSlaves = 0, $corpDivLegalToMarket = 1, $corpCash = 125000, $personalShares = 2000, $publicShares = 1000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsDevOld = 250000, $corpAssetsDev = 0, $corpAssetsSlave = 0, $corpAssetsSlaveOld = 0]] - <<if $cash > 270000>> - <br>A focus on physical slave modifications. <<print cashFormat(270000)>> [[Slave Modifications|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(270000), "stocksTraded"), $corpDiv = 1, $corpDivSurgery = 1, $corpDivSurgeryDev = 10, $corpDivSurgerySlaves = 10, $corpDivSurgerySlaves2 = 0, $corpDivSurgeryToMarket = 1, $corpDivSurgeryFromMarket = 1, $corpCash = 55000, $personalShares = 2000, $publicShares = 1000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 150000, $corpAssetsSlave = 0, $corpAssetsDevOld = 200000, $corpAssetsDev = 0]] - <br>A focus on milking slaves. <<print cashFormat(270000)>> [[Dairy|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(270000), "stocksTraded"), $corpDiv = 1, $corpDivDairy = 1, $corpDivDairyDev = 10, $corpDivDairySlaves = 10, $corpDivDairyFromMarket = 1, $corpCash = 25000, $personalShares = 2000, $publicShares = 1000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 230000, $corpAssetsSlave = 0, $corpAssetsDevOld = 150000, $corpAssetsDev = 0]] - <<if $cash > 300000>> - <br>A focus on training slaves. <<print cashFormat(300000)>> [[Slave Training|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(300000), "stocksTraded"), $corpDiv = 1, $corpDivTrain = 1, $corpDivTrainDev = 10, $corpDivTrainSlaves = 10, $corpDivTrainSlaves2 = 0, $corpDivTrainToMarket = 1, $corpDivTrainFromMarket = 1, $corpCash = 50000, $personalShares = 2000, $publicShares = 1000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 150000, $corpAssetsSlave = 0, $corpAssetsDevOld = 250000, $corpAssetsDev = 0]] - <br>A focus on offering menial services. <<print cashFormat(300000)>> [[Menial Services|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(300000), "stocksTraded"), $corpDiv = 1, $corpDivMenial = 1, $corpDivMenialDev = 20, $corpDivMenialSlaves = 20, $corpDivMenialFromMarket = 1, $corpCash = 20000, $personalShares = 2000, $publicShares = 1000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 300000, $corpAssetsSlave = 0, $corpAssetsDevOld = 130000, $corpAssetsDev = 0]] - <<if $cash > 340000>> - <br>A focus on whoring out slaves. <<print cashFormat(340000)>> [[Escort Service|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(340000), "stocksTraded"), $corpDiv = 1, $corpDivWhore = 1, $corpDivWhoreDev = 10, $corpDivWhoreSlaves = 10, $corpDivWhoreFromMarket = 1, $corpCash = 50000, $personalShares = 2000, $publicShares = 1000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 260000, $corpAssetsSlave = 0, $corpAssetsDevOld = 200000, $corpAssetsDev = 0]] - <<else>> - You lack the funds for the final option. You need @@.yellowgreen;<<print cashFormat(340000)>>@@ for it. - <</if>> - <<else>> - You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(300000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ - <</if>> - <<else>> - You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(270000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ - <</if>> - <<else>> - You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(250000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ - <</if>> - <<else>> - You lack the funds for many options. You need at least @@.yellowgreen;<<print cashFormat(210000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ - <</if>> - <<else>> - You lack the funds for most options. You need at least @@.yellowgreen;<<print cashFormat(200000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ - <</if>> - <<else>> - You lack the funds to found a slave corporation. You need at least @@.yellowgreen;<<print cashFormat(150000)>>@@ and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ - <</if>> - <br>[[8-7 Share Split|Manage Corporation][$vanillaShareSplit = 0]] -<<else>> /*8/7 split on the shares instead of 2/1*/ - <<if $cash > 120000>> - You can lay the groundwork for a slave corporation and choose to start out with; - <br>A focus on breaking slaves. <<print cashFormat(120000)>> [[Slave Breaking|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(120000), "stocksTraded"), $corpDiv = 1, $corpDivBreak = 1, $corpDivBreakDev = 10, $corpDivBreakSlaves = 10, $corpDivBreakSlaves2 = 0, $corpDivBreakToMarket = 1, $corpDivBreakFromMarket = 1, $corpCash = 35000, $personalShares = 8000, $publicShares = 7000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 100000, $corpAssetsSlave = 0, $corpAssetsDevOld = 90000, $corpAssetsDev = 0]] - <<if $cash > 160000>> - <br>A focus on extralegal enslavement. <<print cashFormat(160000)>> [[Extralegal Enslavement|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(160000), "stocksTraded"), $corpDiv = 1, $corpDivExtra = 1, $corpDivExtraDev = 10, $corpDivExtraSlaves = 0, $corpDivExtraToMarket = 1, $corpCash = 100000, $personalShares = 8000, $publicShares = 7000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsDevOld = 200000, $corpAssetsDev = 0]] - <<if $cash > 168000>> - <br>A focus on operating sex arcades. <<print cashFormat(168000)>> [[Sex Arcades|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(168000), "stocksTraded"), $corpDiv = 1, $corpDivArcade = 1, $corpDivArcadeDev = 20, $corpDivArcadeSlaves = 20, $corpDivArcadeFromMarket = 1, $corpCash = 15000, $personalShares = 8000, $publicShares = 7000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 200000, $corpAssetsSlave = 0, $corpAssetsDevOld = 100000, $corpAssetsDev = 0]] - <<if $cash > 200000>> - <br>A focus on legal enslavement. <<print cashFormat(200000)>> [[Legal Enslavement|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(200000), "stocksTraded"), $corpDiv = 1, $corpDivLegal = 1, $corpDivLegalDev = 10, $corpDivLegalSlaves = 0, $corpDivLegalToMarket = 1, $corpCash = 125000, $personalShares = 8000, $publicShares = 7000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsDevOld = 250000, $corpAssetsDev = 0]] - <<if $cash > 216000>> - <br>A focus on physical slave modifications. <<print cashFormat(216000)>> [[Slave Modifications|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(216000), "stocksTraded"), $corpDiv = 1, $corpDivSurgery = 1, $corpDivSurgeryDev = 10, $corpDivSurgerySlaves = 10, $corpDivSurgerySlaves2 = 0, $corpDivSurgeryToMarket = 1, $corpDivSurgeryFromMarket = 1, $corpCash = 60000, $personalShares = 8000, $publicShares = 7000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 150000, $corpAssetsSlave = 0, $corpAssetsDevOld = 200000, $corpAssetsDev = 0]] - <br>A focus on milking slaves. <<print cashFormat(216000)>> [[Dairy|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(216000), "stocksTraded"), $corpDiv = 1, $corpDivDairy = 1, $corpDivDairyDev = 10, $corpDivDairySlaves = 10, $corpDivSurgeryFromMarket = 1, $corpCash = 25000, $personalShares = 8000, $publicShares = 7000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 230000, $corpAssetsSlave = 0, $corpAssetsDevOld = 150000, $corpAssetsDev = 0]] - <<if $cash > 240000>> - <br>A focus on training slaves. <<print cashFormat(240000)>> [[Slave Training|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(240000), "stocksTraded"), $corpDiv = 1, $corpDivTrain = 1, $corpDivTrainDev = 10, $corpDivTrainSlaves = 10, $corpDivTrainSlaves2 = 0, $corpDivTrainToMarket = 1, $corpDivTrainFromMarket = 1, $corpCash = 50000, $personalShares = 8000, $publicShares = 7000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 150000, $corpAssetsSlave = 0, $corpAssetsDevOld = 250000, $corpAssetsDev = 0]] - <br>A focus on offering menial services. <<print cashFormat(240000)>> [[Menial Services|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(240000), "stocksTraded"), $corpDiv = 1, $corpDivMenial = 1, $corpDivMenialDev = 20, $corpDivMenialSlaves = 20, $corpDivMenialFromMarket = 1, $corpCash = 20000, $personalShares = 8000, $publicShares = 7000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 300000, $corpAssetsSlave = 0, $corpAssetsDevOld = 130000, $corpAssetsDev = 0]] - <<if $cash > 272000>> - <br>A focus on whoring out slaves. <<print cashFormat(272000)>> [[Escort Service|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(272000), "stocksTraded"), $corpDiv = 1, $corpDivWhore = 1, $corpDivWhoreDev = 10, $corpDivWhoreSlaves = 10, $corpDivWhoreFromMarket = 1, $corpCash = 50000, $personalShares = 8000, $publicShares = 7000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 260000, $corpAssetsSlave = 0, $corpAssetsDevOld = 200000, $corpAssetsDev = 0]] - <<else>> - You lack the funds for the final option. You need @@.yellowgreen;<<print cashFormat(272000)>>@@ for it. - <</if>> - <<else>> - You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(240000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ - <</if>> - <<else>> - You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(216000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ - <</if>> - <<else>> - You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(200000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ - <</if>> - <<else>> - You lack the funds for many options. You need at least @@.yellowgreen;<<print cashFormat(168000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ - <</if>> - <<else>> - You lack the funds for most options. You need at least @@.yellowgreen;<<print cashFormat(160000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ - <</if>> - <<else>> - You lack the funds to found a slave corporation. You need at least @@.yellowgreen;<<print cashFormat(120000)>>@@ and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ - <</if>> -<br>[[2-1 Share Split|Manage Corporation][$vanillaShareSplit = 1]] -<</if>> - -<<else>> /*When the corporation exists*/ - -<<set _corpDivBreakSlavesRoom = corpDivBreakSlavesRoom(), -_corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom(), -_corpDivTrainSlavesRoom = corpDivTrainSlavesRoom(), -_corpDivArcadeSlavesRoom = corpDivArcadeSlavesRoom(), -_corpDivMenialSlavesRoom = corpDivMenialSlavesRoom(), -_corpDivDairySlavesRoom = corpDivDairySlavesRoom(), -_corpDivWhoreSlavesRoom = corpDivWhoreSlavesRoom()>> - -__Corporation Overview__ -<br>Last Week's Revenue: @@.yellowgreen;<<print cashFormat($corpRevOld)>>@@ /*Returns last week's revenue, gets calculated in corporationDevelopments, but slaves sold here also added to it for next week*/ -<<if ($cheatMode) && ($cheatModeM) && $corpNeighborBonus > 0>> - <br>Including Last Week's Neighbor Bonus: @@.yellowgreen;<<print cashFormat($corpNeighborBonus)>>@@ -<</if>> -<br>Last Week's Operating Expenses: @@.red;<<print cashFormat($corpOpCostOld)>>@@ /*Just like revenue, except for operating expenses (all calculated in corporationDevelopments)*/ -<br>Last Week's Slave Expenses: <<if $corpAssetsSlaveOld > 0>>@@.red;<<print cashFormat($corpAssetsSlaveOld)>>@@<<else>>@@.yellowgreen;<<print cashFormat($corpAssetsSlaveOld)>>@@<</if>> /*buying slaves to work on adds to this expense, works just like revenue*/ -<br>Last Week's Asset Expenses: <<if $corpAssetsDevOld > 0>>@@.red;<<print cashFormat($corpAssetsDevOld)>>@@<<else>>@@.yellowgreen;<<print cashFormat($corpAssetsDevOld)>>@@<</if>> /*costs associated with expanding divisions end up here, reports costs from last week, not current*/ -<<if $corpOverheadOld > 0>><br>Last Week's Overhead: @@.red;<<print cashFormat($corpOverheadOld)>>@@<</if>> -<<if ($cheatMode) && ($cheatModeM)>> - <<if $corpEcon < 0>> - <br>Last Week's Economic Expenses: @@.red;<<print cashFormat(-$corpEcon)>>@@ - <<else>> - <br>Last Week's Economic Windfall: @@.yellowgreen;<<print cashFormat($corpEcon)>>@@ - <</if>> -<</if>> -<br>Last Week's Profit: <<if $corpProfitOld > 0>>@@.yellowgreen;<<print cashFormat($corpProfitOld)>>@@<<else>>@@.red;<<print cashFormat($corpProfitOld)>>@@<</if>> -<br> -<br>Available Liquidity: -<<if ($cheatMode) && ($cheatModeM)>> - <span id="corpCash"> - @@.yellowgreen;<<print $corpCash>>@@ - </span> - <<set _TcorpCash = $corpCash>> - <<textbox "_TcorpCash" _TcorpCash>> - <<link "Apply">> - <<set $corpCash = Math.trunc(Number(_TcorpCash)) || $corpCash, $cheater = 1>> - <<replace "#corpCash">> - @@.yellowgreen;<<print $corpCash>>@@ - <</replace>> - <</link>> -<<elseif $corpCash > 0>> - @@.yelllowgreen;<<print cashFormat($corpCash)>>@@ -<<else>> - @@.red;<<print cashFormat($corpCash)>>@@ -<</if>> -<br>Total Corporate Value: @@.yellowgreen;<<print cashFormat(corpValue())>>@@ -<br>Accumulated Dividend for Payout: @@.yellowgreen;<<print cashFormat($corpDividend)>>@@ -<br>Weeks until Dividend Payout: -<<if $dividendTimer == 1>> - End of this week -<<else>> - $dividendTimer -<</if>> - -<br><br> - -__Division Management__ -<<if $corpDivExtra == 0>> - <<if $corpExpandToken > 0>> /*is the corporation large enough to expand into another division?*/ - <<if $corpDivBreak > 0 || $corpDivArcade > 0>> /*Is there a link from another division to this one?*/ - <<if $corpCash > 200000>> - <br>The corporation can expand by starting an extralegal enslavement division at a cost of @@.yelllowgreen;<<print cashFormat(200000)>>.@@ [[Add Division|Manage Corporation][$corpDivExtra = 1, $corpCash -= 200000, $corpDivExtraSlaves = 0, $corpDivExtraDev = 10, $corpDiv += 1, $corpExpandToken -= 1, $corpAssetsDev += 200000]]<br> - <<else>> - <br>The corporation does not have the funds to add an extralegal enslavement division; @@.yellowgreen;<<print cashFormat(200000)>>@@ required.<br> - <</if>> - <</if>> - <</if>> -<<else>> - <<set _corpDivExtraCost = 7500 * $corpDivExtraDev + 5 * Math.pow($corpDivExtraDev, 2), - _corpDivExtraCostPU = Math.trunc(_corpDivExtraCost / $corpDivExtraDev), - _corpDivExtraRev = menialSlaveCost() * 10>> /*bit of statistics setup to help make informed decisions*/ - <br>The corporation has an extralegal enslavement division. - <br>It averages @@.green;$corpDivExtraDev new slaves@@ each week. - <br>It costs @@.red;<<print cashFormat(_corpDivExtraCost)>>@@ to run. On average that is @@.red;<<print cashFormat(_corpDivExtraCostPU)>>@@ per slave. - <br>The slaves acquired can be sold for @@.yellowgreen;<<print cashFormat(_corpDivExtraRev)>>@@ each. - <<if $corpDivExtraSlaves > 0>> - <br>Currently the division is holding - <<if $corpDivExtraSlaves > 1>> - @@.green;$corpDivExtraSlaves slaves.@@ - <<else>> - @@.green;one slave.@@ - <</if>> - <<if _corpDivArcadeSlavesRoom > 0>> /*sending slaves to linked divisions if possible*/ - <br>You can send up to <<print _corpDivArcadeSlavesRoom>> to the arcade division. [[Send 1|Manage Corporation][$corpDivArcadeSlaves += 1, $corpDivExtraSlaves -= 1]] - <<if $corpDivExtraSlaves >= 10 && _corpDivArcadeSlavesRoom >= 10>> - | [[Send 10|Manage Corporation][$corpDivArcadeSlaves += 10, $corpDivExtraSlaves -= 10]] - <</if>> - <<if $corpDivExtraSlaves >= _corpDivArcadeSlavesRoom>> - | [[Fill|Manage Corporation][$corpDivArcadeSlaves += _corpDivArcadeSlavesRoom, $corpDivExtraSlaves -= _corpDivArcadeSlavesRoom]] - <</if>> - <</if>> - <<if _corpDivBreakSlavesRoom > 0>> - <br>You can send up to <<print _corpDivBreakSlavesRoom>> to the arcade division. [[Send 1|Manage Corporation][$corpDivBreakSlaves += 1, $corpDivExtraSlaves -= 1]] - <<if $corpDivExtraSlaves >= 10 && _corpDivBreakSlavesRoom >= 10>> - | [[Send 10|Manage Corporation][$corpDivBreakSlaves += 10, $corpDivExtraSlaves -= 10]] - <</if>> - <<if $corpDivExtraSlaves >= _corpDivBreakSlavesRoom>> - | [[Fill|Manage Corporation][$corpDivBreakSlaves += _corpDivBreakSlavesRoom, $corpDivExtraSlaves -= _corpDivBreakSlavesRoom]] - <</if>> - <</if>> /*selling slaves that are done is always an option*/ - <br>You can sell these slaves on the market. [[Sell 1|Manage Corporation][$corpCash += 10 * menialSlaveCost(), $corpDivExtraSlaves -= 1, $menialDemandFactor -= 1, $corpRev += 10 * menialSlaveCost()]] - <<if $corpDivExtraSlaves >= 10>> - | [[Sell 10|Manage Corporation][$corpCash += 100 * menialSlaveCost(-10), $corpDivExtraSlaves -= 10, $menialDemandFactor -= 10, $corpRev += 100 * menialSlaveCost(-10)]] - <</if>> - <<if $corpDivExtraSlaves >= 100>> - | [[Sell 100|Manage Corporation][$corpCash += 1000 * menialSlaveCost(-100), $corpDivExtraSlaves -= 100, $menialDemandFactor -= 100, $corpRev += 1000 * menialSlaveCost(-100)]] - <</if>> - | [[Sell all|Manage Corporation][$corpCash += $corpDivExtraSlaves * 10 * menialSlaveCost(-$corpDivExtraSlaves), $corpDivExtraSlaves = 0, $menialDemandFactor -= $corpDivExtraSlaves, $corpRev += $corpDivExtraSlaves * 10 * menialSlaveCost(-$corpDivExtraSlaves)]] - <</if>> - <br>Expanding the division costs @@.red;<<print cashFormat(20000)>>.@@ Downsizing recoups 80% of the investment. /*changing the division's size*/ - <br><<if $corpCash > 20000>> - [[Expand Division|Manage Corporation][$corpDivExtraDev += 1, $corpCash -= 20000, $corpAssetsDev += 20000]] - <</if>> - <<if $corpCash > 200000>> - | [[Expand x10|Manage Corporation][$corpDivExtraDev += 10, $corpCash -= 200000, $corpAssetsDev += 200000]] - <</if>> - <<if $corpDivExtraDev > 10>> - <<if $corpCash > 20000>> - | - <</if>> - [[Downsize Division|Manage Corporation][$corpDivExtraDev -= 1, $corpCash += 16000, $corpAssetsDev -= 16000]] - <</if>> - <<if $corpDivExtraDev > 20>> - | [[Downsize x10|Manage Corporation][$corpDivExtraDev -= 10, $corpCash += 160000, $corpAssetsDev -= 160000]] - <</if>> - <br>Rules: - <<if $corpDivArcade > 0>> /*setting auto move rules for the division*/ - <<if ndef $corpDivExtraToArcade>> - Do not auto send slaves to the arcade [[Auto Send|Manage Corporation][$corpDivExtraToArcade = 1]] - <<else>> - Auto send slaves to the arcade <<link "Stop Auto Send">><<unset $corpDivExtraToArcade>><<goto "Manage Corporation">><</link>> - <</if>> | - <</if>> - <<if $corpDivBreak > 0>> - <<if ndef $corpDivExtraToBreak>> - Do not auto send slaves to slave breaking [[Auto Send|Manage Corporation][$corpDivExtraToBreak = 1]] - <<else>> - Auto send slaves to slave breaking <<link "Stop Auto Send">><<unset $corpDivExtraToBreak>><<goto "Manage Corporation">><</link>> - <</if>> | - <</if>> - <<if ndef $corpDivExtraToMarket>> - Do not auto sell slaves to the market [[Auto Sell|Manage Corporation][$corpDivExtraToMarket = 1]] - <<else>> - Auto sell slaves to the market <<link "Stop Auto Sell">><<unset $corpDivExtraToMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if $corpDiv > 1>> /*killing the division*/ - <br>Dissolve the division. @@.orange;//Think before you click//@@ - <<link "Dissolve">> - <<set $corpCash += $corpDivExtraSlaves * 10 * menialSlaveCost(-$corpDivExtraSlaves) + $corpDivExtraDev * 16000, - $corpRev += $corpDivExtraSlaves * 10 * menialSlaveCost(-$corpDivExtraSlaves), - $corpAssetsDev -= $corpDivExtraDev * 16000, - $corpExpandToken += 1, - $menialDemandFactor -= $corpDivExtraSlaves, - $corpDivExtra = 0, - $corpDivExtraDev = 0>> - <<unset $corpDivExtraSlaves>> - <<goto "Manage Corporation">> - <</link>> - <</if>> - <br> -<</if>> - -<<if $corpDivLegal == 0>> - <<if $corpExpandToken > 0>> - <<if $corpDivTrain > 0 || $corpDivMenial > 0 || $corpDivSurgery > 0>> - <<if $corpCash > 250000>> - <br>The corporation can expand by starting a legal enslavement division at a cost of @@.yelllowgreen;<<print cashFormat(250000)>>.@@ [[Add Division|Manage Corporation][$corpDivLegal = 1, $corpCash -= 250000, $corpDivLegalSlaves = 0, $corpDivLegalDev = 10, $corpDiv += 1, $corpExpandToken -= 1, $corpAssetsDev += 250000]]<br> - <<else>> - <br>The corporation does not have the funds to add an extralegal enslavement division; @@.yellowgreen;<<print cashFormat(250000)>>@@ required.<br> - <</if>> - <</if>> - <</if>> -<<else>> - <<set _corpDivLegalCost = 12000 * $corpDivLegalDev + 6 * Math.pow($corpDivLegalDev, 2), - _corpDivLegalCostPU = Math.trunc(_corpDivLegalCost / $corpDivLegalDev), - _corpDivLegalRev = menialSlaveCost() * 15>> - <br>The corporation has a legal enslavement division. - <br>It averages @@.green;$corpDivLegalDev new slaves@@ each week. - <br>It costs @@.red;<<print cashFormat(_corpDivLegalCost)>>@@ to run. On average that is @@.red;<<print cashFormat(_corpDivLegalCostPU)>>@@ per slave. - <br>The slaves acquired can be sold for @@.yellowgreen;<<print cashFormat(_corpDivLegalRev)>>@@ each. - <<if $corpDivLegalSlaves > 0>> - <br>Currently the division is holding @@.green;<<if $corpDivLegalSlaves > 1>>$corpDivLegalSlaves slaves<<else>>one slave<</if>>.@@ - <<if _corpDivMenialSlavesRoom > 0>> - <br>You can send up to <<print _corpDivMenialSlavesRoom>> to the menial slave division. [[Send 1|Manage Corporation][$corpDivMenialSlaves += 1, $corpDivLegalSlaves -= 1]] - <<if $corpDivLegalSlaves >= 10 && _corpDivMenialSlavesRoom >= 10>> - | [[Send 10|Manage Corporation][$corpDivMenialSlaves += 10, $corpDivLegalSlaves -= 10]] - <</if>> - <<if $corpDivLegalSlaves >= _corpDivMenialSlavesRoom>> - | [[Fill|Manage Corporation][$corpDivMenialSlaves += _corpDivMenialSlavesRoom, $corpDivLegalSlaves -= _corpDivMenialSlavesRoom]] - <</if>> - <</if>> - <<if $corpDivSurgery == 1>> - <<if _corpDivSurgerySlavesRoom > 0>> - <br>You can send up to <<print _corpDivSurgerySlavesRoom>> to the surgery division. [[Send 1|Manage Corporation][$corpDivSurgerySlaves += 1, $corpDivLegalSlaves -= 1]] - <<if $corpDivLegalSlaves >= 10 && _corpDivSurgerySlavesRoom >= 10>> - | [[Send 10|Manage Corporation][$corpDivSurgerySlaves += 10, $corpDivLegalSlaves -= 10]] - <</if>> - <<if $corpDivLegalSlaves >= _corpDivSurgerySlavesRoom>> - | [[Fill|Manage Corporation][$corpDivSurgerySlaves += _corpDivSurgerySlavesRoom, $corpDivLegalSlaves -= _corpDivSurgerySlavesRoom]] - <</if>> - <</if>> - <<else>> - <<if _corpDivTrainSlavesRoom > 0>> - <br>You can send up to <<print _corpDivTrainSlavesRoom>> to the slave training division. [[Send 1|Manage Corporation][$corpDivTrainSlaves += 1, $corpDivLegalSlaves -= 1]] <<if $corpDivLegalSlaves >= 10 && _corpDivTrainSlavesRoom >= 10>> - | [[Send 10|Manage Corporation][$corpDivTrainSlaves += 10, $corpDivLegalSlaves -= 10]] - <</if>> - <<if $corpDivLegalSlaves >= _corpDivTrainSlavesRoom>> - | [[Fill|Manage Corporation][$corpDivTrainSlaves += _corpDivTrainSlavesRoom, $corpDivLegalSlaves -= _corpDivTrainSlavesRoom]] - <</if>> - <</if>> - <</if>> - <br>You can sell these slaves on the market. [[Sell 1|Manage Corporation][$corpCash += 15 * menialSlaveCost(), $corpDivLegalSlaves -= 1, $menialDemandFactor -= 1, $corpRev += 15 * menialSlaveCost()]] - <<if $corpDivLegalSlaves >= 10>> - | [[Sell 10|Manage Corporation][$corpCash += 150 * menialSlaveCost(-10), $corpDivLegalSlaves -= 10, $menialDemandFactor -= 10, $corpRev += 150 * menialSlaveCost(-10)]] - <</if>> - <<if $corpDivLegalSlaves >= 100>> - | [[Sell 100|Manage Corporation][$corpCash += 1500 * menialSlaveCost(-100), $corpDivLegalSlaves -= 100, $menialDemandFactor -= 100, $corpRev += 1500 * menialSlaveCost(-100)]] - <</if>> - | [[Sell all|Manage Corporation][$corpCash += $corpDivLegalSlaves * 15 * menialSlaveCost(-$corpDivLegalSlaves), $corpDivLegalSlaves = 0, $menialDemandFactor -= $corpDivLegalSlaves, $corpRev += $corpDivLegalSlaves * 15 * menialSlaveCost(-$corpDivLegalSlaves)]] - <</if>> - <br>Expanding the division costs @@.red;<<print cashFormat(25000)>>.@@ Downsizing recoups 80% of the investment. - <br><<if $corpCash > 25000>> - [[Expand Division|Manage Corporation][$corpDivLegalDev += 1, $corpCash -= 25000, $corpAssetsDev += 25000]] - <</if>> - <<if $corpCash > 250000>> - | [[Expand x10|Manage Corporation][$corpDivLegalDev += 10, $corpCash -= 250000, $corpAssetsDev += 250000]] - <</if>> - <<if $corpDivLegalDev > 10>> - <<if $corpCash > 25000>> - | - <</if>> - [[Downsize Division|Manage Corporation][$corpDivLegalDev -= 1, $corpCash += 20000, $corpAssetsDev -= 20000]] - <</if>> - <<if $corpDivLegalDev > 19>> - | [[Downsize x10|Manage Corporation][$corpDivLegalDev -= 10, $corpCash += 200000, $corpAssetsDev -= 200000]] - <</if>> - <br>Rules: - <<if $corpDivMenial > 0>> - <<if ndef $corpDivLegalToMenial>> - Do not auto send slaves to the menial services[[Auto Send|Manage Corporation][$corpDivLegalToMenial = 1]] - <<else>> - Auto send slaves to the menial services <<link "Stop Auto Send">><<unset $corpDivLegalToMenial>><<goto "Manage Corporation">><</link>> - <</if>> - | - <</if>> - <<if $corpDivSurgery > 0>> - <<if ndef $corpDivLegalToSurgery>> - Do not auto send slaves to undergo surgery [[Auto Send|Manage Corporation][$corpDivLegalToSurgery = 1]] - <<else>> - Auto send slaves to undergo surgery <<link "Stop Auto Send">><<unset $corpDivLegalToSurgery>><<goto "Manage Corporation">><</link>> - <</if>> - | - <<if def $corpDivLegalToTrain>> - <<unset $corpDivLegalToTrain>> - <</if>> - <<elseif $corpDivTrain > 0>> - <<if ndef $corpDivLegalToTrain>> - Do not auto send slaves to slave training [[Auto Send|Manage Corporation][$corpDivLegalToTrain = 1]] - <<else>> - Auto send slaves to slave training <<link "Stop Auto Send">><<unset $corpDivLegalToTrain>><<goto "Manage Corporation">><</link>> - <</if>> - | - <</if>> - <<if ndef $corpDivLegalToMarket>> - Do not auto sell slaves to the market [[Auto Sell|Manage Corporation][$corpDivLegalToMarket = 1]] - <<else>> - Auto sell slaves to the market <<link "Stop Auto Sell">><<unset $corpDivLegalToMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if $corpDiv > 1>> - <br>Dissolve the division. @@.orange;//Think before you click//@@ - <<link "Dissolve">> - <<set $corpCash += $corpDivLegalSlaves * 15 * menialSlaveCost(-$corpDivLegalSlaves) + $corpDivLegalDev * 20000, - $menialDemandFactor -= $corpDivLegalSlaves, - $corpRev += $corpDivLegalSlaves * 15 * menialSlaveCost(-$corpDivLegalSlaves), - $corpAssetsDev -= $corpDivLegalDev * 20000, - $corpExpandToken += 1, - $corpDivLegal = 0, - $corpDivLegalDev = 0>> - <<unset $corpDivLegalSlaves>> - <<goto "Manage Corporation">> - <</link>> - <</if>> - <br> -<</if>> - -<<if $corpDivBreak == 0>> - <<if $corpExpandToken > 0>> - <<if $corpDivTrain > 0 || $corpDivMenial > 0 || $corpDivSurgery > 0 || $corpDivExtra > 0>> - <<if $corpCash > 190000>> - <br>The corporation can expand by starting a slave breaking division at a cost of @@.yelllowgreen;<<print cashFormat(190000)>>.@@ [[Add Division|Manage Corporation][$corpDivBreak = 1, $corpCash -= 190000, $corpDivBreakSlaves = 10, $corpDivBreakSlaves2 = 0, $corpDivBreakDev = 10, $corpDiv += 1, $corpExpandToken -= 1, $corpAssetsSlave += 100000, $corpAssetsDev += 90000]]<br> - <<else>> - <br>The corporation does not have the funds to add a slave breaking division; @@.yellowgreen;<<print cashFormat(190000)>>@@ required.<br> - <</if>> - <</if>> - <</if>> -<<else>> - <<set _corpDivBreakCost = 450 * $corpDivBreakSlaves + Math.trunc(0.6 * Math.pow($corpDivBreakDev, 2)), - _corpDivBreakCostPU = Math.trunc(_corpDivBreakCost / ($corpDivBreakSlaves * 0.3)), - _corpDivBreakRev = menialSlaveCost() * 15, - _corpDivBreakProc = Math.trunc($corpDivBreakDev * 0.3)>> - <br>The corporation has a slave breaking division. - <br>It can break an average of @@.green;<<print _corpDivBreakProc>> slaves@@ each week when filled to capacity ($corpDivBreakDev). - <br>It costs @@.red;<<print cashFormat(_corpDivBreakCost)>>@@ to run. On average that is @@.red;<<print cashFormat(_corpDivBreakCostPU)>>@@ per slave broken. - <br>The broken slaves can be sold for @@.yellowgreen;<<print cashFormat(_corpDivBreakRev)>>@@ each. - <<if $corpDivBreakSlaves > 0>> - <br>Currently the division is attempting to break <<if $corpDivBreakSlaves > 1>>@@.green;$corpDivBreakSlaves slaves.@@<<else>>@@.green;one slave.@@<</if>> - <<if $corpDivBreakSlaves < $corpDivBreakDev>> - <br>There is room to work on more slaves. - <<if $corpCash >= 10 * menialSlaveCost()>> - If you do not have eligible slaves in your corporation to move here you can buy them from the market. [[Buy 1|Manage Corporation][$corpCash -= 10 * menialSlaveCost(), $corpDivBreakSlaves += 1, $menialSupplyFactor -= 1, $corpAssetsSlave += 10 * menialSlaveCost()]] - <<if $corpCash > 100 * menialSlaveCost(10)>> - | [[Buy 10|Manage Corporation][$corpCash -= 100 * menialSlaveCost(10), $corpDivBreakSlaves += 10, $menialSupplyFactor -= 10, $corpAssetsSlave += 100 * menialSlaveCost(10)]] - <</if>> - <<if $corpCash > 10 * menialSlaveCost($corpDivBreakDev - $corpDivBreakSlaves) * ($corpDivBreakDev - $corpDivBreakSlaves)>> - | [[Fill|Manage Corporation][$corpCash -= 10 * menialSlaveCost($corpDivBreakDev - $corpDivBreakSlaves) * ($corpDivBreakDev - $corpDivBreakSlaves), $corpDivBreakSlaves = $corpDivBreakDev, $menialSupplyFactor -= $corpDivBreakDev - $corpDivBreakSlaves, $corpRev += 10 * menialSlaveCost($corpDivBreakDev - $corpDivBreakSlaves) * ($corpDivBreakDev - $corpDivBreakSlaves)]] - <</if>> - <</if>> - <</if>> - <</if>> - <<if $corpDivBreakSlaves2 > 0>> - It also holds <<if $corpDivBreakSlaves2 > 1>>@@.green;$corpDivBreakSlaves2 broken slaves.@@<<else>>@@.green;one broken slave.@@<</if>> - <<if _corpDivMenialSlavesRoom > 0>> - <br>You can send up to <<print _corpDivMenialSlavesRoom>> to the menial slave division. [[Send 1|Manage Corporation][$corpDivMenialSlaves += 1, $corpDivBreakSlaves2 -= 1]] - <<if $corpDivBreakSlaves2 >= 10 && _corpDivMenialSlavesRoom >= 10>> - | [[Send 10|Manage Corporation][$corpDivMenialSlaves += 10, $corpDivBreakSlaves2 -= 10]] - <</if>> - <<if $corpDivBreakSlaves2 >= _corpDivMenialSlavesRoom>> - | [[Fill|Manage Corporation][$corpDivMenialSlaves += _corpDivMenialSlavesRoom, $corpDivBreakSlaves2 -= _corpDivMenialSlavesRoom]] - <</if>> - <</if>> - <<if $corpDivSurgery == 1>> - <<if _corpDivSurgerySlavesRoom > 0>> - <br>You can send up to <<print _corpDivSurgerySlavesRoom>> to the surgery division. [[Send 1|Manage Corporation][$corpDivSurgerySlaves += 1, $corpDivBreakSlaves2 -= 1]] - <<if $corpDivBreakSlaves2 >= 10 && _corpDivSurgerySlavesRoom >= 10>> - | [[Send 10|Manage Corporation][$corpDivSurgerySlaves += 10, $corpDivBreakSlaves2 -= 10]] - <</if>> - <<if $corpDivBreakSlaves2 >= _corpDivSurgerySlavesRoom>> - | [[Fill|Manage Corporation][$corpDivSurgerySlaves += _corpDivSurgerySlavesRoom, $corpDivBreakSlaves2 -= _corpDivSurgerySlavesRoom]] - <</if>> - <</if>> - <<else>> - <<if _corpDivTrainSlavesRoom > 0>> - <br>You can send up to <<print _corpDivTrainSlavesRoom>> to the slave training division. [[Send 1|Manage Corporation][$corpDivTrainSlaves += 1, $corpDivBreakSlaves2 -= 1]] <<if $corpDivBreakSlaves2 >= 10 && _corpDivTrainSlavesRoom >= 10>> - | [[Send 10|Manage Corporation][$corpDivTrainSlaves += 10, $corpDivBreakSlaves2 -= 10]] - <</if>> - <<if $corpDivBreakSlaves2 >= _corpDivTrainSlavesRoom>> - | [[Fill|Manage Corporation][$corpDivTrainSlaves += _corpDivTrainSlavesRoom, $corpDivBreakSlaves2 -= _corpDivTrainSlavesRoom]] - <</if>> - <</if>> - <</if>> - <br>You can sell these slaves on the market. [[Sell 1|Manage Corporation][$corpCash += 15 * menialSlaveCost(), $corpDivBreakSlaves2 -= 1, $menialDemandFactor -= 1, $corpRev += 15 * menialSlaveCost()]] - <<if $corpDivBreakSlaves2 >= 10>> - | [[Sell 10|Manage Corporation][$corpCash += 150 * menialSlaveCost(-10), $corpDivBreakSlaves2 -= 10, $menialDemandFactor -= 10, $corpRev += 150 * menialSlaveCost(-10)]] - <</if>> - <<if $corpDivBreakSlaves2 >= 100>> - | [[Sell 100|Manage Corporation][$corpCash += 1500 * menialSlaveCost(-100), $corpDivBreakSlaves2 -= 100, $menialDemandFactor -= 100, $corpRev += 1500 * menialSlaveCost(-100)]] - <</if>> - | [[Sell all|Manage Corporation][$corpCash += $corpDivBreakSlaves2 * 15 * menialSlaveCost(-$corpDivBreakSlaves2), $corpDivBreakSlaves2 = 0, $menialDemandFactor -= $corpDivBreakSlaves2, $corpRev += $corpDivBreakSlaves2 * 15 * menialSlaveCost(-$corpDivBreakSlaves2)]] - <</if>> - <br>Expanding the division costs @@.red;<<print cashFormat(9000)>>.@@ Downsizing recoups 80% of the investment. - <br> - <<if $corpCash > 9000>> - [[Expand Division|Manage Corporation][$corpDivBreakDev += 1, $corpCash -= 9000, $corpAssetsDev += 9000]] - <</if>> - <<if $corpCash > 90000>> - | [[Expand x10|Manage Corporation][$corpDivBreakDev += 10, $corpCash -= 90000, $corpAssetsDev += 90000]] - <</if>> - <<if $corpDivBreakDev > 10>> - <<if $corpCash > 9000>> - | - <</if>> - <<if $corpDivBreakSlaves == $corpDivBreakDev>> /*This makes sure the division is not overcrowded after a downsize*/ - [[Downsize Division|Manage Corporation][$corpDivBreakDev -= 1, $corpCash += 7200 + Math.trunc(11.5 * menialSlaveCost()), $corpDivBreakSlaves -= 1, $corpAssetsDev -= 7200]] - <<else>> - [[Downsize Division|Manage Corporation][$corpDivBreakDev -= 1, $corpCash += 7200, $corpAssetsDev -= 7200]] - <</if>> - <</if>> - <<if $corpDivBreakDev > 20>> - <<if $corpDivBreakSlaves >= $corpDivBreakDev - 10>> - <<set _corpDivBreakSlavesSell = $corpDivBreakSlaves - ($corpDivBreakDev - 10)>> - | [[Downsize x10|Manage Corporation][$corpDivBreakDev -= 10, $corpCash += 72000 + Math.trunc(11.5 * _corpDivBreakSlavesSell * menialSlaveCost()), $corpDivBreakSlaves -= _corpDivBreakSlavesSell, $corpAssetsDev -= 72000]] - <<else>> - | [[Downsize x10|Manage Corporation][$corpDivBreakDev -= 10, $corpCash += 72000, $corpAssetsDev -= 72000]] - <</if>> - <</if>> - <br>Rules: - <<if $corpDivMenial > 0>> - <<if ndef $corpDivBreakToMenial>> - Do not auto send slaves to the menial services [[Auto Send|Manage Corporation][$corpDivBreakToMenial = 1]] - <<else>> - Auto send slaves to the menial services <<link "Stop Auto Send">><<unset $corpDivBreakToMenial>><<goto "Manage Corporation">><</link>> - <</if>> - | - <</if>> - <<if $corpDivSurgery > 0>> - <<if ndef $corpDivBreakToSurgery>> - Do not auto send slaves to undergo surgery [[Auto Send|Manage Corporation][$corpDivBreakToSurgery = 1]] - <<else>> - Auto send slaves to undergo surgery <<link "Stop Auto Send">><<unset $corpDivBreakToSurgery>><<goto "Manage Corporation">><</link>> - <</if>> - | - <<if def $corpDivBreakToTrain>> - <<unset $corpDivBreakToTrain>> - <</if>> - <<elseif $corpDivTrain > 0>> - <<if ndef $corpDivBreakToTrain>> - Do not auto send slaves to slave training [[Auto Send|Manage Corporation][$corpDivBreakToTrain = 1]] - <<else>> - Auto send slaves to slave training <<link "Stop Auto Send">><<unset $corpDivBreakToTrain>><<goto "Manage Corporation">><</link>> - <</if>> - | - <</if>> - <<if ndef $corpDivBreakToMarket>> - Do not auto sell slaves to the market [[Auto Sell|Manage Corporation][$corpDivBreakToMarket = 1]] - <<else>> - Auto sell slaves to the market <<link "Stop Auto Sell">><<unset $corpDivBreakToMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if ndef $corpDivBreakFromMarket>> - <br>Do not auto buy slaves from the market [[Auto Buy|Manage Corporation][$corpDivBreakFromMarket = 1]] - <<else>> - <br>Auto buy slaves from the market <<link "Stop Auto Buy">><<unset $corpDivBreakFromMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if $corpDiv > 1>> - <br>Dissolve the division. @@.orange;//Think before you click//@@ - <<link "Dissolve">> - <<set $corpCash += $corpDivBreakSlaves * 10 * menialSlaveCost(-$corpDivBreakSlaves) + $corpDivBreakSlaves2 * 15 * menialSlaveCost(-$corpDivBreakSlaves2) + $corpDivBreakDev * 7200, - $corpAssetsDev -= $corpDivBreakDev * 7200, - $corpAssetsSlave -= $corpDivBreakSlaves * 10 * menialSlaveCost(-$corpDivBreakSlaves), - $corpRev += $corpDivBreakSlaves2 * 15 * menialSlaveCost(-$corpDivBreakSlaves2), - $corpDivBreak = 0, - $corpDivBreakDev = 0, - $menialDemandFactor -= $corpDivBreakSlaves + $corpDivBreakSlaves2, - $corpExpandToken += 1>> - <<unset $corpDivBreakSlaves, - $corpDivBreakSlaves2, - $corpDivExtraToBreak>> - <<goto "Manage Corporation">> - <</link>> - <</if>> - <br> -<</if>> - -<<if $corpDivSurgery == 0>> - <<if $corpExpandToken > 0>> - <<if $corpDivTrain > 0 || $corpDivDairy > 0 || $corpDivBreak > 0 || $corpDivLegal > 0>> - <<if $corpCash > 350000>> - <br>The corporation can expand by starting a physical slave modification division at a cost of @@.yelllowgreen;<<print cashFormat(350000)>>.@@ [[Add Division|Manage Corporation][$corpDivSurgery = 1, $corpCash -= 350000, $corpDivSurgerySlaves = 10, $corpDivSurgerySlaves2 = 0, $corpDivSurgeryDev = 10, $corpDiv += 1, $corpExpandToken -= 1, $corpAssetsDev += 200000, $corpAssetsSlave += 150000]]<br> - <<if $corpDivTrain == 1>> - <<set $corpDivTrainSurgerySwitch = 1, - $corpDivTrainSurgeryTimer = 0>> - <</if>> - <<else>> - <br>The corporation does not have the funds to add a physical slave modification division; @@.yellowgreen;<<print cashFormat(350000)>>@@ required.<br> - <</if>> - <</if>> - <</if>> -<<else>> - <<set _corpDivSurgeryCost = Math.trunc(2400 * $corpDivSurgerySlaves + Math.pow($corpDivSurgeryDev, 2)), - _corpDivSurgeryCostPU = Math.trunc(_corpDivSurgeryCost / ($corpDivSurgerySlaves * 0.5)), - _corpDivSurgeryRev = menialSlaveCost() * 23, - _corpDivSurgeryProc = Math.trunc($corpDivSurgeryDev * 0.5)>> - <br>The corporation has a physical slave modification division. - <br>It can modify an average of @@.green;<<print _corpDivSurgeryProc>> slaves@@ each week when filled to capacity ($corpDivSurgeryDev). - <br>It costs @@.red;<<print cashFormat(_corpDivSurgeryCost)>>@@ to run. On average that is @@.red;<<print cashFormat(_corpDivSurgeryCostPU)>>@@ per slave. - <br>The improved slaves can be sold for @@.yellowgreen;<<print cashFormat(_corpDivSurgeryRev)>>@@ each. - <<if $corpDivSurgerySlaves > 0>> - <br>Currently the division is working on - <<if $corpDivSurgerySlaves > 1>> - @@.green;$corpDivSurgerySlaves slaves.@@ - <<else>> - @@.green;one slave.@@ - <</if>> - <<if $corpDivSurgerySlaves < $corpDivSurgeryDev>> - <br>There is room to work on more slaves. - <<if $corpCash >= 15 * menialSlaveCost()>> - If you do not have eligible slaves in your corporation to move here you can buy them from the market. [[Buy 1|Manage Corporation][$corpCash -= 15 * menialSlaveCost(), $corpDivSurgerySlaves += 1, $menialSupplyFactor -= 1, $corpAssetsSlave += 15 * menialSlaveCost()]] - <<if $corpCash > 150 * menialSlaveCost(10)>> - | [[Buy 10|Manage Corporation][$corpCash -= 150 * menialSlaveCost(10), $corpDivSurgerySlaves += 10, $menialSupplyFactor -= 10, $corpAssetsSlave += 150 * menialSlaveCost(10)]] - <</if>> - <<if $corpCash > 15 * menialSlaveCost($corpDivSurgeryDev - $corpDivSurgerySlaves) * ($corpDivSurgeryDev - $corpDivSurgerySlaves)>> - | [[Fill|Manage Corporation][$corpCash -= 15 * menialSlaveCost($corpDivSurgeryDev - $corpDivSurgerySlaves) * ($corpDivSurgeryDev - $corpDivSurgerySlaves), $corpDivSurgerySlaves = $corpDivSurgeryDev, $menialSupplyFactor -= $corpDivSurgeryDev - $corpDivSurgerySlaves, $corpAssetsSlave += 15 * menialSlaveCost($corpDivSurgeryDev - $corpDivSurgerySlaves) * ($corpDivSurgeryDev - $corpDivSurgerySlaves)]] - <</if>> - <</if>> - <</if>> - <</if>> - <<if $corpDivSurgerySlaves2 > 0>> - It also holds - <<if $corpDivSurgerySlaves2 > 1>> - @@.green;$corpDivSurgerySlaves2 improved slaves.@@ - <<else>> - @@.green;one improved slave.@@ - <</if>> - <<if _corpDivDairySlavesRoom > 0>> - <br>You can send up to <<print _corpDivDairySlavesRoom>> to the dairy division. [[Send 1|Manage Corporation][$corpDivDairySlaves += 1, $corpDivSurgerySlaves2 -= 1]] - <<if $corpDivSurgerySlaves2 >= 10 && _corpDivDairySlavesRoom >= 10>> - | [[Send 10|Manage Corporation][$corpDivDairySlaves += 10, $corpDivSurgerySlaves2 -= 10]] - <</if>> - <<if $corpDivSurgerySlaves2 >= _corpDivDairySlavesRoom>> - | [[Fill|Manage Corporation][$corpDivDairySlaves += _corpDivDairySlavesRoom, $corpDivSurgerySlaves2 -= _corpDivDairySlavesRoom]] - <</if>> - <</if>> - <<if _corpDivTrainSlavesRoom > 0>> - <br>You can send up to <<print _corpDivTrainSlavesRoom>> to the slave training division. [[Send 1|Manage Corporation][$corpDivTrainSlaves += 1, $corpDivSurgerySlaves2 -= 1]] - <<if $corpDivSurgerySlaves2 >= 10 && _corpDivTrainSlavesRoom >= 10>> - | [[Send 10|Manage Corporation][$corpDivTrainSlaves += 10, $corpDivSurgerySlaves2 -= 10]] - <</if>> - <<if $corpDivSurgerySlaves2 >= _corpDivTrainSlavesRoom>> - | [[Fill|Manage Corporation][$corpDivTrainSlaves += _corpDivTrainSlavesRoom, $corpDivSurgerySlaves2 -= _corpDivTrainSlavesRoom]] - <</if>> - <</if>> - <br>You can sell these slaves on the market. [[Sell 1|Manage Corporation][$corpCash += 23 * menialSlaveCost(), $corpDivSurgerySlaves2 -= 1, $menialDemandFactor -= 1, $corpRev += 23 * menialSlaveCost()]] - <<if $corpDivSurgerySlaves2 >= 10>> - | [[Sell 10|Manage Corporation][$corpCash += 230 * menialSlaveCost(-10), $corpDivSurgerySlaves2 -= 10, $menialDemandFactor -= 10, $corpRev += 230 * menialSlaveCost(-10)]] - <</if>> - <<if $corpDivSurgerySlaves2 >= 100>> - | [[Sell 100|Manage Corporation][$corpCash += 2300 * menialSlaveCost(-100), $corpDivSurgerySlaves2 -= 100, $menialDemandFactor -= 100, $corpRev += 2300 * menialSlaveCost(-100)]] - <</if>> - | [[Sell all|Manage Corporation][$corpCash += $corpDivSurgerySlaves2 * 23 * menialSlaveCost(-$corpDivSurgerySlaves2), $corpDivSurgerySlaves2 = 0, $menialDemandFactor -= $corpDivSurgerySlaves2, $corpRev += $corpDivSurgerySlaves2 * 23 * menialSlaveCost(-$corpDivSurgerySlaves2)]] - <</if>> - <br>Expanding the division costs @@.red;<<print cashFormat(20000)>>.@@ Downsizing recoups 80% of the investment. - <br> - <<if $corpCash > 20000>> - [[Expand Division|Manage Corporation][$corpDivSurgeryDev += 1, $corpCash -= 20000, $corpAssetsDev += 20000]] - <</if>> - <<if $corpCash > 200000>> - | [[Expand x10|Manage Corporation][$corpDivSurgeryDev += 10, $corpCash -= 200000, $corpAssetsDev += 200000]] - <</if>> - <<if $corpDivSurgeryDev > 10>> - <<if $corpCash > 20000>> - | - <</if>> - <<if $corpDivSurgerySlaves == $corpDivSurgeryDev>> - [[Downsize Division|Manage Corporation][$corpDivSurgeryDev -= 1, $corpCash += 16000 + 15 * menialSlaveCost(), $corpDivSurgerySlaves -= 1, $corpAssetsDev -= 16000]] - <<else>> - [[Downsize Division|Manage Corporation][$corpDivSurgeryDev -= 1, $corpCash += 16000, $corpAssetsDev -= 16000]] - <</if>> - <</if>> - <<if $corpDivSurgeryDev > 20>> - <<if $corpDivSurgerySlaves >= $corpDivSurgeryDev - 10>> - <<set _corpDivSurgerySlavesSell = $corpDivSurgerySlaves - ($corpDivSurgeryDev - 10)>> - | [[Downsize x10|Manage Corporation][$corpDivSurgeryDev -= 10, $corpCash += 160000 + 15 * _corpDivSurgerySlavesSell * menialSlaveCost(), $corpDivSurgerySlaves -= _corpDivSurgerySlavesSell, $corpAssetsDev -= 160000]] - <<else>> - | [[Downsize x10|Manage Corporation][$corpDivSurgeryDev -= 10, $corpCash += 160000, $corpAssetsDev -= 160000]] - <</if>> - <</if>> - <br>Rules: - <<if $corpDivDairy > 0>> - <<if ndef $corpDivSurgeryToDairy>> - Do not auto send slaves to the dairy [[Auto Send|Manage Corporation][$corpDivSurgeryToDairy = 1]] - <<else>> - Auto send slaves to the dairy <<link "Stop Auto Send">><<unset $corpDivSurgeryToDairy>><<goto "Manage Corporation">><</link>> - <</if>> - | - <</if>> - <<if $corpDivTrain > 0>> - <<if ndef $corpDivSurgeryToTrain>> - Do not auto send slaves to slave training [[Auto Send|Manage Corporation][$corpDivSurgeryToTrain = 1]] - <<else>> - Auto send slaves to slave training <<link "Stop Auto Send">><<unset $corpDivSurgeryToTrain>><<goto "Manage Corporation">><</link>> - <</if>> - | - <</if>> - <<if ndef $corpDivSurgeryToMarket>> - Do not auto sell slaves to the market [[Auto Sell|Manage Corporation][$corpDivSurgeryToMarket = 1]] - <<else>> - Auto sell slaves to the market <<link "Stop Auto Sell">><<unset $corpDivSurgeryToMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if ndef $corpDivSurgeryFromMarket>> - <br>Do not auto buy slaves from the market [[Auto buy|Manage Corporation][$corpDivSurgeryFromMarket = 1]] - <<else>> - <br>Auto buy slaves from the market <<link "Stop Auto Buy">><<unset $corpDivSurgeryFromMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if $corpDiv > 1>> - <br>Dissolve the division. @@.orange;//Think before you click//@@ - <<link "Dissolve">> - <<set $corpCash += $corpDivSurgerySlaves * 15 * menialSlaveCost(-$corpDivSurgerySlaves) + $corpDivSurgerySlaves2 * 23 * menialSlaveCost(-$corpDivSurgerySlaves2) + $corpDivSurgeryDev * 20000, - $corpRev += $corpDivSurgerySlaves2 * 23 * menialSlaveCost(-$corpDivSurgerySlaves2), - $corpAssetsSlave -= $corpDivSurgerySlaves * 15 * menialSlaveCost(-$corpDivSurgerySlaves), - $corpAssetsDev -= $corpDivSurgeryDev * 20000, - $corpDivSurgery = 0, - $corpDivSurgeryDev = 0, - $menialDemandFactor -= $corpDivSurgerySlaves + $corpDivSurgerySlaves2, - $corpExpandToken += 1>> - <<unset $corpDivSurgerySlaves, - $corpDivSurgerySlaves2, - $corpDivLegalToSurgery, - $corpDivBreakToSurgery>> - <<goto "Manage Corporation">> - <</link>> - <</if>> - <br> -<</if>> - -<<if $corpDivTrain == 0>> - <<if $corpExpandToken > 0>> - <<if $corpDivLegal > 0 || $corpDivWhore > 0 || $corpDivSurgery > 0 || $corpDivBreak > 0>> - <<if $corpDivSurgery == 1>> - <<if $corpCash > 480000>> - <br>The corporation can expand by starting a slave training division at a cost of @@.yelllowgreen;<<print cashFormat(480000)>>.@@ [[Add Division|Manage Corporation][$corpDivTrain = 1, $corpCash -= 480000, $corpDivTrainSlaves = 10, $corpDivTrainSlaves2 = 0, $corpDivTrainDev = 10, $corpDiv += 1, $corpExpandToken -=1, $corpAssetsDev += 250000, $corpAssetsSlave += 230000]]<br> - <<else>> - <br>The corporation does not have the funds to add a slave training division; @@.yellowgreen;<<print cashFormat(480000)>>@@ required.<br> - <</if>> - <<elseif $corpCash > 400000>> - <br>The corporation can expand by starting a slave training division at a cost of @@.yelllowgreen;<<print cashFormat(400000)>>.@@ [[Add Division|Manage Corporation][$corpDivTrain = 1, $corpCash -= 400000, $corpDivTrainSlaves = 10, $corpDivTrainSlaves2 = 0, $corpDivTrainDev = 10, $corpDiv += 1, $corpExpandToken -=1, $corpAssetsDev += 250000, $corpAssetsSlave += 150000]]<br> - <<else>> - <br>The corporation does not have the funds to add a slave training division; @@.yellowgreen;<<print cashFormat(400000)>>@@ required.<br> - <</if>> - <</if>> - <</if>> -<<else>> - <<if $corpDivSurgery == 0 && $corpDivTrainSurgerySwitch == 0>> - <<set _corpDivTrainCost = Math.trunc(700 * $corpDivTrainSlaves + Math.pow($corpDivTrainDev, 2)), - _corpDivTrainCostPU = Math.trunc(_corpDivTrainCost / ($corpDivTrainSlaves * 0.2)), - _corpDivTrainRev = menialSlaveCost() * 26, - _corpDivTrainProc = Math.trunc($corpDivTrainDev * 0.2)>> - <br>The corporation has a slave training division. - <br>It can train an average of @@.green;<<print _corpDivTrainProc>> slaves@@ each week when filled to capacity ($corpDivTrainDev). - <br>It costs @@.red;<<print cashFormat(_corpDivTrainCost)>>@@ to run. On average that is @@.red;<<print cashFormat(_corpDivTrainCostPU)>>@@ per slave. - <br>The trained slaves can be sold for @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>@@ each. - <<if $corpDivTrainSlaves > 0>> - <br>Currently the division is training - <<if $corpDivTrainSlaves > 1>> - @@.green;$corpDivTrainSlaves slaves.@@ - <<else>> - @@.green;one slave.@@ - <</if>> - <<if $corpDivTrainSlaves < $corpDivTrainDev>> - <br>There is room to train more slaves. - <<if $corpCash >= 15 * menialSlaveCost()>> - If you do not have eligible slaves in your corporation to move here you can buy them from the market. [[Buy 1|Manage Corporation][$corpCash -= 15 * menialSlaveCost(), $corpDivTrainSlaves += 1, $menialSupplyFactor -= 1, $corpAssetsSlave += 15 * menialSlaveCost()]] - <<if $corpCash > 150 * menialSlaveCost(10)>> - | [[Buy 10|Manage Corporation][$corpCash -= 150 * menialSlaveCost(10), $corpDivTrainSlaves += 10, $menialSupplyFactor -= 10, $corpAssetsSlave += 150 * menialSlaveCost(10)]] - <</if>> - <<if $corpCash > 15 * menialSlaveCost($corpDivTrainDev - $corpDivTrainSlaves) * ($corpDivTrainDev - $corpDivTrainSlaves)>> - | [[Fill|Manage Corporation][$corpCash -= 15 * menialSlaveCost($corpDivTrainDev - $corpDivTrainSlaves) * ($corpDivTrainDev - $corpDivTrainSlaves), $corpDivTrainSlaves = $corpDivTrainDev, $menialSupplyFactor -= $corpDivTrainDev - $corpDivTrainSlaves, $corpAssetsSlave += 15 * menialSlaveCost($corpDivTrainDev - $corpDivTrainSlaves) * ($corpDivTrainDev - $corpDivTrainSlaves)]] - <</if>> - <</if>> - <</if>> - <</if>> - <<elseif $corpDivTrainSurgerySwitch == 1 && $corpDivTrainSurgeryTimer < 5>> - <<set _corpDivTrainCost = Math.trunc(700 * $corpDivTrainSlaves + Math.pow($corpDivTrainDev, 2)), - _corpDivTrainCostPU = Math.trunc(_corpDivTrainCost / ($corpDivTrainSlaves * 0.2)), - _corpDivTrainRev = Math.trunc(menialSlaveCost() * (26 + $corpDivTrainSurgeryTimer * 1.6)), - _corpDivTrainProc = Math.trunc($corpDivTrainDev * 0.2)>> - <br>The corporation has a slave training division. - <br>It can train an average of @@.green;<<print _corpDivTrainProc>> slaves@@ each week when filled to capacity ($corpDivTrainDev). - <br>It costs @@.red;<<print cashFormat(_corpDivTrainCost)>>@@ to run. On average that is @@.red;<<print cashFormat(_corpDivTrainCostPU)>>@@ per slave. - <br>The trained slaves can be sold for @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>@@ each. - <<if $corpDivTrainSlaves > 0>> - <br>Currently the division is training - <<if $corpDivTrainSlaves > 1>> - @@.green;$corpDivTrainSlaves slaves.@@ - <<else>> - @@.green;one slave.@@ - <</if>> - <<if $corpDivTrainSlaves < $corpDivTrainDev>> - <br>There is room to train more slaves. - <<if $corpCash >= 23 * menialSlaveCost()>> - If you do not have eligible slaves in your corporation to move here you can buy them from the market. [[Buy 1|Manage Corporation][$corpCash -= 23 * menialSlaveCost(), $corpDivTrainSlaves += 1, $menialSupplyFactor -= 1, $corpAssetsSlave += 23 * menialSlaveCost()]] - <<if $corpCash > 230 * menialSlaveCost(10)>> - | [[Buy 10|Manage Corporation][$corpCash -= 230 * menialSlaveCost(10), $corpDivTrainSlaves += 10, $menialSupplyFactor -= 10, $corpAssetsSlave += 230 * menialSlaveCost(10)]] - <</if>> - <<if $corpCash > 23 * menialSlaveCost($corpDivTrainDev - $corpDivTrainSlaves) * ($corpDivTrainDev - $corpDivTrainSlaves)>> - | [[Fill|Manage Corporation][$corpCash -= 23 * menialSlaveCost($corpDivTrainDev - $corpDivTrainSlaves) * ($corpDivTrainDev - $corpDivTrainSlaves), $corpDivTrainSlaves = $corpDivTrainDev, $menialSupplyFactor -= $corpDivTrainDev - $corpDivTrainSlaves, $corpAssetsSlave += 23 * menialSlaveCost($corpDivTrainDev - $corpDivTrainSlaves) * ($corpDivTrainDev - $corpDivTrainSlaves)]] - <</if>> - <</if>> - <</if>> - <</if>> - <<else>> - <<set _corpDivTrainCost = Math.trunc(700 * $corpDivTrainSlaves + Math.pow($corpDivTrainDev, 2)), - _corpDivTrainCostPU = Math.trunc(_corpDivTrainCost / ($corpDivTrainSlaves * 0.2)), - _corpDivTrainRev = menialSlaveCost() * 34, - _corpDivTrainProc = Math.trunc($corpDivTrainDev * 0.2)>> - <br>The corporation has a slave training division. - <br>It can train an average of @@.green;<<print _corpDivTrainProc>> slaves@@ each week when filled to capacity ($corpDivTrainDev). - <br>It costs @@.red;<<print cashFormat(_corpDivTrainCost)>>@@ to run. On average that is @@.red;<<print cashFormat(_corpDivTrainCostPU)>>@@ per slave. - <br>The trained slaves can be sold for @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>@@ each. - <<if $corpDivTrainSlaves > 0>> - <br>Currently the division is training - <<if $corpDivTrainSlaves > 1>> - @@.green;$corpDivTrainSlaves slaves.@@ - <<else>> - @@.green;one slave.@@ - <</if>> - <<if $corpDivTrainSlaves < $corpDivTrainDev>> - <br>There is room to train more slaves. - <<if $corpCash >= 23 * menialSlaveCost()>> - If you do not have eligible slaves in your corporation to move here you can buy them from the market. [[Buy 1|Manage Corporation][$corpCash -= 23 * menialSlaveCost(), $corpDivTrainSlaves += 1, $menialSupplyFactor -= 1, $corpAssetsSlave += 23 * menialSlaveCost()]] - <<if $corpCash > 230 * menialSlaveCost(10)>> - | [[Buy 10|Manage Corporation][$corpCash -= 230 * menialSlaveCost(10), $corpDivTrainSlaves += 10, $menialSupplyFactor -= 10, $corpAssetsSlave += 230 * menialSlaveCost(10)]] - <</if>> - <<if $corpCash > 23 * menialSlaveCost($corpDivTrainDev - $corpDivTrainSlaves) * ($corpDivTrainDev - $corpDivTrainSlaves)>> - | [[Fill|Manage Corporation][$corpCash -= 23 * menialSlaveCost($corpDivTrainDev - $corpDivTrainSlaves) * ($corpDivTrainDev - $corpDivTrainSlaves), $corpDivTrainSlaves = $corpDivTrainDev, $menialSupplyFactor -= $corpDivTrainDev - $corpDivTrainSlaves, $corpAssetsSlave += 23 * menialSlaveCost($corpDivTrainDev - $corpDivTrainSlaves) * ($corpDivTrainDev - $corpDivTrainSlaves)]] - <</if>> - <</if>> - <</if>> - <</if>> - <</if>> - <<if $corpDivTrainSlaves2 > 0>> - It also holds - <<if $corpDivTrainSlaves2 > 1>> - @@.green;$corpDivTrainSlaves2 trained slaves.@@ - <<else>> - @@.green;one trained slave.@@ - <</if>> - <<if _corpDivWhoreSlavesRoom > 0>> - <br>You can send up to <<print _corpDivWhoreSlavesRoom>> to the escort division. [[Send 1|Manage Corporation][$corpDivDairySlaves += 1, $corpDivTrainSlaves2 -= 1]] - <<if $corpDivTrainSlaves2 >= 10 && _corpDivWhoreSlavesRoom >= 10>> - | [[Send 10|Manage Corporation][$corpDivWhoreSlaves += 10, $corpDivTrainSlaves2 -= 10]] - <</if>> - <<if $corpDivTrainSlaves2 >= _corpDivWhoreSlavesRoom>> - | [[Fill|Manage Corporation][$corpDivWhoreSlaves += _corpDivWhoreSlavesRoom, $corpDivTrainSlaves2 -= _corpDivWhoreSlavesRoom]] - <</if>> - <</if>> - <<if $corpDivSurgery == 0 && $corpDivTrainSurgerySwitch == 0>> - <br>You can sell these slaves on the market. [[Sell 1|Manage Corporation][$corpCash += 26 * menialSlaveCost(), $corpDivTrainSlaves2 -= 1, $menialDemandFactor -= 1, $corpRev += 26 * menialSlaveCost()]] - <<if $corpDivTrainSlaves2 >= 10>> - | [[Sell 10|Manage Corporation][$corpCash += 260 * menialSlaveCost(-10), $corpDivTrainSlaves2 -= 10, $menialDemandFactor -= 10, $corpRev += 260 * menialSlaveCost(-10)]] - <</if>> - <<if $corpDivTrainSlaves2 >= 100>> - | [[Sell 100|Manage Corporation][$corpCash += 2600 * menialSlaveCost(-100), $corpDivTrainSlaves2 -= 100, $menialDemandFactor -= 100, $corpRev += 2600 * menialSlaveCost(-100)]] - <</if>> - | [[Sell all|Manage Corporation][$corpCash += $corpDivTrainSlaves2 * 26 * menialSlaveCost(-$corpDivTrainSlaves2), $corpDivTrainSlaves2 = 0, $menialDemandFactor -= $corpDivTrainSlaves2, $corpRev += $corpDivTrainSlaves2 * 26 * menialSlaveCost(-$corpDivTrainSlaves2)]] - <<elseif $corpDivTrainSurgerySwitch == 1 && $corpDivTrainSurgeryTimer < 5>> - <br>You can sell these slaves on the market. [[Sell 1|Manage Corporation][$corpCash += Math.trunc((26 + $corpDivTrainSurgeryTimer * 1.6) * menialSlaveCost()), $corpDivTrainSlaves2 -= 1, $menialDemandFactor -= 1, $corpRev += Math.trunc((26 + $corpDivTrainSurgeryTimer * 1.6) * menialSlaveCost())]] - <<if $corpDivTrainSlaves2 >= 10>> - | [[Sell 10|Manage Corporation][$corpCash += Math.trunc((26 + $corpDivTrainSurgeryTimer * 1.6) * 10 * menialSlaveCost(-10)), $corpDivTrainSlaves2 -= 10, $menialDemandFactor -= 10, $corpRev += Math.trunc((26 + $corpDivTrainSurgeryTimer * 1.6) * 10 * menialSlaveCost())]] - <</if>> - <<if $corpDivTrainSlaves2 >= 100>> - | [[Sell 100|Manage Corporation][$corpCash += Math.trunc((26 + $corpDivTrainSurgeryTimer * 1.6) * 100 * menialSlaveCost(-100)), $corpDivTrainSlaves2 -= 100, $menialDemandFactor -= 100, $corpRev += Math.trunc((26 + $corpDivTrainSurgeryTimer * 1.6) * 100 * menialSlaveCost())]] - <</if>> - | [[Sell all|Manage Corporation][$corpCash += Math.trunc($corpDivTrainSlaves2 * (26 + $corpDivTrainSurgeryTimer * 1.6) * menialSlaveCost(-$corpDivTrainSlaves2)), $corpDivTrainSlaves2 = 0, $menialDemandFactor -= $corpDivTrainSlaves2, $corpRev += Math.trunc($corpDivTrainSlaves2 * (26 + $corpDivTrainSurgeryTimer * 1.6) * menialSlaveCost(-$corpDivTrainSlaves2))]] - <<else>> - <br>You can sell these slaves on the market. [[Sell 1|Manage Corporation][$corpCash += 34 * menialSlaveCost(), $corpDivTrainSlaves2 -= 1, $menialDemandFactor -= 1, $corpRev += 34 * menialSlaveCost()]] - <<if $corpDivTrainSlaves2 >= 10>> - | [[Sell 10|Manage Corporation][$corpCash += 340 * menialSlaveCost(-10), $corpDivTrainSlaves2 -= 10, $menialDemandFactor -= 10, $corpRev += 340 * menialSlaveCost(-10)]] - <</if>> - <<if $corpDivTrainSlaves2 >= 100>> - | [[Sell 100|Manage Corporation][$corpCash += 3400 * menialSlaveCost(-100), $corpDivTrainSlaves2 -= 100, $menialDemandFactor -= 100, $corpRev += 3400 * menialSlaveCost(-100)]] - <</if>> - | [[Sell all|Manage Corporation][$corpCash += $corpDivTrainSlaves2 * 34 * menialSlaveCost(-$corpDivTrainSlaves2), $corpDivTrainSlaves2 = 0, $menialDemandFactor -= $corpDivTrainSlaves2, $corpRev += $corpDivTrainSlaves2 * 34 * menialSlaveCost(-$corpDivTrainSlaves2)]] - <</if>> - <</if>> - <br>Expanding the division costs @@.red;<<print cashFormat(25000)>>.@@ Downsizing recoups 80% of the investment. - <br> - <<if $corpCash > 25000>> - [[Expand Division|Manage Corporation][$corpDivTrainDev += 1, $corpCash -= 25000, $corpAssetsDev += 25000]] - <</if>> - <<if $corpCash > 250000>> - | [[Expand x10|Manage Corporation][$corpDivTrainDev += 10, $corpCash -= 250000, $corpAssetsDev += 250000]] - <</if>> - <<if $corpDivTrainSurgeryTimer < 5 || $corpDivSurgery == 0>> - <<if $corpCash > 25000 && $corpDivTrainDev > 10>> - | - <</if>> - <<if $corpDivTrainDev > 10>> - <<if $corpDivTrainSlaves == $corpDivTrainDev>> - [[Downsize Division|Manage Corporation][$corpDivTrainDev -= 1, $corpCash += 20000 + 15 * menialSlaveCost(), $corpDivTrainSlaves -= 1, $corpAssetsDev -= 20000]] - <<else>> - [[Downsize Division|Manage Corporation][$corpDivTrainDev -= 1, $corpCash += 20000, $corpAssetsDev -= 200000]] - <</if>> - <</if>> - <<if $corpDivTrainDev > 20>> - <<if $corpDivTrainSlaves >= $corpDivTrainDev - 10>> - <<set _corpDivTrainSlavesSell = $corpDivTrainSlaves - ($corpDivTrainDev - 10)>> - | [[Downsize x10|Manage Corporation][$corpDivTrainDev -= 10, $corpCash += 200000 + 15 * _corpDivTrainSlavesSell * menialSlaveCost(), $corpDivTrainSlaves -= _corpDivTrainSlavesSell, $corpAssetsDev -= 200000]] - <<else>> - | [[Downsize x10|Manage Corporation][$corpDivTrainDev -= 10, $corpCash += 200000, $corpAssetsDev -= 200000]] - <</if>> - <</if>> - <<else>> - <<if $corpCash > 25000 && $corpDivTrainDev > 10>> - | - <</if>> - <<if $corpDivTrainDev > 10>> - <<if $corpDivTrainSlaves == $corpDivTrainDev>> - [[Downsize Division|Manage Corporation][$corpDivTrainDev -= 1, $corpCash += 20000 + 23 * menialSlaveCost(), $corpDivTrainSlaves -= 1, $corpAssetsDev -= 20000]] - <<else>> - [[Downsize Division|Manage Corporation][$corpDivTrainDev -= 1, $corpCash += 20000, $corpAssetsDev -= 20000]] - <</if>> - <</if>> - <<if $corpDivTrainDev > 20>> - <<if $corpDivTrainSlaves >= $corpDivTrainDev - 10>> - <<set _corpDivTrainSlavesSell = $corpDivTrainSlaves - ($corpDivTrainDev - 10)>> - | [[Downsize x10|Manage Corporation][$corpDivTrainDev -= 10, $corpCash += 200000 + 23 * _corpDivTrainSlavesSell * menialSlaveCost(), $corpDivTrainSlaves -= _corpDivTrainSlavesSell, $corpAssetsDev -= 200000]] - <<else>> - | [[Downsize x10|Manage Corporation][$corpDivTrainDev -= 10, $corpCash += 200000, $corpAssetsDev -= 200000]] - <</if>> - <</if>> - <</if>> - <br>Rules: - <<if $corpDivWhore > 0>> - <<if ndef $corpDivTrainToWhore>> - Do not auto send slaves to the escort services [[Auto Send|Manage Corporation][$corpDivTrainToWhore = 1]] - <<else>> - Auto send slaves to the escort services <<link "Stop Auto Send">><<unset $corpDivTrainToWhore>><<goto "Manage Corporation">><</link>> - <</if>> - | - <</if>> - <<if ndef $corpDivTrainToMarket>> - Do not auto sell slaves to the market [[Auto Sell|Manage Corporation][$corpDivTrainToMarket = 1]] - <<else>> - Auto sell slaves to the market <<link "Stop Auto Sell">><<unset $corpDivTrainToMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if ndef $corpDivTrainFromMarket>> - <br>Do not auto buy slaves from the market [[Auto Buy|Manage Corporation][$corpDivTrainFromMarket = 1]] - <<else>> - <br>Auto buy slaves from the market <<link "Stop Auto Buy">><<unset $corpDivTrainFromMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if $corpDiv > 1>> - <<if ndef $corpDivTrainSurgeryTimer || $corpDivTrainSurgeryTimer < 5 || $corpDivSurgery == 0>> /*not worth it to have the in between option here too*/ - <br>Dissolve the division. @@.orange;//Think before you click//@@ - <<link "Dissolve">> - <<set $corpCash += $corpDivTrainSlaves * 15 * menialSlaveCost(-$corpDivTrainSlaves) + Math.trunc($corpDivTrainSlaves2 * 26 * menialSlaveCost(-$corpDivTrainSlaves2)) + $corpDivTrainDev * 20000, - $corpAssetsDev -= $corpDivTrainDev * 20000, - $corpAssetsSlave -= $corpDivTrainSlaves * 15 * menialSlaveCost(-$corpDivTrainSlaves), - $corpRev += Math.trunc($corpDivTrainSlaves2 * 26 * menialSlaveCost(-$corpDivTrainSlaves2)), - $corpDivTrain = 0, - $corpDivTrainDev = 0, - $menialDemandFactor -= $corpDivTrainSlaves + $corpDivTrainSlaves2, - $corpExpandToken += 1>> - <<unset $corpDivTrainSlaves, - $corpDivTrainSlaves2, - $corpDivSurgeryToTrain, - $corpDivBreakToTrain, - $corpDivLegalToTrain>> - <<goto "Manage Corporation">> - <</link>> - <<else>> - <<link "Dissolve">> - <<set $corpCash += $corpDivTrainSlaves * 23 * menialSlaveCost(-$corpDivTrainSlaves) + Math.trunc($corpDivTrainSlaves2 * 34 * menialSlaveCost(-$corpDivTrainSlaves2)) + $corpDivTrainDev * 20000, - $corpAssetsDev -= $corpDivTrainDev * 20000, - $corpAssetsSlave -= $corpDivTrainSlaves * 23 * menialSlaveCost(-$corpDivTrainSlaves), - $corpRev += Math.trunc($corpDivTrainSlaves2 * 34 * menialSlaveCost(-$corpDivTrainSlaves2)), - $corpDivTrain = 0, - $corpDivTrainDev = 0, - $menialDemandFactor -= $corpDivTrainSlaves + $corpDivTrainSlaves2, - $corpExpandToken += 1>> - <<unset $corpDivTrainSlaves, - $corpDivTrainSlaves2, - $corpDivSurgeryToTrain, - $corpDivBreakToTrain, - $corpDivLegalToTrain>> - <<goto "Manage Corporation">> - <</link>> - <</if>> - <</if>> - <br> -<</if>> - -<<if $corpDivArcade == 0>> - <<if $corpExpandToken > 0>> - <<if $corpDivExtra > 0>> - <<if $corpCash > 300000>> - <br>The corporation can expand by starting a sex arcade division at a cost of @@.yelllowgreen;<<print cashFormat(300000)>>.@@ [[Add Division|Manage Corporation][$corpDivArcade = 1, $corpCash -= 300000, $corpDivArcadeSlaves = 20, $corpDivArcadeDev = 20, $corpDiv += 1, $corpExpandToken -= 1, $corpAssetsDev += 100000, $corpAssetsSlave += 200000]]<br> - <<else>> - <br>The corporation does not have the funds to add a sex arcade division; @@.yellowgreen;<<print cashFormat(300000)>>@@ required.<br> - <</if>> - <</if>> - <</if>> -<<else>> - <<set _corpDivArcadeCost = Math.trunc(200 * $corpDivArcadeSlaves + 0.125 * Math.pow($corpDivArcadeDev, 2)), - _corpDivArcadeCostPU = Math.trunc(_corpDivArcadeCost / ($corpDivArcadeSlaves)), - _corpDivArcadeRev = 1000, - _corpDivArcadeProc = Math.trunc($corpDivArcadeDev * 0.05)>> - <br>The corporation has a sex arcade division. - <br>It has to replace approximately - <<if _corpDivArcadeProc > 1>> - @@.red;<<print _corpDivArcadeProc>> slaves@@ - <<else>> - @@.red;less than one slave@@ - <</if>> - each week when filled to capacity ($corpDivArcadeDev). - <br>It costs @@.red;<<print cashFormat(_corpDivArcadeCost)>>@@ to run. On average that is @@.red;<<print cashFormat(_corpDivArcadeCostPU)>>@@ per slave. - <br>The arcade generates on average @@.yellowgreen;<<print cashFormat(_corpDivArcadeRev)>>@@ per slave. - <<if $corpDivArcadeSlaves > 0>> - <br>Currently the division is exploiting - <<if $corpDivArcadeSlaves > 1>> - @@.green;$corpDivArcadeSlaves slaves.@@ - <<else>> - @@.green;one slave.@@ - <</if>> - <<if $corpDivArcadeSlaves < $corpDivArcadeDev>> - <br>There is room to exploit more slaves. - <<if $corpCash >= 10 * menialSlaveCost()>> - If you do not have eligible slaves in your corporation to move here you can buy them from the market. [[Buy 1|Manage Corporation][$corpCash -= 10 * menialSlaveCost(), $corpDivArcadeSlaves += 1, $menialSupplyFactor -= 1, $corpAssetsSlave += 10 * menialSlaveCost()]] - <<if $corpCash > 100 * menialSlaveCost(10)>> - | [[Buy 10|Manage Corporation][$corpCash -= 100 * menialSlaveCost(10), $corpDivArcadeSlaves += 10, $menialSupplyFactor -= 10, $corpAssetsSlave += 100 * menialSlaveCost(10)]] - <</if>> - <<if $corpCash > 10 * menialSlaveCost($corpDivArcadeDev - $corpDivArcadeSlaves) * ($corpDivArcadeDev - $corpDivArcadeSlaves)>> - | [[Fill|Manage Corporation][$corpCash -= 10 * menialSlaveCost($corpDivArcadeDev - $corpDivArcadeSlaves) * ($corpDivArcadeDev - $corpDivArcadeSlaves), $corpDivArcadeSlaves = $corpDivArcadeDev, $menialSupplyFactor -= $corpDivArcadeDev - $corpDivArcadeSlaves, $corpAssetsSlave += 10 * menialSlaveCost($corpDivArcadeDev - $corpDivArcadeSlaves) * ($corpDivArcadeDev - $corpDivArcadeSlaves)]] - <</if>> - <</if>> - <</if>> - <</if>> - <br>Expanding the division costs @@.red;<<print cashFormat(5000)>>.@@ Downsizing recoups 80% of the investment. - <br><<if $corpCash > 5000>> - [[Expand Division|Manage Corporation][$corpDivArcadeDev += 1, $corpCash -= 5000, $corpAssetsDev += 5000]] - <</if>> - <<if $corpCash > 50000>> - | [[Expand x10|Manage Corporation][$corpDivArcadeDev += 10, $corpCash -= 50000, $corpAssetsDev += 50000]] - <</if>> - <<if $corpDivArcadeDev > 20>> - <<if $corpCash > 5000>> - | - <</if>> - <<if $corpDivArcadeSlaves == $corpDivArcadeDev>> - [[Downsize Division|Manage Corporation][$corpDivArcadeDev -= 1, $corpCash += 4000 + 10 * menialSlaveCost(), $corpDivArcadeSlaves -= 1, $corpAssetsDev -= 4000]] - <<else>> - [[Downsize Division|Manage Corporation][$corpDivArcadeDev -= 1, $corpCash += 4000, $corpAssetsDev -= 4000]] - <</if>> - <</if>> - <<if $corpDivArcadeDev > 30>> - <<if $corpDivArcadeSlaves >= $corpDivArcadeDev - 10>> - <<set _corpDivArcadeSlavesSell = $corpDivArcadeSlaves - ($corpDivArcadeDev - 10)>> - | [[Downsize x10|Manage Corporation][$corpDivArcadeDev -= 10, $corpCash += 40000 + 10 * _corpDivArcadeSlavesSell * menialSlaveCost(), $corpDivArcadeSlaves -= _corpDivArcadeSlavesSell, $corpAssetsDev -= 40000]] - <<else>> - | [[Downsize x10|Manage Corporation][$corpDivArcadeDev -= 10, $corpCash += 40000, $corpAssetsDev -= 40000]] - <</if>> - <</if>> - <br>Rules: - <<if ndef $corpDivArcadeFromMarket>> - Do not auto buy slaves from the market [[Auto Buy|Manage Corporation][$corpDivArcadeFromMarket = 1]] - <<else>> - Auto buy slaves from the market <<link "Stop Auto Buy">><<unset $corpDivArcadeFromMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if $corpDiv > 1>> - <br>Dissolve the division. @@.orange;//Think before you click//@@ - <<link "Dissolve">> - <<set $corpCash += $corpDivArcadeSlaves * 10 * menialSlaveCost(-$corpDivArcadeSlaves) + $corpDivArcadeDev * 4000, - $corpDivArcade = 0, - $corpAssetsSlave -= $corpDivArcadeSlaves * 10 * menialSlaveCost(-$corpDivArcadeSlaves), - $corpAssetsDev -= $corpDivArcadeDev * 4000, - $corpDivArcadeDev = 0, - $menialDemandFactor -= $corpDivArcadeSlaves, - $corpExpandToken += 1>> - <<unset $corpDivArcadeSlaves, - $corpDivExtraToArcade>> - <<goto "Manage Corporation">> - <</link>> - <</if>> - <br> -<</if>> - -<<if $corpDivMenial == 0>> - <<if $corpExpandToken > 0>> - <<if $corpDivLegal > 0 || $corpDivBreak > 0>> - <<if $corpCash > 430000>> - <br>The corporation can expand by starting a menial services division at a cost of @@.yelllowgreen;<<print cashFormat(430000)>>.@@ [[Add Division|Manage Corporation][$corpDivMenial = 1, $corpCash -= 430000, $corpDivMenialSlaves = 20, $corpDivMenialDev = 20, $corpDiv += 1, $corpExpandToken -= 1, $corpAssetsSlave += 300000, $corpAssetsDev += 130000]]<br> - <<else>> - <br>The corporation does not have the funds to add a menial services division; @@.yellowgreen;<<print cashFormat(430000)>>@@ required.<br> - <</if>> - <</if>> - <</if>> -<<else>> - <<set _corpDivMenialCost = Math.trunc(200 * $corpDivMenialSlaves + 0.1 * Math.pow($corpDivMenialDev, 2)), - _corpDivMenialCostPU = Math.trunc(_corpDivMenialCost / ($corpDivMenialSlaves)), - _corpDivMenialRev = 1250, - _corpDivMenialProc = Math.trunc($corpDivMenialDev * 0.05)>> - <br>The corporation has a menial services division. - <br>It has to replace approximately <<if _corpDivMenialProc > 1>>@@.red;<<print _corpDivMenialProc>> slaves@@<<else>>@@.red;less than one slave@@<</if>> each week when operating at capacity ($corpDivMenialDev). - <br>It costs @@.red;<<print cashFormat(_corpDivMenialCost)>>@@ to run. On average that is @@.red;<<print cashFormat(_corpDivMenialCostPU)>>@@ per slave. - <br>The menial services generate @@.yellowgreen;<<print cashFormat(_corpDivMenialRev)>>@@ per slave on average. - <<if $corpDivMenialSlaves > 0>> - <br>Currently the division is exploiting <<if $corpDivMenialSlaves > 1>>@@.green;$corpDivMenialSlaves slaves.@@<<else>>@@.green;one slave.@@<</if>> - <<if $corpDivMenialSlaves < $corpDivMenialDev>> - <br>There is room to exploit more slaves. - <<if $corpCash >= 15 * menialSlaveCost()>> - If you do not have eligible slaves in your corporation to move here you can buy them from the market. [[Buy 1|Manage Corporation][$corpCash -= 15 * menialSlaveCost(), $corpDivMenialSlaves += 1, $menialSupplyFactor -= 1, $corpAssetsSlave += 15 * menialSlaveCost()]] - <<if $corpCash > 150 * menialSlaveCost(10)>> - | [[Buy 10|Manage Corporation][$corpCash -= 150 * menialSlaveCost(10), $corpDivMenialSlaves += 10, $menialSupplyFactor -= 10, $corpAssetsSlave += 150 * menialSlaveCost(10)]] - <</if>> - <<if $corpCash > 15 * menialSlaveCost($corpDivMenialDev - $corpDivMenialSlaves) * ($corpDivMenialDev - $corpDivMenialSlaves)>> - | [[Fill|Manage Corporation][$corpCash -= 15 * menialSlaveCost($corpDivMenialDev - $corpDivMenialSlaves) * ($corpDivMenialDev - $corpDivMenialSlaves), $corpDivMenialSlaves = $corpDivMenialDev, $menialSupplyFactor -= $corpDivMenialDev - $corpDivMenialSlaves, $corpAssetsSlave += 15 * menialSlaveCost($corpDivMenialDev - $corpDivMenialSlaves) * ($corpDivMenialDev - $corpDivMenialSlaves)]] - <</if>> - <</if>> - <</if>> - <</if>> - <br>Expanding the division costs @@.red;<<print cashFormat(6500)>>.@@ Downsizing recoups 80% of the investment. - <br><<if $corpCash > 6500>> - [[Expand Division|Manage Corporation][$corpDivMenialDev += 1, $corpCash -= 6500, $corpAssetsDev += 6500]] - <</if>> - <<if $corpCash > 65000>> - | [[Expand x10|Manage Corporation][$corpDivMenialDev += 10, $corpCash -= 65000, $corpAssetsDev += 65000]] - <</if>> - <<if $corpDivMenialDev > 20>> - <<if $corpCash > 6500>> - | - <</if>> - <<if $corpDivMenialSlaves == $corpDivMenialDev>> - [[Downsize Division|Manage Corporation][$corpDivMenialDev -= 1, $corpCash += 5200 + 15 * menialSlaveCost(), $corpDivMenialSlaves -= 1, $corpAssetsDev -= 5200]] - <<else>> - [[Downsize Division|Manage Corporation][$corpDivMenialDev -= 1, $corpCash += 5200, $corpAssetsDev -= 5200]] - <</if>> - <</if>> - <<if $corpDivMenialDev > 30>> - <<if $corpDivMenialSlaves >= $corpDivMenialDev - 10>> - <<set _corpDivMenialSlavesSell = $corpDivMenialSlaves - ($corpDivMenialDev - 10)>> - | [[Downsize x10|Manage Corporation][$corpDivMenialDev -= 10, $corpCash += 52000 + 15 * _corpDivMenialSlavesSell * menialSlaveCost(), $corpDivMenialSlaves -= _corpDivMenialSlavesSell, $corpAssetsDev -= 52000]] - <<else>> - | [[Downsize x10|Manage Corporation][$corpDivMenialDev -= 10, $corpCash += 52000, $corpAssetsDev -= 52000]] - <</if>> - <</if>> - <br>Rules: - <<if ndef $corpDivMenialFromMarket>> - Do not auto buy slaves from the market [[Auto Buy|Manage Corporation][$corpDivMenialFromMarket = 1]] - <<else>> - Auto buy slaves from the market <<link "Stop Auto Buy">><<unset $corpDivMenialFromMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if $corpDiv > 1>> - <br>Dissolve the division. @@.orange;//Think before you click//@@ - <<link "Dissolve">> - <<set $corpCash += $corpDivMenialSlaves * 15 * menialSlaveCost(-$corpDivMenialSlaves) + $corpDivMenialDev * 5200, - $corpAssetsDev -= $corpDivMenialDev * 5200, - $corpAssetsSlave -= $corpDivMenialSlaves * 15 * menialSlaveCost(-$corpDivMenialSlaves), - $corpDivMenial = 0, - $corpDivMenialDev = 0, - $menialDemandFactor -= $corpDivMenialSlaves, - $corpExpandToken += 1>> - <<unset $corpDivMenialSlaves, - $corpDivBreakToMenial, - $corpDivLegalToMenial>> - <<goto "Manage Corporation">> - <</link>> - <</if>> - <br> -<</if>> - -<<if $corpDivDairy == 0>> - <<if $corpExpandToken > 0>> - <<if $corpDivSurgery > 0>> - <<if $corpCash > 430000>> - <br>The corporation can expand by starting a dairy division at a cost of @@.yelllowgreen;<<print cashFormat(430000)>>.@@ [[Add Division|Manage Corporation][$corpDivDairy = 1, $corpCash -= 430000, $corpDivDairySlaves = 10, $corpDivDairyDev = 10, $corpDiv += 1, $corpExpandToken -= 1, $corpAssetsSlave += 230000, $corpAssetsDev += 200000]]<br> - <<else>> - <br>The corporation does not have the funds to add a dairy division; @@.yellowgreen;<<print cashFormat(430000)>>@@ required.<br> - <</if>> - <</if>> - <</if>> -<<else>> - <<set _corpDivDairyCost = Math.trunc(850 * $corpDivDairySlaves + 0.4 * Math.pow($corpDivDairyDev, 2)), - _corpDivDairyCostPU = Math.trunc(_corpDivDairyCost / ($corpDivDairySlaves)), - _corpDivDairyRev = 3000, - _corpDivDairyProc = Math.trunc($corpDivDairyDev * 0.05)>> - <br>The corporation has a dairy division. - <br>It has to replace approximately <<if _corpDivDairyProc > 1>>@@.red;<<print _corpDivDairyProc>> slaves@@<<else>>@@.red;less than one slave@@<</if>> each week when operating at capacity ($corpDivDairyDev). - <br>It costs @@.red;<<print cashFormat(_corpDivDairyCost)>>@@ to run. On average that is @@.red;<<print cashFormat(_corpDivDairyCostPU)>>@@ per slave. - <br>The dairy generates @@.yellowgreen;<<print cashFormat(_corpDivDairyRev)>>@@ per slave on average. - <<if $corpDivDairySlaves > 0>> - <br>Currently the division is milking <<if $corpDivDairySlaves > 1>>@@.green;$corpDivDairySlaves slaves.@@<<else>>@@.green;one slave.@@<</if>> - <<if $corpDivDairySlaves < $corpDivDairyDev>> - <br>there is room to milk more slaves. - <<if $corpCash >= 23 * menialSlaveCost()>> - If you do not have eligible slaves in your corporation to move here you can buy them from the market. [[Buy 1|Manage Corporation][$corpCash -= 23 * menialSlaveCost(), $corpDivDairySlaves += 1, $menialSupplyFactor -= 1, $corpAssetsSlave += 23 * menialSlaveCost()]] - <<if $corpCash > 230 * menialSlaveCost(10)>> - | [[Buy 10|Manage Corporation][$corpCash -= 230 * menialSlaveCost(10), $corpDivDairySlaves += 10, $menialSupplyFactor -= 10, $corpAssetsSlave += 230 * menialSlaveCost(10)]] - <</if>> - <<if $corpCash > 23 * menialSlaveCost($corpDivDairyDev - $corpDivDairySlaves) * ($corpDivDairyDev - $corpDivDairySlaves)>> - | [[Fill|Manage Corporation][$corpCash -= 23 * menialSlaveCost($corpDivDairyDev - $corpDivDairySlaves) * ($corpDivDairyDev - $corpDivDairySlaves), $corpDivDairySlaves = $corpDivDairyDev, $menialSupplyFactor -= $corpDivDairyDev - $corpDivDairySlaves, $corpAssetsSlave += 23 * menialSlaveCost($corpDivDairyDev - $corpDivDairySlaves) * ($corpDivDairyDev - $corpDivDairySlaves)]] - <</if>> - <</if>> - <</if>> - <</if>> - <br>Expanding the division costs @@.red;<<print cashFormat(15000)>>.@@ Downsizing recoups 80% of the investment. - <br><<if $corpCash > 15000>> - [[Expand Division|Manage Corporation][$corpDivDairyDev += 1, $corpCash -= 15000, $corpAssetsDev += 15000]] - <</if>> - <<if $corpCash > 150000>> - | [[Expand x10|Manage Corporation][$corpDivDairyDev += 10, $corpCash -= 150000, $corpAssetsDev += 150000]] - <</if>> - <<if $corpDivDairyDev > 10>> - <<if $corpCash > 15000>> - | - <</if>> - <<if $corpDivDairySlaves == $corpDivDairyDev>> - [[Downsize Division|Manage Corporation][$corpDivDairyDev -= 1, $corpCash += 12000 + 23 * menialSlaveCost(), $corpDivDairySlaves -= 1, $corpAssetsDev -= 12000]] - <<else>> - [[Downsize Division|Manage Corporation][$corpDivDairyDev -= 1, $corpCash += 12000, $corpAssetsDev -= 12000]] - <</if>> - <</if>> - <<if $corpDivDairyDev > 20>> - <<if $corpDivDairySlaves >= $corpDivDairyDev - 10>> - <<set _corpDivDairySlavesSell = $corpDivDairySlaves - ($corpDivDairyDev - 10)>> - | [[Downsize x10|Manage Corporation][$corpDivDairyDev -= 10, $corpCash += 120000 + 23 * _corpDivDairySlavesSell * menialSlaveCost(), $corpDivDairySlaves -= _corpDivDairySlavesSell, $corpAssetsDev -= 120000]] - <<else>> - | [[Downsize x10|Manage Corporation][$corpDivDairyDev -= 10, $corpCash += 120000, $corpAssetsDev -= 120000]] - <</if>> - <</if>> - <br>Rules: - <<if ndef $corpDivDairyFromMarket>> - Do not auto buy slaves from the market [[Auto Buy|Manage Corporation][$corpDivDairyFromMarket = 1]] - <<else>> - Auto buy slaves from the market <<link "Stop Auto Buy">><<unset $corpDivDairyFromMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if $corpDiv > 1>> - <br>Dissolve the division. @@.orange;//Think before you click//@@ - <<link "Dissolve">> - <<set $corpCash += $corpDivDairySlaves * 23 * menialSlaveCost(-$corpDivDairySlaves) + $corpDivDairyDev * 12000, - $corpDivDairy = 0, - $corpAssetsDev -= $corpDivDairyDev * 12000, - $corpAssetsSlave -= $corpDivDairySlaves * 23 * menialSlaveCost(-$corpDivDairySlaves), - $corpDivDairyDev = 0, - $menialDemandFactor -= $corpDivDairySlaves, - $corpExpandToken += 1>> - <<unset $corpDivDairySlaves, - $corpDivSurgeryToDairy>> - <<goto "Manage Corporation">> - <</link>> - <</if>> - <br> -<</if>> - -<<if $corpDivWhore == 0>> - <<if $corpExpandToken > 0>> - <<if $corpDivTrain > 0>> - <<if $corpDivTrainSurgerySwitch == 0>> - <<if $corpCash > 460000>> - <br>The corporation can expand by starting an escort division at a cost of @@.yelllowgreen;<<print cashFormat(460000)>>.@@ [[Add Division|Manage Corporation][$corpDivWhore = 1, $corpCash -= 460000, $corpDivWhoreSlaves = 10, $corpDivWhoreDev = 10, $corpDiv += 1, $corpExpandToken -= 1, $corpAssetsDev += 200000, $corpAssetsSlave += 260000]]<br> - <<else>> - <br>The corporation does not have the funds to add an escort division; @@.yellowgreen;<<print cashFormat(460000)>>@@ required.<br> - <</if>> - <<else>> - <<if $corpCash > 540000>> - <br>The corporation can expand by starting an escort division at a cost of @@.yelllowgreen;<<print cashFormat(540000)>>.@@ [[Add Division|Manage Corporation][$corpDivWhore = 1, $corpCash -= 540000, $corpDivWhoreSlaves = 10, $corpDivWhoreDev = 10, $corpDiv += 1, $corpExpandToken -= 1, $corpAssetsDev += 200000, $corpAssetsSlave += 340000]]<br> - <<else>> - <br>The corporation does not have the funds to add an escort division; @@.yellowgreen;<<print cashFormat(540000)>>@@ required.<br> - <</if>> - <</if>> - <</if>> - <</if>> -<<else>> - <<set _corpDivWhoreCost = Math.trunc(700 * $corpDivWhoreSlaves + 0.25 * Math.pow($corpDivWhoreDev, 2)), - _corpDivWhoreCostPU = Math.trunc(_corpDivWhoreCost / ($corpDivWhoreSlaves)), - _corpDivWhoreRev = 3000, - _corpDivWhoreProc = Math.trunc($corpDivWhoreDev * 0.05)>> - <br>The corporation has an escort division. - <br>It has to replace approximately <<if _corpDivWhoreProc > 1>>@@.red;<<print _corpDivWhoreProc>> slaves@@<<else>>@@.red;less than one slave@@<</if>> each week when operating at capacity ($corpDivWhoreDev). - <br>It costs @@.red;<<print cashFormat(_corpDivWhoreCost)>>@@ to run. On average that is @@.red;<<print cashFormat(_corpDivWhoreCostPU)>>@@ per slave. - <br>The escorts generate @@.yellowgreen;<<print cashFormat(_corpDivWhoreRev)>>@@ per slave on average. - <<if $corpDivWhoreSlaves > 0>> - <br>Currently the division is whoring out <<if $corpDivWhoreSlaves > 1>>@@.green;$corpDivWhoreSlaves slaves.@@<<else>>@@.green;one slave.@@<</if>> - <<if $corpDivWhoreSlaves < $corpDivWhoreDev>> - <br>There is room to whore out more slaves. - <<if $corpDivSurgery == 0 && $corpDivTrainSurgerySwitch == 0>> - <<if $corpCash >= 26 * menialSlaveCost()>> - If you do not have eligible slaves in your corporation to move here you can buy them from the market. [[Buy 1|Manage Corporation][$corpCash -= 26 * menialSlaveCost(), $corpDivWhoreSlaves += 1, $menialSupplyFactor -= 1, $corpAssetsSlave += 26 * menialSlaveCost()]] - <<if $corpCash > 260 * menialSlaveCost(10)>> - | [[Buy 10|Manage Corporation][$corpCash -= 260 * menialSlaveCost(10), $corpDivWhoreSlaves += 10, $menialSupplyFactor -= 10, $corpAssetsSlave += 260 * menialSlaveCost(10)]] - <</if>> - <<if $corpCash > 26 * menialSlaveCost($corpDivWhoreDev - $corpDivWhoreSlaves) * ($corpDivWhoreDev - $corpDivWhoreSlaves)>> - | [[Fill|Manage Corporation][$corpCash -= 26 * menialSlaveCost($corpDivWhoreDev - $corpDivWhoreSlaves) * ($corpDivWhoreDev - $corpDivWhoreSlaves), $corpDivWhoreSlaves = $corpDivWhoreDev, $menialSupplyFactor -= $corpDivWhoreDev - $corpDivWhoreSlaves, $corpAssetsSlave += 26 * menialSlaveCost($corpDivWhoreDev - $corpDivWhoreSlaves) * ($corpDivWhoreDev - $corpDivWhoreSlaves)]] - <</if>> - <</if>> - <<elseif $corpDivTrainSurgerySwitch == 1 && $corpDivTrainSurgeryTimer < 20>> - <<if $corpCash >= Math.trunc((26 + 0.4 * $corpDivTrainSurgeryTimer) * menialSlaveCost())>> - If you do not have eligible slaves in your corporation to move here you can buy them from the market. [[Buy 1|Manage Corporation][$corpCash -= Math.trunc((26 + 0.4 * $corpDivTrainSurgeryTimer) * menialSlaveCost()), $corpDivWhoreSlaves += 1, $menialSupplyFactor -= 1, $corpAssetsSlave += (26 + 4 * $corpDivTrainSurgeryTimer) * menialSlaveCost()]] - <<if $corpCash > (260 + 4 * $corpDivTrainSurgeryTimer) * menialSlaveCost(10)>> - | [[Buy 10|Manage Corporation][$corpCash -= (260 + 4 * $corpDivTrainSurgeryTimer) * menialSlaveCost(10), $corpDivWhoreSlaves += 10, $menialSupplyFactor -= 10, $corpAssetsSlave += (260 + 4 * $corpDivTrainSurgeryTimer) * menialSlaveCost(10)]] - <</if>> - <<if $corpCash > (26 + 4 * $corpDivTrainSurgeryTimer) * menialSlaveCost($corpDivWhoreDev - $corpDivWhoreSlaves) * ($corpDivWhoreDev - $corpDivWhoreSlaves)>> - | [[Fill|Manage Corporation][$corpCash -= (26 + 4 * $corpDivTrainSurgeryTimer) * menialSlaveCost($corpDivWhoreDev - $corpDivWhoreSlaves) * ($corpDivWhoreDev - $corpDivWhoreSlaves), $corpDivWhoreSlaves = $corpDivWhoreDev, $menialSupplyFactor -= $corpDivWhoreDev - $corpDivWhoreSlaves, $corpAssetsSlave += (26 + 4 * $corpDivTrainSurgeryTimer) * menialSlaveCost($corpDivWhoreDev - $corpDivWhoreSlaves) * ($corpDivWhoreDev - $corpDivWhoreSlaves)]] - <</if>> - <</if>> - <<else>> - <<if $corpCash >= 34 * menialSlaveCost()>> - If you do not have eligible slaves in your corporation to move here you can buy them from the market. [[Buy 1|Manage Corporation][$corpCash -= 34 * menialSlaveCost(), $corpDivWhoreSlaves += 1, $menialSupplyFactor -= 1, $corpAssetsSlave += 34 * menialSlaveCost()]] - <<if $corpCash > 340 * menialSlaveCost(10)>> - | [[Buy 10|Manage Corporation][$corpCash -= 340 * menialSlaveCost(10), $corpDivWhoreSlaves += 10, $menialSupplyFactor -= 10, $corpAssetsSlave += 340 * menialSlaveCost()]] - <</if>> - <<if $corpCash > 34 * menialSlaveCost($corpDivWhoreDev - $corpDivWhoreSlaves) * ($corpDivWhoreDev - $corpDivWhoreSlaves)>> - | [[Fill|Manage Corporation][$corpCash -= 34 * menialSlaveCost($corpDivWhoreDev - $corpDivWhoreSlaves) * ($corpDivWhoreDev - $corpDivWhoreSlaves), $corpDivWhoreSlaves = $corpDivWhoreDev, $menialSupplyFactor -= $corpDivWhoreDev - $corpDivWhoreSlaves, $corpAssetsSlave += 34 * menialSlaveCost($corpDivWhoreDev - $corpDivWhoreSlaves) * ($corpDivWhoreDev - $corpDivWhoreSlaves)]] - <</if>> - <</if>> - <</if>> - <</if>> - <</if>> - <br>Expanding the division costs @@.red;<<print cashFormat(20000)>>.@@ Downsizing recoups 80% of the investment. - <br><<if $corpCash > 20000>> - [[Expand Division|Manage Corporation][$corpDivWhoreDev += 1, $corpCash -= 20000, $corpAssetsDev += 20000]] - <</if>> - <<if $corpCash > 200000>> - | [[Expand x10|Manage Corporation][$corpDivWhoreDev += 10, $corpCash -= 200000, $corpAssetsDev += 200000]] - <</if>> - <<if $corpDivTrainSurgeryTimer < 20 || $corpDivSurgery == 0>> - <<if $corpDivWhoreDev > 10>> - <<if $corpCash > 20000>> - | - <</if>> - <<if $corpDivWhoreSlaves == $corpDivWhoreDev>> - [[Downsize Division|Manage Corporation][$corpDivWhoreDev -= 1, $corpCash += 16000 + 26 * menialSlaveCost(), $corpDivWhoreSlaves -= 1, $corpAssetsDev -= 16000]] - <<else>> - [[Downsize Division|Manage Corporation][$corpDivWhoreDev -= 1, $corpCash += 16000, $corpAssetsDev -= 16000]] - <</if>> - <</if>> - <<if $corpDivWhoreDev > 20>> - <<if $corpDivWhoreSlaves >= $corpDivWhoreDev - 10>> - <<set _corpDivWhoreSlavesSell = $corpDivWhoreSlaves - ($corpDivWhoreDev - 10)>> - | [[Downsize x10|Manage Corporation][$corpDivWhoreDev -= 10, $corpCash += 160000 + 26 * _corpDivWhoreSlavesSell * menialSlaveCost(), $corpDivWhoreSlaves -= _corpDivWhoreSlavesSell, $corpAssetsDev -= 160000]] - <<else>> - | [[Downsize x10|Manage Corporation][$corpDivWhoreDev -= 10, $corpCash += 160000, $corpAssetsDev -= 160000]] - <</if>> - <</if>> - <<else>> - <<if $corpDivWhoreDev > 10>> - <<if $corpDivWhoreSlaves == $corpDivWhoreDev>> - | [[Downsize Division|Manage Corporation][$corpDivWhoreDev -= 1, $corpCash += 16000 + 34 * menialSlaveCost(), $corpDivWhoreSlaves -= 1, $corpAssetsDev -= 16000]] - <<else>> - | [[Downsize Division|Manage Corporation][$corpDivWhoreDev -= 1, $corpCash += 16000, $corpAssetsDev -= 16000]] - <</if>> - <</if>> - <<if $corpDivWhoreDev > 20>> - <<if $corpDivWhoreSlaves >= $corpDivWhoreDev - 10>> - <<set _corpDivWhoreSlavesSell = $corpDivWhoreSlaves - ($corpDivWhoreDev - 10)>> - | [[Downsize x10|Manage Corporation][$corpDivWhoreDev -= 10, $corpCash += 160000 + 34 * _corpDivWhoreSlavesSell * menialSlaveCost(), $corpDivWhoreSlaves -= _corpDivWhoreSlavesSell, $corpAssetsDev -= 160000]] - <<else>> - | [[Downsize x10|Manage Corporation][$corpDivWhoreDev -= 10, $corpCash += 160000, $corpAssetsDev -= 160000]] - <</if>> - <</if>> - <</if>> - <br>Rules: - <<if ndef $corpDivWhoreFromMarket>> - Do not auto buy slaves from the market [[Auto Buy|Manage Corporation][$corpDivWhoreFromMarket = 1]] - <<else>> - Auto buy slaves from the market <<link "Stop Auto Buy">><<unset $corpDivWhoreFromMarket>><<goto "Manage Corporation">><</link>> - <</if>> - <<if $corpDiv > 1>> - <<if $corpDivTrainSurgeryTimer < 20 || $corpDivSurgery == 0>> - <br>Dissolve the division. @@.orange;//Think before you click//@@ - <<link "Dissolve">> - <<set $corpCash += $corpDivWhoreSlaves * 26 * menialSlaveCost(-$corpDivWhoreSlaves) + $corpDivWhoreDev * 16000, - $corpAssetsDev -= $corpDivWhoreDev * 16000, - $corpAssetsSlave -= $corpDivWhoreSlaves * 26 * menialSlaveCost(-$corpDivWhoreSlaves), - $corpDivWhore = 0, - $corpDivWhoreDev = 0, - $menialDemandFactor -= $corpDivWhoreSlaves, - $corpExpandToken += 1>> - <<unset $corpDivWhoreSlaves, - $corpDivTrainToWhore>> - <<goto "Manage Corporation">> - <</link>> - <<else>> - <br>Dissolve the division. @@.orange;//Think before you click//@@ - <<link "Dissolve">> - <<set $corpCash += $corpDivWhoreSlaves * 34 * menialSlaveCost(-$corpDivWhoreSlaves) + $corpDivWhoreDev * 16000, - $corpAssetsDev -= $corpDivWhoreDev * 16000, - $corpAssetsSlave -= $corpDivWhoreSlaves * 34 * menialSlaveCost(-$corpDivWhoreSlaves), - $corpDivWhore = 0, - $corpDivWhoreDev = 0, - $menialDemandFactor -= $corpDivWhoreSlaves, - $corpExpandToken += 1>> - <<unset $corpDivWhoreSlaves, - $corpDivTrainToWhore>> - <<goto "Manage Corporation">> - <</link>> - <</if>> - <</if>> - <br> -<</if>> - -<br><br> - -__Dividend__ -<<if $dividendRatio > 0.5>> - <br>The corporation is currently reserving 75% of its profit to be paid out as dividends. [[Reduce Ratio|Manage Corporation][$dividendRatio = 0.5]] -<<elseif $dividendRatio > 0.25>> - <br>The corporation is currently reserving 50% of its profit to be paid out as dividends. [[Increase Ratio|Manage Corporation][$dividendRatio = 0.75]] | [[Reduce Ratio|Manage Corporation][$dividendRatio = 0.25]] -<<elseif $dividendRatio > 0.1>> - <br>The corporation is currently reserving 25% of its profit to be paid out as dividends. [[Increase Ratio|Manage Corporation][$dividendRatio = 0.5]] | [[Reduce Ratio|Manage Corporation][$dividendRatio = 0.1]] -<<elseif $dividendRatio > 0.05>> - <br>The corporation is currently reserving 10% of its profit to be paid out as dividends. [[Increase Ratio|Manage Corporation][$dividendRatio = 0.25]] | [[Reduce Ratio|Manage Corporation][$dividendRatio = 0.05]] -<<elseif $dividendRatio > 0>> - <br>The corporation is currently reserving 5% of its profit to be paid out as dividends. [[Increase Ratio|Manage Corporation][$dividendRatio = 0.1]] | [[Reduce Ratio|Manage Corporation][$dividendRatio = 0]] -<<else>> - <br>The corporation is currently not reserving a portion of its profit to be paid out as dividends. [[Increase Ratio|Manage Corporation][$dividendRatio = 0.05]] -<</if>> -<<if $corpCashDividend == 0>> - <br>You can direct the corporation to reserve cash over <<if corpValue() * 0.05 > 1000000>>5% of @@.yellowgreen;<<print cashFormat(corpValue())>>@@<<else>>@@.yellowgreen;<<print cashFormat(1000000)>>@@<</if>> to be paid out as dividends as well. [[Payout Cash Reserves|Manage Corporation][$corpCashDividend = 1]] -<<else>> - <br>The corporation will payout unused cash reserves as dividends [[Stop|Manage Corporation][$corpCashDividend = 0]] -<</if>> - -<br><br> - -__Shares__ -<br>You own <<print num($personalShares)>> shares while another <<print num($publicShares)>> shares are traded publicly. The going rate on the market for 1000 shares is currently @@.yellowgreen;<<print cashFormat(corpSharePrice())>>.@@ -<br>The corporation can buyback 1000 shares for @@.red;<<print cashFormat(corpSharePrice(-1000))>>@@ or issue 1000 shares and net @@.yellowgreen;<<print cashFormat(corpSharePrice(1000))>>.@@ The corporation will prefer to round shares to the nearest 1000 and will issue or buy shares toward that goal first. -<<if $corpCash > corpSharePrice(-1000)>> - <<if $publicShares <= $personalShares - 2000 && $publicShares > 0>> /*It won't buy back player shares if the corporation is entirely owned by the player*/ - <<set _persExtraShares = $personalShares % 1000 || 1000>> - <br>The corporation can buyback some of your shares. - <<= "[[Buyback "+ _persExtraShares + "|Manage Corporation][cashX(corpSharePrice(-"+_persExtraShares+"), 'stocksTraded'), $corpCash -= corpSharePrice(-"+_persExtraShares+"), $personalShares -= "+_persExtraShares+"]]">> - <<elseif $publicShares >= 1000>> - <<set _pubExtraShares = $publicShares % 1000 || 1000>> - <br>The corporation can buyback some of the public shares. - <<= "[[Buyback "+ _pubExtraShares + "|Manage Corporation][$corpCash -= corpSharePrice(-"+_pubExtraShares+"), $publicShares -= "+_pubExtraShares+"]]">> - <</if>> -<</if>> - -<<set _persLeftoverShares = 1000 - ($personalShares % 1000)>> -<<if $cash > corpSharePrice(_persLeftoverShares)>> - <br>The corporation can issue <<=_persLeftoverShares>> shares to you. - <<= "[[Issue " + _persLeftoverShares + "|Manage Corporation][cashX(forceNeg(corpSharePrice("+_persLeftoverShares+")), 'stocksTraded'), $corpCash += corpSharePrice("+_persLeftoverShares+"), $personalShares += "+_persLeftoverShares+"]]">> -<</if>> -<<set _pubLeftoverShares = 1000 - ($publicShares % 1000)>> -<<if $publicShares <= $personalShares - 2000>> - <br>The corporation can issue <<=_pubLeftoverShares>> shares onto the stock market. - <<= "[[Issue " + _pubLeftoverShares + "|Manage Corporation][$corpCash += corpSharePrice("+_pubLeftoverShares+"), $publicShares += "+_pubLeftoverShares+"]]">> -<</if>> -<<if $publicShares <= $personalShares - 3000>> - <br>You can sell some of your shares on the stock market. [[Sell 1000|Manage Corporation][cashX(corpSharePrice(), "stocksTraded"), $personalShares -= 1000, $publicShares += 1000]] -<</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>> -<br>__Stock Split__ - -/* Splitting shares when they're unwieldy */ -<<set _splitFeeInitial = 10000>> -<<set _splitFeeValue = _splitFeeInitial - Math.floor((_splitFeeInitial * ($PC.trading / 100.0) / 2.0) / 1000) * 1000>> -<<set _splitStockConstants = [ -{ - 'newStocks': 3, - 'oldStocks': 2, - 'weeks': 1, - 'cost': 7.5 -}, -{ - 'newStocks': 2, - 'weeks': 1, - 'cost': 10 -}, -{ - 'newStocks': 3, - 'weeks': 2, - 'cost': 12.5 -}, -{ - 'newStocks': 4, - 'weeks': 3, - 'cost': 15 -}, -{ - 'oldStocks': 4, - 'weeks': 1, - 'cost': 15 -}, -{ - 'oldStocks': 10, - 'weeks': 2, - 'cost': 25 -}, -]>> - - <br>The corporation can perform a stock split to increase the number of stocks while maintaining the same owned value. This requires paying a market fee of @@.red;<<= cashFormat(_splitFeeValue)>>@@ plus a per-share fee depending on the type of split being done. - <<if _splitFeeValue < _splitFeeInitial>> - //You negotiated lower fees due to your @@.springgreen;business acumen@@.// - <</if>> -<<if $corpSpecTimer > 0>> - <br>//The corporation has restructured too recently.// -<</if>> -<ul> -<<for _stockType range _splitStockConstants>> - <<set _splitInitial = _stockType['cost']>> - <<set _splitValue = _splitInitial>> - <<set _splitDenom = _stockType['oldStocks'] || 1>> - <<set _splitNumerator = _stockType['newStocks'] || 1>> - <<set _splitMultiplier = _splitNumerator / _splitDenom>> - <<set _splitTotal = _splitValue * ($publicShares + $personalShares) + _splitFeeValue>> - <<set _splitWeek = _stockType['weeks']>> - <li><<= _splitNumerator >>-for-<<= _splitDenom>> <<if _splitDenom > _splitNumerator>>inverse<</if>> stock split at @@.red;<<= cashFormat(_splitValue) >>@@ per share. - Including market fees, this will cost the corporation a total of @@.red;<<= cashFormat(_splitTotal)>>@@, - leaving the going rate for stock at @@.yellowgreen;<<= cashFormat(Math.floor(corpSharePrice(0, $personalShares * _splitMultiplier, $publicShares * _splitMultiplier))) >>@@ per 1000 shares. - <<if $corpSpecTimer == 0>> - <<if $publicShares % _splitDenom != 0 || $personalShares % _splitDenom != 0>> - //The number of shares cannot be evenly split// - <<elseif $corpCash > _splitTotal>> - <<= "[[Split Shares|Manage Corporation][$corpCash -= " + _splitTotal + ", $publicShares *= " + _splitMultiplier + ", $personalShares *= " + _splitMultiplier + ", $corpSpecTimer="+_splitWeek+"]]" >> - <<else>> - //The corporation cannot afford the fees.// - <</if>> - <</if>> - </li> -<</for>> -</ul> -<br><br> - -__Slave specialization__ -<<if $corpSpecToken > 0>> /*Spending tokens on new specializations*/ - <<if $corpSpecToken > 1>> - <br>Your corporation has $corpSpecToken specializations left. - <<else>> - <br>Your corporation has one specialization left. - <</if>> - <<if $corpSpecTimer > 0>> - You have recently changed specializations and the corporation needs <<if $corpSpecTimer > 1>>$corpSpecTimer 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 $corpSpecRaces.length == 0 && ($corpDivExtra > 0 || $corpDivLegal > 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][$corpSpecRaces = corpBlacklistRace("amerindian", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> - <<if $arcologies[0].FSSubjugationistRace != "asian" || $arcologies[0].FSSubjugationist == "unset">>[[Asian|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> - <<if $arcologies[0].FSSubjugationistRace != "black" || $arcologies[0].FSSubjugationist == "unset">>[[Black|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> - <<if $arcologies[0].FSSubjugationistRace != "indo-aryan" || $arcologies[0].FSSubjugationist == "unset">>[[Indo-aryan|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> - <<if $arcologies[0].FSSubjugationistRace != "latina" || $arcologies[0].FSSubjugationist == "unset">>[[Latina|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> - <<if $arcologies[0].FSSubjugationistRace != "malay" || $arcologies[0].FSSubjugationist == "unset">>[[Malay|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> - <<if $arcologies[0].FSSubjugationistRace != "middle eastern" || $arcologies[0].FSSubjugationist == "unset">>[[Middle Eastern|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> - <<if $arcologies[0].FSSubjugationistRace != "mixed race" || $arcologies[0].FSSubjugationist == "unset">>[[Mixed Race|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> - <<if $arcologies[0].FSSubjugationistRace != "pacific islander" || $arcologies[0].FSSubjugationist == "unset">>[[Pacific Islander|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> - <<if $arcologies[0].FSSubjugationistRace != "semitic" || $arcologies[0].FSSubjugationist == "unset">>[[Semitic|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> - <<if $arcologies[0].FSSubjugationistRace != "southern european" || $arcologies[0].FSSubjugationist == "unset">>[[Southern European|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]] | <</if>> - <<if $arcologies[0].FSSubjugationistRace != "white" || $arcologies[0].FSSubjugationist == "unset">>[[White|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white", 1), $corpSpecToken -= 1, $corpSpecTimer = 1]]<</if>> - — //additional races can be excluded. 4 races per token.// - <<if $corpSpecToken >= 3>> - <br>Only slaves who are - <<if $arcologies[0].FSSupremacistRace != "amerindian" || $arcologies[0].FSSubjugationist == "unset">>[[Amerindian|Manage Corporation][$corpSpecRaces = corpBlacklistRace("amerindian", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> - <<if $arcologies[0].FSSupremacistRace != "asian" || $arcologies[0].FSSubjugationist == "unset">>[[Asian|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> - <<if $arcologies[0].FSSupremacistRace != "black" || $arcologies[0].FSSubjugationist == "unset">>[[Black|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> - <<if $arcologies[0].FSSupremacistRace != "indo-aryan" || $arcologies[0].FSSubjugationist == "unset">>[[Indo-aryan|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> - <<if $arcologies[0].FSSupremacistRace != "latina" || $arcologies[0].FSSubjugationist == "unset">>[[Latina|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> - <<if $arcologies[0].FSSupremacistRace != "malay" || $arcologies[0].FSSubjugationist == "unset">>[[Malay|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> - <<if $arcologies[0].FSSupremacistRace != "middle eastern" || $arcologies[0].FSSubjugationist == "unset">>[[Middle Eastern|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> - <<if $arcologies[0].FSSupremacistRace != "mixed race" || $arcologies[0].FSSubjugationist == "unset">>[[Mixed Race|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> - <<if $arcologies[0].FSSupremacistRace != "pacific islander" || $arcologies[0].FSSubjugationist == "unset">>[[Pacific Islander|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> - <<if $arcologies[0].FSSupremacistRace != "semitic" || $arcologies[0].FSSubjugationist == "unset">>[[Semitic|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> - <<if $arcologies[0].FSSupremacistRace != "southern european" || $arcologies[0].FSSubjugationist == "unset">>[[Southern European|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]] | <</if>> - <<if $arcologies[0].FSSupremacistRace != "white" || $arcologies[0].FSSubjugationist == "unset">>[[White|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white", 0), $corpSpecToken -= 3, $corpSpecTimer = 2]]<</if>> - <<else>> - <br>Only slaves of a particular race requires 3 tokens. - <</if>> - <</if>> - <<if $seeDicks != 0 && ndef $corpSpecGender && ($corpDivExtra > 0 || $corpDivLegal > 0)>> /*This used to be $captureUpgradeGender, it is a general acquisition specialization*/ - <br>Train only slaves with [[Pussies|Manage Corporation][$corpSpecGender = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Dicks|Manage Corporation][$corpSpecGender = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] - <</if>> - <<if ndef $corpSpecHeight && ($corpDivExtra > 0 || $corpDivLegal > 0)>> /*This is a general acquisition specialization*/ - <br>Slaves that are [[Short|Manage Corporation][$corpSpecHeight = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Tall|Manage Corporation][$corpSpecHeight = 4, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// - <</if>> - <<if ndef $corpSpecVirgin && ($corpDivExtra > 0 || $corpDivLegal > 0)>> /*This is a general acquisition specialization*/ - <br>Slaves that are [[Virgins|Manage Corporation][$corpSpecVirgin = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] - <</if>> - <<if ndef $corpSpecIntelligence && $corpDivLegal > 0 >> /*This used to be $entrapmentUpgradeIntelligence, it is a legal enslavement specialization*/ - <br>Slaves who are [[Stupid|Manage Corporation][$corpSpecIntelligence = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Intelligent|Manage Corporation][$corpSpecIntelligence = 3, $corpSpecToken -= 1, $corpSpecTimer = 2]] --//Further specializations possible// - <</if>> - <<if ndef $corpSpecAge && $corpDivExtra > 0>> /*This used to be $captureUpgradeAge, it is the extralegal enslavement specialization*/ - <br>Slaves who are [[Younger|Manage Corporation][$corpSpecAge = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Older|Manage Corporation][$corpSpecAge = 3, $corpSpecToken -= 1, $corpSpecTimer = 2]] - <</if>> - <<if ndef $corpSpecWeight && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $generalUpgradeWeight, it is a general improvement specialization*/ - <br>Managing slaves' diets to achieve [[Thin Slaves|Manage Corporation][$corpSpecWeight = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Fat nor Thin Slaves|Manage Corporation][$corpSpecWeight = 3, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Fat Slaves|Manage Corporation][$corpSpecWeight = 5, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// - <</if>> - <<if ndef $corpSpecDevotion && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $entrapmentUpgradeDevotionOne/Two, it is a general improvement specialization*/ - <br>Slaves who are [[Reluctant|Manage Corporation][$corpSpecDevotion = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Obedient|Manage Corporation][$corpSpecDevotion = 4, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// - <</if>> - <<if ndef $corpSpecAccent && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $trainingUpgradeAccent, it is a general improvement specialization*/ - <br>Slaves are taught to [[Speak the Language|Manage Corporation][$corpSpecAccent = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Speak without Accent|Manage Corporation][$corpSpecAccent = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] - <</if>> - <<if ndef $corpSpecHormones && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $drugUpgradeHormones, it is a general improvement specialization*/ - <br>Slaves are given hormones to [[Feminize|Manage Corporation][$corpSpecHormones = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Masculinize|Manage Corporation][$corpSpecHormones = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] - <</if>> - <<if ndef $corpSpecInjection && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $drugUpgradeInjectionOne, it is a general improvement specialization*/ - <br>Slave assets are made to be [[Petite|Manage Corporation][$corpSpecInjection = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Tasteful|Manage Corporation][$corpSpecInjection = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Huge|Manage Corporation][$corpSpecInjection = 3, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// - <</if>> - <<if ndef $corpSpecCosmetics && ($corpDivBreak > 0 || $corpDivSurgery > 0 || $corpDivTrain > 0)>> /*This used to be $surgicalUpgradeCosmetics, it is a general improvement specialization*/ - <br>Straightforward cosmetic procedures are [[Applied|Manage Corporation][$corpSpecCosmetics = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Not Applied|Manage Corporation][$corpSpecCosmetics = 0, $corpSpecTimer = 2]] - <</if>> - <<if ndef $corpSpecEducation && $corpDivTrain > 0>> /*This used to be $trainingUpgradeEducation, it is the training specialization*/ - <br>Slaves are given [[No Education|Manage Corporation][$corpSpecEducation == 0, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Basic Education|Manage Corporation][$corpSpecEducation = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// - <</if>> - <<if ndef $corpSpecImplants && $corpDivSurgery > 0>> /*This used to be $surgicalUpgradeImplants, it is the surgery specialization*/ - <br>Slave implants are [[Applied|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Not Applied|Manage Corporation][$corpSpecImplants = 0, $corpSpecTimer = 2]] -- //Further specializations possible// - <</if>> - <<if ndef $corpSpecGenitalia && $corpDivSurgeryDev > 100>> /*This used to be $surgicalUpgradeGenitalia, it is the surgery specialization*/ - <br>Slaves get their genitalia reconfigured [[Add Pussy|Manage Corporation][$corpSpecPussy = 1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Remove Pussy|Manage Corporation][$corpSpecPussy = -1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Add Dick|Manage Corporation][$corpSpecDick = 1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Remove Dick|Manage Corporation][$corpSpecDick = -1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Add Balls|Manage Corporation][$corpSpecBalls = 1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Remove Balls|Manage Corporation][$corpSpecBalls = -1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// - <</if>> - <<if ndef $corpSpecTrust && $corpDivBreak > 0>> /*This used to be $generalUpgradeBreaking, it is the slave breaking specific specialization*/ - <br>Breaking slaves with [[Brutality|Manage Corporation][$corpSpecTrust = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Care|Manage Corporation][$corpSpecTrust = 4, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// - <</if>> - <<if ndef $corpSpecAmputee && $corpDivArcade > 0 && $corpDivSurgeryDev > 100>> /*This is the arcade specialization*/ - <br>Slave limbs are categorically [[Removed|Manage Corporation][$corpSpecAmputee = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] - <</if>> - <<if ndef $corpSpecMuscle && $corpDivMenial > 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][$corpSpecMuscle = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | <</if>>[[Soft|Manage Corporation][$corpSpecMuscle = 3, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Toned|Manage Corporation][$corpSpecMuscle = 4, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// - <</if>> - <<if ndef $corpSpecMilk && $corpDivDairy > 0>> /*This is the dairy specialization*/ - <br>Slaves are made to be lactating [[Naturally|Manage Corporation][$corpSpecMilk = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Through Implant|Manage Corporation][$corpSpecMilk = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] - <</if>> - <<if ndef $corpSpecSexEd && $corpDivWhore > 0>> /*This used to be $trainingUpgradeSexEd, it is the escort division specialization*/ - <br>Slaves are sexually [[Clueless|Manage Corporation][$corpSpecSexEd = 0, $corpSpecToken -= 0, $corpSpecTimer = 2]] | [[Competent|Manage Corporation][$corpSpecSexEd = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] -- //Further specializations possible// - <</if>> - <</if>> -<<else>> - <br>Your corporation cannot pick a new specialization at this time. -<</if>> - -<<if $corpSpec > $corpSpecToken>> /*Modifying specializations*/ - <br><br>You have chosen the following specializations; - <br>//You can choose to specialize further with additional tokens, specialize less, end the specialization or sometimes tweak them for free.// - <<if $corpSpecRaces.length == 12>> - <<set $corpSpecRaces = []>> - <</if>> - <<if $corpSpecRaces.length > 0>> - <br>The corporation enslaves people of the following race(s); - <<if $corpSpecRaces.includes("amerindian")>> - <br>Amerindian - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "amerindian")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("amerindian",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("amerindian",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Amerindian== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("amerindian",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("amerindian",0)]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecRaces.includes("asian")>> - <br>Asian - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "asian")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Asian== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("asian",0)]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecRaces.includes("black")>> - <br>Black - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "black")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Black== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("black",0)]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecRaces.includes("indo-aryan")>> - <br>Indo-Aryan - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "indo-aryan")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Indo-Aryan== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("indo-aryan",0)]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecRaces.includes("latina")>> - <br>Latina - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "latina")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Latina== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("latina",0)]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecRaces.includes("malay")>> - <br>Malay - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "malay")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Malay== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("malay",0)]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecRaces.includes("middle eastern")>> - <br>Middle Eastern - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "middle eastern")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Middle Eastern== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("middle eastern",0)]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecRaces.includes("mixed race")>> - <br>Mixed Race - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "mixed race")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Mixed Race== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("mixed race",0)]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecRaces.includes("pacific islander")>> - <br>Pacific Islander - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "pacific islander")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Pacific Islander== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("pacific islander",0)]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecRaces.includes("semitic")>> - <br>Semitic - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "semitic")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Semitic== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("semitic",0)]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecRaces.includes("southern european")>> - <br>Southern European - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "southern european")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Southern European== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("southern european",0)]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecRaces.includes("white")>> - <br>White - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace == "white")>> - <<if $corpSpecRaces.length > 1 && $corpSpecTimer == 0>> - <<if ($corpSpecRaces.length == 4 || $corpSpecRaces.length == 8) && $corpSpecToken > 0>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white",1), $corpSpecToken -= 1, $corpSpecTimer = 1]] - <<elseif ($corpSpecRaces.length != 4 || $corpSpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==White== - <<if $corpSpecTimer == 0>> - <<if $corpSpecRaces.length == 3 || $corpSpecRaces.length == 7 || $corpSpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white",0), $corpSpecToken += 1, $corpSpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corpSpecRaces = corpBlacklistRace("white",0)]] - <</if>> - <</if>> - <</if>> - <</if>> - <<if $corpSpecGender == 1>> - <br>The corporation trains slaves with pussies. - <<if $corpSpecTimer == 0>> - <<link "No Focus">><<unset $corpSpecGender>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecGender == 2>> - <br>The corporation trains slaves with dicks. - <<if $corpSpecTimer == 0>> - <<link "No Focus">><<unset $corpSpecGender>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecHeight == 1>> - <br>The corporation is targeting tiny slaves. - <<if $corpSpecTimer == 0>> - [[Short Slaves|Manage Corporation][$corpSpecHeight = 2, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecHeight>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecHeight == 2>> - <br>The corporation is targeting short slaves. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0 && ($corpDivExtraDev + $corpDivLegalDev) > 50>> - [[Tiny Slaves|Manage Corporation][$corpSpecHeight = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecHeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecHeight == 4>> - <br>The corporation is targeting tall slaves. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0 && ($corpDivExtraDev + $corpDivLegalDev) > 50>> - [[Giant Slaves|Manage Corporation][$corpSpecHeight = 5, $corpSpecToken -= 1, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecHeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecHeight == 5>> - <br>The corporation is targeting giant slaves. - <<if $corpSpecTimer == 0>> - [[Tall Slaves|Manage Corporation][$corpSpecHeight = 4, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecHeight>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecVirgin == 1>> - <br>The corporation is ensuring slaves remain virgins. - <<if $corpSpecTimer == 0>> - <<link "No Focus">><<unset $corpSpecVirgin>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecTrust == 1>> - <br>The corporation is breaking slaves with extreme brutality. - <<if $corpSpecTimer == 0>> - [[Apply Less Brutality|Manage Corporation][$corpSpecTrust = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecTrust>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> /*Don't think this deserves the added cost of a token, unlike the 'utmost care' one*/ - <<elseif $corpSpecTrust == 2>> - <br>The corporation is breaking slaves with brutality. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0 && $arcologies[0].FSDegradationist > 20 && $corpDivBreakDev > 50>> - [[Apply Extreme Brutality|Manage Corporation][$corpSpecTrust = 1, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecTrust>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecTrust == 4>> - <br>The corporation is breaking slaves with care. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0 && $arcologies[0].FSPaternalist > 20 && $corpDivBreakDev > 50>> - [[Use the Utmost Care|Manage Corporation][$corpSpecTrust = 5, $corpSpecToken += 1, $corpSpecTimer == 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecTrust>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecTrust == 5>> - <br>The corporation is breaking slaves with the utmost care. - <<if $corpSpecTimer == 0>> - [[Use Less Care|Manage Corporation][$corpSpecTrust = 4, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecTrust>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecWeight == 1>> - <br>The corporation makes slaves follow incredibly strict diets. - <<if $corpSpecTimer == 0>> - [[Apply Looser Diet|Manage Corporation][$corpSpecWeight = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecWeight == 2>> - <br>The corporation makes slaves diet. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0 && $arcologies[0].FSHedonisticDecadence == "unset">> - [[Apply Strict Diet|Manage Corporation][$corpSpecWeight = 1, $corpSpecTimer = 2]] | - <</if>> - [[Aim for Healthy Weight|Manage Corporation][$corpSpecWeight = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecWeight == 3>> - <br>The corporation is aiming for slaves with a healthy weight. - <<if $corpSpecTimer == 0>> - [[Apply Diet|Manage Corporation][$corpSpecWeight = 2, $corpSpecTimer = 2]] | [[Plump up Slaves|Manage Corporation][$corpSpecWeight = 5, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> /*Perhaps 'plump up' is not the right phrase*/ - <<elseif $corpSpecWeight == 5>> - <br>The corporation aims for plump slaves. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0 && $arcologies[0].FSPhysicalIdealist == "unset">> - [[Fatten Slaves|Manage Corporation][$corpSpecWeight = 6, $corpSpecTimer = 2]] | - <</if>> - [[Aim for Healthy Weight|Manage Corporation][$corpSpecWeight = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecWeight == 6>> - <br>The corporation aims for fat slaves. - <<if $corpSpecTimer == 0>> - [[Settle for Plump|Manage Corporation][$corpSpecWeight = 5, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecMuscle == 1>> - <br>The corporation aims to have frail slaves. - <<if $corpSpecTimer == 0>> - [[Aim for Weak|Manage Corporation][$corpSpecMuscle = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecMuscle>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecMuscle == 2>> /*Don't think this deserves the added cost of a token, unlike slaves getting ripped*/ - <br>The corporation aims to have weak slaves. - <<if $corpSpecTimer == 0>> - <<if $arcologies[0].FSPhysicalIdealist == "unset">> - [[Aim for Frail|Manage Corporation][$corpSpecMuscle = 1, $corpSpecTimer = 2]] | - <</if>> - [[Aim for Soft|Manage Corporation][$corpSpecMuscle = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecMuscle == 3>> - <br>The corporation is aiming for slaves with soft muscles. - <<if $corpSpecTimer == 0>> - <<if $arcologies[0].FSPhysicalIdealist == "unset">> - [[Aim for Weak|Manage Corporation][$corpSpecMuscle = 2, $corpSpecTimer = 2]] | - <</if>> - [[Aim for Toned|Manage Corporation][$corpSpecMuscle = 4, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecMuscle == 4>> - <br>The corporation aims for toned muscles. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0 && ($corpDivBreakDev + $corpDivSurgeryDev + $corpDivTrainDev > 100)>> - [[Aim for Ripped|Manage Corporation][$corpSpecMuscle = 5, $corpSpecToken -= 1, $corpSpecTimer = 2]] | - <</if>> - [[Aim for Soft|Manage Corporation][$corpSpecMuscle = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecMuscle == 5>> - <br>The corporation aims for ripped slaves. - <<if $corpSpecTimer == 0>> - [[Aim for Toned|Manage Corporation][$corpSpecMuscle = 4, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecWeight>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecDevotion == 1>> - <br>The corporation keeps slaves extremely defiant. - <<if $corpSpecTimer == 0>> - [[Less Defiant|Manage Corporation][$corpSpecDevotion = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecDevotion>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> /*Don't think this deserves the added cost of a token, unlike the 'devoted' one*/ - <<elseif $corpSpecDevotion == 2>> - <br>The corporation keeps slaves reluctant. - <<if $corpSpecTimer == 0>> - [[Make them Defiant|Manage Corporation][$corpSpecDevotion = 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecDevotion>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecDevotion == 4>> - <br>The corporation is fostering obedience. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0 && $corpDivTrainDev > 100>> - [[Foster Devotion|Manage Corporation][$corpSpecDevotion = 5, $corpSpecToken += 1, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecDevotion>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecDevotion == 5>> - <br>The corporation is fostering devotion. - <<if $corpSpecTimer == 0>> - [[Settle for Obedience|Manage Corporation][$corpSpecDevotion = 4, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecDevotion>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecIntelligence == 1>> - <br>The corporation keeps stupid slaves. - <<if $corpSpecTimer == 0>> - <<link "No Focus">><<unset $corpSpecIntelligence>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecIntelligence == 3>> - <br>The corporation keeps intelligent slaves. - <<if $corpSpecTimer == 0>> - <<link "No Focus">><<unset $corpSpecIntelligence>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecAge == 1>> - <br>The corporation focuses on young slaves. - <<if $corpSpecTimer == 0>> - <<link "No Focus">><<unset $corpSpecAge>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecAge == 3>> - <br>The corporation focuses on older slaves. - <<if $corpSpecTimer == 0>> - <<link "No Focus">><<unset $corpSpecAge>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecAccent == 1>> - <br>The corporation teaches slaves to speak the lingua franca. - <<if $corpSpecTimer == 0>> - [[Eliminate Accents|Manage Corporation][$corpSpecAccent = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecAccent>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecAccent == 2>> - <br>The corporation teaches slaves to speak the lingua franca without an accent. - <<if $corpSpecTimer == 0>> - [[Just Teach Language|Manage Corporation][$corpSpecAccent = 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecAccent>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecEducation == 0>> - <br>The corporation focuses on uneducated slaves. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0>> - [[Basic Education|Manage Corporation][$corpSpecEducation = 1, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecEducation>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecEducation == 1>> - <br>The corporation makes sure all slaves have a basic education. - <<if $corpSpecTimer == 0>> - <<if $corpDivTrainDev > 200 && $corpSpecToken > 0>> - [[Advanced Education|Manage Corporation][$corpSpecEducation = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | - <</if>> - [[No Education|Manage Corporation][$corpSpecEducation = 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecEducation>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecEducation == 2>> - <br>The corporation makes sure all slaves have an advanced education. - <<if $corpSpecTimer == 0>> - [[Basic Education|Manage Corporation][$corpSpecEducation = 1, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecEducation>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecCosmetics == 1>> - <br>The corporation applies straightforward cosmetic procedures. - <<if $corpSpecTimer == 0>> - <<link "No Focus">><<unset $corpSpecCosmetics>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecCosmetics == 0>> - <br>The corporation doesn't apply cosmetic procedures. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0>> - [[Applied|Manage Corporation][$corpSpecCosmetics = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecCosmetics>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecImplants == 1>> - <br>The corporation applies tasteful implants to all slaves. - <<if $corpSpecTimer == 0>> - <<if $corpDivSurgeryDev > 100 && $corpSpecToken > 0>> - [[Absurd Implants|Manage Corporation][$corpSpecImplants = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecImplants>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecImplants == 2>> - <br>The corporation applies absurd implants to all slaves. - <<if $corpSpecTimer == 0>> - [[Tasteful Implants|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecImplants>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecImplants == 0>> - <br>The corporation keeps their slaves entirely implant free. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0>> - [[Tasteful Implants|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecImplants>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if ndef $corpSpecPussy && ndef $corpSpecDick && ndef $corpSpecBalls && $corpSpecGenitalia == 1>> - <<set ndef $corpSpecGenitalia, - $corpSpecToken += 1>> - <</if>> - <<if $corpSpecGenitalia == 1>> - <<if $corpSpecPussy == 1>> - <br>The corporation adds a pussy to all slaves. - <<if $corpSpecTimer == 0>> - <<link "Stop">><<unset $corpSpecPussy>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecPussy == -1>> - <br>The corporation removes pussies from all slaves. - <<if $corpSpecTimer == 0>> - <<link "Stop">><<unset $corpSpecPussy>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<else>> - <br>The corporation has no plans for pussies. - <<if $corpSpecTimer == 0>> - [[Add Pussy|Manage Corporation][$corpSpecPussy = 1, $corpSpecTimer = 2]] | [[Remove Pussy|Manage Corporation][$corpSpecPussy = -1, $corpSpecToken -= 1, $corpSpecTimer = 2]] - <</if>> - <</if>> - <<if $corpSpecDick == 1>> - <br>The corporation adds a dick to all slaves. - <<if $corpSpecTimer == 0>> - <<link "Stop">><<unset $corpSpecDick>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecDick == -1>> - <br>The corporation removes dicks from all slaves. - <<if $corpSpecTimer == 0>> - <<link "Stop">><<unset $corpSpecDick>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<else>> - <br>The corporation has no plans for dicks. - <<if $corpSpecTimer == 0>> - [[Add Dick|Manage Corporation][$corpSpecDick = 1, $corpSpecTimer = 2]] | [[Remove Dick|Manage Corporation][$corpSpecDick = -1, $corpSpecToken -= 1, $corpSpecTimer = 2]] - <</if>> - <</if>> - <<if $corpSpecBalls == 1>> - <br>The corporation adds balls to all slaves (penis required). - <<if $corpSpecTimer == 0>> - <<link "Stop">><<unset $corpSpecBalls>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecBalls == -1>> - <br>The corporation removes balls from all slaves. - <<if $corpSpecTimer == 0>> - <<link "Stop">><<unset $corpSpecBalls>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<else>> - <br>The corporation has no plans for balls. - <<if $corpSpecTimer == 0>> - [[Add Balls|Manage Corporation][$corpSpecBalls = 1, $corpSpecTimer = 2]] | [[Remove Balls|Manage Corporation][$corpSpecBalls = -1, $corpSpecTimer = 2]] - <</if>> - <</if>> - <</if>> - <<if $corpSpecInjection == 1>> - <br>The corporation aims for petite assets. - <<if $corpSpecTimer == 0>> - [[Tasteful Size|Manage Corporation][$corpSpecInjection = 2, $corpSpecTimer = 2]] | [[Huge Size|Manage Corporation][$corpSpecInjection = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecInjection>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecInjection == 2>> - <br>The corporation aims for tasteful assets. - <<if $corpSpecTimer == 0>> - [[Small Size|Manage Corporation][$corpSpecInjection = 1, $corpSpecTimer = 2]] | [[Huge Size|Manage Corporation][$corpSpecInjection = 3, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecInjection>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecInjection == 3>> - <br>The corporation aims for huge assets. - <<if $corpSpecTimer == 0>> - [[Small Size|Manage Corporation][$corpSpecInjection = 1, $corpSpecTimer = 2]] | [[Tasteful Size|Manage Corporation][$corpSpecInjection = 2, $corpSpecTimer = 2]] | - <<if $corpDivSurgeryDev > 100 && $corpSpecToken > 0>> - [[Supermassive Size|Manage Corporation][$corpSpecInjection = 4, $corpSpecToken -= 1, $corpSpecTimer = 2]] - <</if>> - <<if $corpDivDairyDev > 200 && $corpSpecToken > 0>> | - [[Pastoral Size|Manage Corporation][$corpSpecInjection = 5, $corpSpecToken -= 1, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecInjection>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecInjection == 4>> - <br>The corporation aims for supermassive assets. - <<if $corpSpecTimer == 0>> - [[Huge Size|Manage Corporation][$corpSpecInjection = 3, $corpSpecToken += 1, $corpSpecTimer = 2]] | - <<if $corpDivDairyDev > 200>> - [[Pastoral Size|Manage Corporation][$corpSpecInjection = 5, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecInjection>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecInjection == 5>> - <br>The corporation aims for pastoral assets. - <<if $corpSpecTimer == 0>> - [[Huge Size|Manage Corporation][$corpSpecInjection = 3, $corpSpecToken += 1, $corpSpecTimer = 2]] | - <<if $corpDivSurgeryDev > 50>> - [[Supermassive Size|Manage Corporation][$corpSpecInjection = 4, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecInjection>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecHormones == 1>> - <br>The corporation feminizes slaves with hormones. - <<if $corpSpecTimer == 0>> - [[Masculinize|Manage Corporation][$corpSpecHormones = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecHormones>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecHormones == 2>> - <br>The corporation masculinize slaves with hormones. - <<if $corpSpecTimer == 0>> - [[Feminize|Manage Corporation][$corpSpecHormones = 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecHormones>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecAmputee == 1>> - <br>The corporation removes all limbs from its slaves. - <<if $corpSpecTimer == 0>> - <<link "Stop">><<unset $corpSpecAmputee>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecMilk == 1>> - <br>The corporation makes sure all slaves are naturally lactating. - <<if $corpSpecTimer == 0>> - [[Lactation Implant|Manage Corporation][$corpSpecMilk = 2, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecMilk>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecMilk == 2>> - <br>The corporation equips all slaves with lactation implants. - <<if $corpSpecTimer == 0>> - [[Natural Lactation|Manage Corporation][$corpSpecMilk = 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecMilk>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> - <<if $corpSpecSexEd == 1>> - <br>The corporation familiarizes slaves with sexual service. - <<if $corpSpecTimer == 0>> - <<if $corpSpecToken > 0 && $corpDivWhoreDev > 200>> - [[Advanced Training|Manage Corporation][$corpSpecSexEd = 2, $corpSpecToken -= 1, $corpSpecTimer = 2]] | - <</if>> - <<link "No Focus">><<unset $corpSpecSexEd>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecSexEd == 2>> - <br>The corporation teaches advanced sexual techniques to its slaves. - <<if $corpSpecTimer == 0>> - [[Basic Training|Manage Corporation][$corpSpecSexEd = 1, $corpSpecToken +=1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecSexEd>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <<elseif $corpSpecSexEd == 0>> - <br>The corporation teaches no sexual techniques to its slaves. - <<if $corpSpecTimer == 0>> - [[Basic Training|Manage Corporation][$corpSpecSexEd = 1, $corpSpecToken -=1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecSexEd>><<set $corpSpecToken += 1, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> - <</if>> - <</if>> -<</if>> /*End of activated specializations*/ - -<br><br> - -@@.orange;//Warning: Think TWICE before you click this!//@@ -<<link "Dissolve the corporation">> - <<set cashX(Math.min(corpSharePrice() * $personalShares / 1000, 1000000), "stocksTraded"), - $corpIncorporated = 0, - $corpDivExtra = 0, - $corpDivLegal = 0, - $corpDivBreak = 0, - $corpDivSurgery = 0, - $corpDivTrain = 0, - $corpDivArcade = 0, - $corpDivMenial = 0, - $corpDivDairy = 0, - $corpDivWhore = 0, - $corpDivExtraDev = 0, - $corpDivLegalDev = 0, - $corpDivBreakDev = 0, - $corpDivSurgeryDev = 0, - $corpDivTrainDev = 0, - $corpDivDairyDev = 0, - $corpDivArcadeDev = 0, - $corpDivMenialDev = 0, - $corpDivWhoreDev = 0, - $corpExpand = 0, - $corpExpandToken = 0, - $corpSpec = 0, - $corpSpecToken = 0, - $corpSpecRaces = []>> - <<unset $corpCash, - $personalShares, - $publicShares, - $corpDividend, - $dividendTimer, - $corpDiv, - $corpRev, - $corpDivExtraSlaves, - $corpDivLegalSlaves, - $corpDivBreakSlaves, - $corpDivBreakSlaves2, - $corpDivSurgerySlaves, - $corpDivSurgerySlaves2, - $corpDivTrainSlaves, - $corpDivTrainSlaves2, - $corpDivArcadeSlaves, - $corpDivMenialSlaves, - $corpDivDairySlaves, - $corpDivWhoreSlaves, - $corpRevOld, - $corpAssetsSlaveOld, - $corpAssetsSlave, - $corpAssetsDevOld, - $corpAssetsDev, - $corpOverheadOld, - $corpOpCostOld, - $corpProfitOld, - $corpSpecAccent, - $corpSpecAge, - $corpSpecAmputee, - $corpSpecBalls, - $corpSpecDevotion, - $corpSpecDick, - $corpSpecEducation, - $corpSpecGender, - $corpSpecGenitalia, - $corpSpecWeight, - $corpSpecHeight, - $corpSpecHormones, - $corpSpecImplants, - $corpSpecInjection, - $corpSpecIntelligence, - $corpSpecMilk, - $corpSpecMuscle, - $corpSpecPussy, - $corpSpecSexEd, - $corpSpecTrust, - $corpSpecVirgin, - $corpDivExtraToArcade, - $corpDivExtraToBreak, - $corpDivExtraToMarket, - $corpDivLegalToMenial, - $corpDivLegalToSurgery, - $corpDivLegalToTrain, - $corpDivLegalToMarket, - $corpDivBreakToMenial, - $corpDivBreakToSurgery, - $corpDivBreakToTrain, - $corpDivBreakToMarket, - $corpDivBreakFromMarket, - $corpDivSurgeryToDairy, - $corpDivSurgeryToTrain, - $corpDivSurgeryToMarket, - $corpDivSurgeryFromMarket, - $corpDivTrainToWhore, - $corpDivTrainToMarket, - $corpDivTrainFromMarket, - $corpDivArcadeFromMarket, - $corpDivMenialFromMarket, - $corpDivDairyFromMarket, - $corpDivWhoreFromMarket>> - <<if $corpMarket == 1>> - <<for _i = 0; _i < $sectors.length; _i++>> - <<if $sectors[_i].type == "CorporateMarket">><<set $sectors[_i].type = "Markets">><<break>><</if>> - <</for>> - <<set $corpMarket = 0>> - <</if>> - <<goto "Manage Corporation">> -<</link>> -@@.orange;//Warning!//@@ - -<</if>> /*end of incorporated or not check*/ diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index db1a0920767..2ca53b71006 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -1420,15 +1420,14 @@ <<set $sectors[28].type = "Farmyard", $sectors[28].ownership = 1>> <</if>> - -<<if ndef $month>> - <<set $month = either("April", "August", "December", "February", "January", "July", "June", "March", "May", "November", "October", "September")>> +<<if def $year>> + <<unset $year>> <</if>> -<<if ndef $day>> - <<set $day = random(1,28)>> +<<if def $day>> + <<unset $day>> <</if>> -<<if ndef $year>> - <<set $year = (2037+Math.floor($week/52))>> +<<if def $month>> + <<unset $month>> <</if>> <<if ndef $arcologies>> @@ -2678,12 +2677,15 @@ Setting missing global variables: <<if ndef $corpDiv>> <<set $corpDiv = 0>> <</if>> -<<if ndef $corpExpand>> - <<set $corpExpand = 0>> +<<if def $corpExpand>> + <<unset $corpExpand>> <</if>> <<if ndef $corpExpandToken>> <<set $corpExpandToken = 0>> <</if>> +<<if $corpExpandToken > 1>> + <<set $corpExpandToken = 1>> +<</if>> <<if ndef $corpSpec>> <<set $corpSpec = 0>> <</if>> diff --git a/src/uncategorized/corporationDevelopments.tw b/src/uncategorized/corporationDevelopments.tw deleted file mode 100644 index b2ceef8760c..00000000000 --- a/src/uncategorized/corporationDevelopments.tw +++ /dev/null @@ -1,718 +0,0 @@ -:: Corporation Developments [nobr] - -/*Main Corporation Pass*/ - -<<if $corpCash < 0>> - <<set $corpCash = Math.trunc($corpCash * 1.02)>> /*2% weekly interest rate on negative cash*/ -<</if>> -<<if $corpDivTrainSurgerySwitch == 1 && $corpDivTrainSurgeryTimer < 20>> - <<set $corpDivTrainSurgeryTimer++>> -<</if>> -<<set _corpOpCost = 0, -_corpRev = 0, -_corpAssetsSlave = 0>> - -__Corporation Management__ -<br>''Operational Results'' -/*Divisions doing their thing*/ -<<if $corpDivExtra == 1>> - <<if $mercenariesHelpCorp > 0>> /*This is the cost of acquiring slaves, the level of development is also the amount of slaves on average*/ - <<set _corpOpCost += 7500 * $corpDivExtraDev + 5 * Math.pow($corpDivExtraDev, 2) - ($mercenaries - 2) * 50, - _corpDivExtraSlaves = Math.trunc($corpDivExtraDev * (1 + random(-40,40) / 100)), - $corpDivExtraSlaves += _corpDivExtraSlaves>> /*the actual amount of slaves acquired*/ - <<else>> - <<set _corpOpCost += 7500 * $corpDivExtraDev + 5 * Math.pow($corpDivExtraDev, 2), - _corpDivExtraSlaves = Math.trunc($corpDivExtraDev * (1 + random(-40,40) / 100)), - $corpDivExtraSlaves += _corpDivExtraSlaves>> - <</if>> -<</if>> -<<if $corpDivLegal == 1>> - <<set _corpOpCost += 12000 * $corpDivLegalDev + 6 * Math.pow($corpDivExtraDev, 2), - _corpDivLegalSlaves = Math.trunc($corpDivLegalDev * (1 + random(-25,25) / 100)), - $corpDivLegalSlaves += _corpDivLegalSlaves>> -<</if>> -<<if $corpDivBreak == 1>> - <<set _corpOpCost += 450 * $corpDivBreakSlaves + Math.trunc(0.7 * Math.pow($corpDivBreakDev, 2)), - _corpDivBreakProc = Math.trunc($corpDivBreakSlaves * 0.3 * (1 + random(-15,15) / 100)), - $corpDivBreakSlaves2 += _corpDivBreakProc, - $corpDivBreakSlaves -= _corpDivBreakProc>> -<</if>> -<<if $corpDivSurgery == 1>> - <<set _corpOpCost += 2400 * $corpDivSurgerySlaves + Math.pow($corpDivSurgeryDev, 2), - _corpDivSurgeryProc = Math.trunc($corpDivSurgerySlaves * 0.5 * (1 + random(-10,10) / 100)), - $corpDivSurgerySlaves2 += _corpDivSurgeryProc, - $corpDivSurgerySlaves -= _corpDivSurgeryProc>> -<</if>> -<<if $corpDivTrain == 1>> - <<set _corpOpCost += 700 * $corpDivTrainSlaves + Math.trunc(0.8 * Math.pow($corpDivTrainDev, 2)), - _corpDivTrainProc = Math.trunc($corpDivTrainSlaves * 0.2 * (1 + random(-15,15) / 100)), - $corpDivTrainSlaves2 += _corpDivTrainProc, - $corpDivTrainSlaves -= _corpDivTrainProc>> -<</if>> -<<if $corpDivArcade == 1>> - <<set _corpOpCost += 200 * $corpDivArcadeSlaves + Math.trunc(0.125 * Math.pow($corpDivArcadeDev, 2)), - _corpDivArcadeRev = Math.trunc(1000 * (1 + random(-5,5) / 100) * $corpDivArcadeSlaves), - _corpRev += _corpDivArcadeRev, - _corpDivArcadeProc = $corpDivArcadeSlaves * 0.05 * (1 + random(-10,10) / 100)>> - <<if _corpDivArcadeProc > 1>> - <<set _corpDivArcadeProc = Math.trunc(_corpDivArcadeProc)>> - <<elseif _corpDivArcadeProc < 1 && _corpDivArcadeProc > random(1,100) / 100>> - <<set _corpDivArcadeProc = 1>> - <<else>> - <<set _corpDivArcadeProc = 0>> - <</if>> - <<set $corpDivArcadeSlaves -= _corpDivArcadeProc>> -<</if>> -<<if $corpDivMenial == 1>> - <<set _corpDivMenialRev = Math.trunc(1250 * (1 + random(-10,10) / 100)) * $corpDivMenialSlaves, - _corpOpCost += 200 * $corpDivMenialSlaves + Math.trunc(0.1 * Math.pow($corpDivMenialDev, 2)), - _corpRev += _corpDivMenialRev, - _corpDivMenialProc = $corpDivMenialSlaves * 0.05 * (1 + random(-10,10) / 100)>> - <<if _corpDivMenialProc > 1>> - <<set _corpDivMenialProc = Math.trunc(_corpDivMenialProc)>> - <<elseif _corpDivMenialProc < 1 && _corpDivMenialProc > random(1,100) / 100>> - <<set _corpDivMenialProc = 1>> - <<else>> - <<set _corpDivMenialProc = 0>> - <</if>> - <<set $corpDivMenialSlaves -= _corpDivMenialProc>> -<</if>> -<<if $corpDivDairy == 1>> - <<set _corpDivDairyRev = Math.trunc(3000 * (1 + random(-10,10) / 100) * $corpDivDairySlaves), - _corpOpCost += 850 * $corpDivDairySlaves + Math.trunc(0.4 * Math.pow($corpDivDairyDev, 2)), - _corpRev += _corpDivDairyRev, - _corpDivDairyProc = $corpDivDairySlaves * 0.05 * (1 + random(-10,10) / 100)>> - <<if _corpDivDairyProc > 1>> - <<set _corpDivDairyProc = Math.trunc(_corpDivDairyProc)>> - <<elseif _corpDivDairyProc < 1 && _corpDivDairyProc > random(1,100) / 100>> - <<set _corpDivDairyProc = 1>> - <<else>> - <<set _corpDivDairyProc = 0>> - <</if>> - <<set $corpDivDairySlaves -= _corpDivDairyProc>> -<</if>> -<<if $corpDivWhore == 1>> - <<set _corpDivWhoreRev = Math.trunc(3000 * (1 + random(-5,5) / 100) * $corpDivWhoreSlaves), - _corpOpCost += 700 * $corpDivWhoreSlaves + Math.trunc(0.25 * Math.pow($corpDivWhoreDev, 2)), - _corpRev += _corpDivWhoreRev, - _corpDivWhoreProc = $corpDivWhoreSlaves * 0.05 * (1 + random(-10,10) / 100)>> - <<if _corpDivWhoreProc > 1>> - <<set _corpDivWhoreProc = Math.trunc(_corpDivWhoreProc)>> - <<elseif _corpDivWhoreProc < 1 && _corpDivWhoreProc > random(1,100) / 100>> - <<set _corpDivWhoreProc = 1>> - <<else>> - <<set _corpDivWhoreProc = 0>> - <</if>> - <<set $corpDivWhoreSlaves -= _corpDivWhoreProc>> -<</if>> - -/*division output and moving slaves around*/ -<<set _corpDivBreakSlavesRoom = corpDivBreakSlavesRoom(), -_corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom(), -_corpDivTrainSlavesRoom = corpDivTrainSlavesRoom(), -_corpDivArcadeSlavesRoom = corpDivArcadeSlavesRoom(), -_corpDivMenialSlavesRoom = corpDivMenialSlavesRoom(), -_corpDivDairySlavesRoom = corpDivDairySlavesRoom(), -_corpDivWhoreSlavesRoom = corpDivWhoreSlavesRoom()>> - -<<if $corpDivExtra > 0>> - <br>Extralegal Enslavement: The division - <<if $mercenariesHelpCorp > 0>> - @@.green;acquired <<print _corpDivExtraSlaves>> slaves@@ with the help of your mercenaries. - <<else>> - @@.green;acquired <<print _corpDivExtraSlaves>>.@@ - <</if>> - <<if $corpDivExtraToArcade == 1 && _corpDivArcadeSlavesRoom > 0>> /*slaves getting auto moved around*/ - <<if $corpDivExtraSlaves >= _corpDivArcadeSlavesRoom>> - It moved <<if _corpDivArcadeSlavesRoom > 1>><<print _corpDivArcadeSlavesRoom>> slaves<<else>>one slave<</if>> to the arcade division. - <<set $corpDivExtraSlaves -= _corpDivArcadeSlavesRoom, - $corpDivArcadeSlaves = $corpDivArcadeDev, - _corpDivArcadeSlavesRoom = corpDivArcadeSlavesRoom()>> - <<elseif $corpDivExtraSlaves > 0>> - It moved <<if $corpDivExtraSlaves > 1>><<print $corpDivExtraSlaves>> slaves<<else>>one slave<</if>> to the arcade division. - <<set $corpDivArcadeSlaves += $corpDivExtraSlaves, - $corpDivExtraSlaves = 0, - _corpDivArcadeSlavesRoom = corpDivArcadeSlavesRoom()>> - <</if>> - <</if>> - <<if $corpDivExtraToBreak == 1 && _corpDivBreakSlavesRoom > 0>> - <<if $corpDivExtraSlaves >= _corpDivBreakSlavesRoom>> - It moved <<if _corpDivBreakSlavesRoom > 1>><<print _corpDivBreakSlavesRoom>> slaves<<else>>one slave<</if>> to the slave breaking division. - <<set $corpDivExtraSlaves -= _corpDivBreakSlavesRoom, - $corpDivBreakSlaves = $corpDivBreakDev, - _corpDivBreakSlavesRoom = corpDivBreakSlavesRoom()>> - <<elseif $corpDivExtraSlaves > 0>> - It moved <<if $corpDivExtraSlaves > 1>><<print $corpDivExtraSlaves>> slaves<<else>>one slave<</if>> to the slave breaking division. - <<set $corpDivBreakSlaves += $corpDivExtraSlaves, - $corpDivExtraSlaves = 0, - _corpDivBreakSlavesRoom = corpDivBreakSlavesRoom()>> - <</if>> - <</if>> - <<if $corpDivExtraToMarket == 1 && $corpDivExtraSlaves > 0>> - It immediately sold <<if $corpDivExtraSlaves > 1>>$corpDivExtraSlaves slaves<<elseif $corpDivExtraSlaves > 0>>one slave<</if>> - <<set _corpDivExtraRev = $corpDivExtraSlaves * 10 * menialSlaveCost(-_corpDivExtraSlaves), - _corpRev += _corpDivExtraRev, - $corpDivExtraSlaves = 0>> - to the market and made @@.yellowgreen;<<print cashFormat(_corpDivExtraRev)>>.@@ - <<elseif $corpDivExtraSlaves > 0>> - It holds <<if $corpDivExtraSlaves > 1>>@@.green;$corpDivExtraSlaves slaves@@<<else>>@@.green;one slave@@<</if>> at the end of the week. - <<if $corpDivExtraSlaves > $corpDivExtraDev * 2>> /*The division can store some slaves it has acquired/processed, but not a huge amount*/ - <<set _corpDivExtraCapSlaves = $corpDivExtraSlaves - $corpDivExtraDev * 2, - _corpDivExtraRev = _corpDivExtraCapSlaves * 10 * menialSlaveCost(-_corpDivExtraCapSlaves), - _corpRev += _corpDivExtraRev, - $menialDemandFactor -= _corpDivExtraCapSlaves, - $corpDivExtraSlaves = $corpDivExtraDev * 2>> /*slaves over holding capacity get sold*/ - But it ran out of storage space and had to sell <<if _corpDivExtraCapSlaves > 1>>@@.red;<<print _corpDivExtraCapSlaves>> slaves@@<<else>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivExtraRev)>>.@@ - <</if>> - <</if>> -<</if>> - -<<if $corpDivLegal > 0>> - <br>Legal Enslavement: The division @@.green;acquired <<print _corpDivLegalSlaves>>.@@ - <<if $corpDivLegalToMenial == 1 && _corpDivMenialSlavesRoom > 0>> - <<if $corpDivLegalSlaves >= _corpDivMenialSlavesRoom>> - It moved <<if _corpDivMenialSlavesRoom > 1>><<print _corpDivMenialSlavesRoom>> slaves<<else>>one slave<</if>> to the menial services division. - <<set $corpDivLegalSlaves -= _corpDivMenialSlavesRoom, - $corpDivMenialSlaves = $corpDivMenialDev, - _corpDivMenialSlavesRoom = corpDivMenialSlavesRoom()>> - <<elseif $corpDivLegalSlaves > 0>> - It moved <<if $corpDivLegalSlaves > 1>>$corpDivLegalSlaves slaves<<else>>one slave<</if>> to the menial services division. - <<set $corpDivMenialSlaves += $corpDivLegalSlaves, - $corpDivLegalSlaves = 0, - _corpDivMenialSlavesRoom = corpDivMenialSlavesRoom()>> - <</if>> - <</if>> - <<if $corpDivLegalToSurgery == 1 && _corpDivSurgerySlavesRoom > 0>> - <<if $corpDivLegalSlaves >= _corpDivSurgerySlavesRoom>> - It moved <<if _corpDivSurgerySlavesRoom > 1>><<print _corpDivSurgerySlavesRoom>> slaves<<else>>one slave<</if>> to the physical modification division. - <<set $corpDivLegalSlaves -= _corpDivSurgerySlavesRoom, - $corpDivSurgerySlaves = $corpDivSurgeryDev, - _corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom()>> - <<elseif $corpDivLegalSlaves > 0>> - It moved <<if $corpDivLegalSlaves > 1>>$corpDivLegalSlaves slaves<<else>>one slave<</if>> to the physical modification division. - <<set $corpDivSurgerySlaves += $corpDivLegalSlaves, - $corpDivLegalSlaves = 0, - _corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom()>> - <</if>> - <</if>> - <<if $corpDivLegalToTrain == 1 && _corpDivTrainSlavesRoom > 0>> - <<if $corpDivLegalSlaves >= _corpDivTrainSlavesRoom>> - It moved <<if _corpDivTrainSlavesRoom > 1>><<print _corpDivTrainSlavesRoom>> slaves<<else>>one slave<</if>> to the slave training division. - <<set $corpDivLegalSlaves -= _corpDivTrainSlavesRoom, - $corpDivTrainSlaves = $corpDivTrainDev, - _corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>> - <<elseif $corpDivLegalSlaves > 0>> - It moved <<if $corpDivLegalSlaves > 1>>$corpDivLegalSlaves slaves<<else>>one slave<</if>> to the slave training division. - <<set $corpDivTrainSlaves += $corpDivLegalSlaves, - $corpDivLegalSlaves = 0, - _corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>> - <</if>> - <</if>> - <<if $corpDivLegalToMarket == 1 && $corpDivLegalSlaves > 0>> - It immediately sold <<if $corpDivLegalSlaves > 1>><<print $corpDivLegalSlaves>> slaves<<else>>one slave<</if>> - <<set _corpDivLegalRev = $corpDivLegalSlaves * 15 * menialSlaveCost(-$corpDivLegalSlaves), - _corpRev += _corpDivLegalRev, - $corpDivLegalSlaves = 0>> - to the market and made @@.yellowgreen;<<print cashFormat(_corpDivLegalRev)>>.@@ - <<elseif $corpDivLegalSlaves > 0>> - It holds <<if $corpDivLegalSlaves > 1>>@@.green;$corpDivLegalSlaves slaves@@<<else>>@@.green;one slave@@<</if>> at the end of the week. - <<if $corpDivLegalSlaves > $corpDivLegalDev * 2>> - <<set _corpDivLegalCapSlaves = $corpDivLegalSlaves - $corpDivLegalDev * 2, - _corpDivLegalRev = _corpDivLegalCapSlaves * 15 * menialSlaveCost(-_corpDivLegalCapSlaves), - _corpRev += _corpDivLegalRev, - $menialDemandFactor -= _corpDivLegalCapSlaves, - $corpDivLegalSlaves = $corpDivLegalDev * 2>> - But it ran out of storage space and had to sell <<if _corpDivLegalCapSlaves > 1>>@@.red;<<print _corpDivLegalCapSlaves>> slaves@@<<else>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivLegalRev)>>.@@ - <</if>> - <</if>> -<</if>> - -<<if $corpDivBreak > 0>> - <br>Slave Breaking: The division broke <<if _corpDivBreakProc > 1>><<print _corpDivBreakProc>> slaves.<<elseif _corpDivBreakProc > 0>>one slave.<<else>>@@.red;none of its slaves.@@<</if>> The division is still busy breaking $corpDivBreakSlaves slaves. - <<if $corpDivBreakFromMarket == 1 && _corpDivBreakSlavesRoom > 0>> - It replenished its slave stock and bought <<print _corpDivBreakSlavesRoom>> slaves that need breaking from the market. - <<set _corpDivBreakAssetsSlave = _corpDivBreakSlavesRoom * 10 * menialSlaveCost(_corpDivBreakSlavesRoom), - _corpAssetsSlave += _corpDivBreakAssetsSlave, - $corpDivBreakSlaves = $corpDivBreakDev>> - <</if>> - <<if $corpDivBreakToMenial == 1 && _corpDivMenialSlavesRoom > 0>> - <<if $corpDivBreakSlaves2 >= _corpDivMenialSlavesRoom>> - It moved <<if _corpDivMenialSlavesRoom > 1>><<print _corpDivMenialSlavesRoom>> slaves<<else>>one slave<</if>> to the menial services division. - <<set $corpDivBreakSlaves2 -= _corpDivMenialSlavesRoom, - $corpDivMenialSlaves = $corpDivMenialDev, - _corpDivMenialSlavesRoom = corpDivMenialSlavesRoom()>> - <<elseif $corpDivBreakSlaves2 > 0>> - It moved <<if $corpDivBreakSlaves2 > 1>>$corpDivBreakSlaves2 slaves<<else>>one slave<</if>> to the menial services division. - <<set $corpDivMenialSlaves += $corpDivBreakSlaves2, - $corpDivBreakSlaves2 = 0, - _corpDivMenialSlavesRoom = corpDivMenialSlavesRoom()>> - <</if>> - <</if>> - <<if $corpDivBreakToSurgery == 1 && _corpDivSurgerySlavesRoom > 0>> - <<if $corpDivBreakSlaves2 >= _corpDivSurgerySlavesRoom>> - It moved <<if _corpDivSurgerySlavesRoom > 1>><<print _corpDivSurgerySlavesRoom>> slaves<<else>>one slave<</if>> to the physical modification division. - <<set $corpDivBreakSlaves2 -= _corpDivSurgerySlavesRoom, - $corpDivSurgerySlaves = $corpDivSurgeryDev, - _corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom()>> - <<elseif $corpDivBreakSlaves2 > 0>> - It moved <<if $corpDivBreakSlaves2 > 1>>$corpDivBreakSlaves2 slaves<<else>>one slave<</if>> to the physical modification division. - <<set $corpDivSurgerySlaves += $corpDivBreakSlaves2, - $corpDivBreakSlaves2 = 0, - _corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom()>> - <</if>> - <</if>> - <<if $corpDivBreakToTrain == 1 && _corpDivTrainSlavesRoom > 0>> - <<if $corpDivBreakSlaves2 >= _corpDivTrainSlavesRoom>> - It moved <<if _corpDivTrainSlavesRoom > 1>><<print _corpDivTrainSlavesRoom>> slaves<<else>>one slave<</if>> to the slave training division. - <<set $corpDivBreakSlaves2 -= _corpDivTrainSlavesRoom, - $corpDivTrainSlaves = $corpDivTrainDev, - _corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>> - <<elseif $corpDivBreakSlaves2 > 0>> - It moved <<if $corpDivBreakSlaves2 > 1>>$corpDivBreakSlaves2 slaves<<else>>one slave<</if>> to the slave training division. - <<set $corpDivTrainSlaves += $corpDivBreakSlaves2, - $corpDivBreakSlaves2 = 0, - _corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>> - <</if>> - <</if>> - <<if $corpDivBreakToMarket == 1 && $corpDivBreakSlaves2 > 0>> - It immediately sold <<if $corpDivBreakSlaves2 > 1>>$corpDivBreakSlaves2 slaves<<else>>one slave<</if>> - <<set _corpDivBreakRev = $corpDivBreakSlaves2 * 15 * menialSlaveCost(-$corpDivBreakSlaves2), - _corpRev += _corpDivBreakRev, - $corpDivBreakSlaves2 = 0>> - to the market and made @@.yellowgreen;<<print cashFormat(_corpDivBreakRev)>>.@@ - <<elseif $corpDivBreakSlaves2 > 0>> - It is holding <<if $corpDivBreakSlaves2 > 1>>$corpDivBreakSlaves2 broken slaves<<else>>one broken slave<</if>> at the end of the week. - <<if $corpDivBreakSlaves2 > Math.trunc($corpDivBreakDev * 0.6)>> - <<set _corpDivBreakCapSlaves = $corpDivBreakSlaves2 - Math.trunc($corpDivBreakDev * 0.6), - _corpDivBreakRev = _corpDivBreakCapSlaves * 15 * menialSlaveCost(-_corpDivBreakCapSlaves), - _corpRev += _corpDivBreakRev, - $menialDemandFactor -= _corpDivBreakCapSlaves, - $corpDivBreakSlaves2 = Math.trunc($corpDivBreakDev * 0.6)>> - But it ran out of storage space and had to sell <<if _corpDivBreakCapSlaves > 1>>@@.red;<<print _corpDivBreakCapSlaves>> slaves@@<<else>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivBreakRev)>>.@@ - <</if>> - <</if>> -<</if>> - -<<if $corpDivSurgery > 0>> - <br>Physical Slave Modifications: The division finished working on <<if _corpDivSurgeryProc > 1>><<print _corpDivSurgeryProc>> slaves.<<elseif _corpDivSurgeryProc > 0>>one slave.<<else>>@@.red;none of its slaves.@@<</if>> The division is still working on $corpDivSurgerySlaves slaves. - <<if $corpDivSurgeryFromMarket == 1 && _corpDivSurgerySlavesRoom > 0>> - It replenished its slave stock and bought <<print _corpDivSurgerySlavesRoom>> slaves that could use some work done to their bodies from the market. - <<set _corpDivSurgeryAssetsSlave = _corpDivSurgerySlavesRoom * 15 * menialSlaveCost(_corpDivSurgerySlavesRoom), - _corpAssetsSlave += _corpDivSurgeryAssetsSlave, - $corpDivSurgerySlaves = $corpDivSurgeryDev, - _corpDivSurgerySlavesRoom = corpDivSurgerySlavesRoom()>> - <</if>> - <<if $corpDivSurgeryToDairy == 1 && _corpDivDairySlavesRoom > 0>> - <<if $corpDivSurgerySlaves2 >= _corpDivDairySlavesRoom>> - It moved <<if _corpDivDairySlavesRoom > 1>><<print _corpDivDairySlavesRoom>> slaves<<else>>one slave<</if>> to the dairy division. - <<set $corpDivSurgerySlaves2 -= _corpDivDairySlavesRoom, - $corpDivDairySlaves = $corpDivDairyDev, - _corpDivDairySlavesRoom = corpDivDairySlavesRoom()>> - <<elseif $corpDivSurgerySlaves2 > 0>> - It moved <<if $corpDivSurgerySlaves2 > 1>>$corpDivSurgerySlaves2 slaves<<else>>one slave<</if>> to the dairy division. - <<set $corpDivDairySlaves += $corpDivSurgerySlaves2, - $corpDivSurgerySlaves2 = 0, - _corpDivDairySlavesRoom = corpDivDairySlavesRoom()>> - <</if>> - <</if>> - <<if $corpDivSurgeryToTrain == 1 && _corpDivTrainSlavesRoom > 0>> - <<if $corpDivSurgerySlaves2 >= _corpDivTrainSlavesRoom>> - It moved <<if _corpDivTrainSlavesRoom > 1>><<print _corpDivTrainSlavesRoom>> slaves<<else>>one slave<</if>> to the slave training division. - <<set $corpDivSurgerySlaves2 -= _corpDivTrainSlavesRoom, - $corpDivTrainSlaves = $corpDivTrainDev, - _corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>> - <<elseif $corpDivSurgerySlaves2 > 0>> - It moved <<if $corpDivSurgerySlaves2 > 1>>$corpDivSurgerySlaves2 slaves<<else>>one slave<</if>> to the slave training division. - <<set $corpDivTrainSlaves += $corpDivSurgerySlaves2, - $corpDivSurgerySlaves2 = 0, - _corpDivTrainSlavesRoom = corpDivTrainSlavesRoom()>> - <</if>> - <</if>> - <<if $corpDivSurgeryToMarket == 1 && $corpDivSurgerySlaves2 > 0>> - It immediately sold <<if $corpDivSurgerySlaves2 > 1>><<print $corpDivSurgerySlaves2>> slaves<<else>>one slave<</if>> - <<set _corpDivSurgeryRev = $corpDivSurgerySlaves2 * 23 * menialSlaveCost(-$corpDivSurgerySlaves2), - _corpRev += _corpDivSurgeryRev, - $corpDivSurgerySlaves2 = 0>> - to the market and made @@.yellowgreen;<<print cashFormat(_corpDivSurgeryRev)>>.@@ - <<elseif $corpDivSurgerySlaves2 > 0>> - It is holding <<if $corpDivSurgerySlaves2 > 1>>@@.green;$corpDivSurgerySlaves2 improved slaves@@<<else>>@@.green;one improved slave@@<</if>> at the end of the week. - <<if $corpDivSurgerySlaves2 > Math.trunc($corpDivSurgeryDev)>> - <<set _corpDivSurgeryCapSlaves = $corpDivSurgerySlaves2 - Math.trunc($corpDivSurgeryDev), - _corpDivSurgeryRev = _corpDivSurgeryCapSlaves * 23 * menialSlaveCost(-_corpDivSurgeryCapSlaves), - _corpRev += _corpDivSurgeryRev, - $menialDemandFactor -= _corpDivSurgeryCapSlaves, - $corpDivSurgerySlaves2 = Math.trunc($corpDivSurgeryDev)>> - But it ran out of storage space and had to sell <<if _corpDivSurgeryCapSlaves > 1>>@@.red;<<print _corpDivSurgeryCapSlaves>> slaves@@<<else>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivSurgeryRev)>>.@@ - <</if>> - <</if>> -<</if>> - -<<if $corpDivTrain > 0>> - <br>Slave Training: The division finished training <<if _corpDivTrainProc > 1>><<print _corpDivTrainProc>> slaves.<<elseif _corpDivTrainProc > 0>>one slave.<<else>>@@.red;none of its slaves.@@<</if>> The division is still training $corpDivTrainSlaves slaves. - <<if $corpDivTrainFromMarket == 1>> - <<if $corpDivSurgery == 0 && $corpDivTrainSurgerySwitch == 0 && _corpDivTrainSlavesRoom > 0>> - It replenished its slave stock and bought <<print _corpDivTrainSlavesRoom>> slaves that need slave training from the market. - <<set _corpDivTrainAssetsSlave = _corpDivTrainSlavesRoom * 15 * menialSlaveCost(_corpDivTrainSlavesRoom), - _corpAssetsSlave += _corpDivTrainAssetsSlave, - $corpDivTrainSlaves = $corpDivTrainDev>> - <<elseif _corpDivTrainSlavesRoom > 0>> - It replenished its slave stock and bought <<print _corpDivTrainSlavesRoom>> slaves that need slave training from the market. - <<set _corpDivTrainAssetsSlave = _corpDivTrainSlavesRoom * 23 * menialSlaveCost(_corpDivTrainSlavesRoom), - _corpAssetsSlave += _corpDivTrainAssetsSlave, - $corpDivTrainSlaves = $corpDivTrainDev>> - <</if>> - <</if>> - <<if $corpDivTrainToWhore == 1 && _corpDivWhoreSlavesRoom > 0>> - <<if $corpDivTrainSlaves2 >= _corpDivWhoreSlavesRoom>> - It moved <<if _corpDivWhoreSlavesRoom > 1>><<print _corpDivWhoreSlavesRoom>> slaves<<else>>one slave<</if>> to the escort division. - <<set $corpDivTrainSlaves2 -= _corpDivWhoreSlavesRoom, - $corpDivWhoreSlaves = $corpDivWhoreDev, - _corpDivWhoreSlavesRoom = corpDivWhoreSlavesRoom()>> - <<elseif $corpDivTrainSlaves2 > 0>> - It moved <<if $corpDivTrainSlaves2 > 1>>$corpDivTrainSlaves2 slaves<<else>>one slave<</if>> to the escort division. - <<set $corpDivWhoreSlaves += $corpDivTrainSlaves2, - $corpDivTrainSlaves2 = 0, - _corpDivWhoreSlavesRoom = corpDivWhoreSlavesRoom()>> - <</if>> - <</if>> - <<if $corpDivTrainToMarket == 1 && $corpDivTrainSlaves2 > 0>> - <<if $corpDivSurgery == 0 && $corpDivTrainSurgerySwitch == 0>> - It immediately sold <<if $corpDivTrainSlaves2 > 1>>$corpDivTrainSlaves2 slaves<<else>>one slave<</if>> - <<set _corpDivTrainRev = $corpDivTrainSlaves2 * 26 * menialSlaveCost(-$corpDivTrainSlaves2), - _corpRev += _corpDivTrainRev, - $corpDivTrainSlaves2 = 0>> - to the market and made @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>.@@ - <<elseif $corpDivTrainSurgerySwitch == 1 && $corpDivTrainSurgeryTimer < 5>> - It immediately sold <<if $corpDivTrainSlaves2 > 1>>$corpDivTrainSlaves2 slaves<<else>>one slave<</if>> - <<set _corpDivTrainRev = Math.trunc($corpDivTrainSlaves2 * (26 + $corpDivTrainSurgeryTimer * 1.6) * menialSlaveCost(-$corpDivTrainSlaves2)), - _corpRev += _corpDivTrainRev, - $corpDivTrainSlaves2 = 0>> - to the market and made @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>.@@ - <<else>> - It immediately sold <<if $corpDivTrainSlaves2 > 1>><<print $corpDivTrainSlaves2>> slaves<<else>>one slave<</if>> - <<set _corpDivTrainRev = $corpDivTrainSlaves2 * 34 * menialSlaveCost(-$corpDivTrainSlaves2), - _corpRev += _corpDivTrainRev, - $corpDivTrainSlaves2 = 0>> - to the market and made @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>.@@ - <</if>> - <<elseif $corpDivTrainSlaves2 > 0>>It is holding <<if $corpDivTrainSlaves2 > 1>>$corpDivTrainSlaves2 trained slaves<<elseif $corpDivTrainSlaves2 == 1>>one trained slave<</if>> at the end of the week. - <<if $corpDivTrainSlaves2 > Math.trunc($corpDivTrainDev * 0.4)>> - <<if $corpDivTrainSurgeryTimer < 5 || $corpDivSurgery == 0>> - <<set _corpDivTrainCapSlaves = $corpDivTrainSlaves2 - Math.trunc($corpDivTrainDev * 0.4), - _corpDivTrainRev = _corpDivTrainCapSlaves * 26 * menialSlaveCost(-_corpDivTrainCapSlaves), - _corpRev += _corpDivTrainRev, - $menialDemandFactor -= _corpDivTrainCapSlaves, - $corpDivTrainSlaves2 = Math.trunc($corpDivTrainDev * 0.4)>> - But it ran out of storage space and had to sell <<if _corpDivTrainCapSlaves > 1>>@@.red;<<print _corpDivTrainCapSlaves>> slaves@@<<elseif _corpDivTrainCapSlaves > 0>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>.@@ - <<else>> - <<set _corpDivTrainCapSlaves = $corpDivTrainSlaves2 - Math.trunc($corpDivTrainDev * 0.4), - _corpDivTrainRev = _corpDivTrainCapSlaves * 34 * menialSlaveCost(-_corpDivTrainCapSlaves), - _corpRev += _corpDivTrainRev, - $menialDemandFactor -= _corpDivTrainCapSlaves, - $corpDivTrainSlaves2 = Math.trunc($corpDivTrainDev * 0.4)>> - But it ran out of storage space and had to sell <<if _corpDivTrainCapSlaves > 1>>@@.red;<<print _corpDivTrainCapSlaves>> slaves@@<<elseif _corpDivTrainCapSlaves > 0>>@@.red;one slave@@<</if>> and made @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>.@@ - <</if>> - <</if>> - <</if>> -<</if>> - -<<if $corpDivArcade > 0>> - <br>Sex Arcade: The division is exploiting @@.green;$corpDivArcadeSlaves slaves.@@ <<if _corpDivArcadeProc > 0>>During operations <<if _corpDivArcadeProc > 1>>@@.red;_corpDivArcadeProc slaves@@<<else>>@@.green;one slave@@<</if>> wore out.<</if>> - It earned @@.yellowgreen;<<print cashFormat(_corpDivArcadeRev)>>@@ in revenue. - <<if $corpDivArcadeFromMarket == 1 && _corpDivArcadeSlavesRoom > 0>> - It replenished its slave stock and bought <<print _corpDivArcadeSlavesRoom>> fresh slaves from the market. - <<set _corpDivArcadeAssetsSlave = _corpDivArcadeSlavesRoom * 10 * menialSlaveCost(_corpDivArcadeSlavesRoom), - _corpAssetsSlave += _corpDivArcadeAssetsSlave, - $corpDivArcadeSlaves = $corpDivArcadeDev>> - <</if>> -<</if>> - -<<if $corpDivMenial > 0>> - <br>Menial Services: The division is exploiting @@.green;$corpDivMenialSlaves slaves.@@ <<if _corpDivMenialProc > 0>>During operations <<if _corpDivMenialProc > 1>>@@.red;_corpDivMenialProc slaves@@<<else>>@@.green;one slave@@<</if>> wore out.<</if>> - <br>It earned @@.yellowgreen;<<print cashFormat(_corpDivMenialRev)>>@@ in revenue. - <<if $corpDivMenialFromMarket == 1 && _corpDivMenialSlavesRoom > 0>> - It replenished its slave stock and bought <<print _corpDivMenialSlavesRoom>> menial slaves from the market. - <<set _corpDivMenialAssetsSlave = _corpDivMenialSlavesRoom * 15 * menialSlaveCost(_corpDivMenialSlavesRoom), - _corpAssetsSlave += _corpDivMenialAssetsSlave, - $corpDivMenialSlaves = $corpDivMenialDev>> - <</if>> -<</if>> - -<<if $corpDivDairy > 0>> - <br>Dairy: The division is milking @@.green;$corpDivDairySlaves slaves.@@ <<if _corpDivDairyProc > 0>>During operations <<if _corpDivDairyProc > 1>>@@.red;_corpDivDairyProc slaves@@<<else>>@@.green;one slave@@<</if>> ran dry.<</if>> - It earned @@.yellowgreen;<<print cashFormat(_corpDivDairyRev)>>@@ in revenue. - <<if $corpDivDairyFromMarket == 1 && _corpDivDairySlavesRoom > 0>> - It replenished its slave stock and bought <<print _corpDivDairySlavesRoom>> cows from the market. - <<set _corpDivDairyAssetsSlave = _corpDivDairySlavesRoom * 23 * menialSlaveCost(_corpDivDairySlavesRoom), - _corpAssetsSlave += _corpDivDairyAssetsSlave, - $corpDivDairySlaves = $corpDivDairyDev>> - <</if>> -<</if>> - -<<if $corpDivWhore > 0>> - <br>Escort Service: The division is whoring out @@.green;$corpDivWhoreSlaves slaves.@@ <<if _corpDivWhoreProc > 0>>During operations <<if _corpDivWhoreProc > 1>>@@.red;_corpDivWhoreProc slaves@@<<else>>@@.green;one slave@@<</if>> lost their appeal.<</if>> - It earned @@.yellowgreen;<<print cashFormat(_corpDivWhoreRev)>>@@ in revenue. - <<if $corpDivWhoreFromMarket == 1 && $corpDivTrainSurgerySwitch > 0 && _corpDivWhoreSlavesRoom > 0>> - It replenished its slave stock and bought <<print _corpDivWhoreSlavesRoom>> trained whores from the market. - <<set _corpDivWhoreAssetsSlave = _corpDivWhoreSlavesRoom * 34 * menialSlaveCost(_corpDivWhoreSlavesRoom), - _corpAssetsSlave += _corpDivWhoreAssetsSlave, - $corpDivWhoreSlaves = $corpDivWhoreDev>> - <<elseif $corpDivWhoreFromMarket == 1 && _corpDivWhoreSlavesRoom > 0>> - It replenished its slave stock and bought <<print _corpDivWhoreSlavesRoom>> trained whores from the market. - <<set _corpDivWhoreAssetsSlave = _corpDivWhoreSlavesRoom * 26 * menialSlaveCost(_corpDivWhoreSlavesRoom), - _corpAssetsSlave += _corpDivWhoreAssetsSlave, - $corpDivWhoreSlaves = $corpDivWhoreDev>> - <</if>> -<</if>> - -/*Aggregate Corporation Results*/ -<br><br>''Aggregate Results'' -<<set _corpOverhead = 0>> -<<if $corpDiv > 1>> - <<set _corpAcquisition = Math.pow(($corpDivExtra + $corpDivLegal), 2) * 25000 + Math.pow(Math.max(($corpDivExtraDev + $corpDivLegalDev - 100),0), 2) * 2, - _corpProcessing = Math.pow(($corpDivBreak + $corpDivSurgery + $corpDivTrain), 2) * 25000 + Math.pow(Math.max(($corpDivBreakDev + $corpDivSurgeryDev + $corpDivTrainDev - 200),0), 2), - _corpExploitation = Math.pow(Math.max(($corpDivArcade + $corpDivMenial + $corpDivDairy + $corpDivWhore - 1), 0), 2) * 15000 + Math.trunc(Math.pow(Math.max(($corpDivArcadeDev + $corpDivMenialDev + $corpDivDairyDev + $corpDivWhoreDev - 800),0), 2) * 0.1), - _corpOverhead = _corpAcquisition + _corpProcessing + _corpExploitation + Math.pow(Math.max($corpDiv - 2, 0), 2) * 10000>> - <<if $corpEasy == 1>> - <<set _corpOverhead = Math.trunc(_corpOverhead / 2)>> - <</if>> -<</if>> - -/*cash, rev and costs state variables get corrected here*/ -<<set $corpCash += _corpRev - (_corpOverhead + _corpOpCost + _corpAssetsSlave), -$corpRev += _corpRev, -$corpAssetsSlave += _corpAssetsSlave, -_corpProfitProvisional = $corpRev - ($corpAssetsDev + $corpAssetsSlave + _corpOpCost + _corpOverhead)>> -<<if _corpProfitProvisional > 0>> - <<set $corpEcon = Math.trunc(_corpProfitProvisional / (100 / $localEcon) - _corpProfitProvisional), - $corpCash += $corpEcon, - $corpProfitOld = _corpProfitProvisional + $corpEcon>> /*this is probably the best place for the economy to show itself, the rest is finnicky enough as is*/ -<<else>> - <<set $corpProfitOld = _corpProfitProvisional>> -<</if>> -<br>Revenue: @@.yellowgreen;<<print cashFormat($corpRev)>>@@ -<<if ($cheatMode) && ($cheatModeM) && $corpNeighborBonus > 0>> - <br>Including Neighbor Bonus: @@.yellowgreen;<<print cashFormat($corpNeighborBonus)>>@@ -<</if>> -<br>Operating Expenses: @@.red;<<print cashFormat(_corpOpCost)>>@@ -<<if $corpAssetsSlave > 0>> - <br>Slave Expenses: @@.red;<<print cashFormat($corpAssetsSlave)>>@@ -<<else>> - <br>Slave Expenses: @@.yellowgreen;<<print cashFormat($corpAssetsSlave)>>@@ -<</if>> -<<if $corpAssetsDev > 0>> - <br>Asset Expenses: @@.red;<<print cashFormat($corpAssetsDev)>>@@ -<<else>> - <br>Asset Expenses: @@.yellowgreen;<<print cashFormat($corpAssetsDev)>>@@ -<</if>> -<<if ($cheatMode) && ($cheatModeM)>> - <<if $corpEcon < 0>> - <br>Economic Expenses: @@.red;<<print cashFormat(-$corpEcon)>>@@ - <<else>> - <br>Economic Windfall: @@.yellowgreen;<<print cashFormat($corpEcon)>>@@ - <</if>> -<</if>> -<<if _corpOverhead != 0>><br>Overhead: @@.red;<<print cashFormat(_corpOverhead)>>@@<</if>> -<br>Profit: <<if $corpProfitOld > 0>>@@.yellowgreen;<<print cashFormat($corpProfitOld)>>@@<<else>>@@.red;<<print cashFormat($corpProfitOld)>>@@<</if>> -<<if $localEcon > 100>> - <br>Your profits benefit from a strong economy. -<<elseif $localEcon < 60>> - <br>Your profits are severely depressed by the failing economy. -<<elseif $localEcon < 100>> - <br>Your profits are lowered by the weak economy. -<</if>> - -/*Division Expansion Tokens*/ -<<if corpValue() > 2000000 && $corpExpand < 1>> - <<set $corpExpandToken += 1, - $corpExpand = 1>> - <br><br>Your corporation is ready to start an additional division! -<<elseif corpValue() > 5000000 && $corpExpand < 2>> - <<set $corpExpandToken += 1, - $corpExpand = 2>> - <br><br>Your corporation is ready to start an additional division! -<<elseif corpValue() > 9000000 && $corpExpand < 3>> - <<set $corpExpandToken += 1, - $corpExpand = 3>> - <br><br>Your corporation is ready to start an additional division! -<<elseif corpValue() > 13000000 && $corpExpand < 4>> - <<set $corpExpandToken += 1, - $corpExpand = 4>> - <br><br>Your corporation is ready to start an additional division! -<<elseif corpValue() > 17000000 && $corpExpand < 5>> - <<set $corpExpandToken += 1, - $corpExpand = 5>> - <br><br>Your corporation is ready to start an additional division! -<<elseif corpValue() > 22000000 && $corpExpand < 6>> - <<set $corpExpandToken += 1, - $corpExpand = 6>> - <br><br>Your corporation is ready to start an additional division! -<<elseif corpValue() > 27000000 && $corpExpand < 7>> - <<set $corpExpandToken += 1, - $corpExpand = 7>> - <br><br>Your corporation is ready to start an additional division! -<<elseif corpValue() > 33000000 && $corpExpand < 8>> - <<set $corpExpandToken += 1, - $corpExpand = 8>> - <br><br>Your corporation is ready to start an additional division! -<</if>> - -/*Specializations tokens*/ -<<if corpValue() > 1600000 * Math.pow(1.25, $corpSpec) - 1200000>> - /*the spendable currency*/ <<set $corpSpecToken += 1, - $corpSpec += 1>> /*the amount unlocked*/ - <br><br>Your corporation is ready to specialize its slaves further! -<</if>> - -/*Specialization Cooldown*/ -<<if $corpSpecTimer > 0>> - <<set $corpSpecTimer-->> -<</if>> - -/*Calculating cash set aside for dividend*/ -<br><br>''Dividend'' -<<if $dividendRatio > 0.5>> - <br>The corporation is currently reserving 75% of its profit to be paid out as dividends. -<<elseif $dividendRatio > 0.25>> - <br>The corporation is currently reserving 50% of its profit to be paid out as dividends. -<<elseif $dividendRatio > 0.1>> - <br>The corporation is currently reserving 25% of its profit to be paid out as dividends. -<<elseif $dividendRatio > 0.05>> - <br>The corporation is currently reserving 10% of its profit to be paid out as dividends. -<<elseif $dividendRatio > 0>> - <br>The corporation is currently reserving 5% of its profit to be paid out as dividends. -<<else>> - <br>The corporation is currently not reserving a portion of its profit to be paid out as dividends. -<</if>> -<<if $corpCashDividend == 1>> - It is putting aside unused cash reserves to be paid out as dividends. -<</if>> -<<set _dividendCashReserved = 0, -_dividendReserved = 0>> -<<if $corpProfitOld > 0 && $dividendRatio > 0 && $corpCash > $corpProfitOld * $dividendRatio>> - <<set _dividendReserved = Math.trunc($corpProfitOld * $dividendRatio), - $corpDividend += _dividendReserved, - $corpCash -= _dividendReserved>> -<</if>> -<<if $corpCashDividend == 1>> - <<if $corpCash > 1000000 && $corpCash > Math.trunc(0.05 * corpValue())>> - <<set _dividendCashReserved = $corpCash - Math.trunc(0.05 * corpValue()), - $corpDividend += _dividendCashReserved, - $corpCash -= _dividendCashReserved>> - <<elseif $corpCash > 1000000>> - <<set _dividendCashReserved = $corpCash - 1000000, - $corpDividend += _dividendCashReserved, - $corpCash -= _dividendCashReserved>> - <</if>> -<</if>> -<<if $corpDividend > 0 || $dividendRatio > 0 || _dividendCashReserved > 0>> - <<if _dividendReserved > 0 || _dividendCashReserved > 0>> - It reserved @@.yellowgreen;<<print cashFormat(_dividendReserved + _dividendCashReserved)>>@@ this week. - <</if>> - A total of @@.yellowgreen;<<print cashFormat($corpDividend)>>@@ has been put aside for its shareholders. -<</if>> - -/*The corporation pays out every quarter (13 weeks)*/ -<<if $dividendTimer == 1>> - <<set _dividendPayout = Math.trunc($corpDividend * $personalShares / ($personalShares + $publicShares)), - $corpDividend = 0, - $dividendTimer = 13, - cashX(_dividendPayout, "stocks")>> - <<if _dividendPayout > 0>> - <br>This week the dividends were paid out, you received @@.yellowgreen;<<print cashFormat(_dividendPayout)>>.@@ - <</if>> -<<elseif $corpIncorporated == 1>> - <<set $dividendTimer -= 1>> -<</if>> - -/*Bankrupted the Corporation*/ -<<if corpValue() < 0>> - <<set $corpIncorporated = 0, - $corpDiv = 0, - $corpDivExtra = 0, - $corpDivLegal = 0, - $corpDivBreak = 0, - $corpDivSurgery = 0, - $corpDivTrain = 0, - $corpDivArcade = 0, - $corpDivMenial = 0, - $corpDivDairy = 0, - $corpDivWhore = 0, - $corpDivExtraDev = 0, - $corpDivLegalDev = 0, - $corpDivBreakDev = 0, - $corpDivSurgeryDev = 0, - $corpDivTrainDev = 0, - $corpDivDairyDev = 0, - $corpDivArcadeDev = 0, - $corpDivMenialDev = 0, - $corpDivWhoreDev = 0, - $corpExpand = 0, - $corpExpandToken = 0, - $corpSpec = 0, - $corpSpecToken = 0, - $corpSpecRaces = []>> - <<unset $corpCash, - $personalShares, - $publicShares, - $corpDividend, - $dividendTimer, - $corpDivExtraSlaves, - $corpDivLegalSlaves, - $corpDivBreakSlaves, - $corpDivBreakSlaves2, - $corpDivSurgerySlaves, - $corpDivSurgerySlaves2, - $corpDivTrainSlaves, - $corpDivTrainSlaves2, - $corpDivArcadeSlaves, - $corpDivMenialSlaves, - $corpDivDairySlaves, - $corpDivWhoreSlaves, - $corpRev, - $corpRevOld, - $corpAssetsDev, - $corpAssetsDevOld, - $corpAssetsSlave, - $corpAssetsSlaveOld, - $corpOverheadOld, - $corpOpCostOld, - $corpProfitOld, - $corpSpecAccent, - $corpSpecAge, - $corpSpecAmputee, - $corpSpecBalls, - $corpSpecDevotion, - $corpSpecDick, - $corpSpecEducation, - $corpSpecGender, - $corpSpecGenitalia, - $corpSpecWeight, - $corpSpecHeight, - $corpSpecHormones, - $corpSpecImplants, - $corpSpecInjection, - $corpSpecIntelligence, - $corpSpecMilk, - $corpSpecMuscle, - $corpSpecPussy, - $corpSpecSexEd, - $corpSpecTrust, - $corpSpecVirgin>> - <<if $corpMarket == 1>> - <<for _i = 0; _i < $sectors.length; _i++>> - <<if $sectors[_i].type == "CorporateMarket">><<set $sectors[_i].type = "Markets">><<break>><</if>> - <</for>> - <<set $corpMarket = 0>> - <</if>> - <br>@@.red;Your corporation went bankrupt.@@ -<</if>> - -<<set $corpRevOld = $corpRev, -$corpRev = 0, -$corpOpCostOld = _corpOpCost, -$corpAssetsDevOld = $corpAssetsDev, -$corpAssetsDev = 0, -$corpAssetsSlaveOld = $corpAssetsSlave, -$corpAssetsSlave = 0, -$corpOverheadOld = _corpOverhead>> /*This needs to be at the very end of the financials*/ diff --git a/src/uncategorized/neighborsDevelopment.tw b/src/uncategorized/neighborsDevelopment.tw index 6c8fd4f7849..8b7bc150939 100644 --- a/src/uncategorized/neighborsDevelopment.tw +++ b/src/uncategorized/neighborsDevelopment.tw @@ -10,7 +10,7 @@ <<set $averageProsperity = $averageProsperity/$arcologies.length>> <<if $corpIncorporated == 1>> - <<set _corpBonus = Math.trunc(1000 * Math.pow(corpValue(), 0.1)), + <<set _corpBonus = Math.trunc(1000 * Math.pow(App.Corporate.value, 0.1)), $corpNeighborBonus = 0>> <</if>> diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw index 449b2bb8605..75b7a0a3049 100644 --- a/src/uncategorized/nextWeek.tw +++ b/src/uncategorized/nextWeek.tw @@ -307,57 +307,7 @@ <</if>> <<if $week == $oldWeek>> - <<set $week += 1, $day += 7>> - <<switch $month>> - <<case "January">> - <<if $day > 31>> - <<set $day -= 31, $month = "February">> - <</if>> - <<case "February">> - <<if $day > 28>> - <<set $day -= 28, $month = "March">> - <</if>> - <<case "March">> - <<if $day > 31>> - <<set $day -= 31, $month = "April">> - <</if>> - <<case "April">> - <<if $day > 30>> - <<set $day -= 30, $month = "May">> - <</if>> - <<case "May">> - <<if $day > 31>> - <<set $day -= 31, $month = "June">> - <</if>> - <<case "June">> - <<if $day > 30>> - <<set $day -= 30, $month = "July">> - <</if>> - <<case "July">> - <<if $day > 31>> - <<set $day -= 31, $month = "August">> - <</if>> - <<case "August">> - <<if $day > 31>> - <<set $day -= 31, $month = "September">> - <</if>> - <<case "September">> - <<if $day > 30>> - <<set $day -= 30, $month = "October">> - <</if>> - <<case "October">> - <<if $day > 31>> - <<set $day -= 31, $month = "November">> - <</if>> - <<case "November">> - <<if $day > 30>> - <<set $day -= 30, $month = "December">> - <</if>> - <<default>> - <<if $day > 31>> - <<set $day -= 31, $month = "January", $year += 1>> - <</if>> - <</switch>> + <<set $week += 1>> <</if>> <<if $playerSurgery > 0>> diff --git a/src/uncategorized/remMerger.tw b/src/uncategorized/remMerger.tw index f77a7e2b8e7..9448be1bf4d 100644 --- a/src/uncategorized/remMerger.tw +++ b/src/uncategorized/remMerger.tw @@ -3,212 +3,61 @@ <<set $nextButton = "Continue">> <<set $nextLink = "RIE Eligibility Check">> -<<set _slaveCompany = []>> -<<if $corpDivExtra == 1>> - <<set _slaveCompany.push("capture")>> -<</if>> -<<if $corpDivLegal == 1>> - <<set _slaveCompany.push("entrapment")>> -<</if>> -<<if $corpDivBreak == 1>> - <<set _slaveCompany.push("break")>> -<</if>> -<<if $corpDivSurgery == 1>> - <<set _slaveCompany.push("surgery")>> -<</if>> -<<if $corpDivTrain == 1>> - <<set _slaveCompany.push("training")>> -<</if>> -<<if $corpDivArcade == 1>> - <<set _slaveCompany.push("arcade")>> -<</if>> -<<if $corpDivMenial == 1>> - <<set _slaveCompany.push("slaves")>> -<</if>> -<<if $corpDivDairy == 1>> - <<set _slaveCompany.push("dairy")>> -<</if>> -<<if $corpDivWhore == 1>> - <<set _slaveCompany.push("whore")>> -<</if>> +<<set _slaveCompany = App.Corporate.divisionList + .filter(div=>div.founded && div.hasMergers) + .map (div=>div.mergerChoices.map((merger, index)=>({merger, index, division:div}))) + .flat ()>> +<<set _maxCompanies = Math.trunc(Math.log2(App.Corporate.divisionList.filter(div=>div.founded).length)) + 1>> +<<set _numCompanies = random(1, _maxCompanies)>> -<<set _company1 = _slaveCompany.pluck()>> -<<if $corpDiv > 1>> - <<set _company2 = _slaveCompany.random()>> -<</if>> +<<set _companies = []>> +<<for _index = 0; _index < _numCompanies; ++_index>> + <<run _companies.push(_slaveCompany.pluck())>> +<</for>> -<<if $marketAssistantAnnounced>>Your market assistant<<elseif $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> constantly combs business records, tax receipts and the media for leads on opportunities for your corporation to take advantage of. Small businesses go under all the time, and with a large amount of cash on hand, your corporation can afford to step in and acquire them.<<if $corpDiv > 1>> This week, there are not one but two troubled organizations you could easily fold into your corporation.<</if>> -<br><br> +<<set _assistant = $assistantName>> +<<if $marketAssistantAnnounced>><<set _assistant = "your market assistant">><</if>> +<p><<= capFirstChar(_assistant) >> constantly combs business records, tax receipts and the media for leads on opportunities for your corporation to take advantage of. Small businesses go under all the time, and with a large amount of cash on hand, your corporation can afford to step in and acquire them. This week, _assistant has found <<= numberWithPlural(_numCompanies, "troubled organization") >> you could easily fold into your corporation.</p> -<<if $corpDiv > 1>>The first is <<else>>This week you come across <</if>> -<<if _company1 == "slaves">> - a minor slaveholding company. A major deal with a troubled government just fell through, and they had depended on it going through to an unwise degree. They need to merge with a larger slaving concern immediately, but there's nothing at all wrong with their significant inventory of slaves. -<<elseif _company1 == "entrapment">> - an old world telemarketing firm. In an attempt to survive in the changing economy, it turned its focus towards convincing desperate, ignorant, or stupid people from the old world to accept voluntary enslavement, through a variety of entrapment procedures. It failed to make the transition successfully, but you could certainly continue its operations under your aegis. -<<elseif _company1 == "training">> - a small slave training firm. Slave training is a notoriously difficult business, since the maturation times on the merchandise can be extremely long, and the improvement in price can be marginal if the training does not prove highly successful. There's nothing inherently wrong with the business, they've simply hit a cash flow bottleneck and need to merge with a cash-rich organization like yours. -<<elseif _company1 == "break">> - a small slave breaking firm. Despite a great need for obedient slaves the owner of this little establishment was unable to turn a profit. The facility has everything a respecting slave breaking could ever need, it seems the owner simply lacked the right character to apply effective breaking techniques. Your corporation knows perfectly well what it takes to achieve obedience and the assets can be put to great use. -<<elseif _company1 == "capture">> - a troubled mercenary company. After a spate of failed operations, the rank and file deposed their management and are now looking to merge with a better-run organization. The old leadership did not engage in enslavement activities, but the mercenaries have decided to turn their talents towards slaving for profit in conflict zones. -<<elseif _company1 == "arcade">> - a quaint maid café. The prime location together with a popular concept should make for a bustling business and yet the owner is looking to get out of the business hoping to salvage some of his savings. Sadly there was a lack of capital to employ attractive servant slave maids. While someone might very well be more than willing to come in and invest in some better slaves, the place is so cheap you could easily replace the furniture and use the current assets to create a new arcade location for your corporation instead. -<<elseif _company1 == "dairy">> - a dairy farm. Why a conventional dairy farm popped up as target confused you for a moment, but it quickly became clear the entire family was so deep in debt it would be a no brainer to buy the farm and start milking the large-uddered farmer's daughters as a great addition to your corporate dairy. -<<elseif _company1 == "whore">> - a little brothel. With slave whores becoming the dominant force in sexual services the current madam lost her passion for the business. She's getting up there in age and has run a tight ship for many years so she deemed it the right time to bow out. All you need to do to add a new brothel location for your corporation is sign at the dotted line before anyone else has a chance to bite. -<<else>> - a small medical clinic. Medical malpractice continues to be a major source of trouble for surgeons in the old world. A plastic surgeon has just suffered defeat in a major legal case over implant ruptures. He's looking to make the transition to a more enlightened area, along with his inventory and staff. -<</if>> -<br><br> - -<<if $corpDiv > 1>> - The second is - <<if _company2 == "slaves">> - a minor slaveholding company. A major deal with a troubled government just fell through, and they had depended on it going through to an unwise degree. They need to merge with a larger slaving concern immediately, but there's nothing at all wrong with their significant inventory of slaves. - <<elseif _company2 == "entrapment">> - an old world telemarketing firm. In an attempt to survive in the changing economy, it turned its focus towards convincing desperate, ignorant, or stupid people from the old world to accept voluntary enslavement, through a variety of entrapment procedures. It failed to make the transition successfully, but you could certainly continue its operations under your aegis. - <<elseif _company2 == "training">> - a small slave training firm. Slave training is a notoriously difficult business, since the maturation times on the merchandise can be extremely long, and the improvement in price can be marginal if the training does not prove highly successful. There's nothing inherently wrong with the business, they've simply hit a cash flow bottleneck and need to merge with a cash-rich organization like yours. - <<elseif _company2 == "break">> - a small slave breaking firm. Despite a great need for obedient slaves the owner of this little establishment was unable to turn a profit. The facility has everything a respecting slave breaking could ever need, it seems the owner simply lacked the right character to apply effective breaking techniques. Your corporation knows perfectly well what it takes to achieve obedience and the assets can be put to great use. - <<elseif _company2 == "capture">> - a troubled mercenary company. After a spate of failed operations, the rank and file deposed their management and are now looking to merge with a better-run organization. The old leadership did not engage in enslavement activities, but the mercenaries have decided to turn their talents towards slaving for profit in conflict zones. - <<elseif _company2 == "arcade">> - a quaint maid café. The prime location together with a popular concept should make for a bustling business and yet the owner is looking to get out of the business hoping to salvage some of his savings. Sadly there was a lack of capital to employ attractive servant slave maids. While someone might very well be more than willing to come in and invest in some better slaves, the place is so cheap you could easily replace the furniture and use the current assets to create a new arcade location for your corporation instead. - <<elseif _company2 == "dairy">> - a dairy farm. Why a conventional dairy farm popped up as target confused you for a moment, but it quickly became clear the entire family was so deep in debt it would be a no brainer to buy the farm and start milking the large-uddered farmer's daughters as a great addition to your corporate dairy. - <<elseif _company2 == "whore">> - a little brothel. With slave whores becoming the dominant force in sexual services the current madam lost her passion for the business. She's getting up there in age and has run a tight ship for many years so she deemed it the right time to bow out. All you need to do to add a new brothel location for your corporation is sign at the dotted line before anyone else has a chance to bite. - <<else>> - a small medical clinic. Medical malpractice continues to be a major source of trouble for surgeons in the old world. A plastic surgeon has just suffered defeat in a major legal case over implant ruptures. He's looking to make the transition to a more enlightened area, along with his inventory and staff. - <</if>> -<</if>> -<br><br> -<span id="result"> -<<if $corpDiv > 1>> - <<link "Absorb the first business">> - <<replace "#result">> - <<if _company1 == "slaves">> - You immediately acquire the slaveholding firm, cash out its hapless staff, and absorb its stock into your corporation. - <<set $corpDivMenialDev += 5, - $corpDivMenialSlaves += 5>> - <<elseif _company1 == "entrapment">> - You immediately acquire the telemarketing firm and clean out the deadwood, getting the business in Free Cities shape. - <<set $corpDivLegalDev += 5>> - <<elseif _company1 == "capture">> - You immediately acquire the mercenary company and ease their transition to conflict zone slaving. - <<set $corpDivExtraDev += 5>> - <<elseif _company1 == "training">> - The owners of the slave training firm are happy to hear that they'll be able to continue operations under the aegis of a better-run, richer corporation. - <<set $corpDivTrainDev += 3, - $corpDivTrainSlaves += 3>> - <<elseif _company1 == "break">> - You quickly staff the slave breaking facility with qualified personnel to make use of the new assets. - <<set $corpDivBreakDev += 5, - $corpDivBreakSlaves += 5>> - <<elseif _company1 == "arcade">> - The old owner wishes his slaves luck under the new management, not knowing your plans for the place. A new sex arcade under your corporate umbrella will open shortly. - <<set $corpDivArcadeDev += 5, - $corpDivArcadeSlaves += 5>> - <<elseif _company1 == "dairy">> - You acquire the farm and your new slaves for the corporation. The family is not happy with your plans, but their approval is not required, you care only for their fluids. - <<set $corpDivDairyDev += 3, - $corpDivDairySlaves += 3>> - <<elseif _company1 == "whore">> - Without delay you contact the madam and seal the deal before anyone else can make an offer. She's surprised by your speed, but happily signs over the brothel. - <<set $corpDivWhoreDev += 3, - $corpDivWhoreSlaves += 3>> - <<else>> - The surgeon decides to retire on the proceeds of the sale, wishing your corporation well. It was a smart decision; he can retire to the Free Cities on that sum of money, and remote surgery is killing surgeons' wages. - <<set $corpDivSurgeryDev += 3, - $corpDivSurgerySlaves += 3>> - <</if>> - <<set $corpCash -= 50000>> - <</replace>> - <</link>> - <br> - <<link "Absorb the second business">> - <<replace "#result">> - <<if _company2 == "slaves">> - You immediately acquire the slaveholding firm, cash out its hapless staff, and absorb its stock into your corporation. - <<set $corpDivMenialDev += 5, - $corpDivMenialSlaves += 5>> - <<elseif _company2 == "entrapment">> - You immediately acquire the telemarketing firm and clean out the deadwood, getting the business in Free Cities shape. - <<set $corpDivLegalDev += 5>> - <<elseif _company2 == "capture">> - You immediately acquire the mercenary company and ease their transition to conflict zone slaving. - <<set $corpDivExtraDev += 5>> - <<elseif _company2 == "training">> - The owners of the slave training firm are happy to hear that they'll be able to continue operations under the aegis of a better-run, richer corporation. - <<set $corpDivTrainDev += 3, - $corpDivTrainSlaves += 3>> - <<elseif _company2 == "break">> - You quickly staff the slave breaking facility with qualified personnel to make use of the new assets. - <<set $corpDivBreakDev += 5, - $corpDivBreakSlaves += 5>> - <<elseif _company2 == "arcade">> - The old owner wishes his slaves luck under the new management, not knowing your plans for the place. A new sex arcade under your corporate umbrella will open shortly. - <<set $corpDivArcadeDev += 5, - $corpDivArcadeSlaves += 5>> - <<elseif _company2 == "dairy">> - You acquire the farm and your new slaves for the corporation. The family is not happy with your plans, but their approval is not required, you care only for their fluids. - <<set $corpDivDairyDev += 3, - $corpDivDairySlaves += 3>> - <<elseif _company2 == "whore">> - Without delay you contact the madam and seal the deal before anyone else can make an offer. She's surprised by your speed, but happily signs over the brothel. - <<set $corpDivWhoreDev += 3, - $corpDivWhoreSlaves += 3>> - <<else>> - The surgeon decides to retire on the proceeds of the sale, wishing your corporation well. It was a smart decision; he can retire to the Free Cities on that sum of money, and remote surgery is killing surgeons' wages. - <<set $corpDivSurgeryDev += 3, - $corpDivSurgerySlaves += 3>> - <</if>> - <<set $corpCash -= 50000>> - <</replace>> - <</link>> +<<if _companies.length == 1>> + <<set _company = _companies[0]>> + <div class="majorText">This week you come across <<= _company.merger.text.trouble >></div> <<else>> - <<link "Absorb the business">> + <<for _index, _company range _companies>> + <div class="majorText">The <<= ordinalSuffixWords(_index + 1)>> is <<= _company.merger.text.trouble >></div> + <</for>> +<</if>> +<div id="result"> +<<for _company range _companies>> + <<capture _company>> + <div> + <<set _absorbName = "Absorb the " + _company.merger.name>> + <<link _absorbName>> <<replace "#result">> - <<if _company1 == "slaves">> - You immediately acquire the slaveholding firm, cash out its hapless staff, and absorb its stock into your corporation. - <<set $corpDivMenialDev += 5, - $corpDivMenialSlaves += 5>> - <<elseif _company1 == "entrapment">> - You immediately acquire the telemarketing firm and clean out the deadwood, getting the business in Free Cities shape. - <<set $corpDivLegalDev += 5>> - <<elseif _company1 == "capture">> - You immediately acquire the mercenary company and ease their transition to conflict zone slaving. - <<set $corpDivExtraDev += 5>> - <<elseif _company1 == "training">> - The owners of the slave training firm are happy to hear that they'll be able to continue operations under the aegis of a better-run, richer corporation. - <<set $corpDivTrainDev += 3, - $corpDivTrainSlaves += 3>> - <<elseif _company1 == "break">> - You quickly staff the slave breaking facility with qualified personnel to make use of the new assets. - <<set $corpDivBreakDev += 5, - $corpDivBreakSlaves += 5>> - <<elseif _company1 == "arcade">> - The old owner wishes his slaves luck under the new management, not knowing your plans for the place. A new sex arcade under your corporate umbrella will open shortly. - <<set $corpDivArcadeDev += 5, - $corpDivArcadeSlaves += 5>> - <<elseif _company1 == "dairy">> - You acquire the farm and your new slaves for the corporation. The family is not happy with your plans, but their approval is not required, you care only for their fluids. - <<set $corpDivDairyDev += 3, - $corpDivDairySlaves += 3>> - <<elseif _company1 == "whore">> - Without delay you contact the madam and seal the deal before anyone else can make an offer. She's surprised by your speed, but happily signs over the brothel. - <<set $corpDivWhoreDev += 3, - $corpDivWhoreSlaves += 3>> - <<else>> - The surgeon decides to retire on the proceeds of the sale, wishing your corporation well. It was a smart decision; he can retire to the Free Cities on that sum of money, and remote surgery is killing surgeons' wages. - <<set $corpDivSurgeryDev += 3, - $corpDivSurgerySlaves += 3>> - <</if>> - <<set $corpCash -= 50000>> + You quickly acquire the <<= _company.merger.name>><<= _company.merger.text.acquire >> + <<set _devCount = _company.merger.result.development, + _slaveCount = _company.merger.result.slaves>> + <<if _devCount != null>> + <<set _company.division.developmentCount += _devCount>> + <</if>> + <<if _slaveCount != null>> + <<set _company.division.activeSlaves += _slaveCount>> + <</if>> + <<set _cost = (_company.merger.cost || 50) * 1000 >> + <<if _devCount != null && _slaveCount != null>> + <<set App.Corporate.chargeAsset(_cost / 2, "development")>> + <<set App.Corporate.chargeAsset(_cost / 2, "slaves")>> + <<elseif _devCount != null>> + <<set App.Corporate.chargeAsset(_cost, "development")>> + <<elseif _slavecount != null>> + <<set App.Corporate.chargeAsset(_cost, "slaves")>> + <<else>> + @@.red;ERROR! No changes to the corporation are made!@@ + <</if>> <</replace>> <</link>> -<</if>> -</span> + </div> + <</capture>> +<</for>> +</div> diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw index a2310c299bd..262bc01f39c 100644 --- a/src/uncategorized/storyCaption.tw +++ b/src/uncategorized/storyCaption.tw @@ -64,7 +64,7 @@ <<if $cheatMode || $debugMode>> _Pass<br> <</if>> <span id="week">''Week $week''</span> <<if $week > 52>> (<<= years($week)>>) <</if>> - <br>Week of $month $day, $year + <br>Week of <<= asDateString($week) >> <<if (_Pass == "Main") && ($cheatMode)&& ($cheatModeM)>> <<set _TWeek = $week>> <<textbox "$week" $week>> @@ -804,4 +804,4 @@ <</link>> <</if>> <br> <<link "Dump Game State">><<run App.Debug.dumpGameState()>><</link>> -<</if>> \ No newline at end of file +<</if>> -- GitLab