diff --git a/Changelog.txt b/Changelog.txt index ae020e11c9a30261b7dbf27702f14b198e7b5a60..891453b0899067481407012147907a19d283c889 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -17,7 +17,7 @@ Pregmod 11/21/2019 0 - + -added FS Intellectual Dependency -added FS Slave Professionalism -added FS Statuesque Glorification @@ -29,7 +29,7 @@ Pregmod 0.10.7.1-2.9.x 11/09/2019 - + 2 -sugarcube updated to 2.30.0 @@ -38,7 +38,7 @@ Pregmod -various minor fixes and cleaning 10/28/2019 - + 1 -beta 3.0.0 work (schoolroom remodel) -added ability to reject delivered custom slaves without closing the order @@ -48,7 +48,7 @@ Pregmod -saTakeClasses JSification 10/15/2019 - + 0 -corporation overhauling -some minor ui settings diff --git a/src/002-config/sugarCubeConfig.js b/src/002-config/sugarCubeConfig.js index bd8bc1e80925d720fd94bcc99e9ce0d6117c0890..43711f8918b3b59977af30039d5d8c6f693fa320 100644 --- a/src/002-config/sugarCubeConfig.js +++ b/src/002-config/sugarCubeConfig.js @@ -6,11 +6,11 @@ Config.passages.start = "init"; /* Set description used by Save, for all passages, to give some decent information about game state. */ Config.passages.descriptions = function () { - let sv = State.variables; - if (sv.arcologies === undefined || sv.arcologies.length === 0) - return "New Game Setup, Week 0"; // no arcology yet... - else - return sv.arcologies[0].name + ", Week " + sv.week + ", " + sv.slaves.length + " Slaves, " + cashFormat(sv.cash); + let sv = State.variables; + if (sv.arcologies === undefined || sv.arcologies.length === 0) + return "New Game Setup, Week 0"; // no arcology yet... + else + return sv.arcologies[0].name + ", Week " + sv.week + ", " + sv.slaves.length + " Slaves, " + cashFormat(sv.cash); }; /* Disable forward/back buttons in panel. */ diff --git a/src/Corporation/corporate-constants.js b/src/Corporation/corporate-constants.js index 5117176df8fbae2c14ccd1e309bf2f211c855b92..d10a3590f6f15ff5161d5ce1c4e4d52ced36167a 100644 --- a/src/Corporation/corporate-constants.js +++ b/src/Corporation/corporate-constants.js @@ -1,541 +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. + 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}. + == 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) + 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. + == 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. + ==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. + ==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 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 - } - }; + */ + 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 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 index bdf5a516446dc6e42096050d5c1e62bb7676316d..af87a640601ab0a7e477b3c6354d1da8ba60e0dd 100644 --- a/src/Corporation/corporate-divisionAcquiring.js +++ b/src/Corporation/corporate-divisionAcquiring.js @@ -1,89 +1,89 @@ 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 <span class="green">${numberWithPluralNonZero(this.developmentCount, "new slave")}</span> each week.`; - } - messageSlaveOutput() { - return shared.MessageSlaveToMarket(this); - } - message_endWeek_Slaves(divLedger) { - let newSlaves = divLedger.slaves.value; - if(newSlaves > 0) { - return `<span class="green">acquired ${numberWithPlural(newSlaves, "slave")}</span>` - + (this.hadMercenaryHelp ? " with the help of your mercenaries" : ""); - } - else { - return `<span class="red">failed to acquire any slaves</span>` - + (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() { - App.Corporate.sellSlaves(this, this.heldSlaves); - super.dissolve(); - delete V[`${this._const.corpId}Slaves`]; - } - getAutoBuyFromMarket() { - return false; - } - setAutoBuyFromMarket(value) { - throw "Acquiring divisions cannot acquire from the market"; - } + 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 <span class="green">${numberWithPluralNonZero(this.developmentCount, "new slave")}</span> each week.`; + } + messageSlaveOutput() { + return shared.MessageSlaveToMarket(this); + } + message_endWeek_Slaves(divLedger) { + let newSlaves = divLedger.slaves.value; + if(newSlaves > 0) { + return `<span class="green">acquired ${numberWithPlural(newSlaves, "slave")}</span>` + + (this.hadMercenaryHelp ? " with the help of your mercenaries" : ""); + } + else { + return `<span class="red">failed to acquire any slaves</span>` + + (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() { + App.Corporate.sellSlaves(this, this.heldSlaves); + super.dissolve(); + delete V[`${this._const.corpId}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; + 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; - } + 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); - } + create() { + super.create(); + this.heldSlaves = 0; + shared.FoundingSetupAutoSell(this); + } - get hadMercenaryHelp() { return this.mercenaryHelp != null && V.mercenaries > this.mercenaryHelp.level;} - }; + 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 index 90de97fd5715b016bd0eccdc3e8aa1d621a13739..871978c60ae42dddb6c41583269ef8f65c6b7f3b 100644 --- a/src/Corporation/corporate-divisionBase.js +++ b/src/Corporation/corporate-divisionBase.js @@ -1,204 +1,204 @@ 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.corpId = `corpDiv${capFirstChar(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; } + App.Corporate.Division.Base = class { + constructor({id, name, focusDescription, sizeCost, maintenance, founding, merger}) { + this._const = {}; + this._const.id = id; + this._const.corpId = `corpDiv${capFirstChar(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"; - //dissolve is the only function that sets founded to false. - if(value == 0 && this.founded) throw "Cannot set development count to 0; use dissolve instead."; - this.setStored("Dev", value); - } + //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"; + //dissolve is the only function that sets founded to false. + if(value == 0 && this.founded) throw "Cannot set development count to 0; use dissolve instead."; + this.setStored("Dev", value); + } - //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; + //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; + if(this.activeSlaves > 0) + slaveProcValue = this.activeSlaves * this.purchasedSlaveValue * 1000; + if(this.heldSlaves > 0) + slaveHeldValue = this.heldSlaves * this.soldSlaveValue * 1000; - return developmentValue + slaveProcValue + slaveHeldValue; - } + 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"; } + //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 * this.processRate; } - getDisplayMaintenanceCost() { - const cost = this.maintenanceCost; - const processedCount = this.maintenanceSlaves; + //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 * this.processRate; } + getDisplayMaintenanceCost() { + const cost = this.maintenanceCost; + const processedCount = this.maintenanceSlaves; - 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); + 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); - } + 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); - } + } + 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.`; + 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); - App.Corporate.sellDevelopment(this); - App.Corporate.dissolvedDivision(); - this.relatedDivisions.to.forEach(nextDep => delete V[`${this._const.corpId}To${nextDep.id}`]); - } + 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); + App.Corporate.sellDevelopment(this); + App.Corporate.dissolvedDivision(); + this.relatedDivisions.to.forEach(nextDep => delete V[`${this._const.corpId}To${nextDep.id}`]); + } - //private helpers - getStored(key ) { return V[this._const.corpId + key]; } - setStored(key, value) { V[this._const.corpId + key] = value; } - }; + //private helpers + getStored(key ) { return V[this._const.corpId + key]; } + setStored(key, value) { V[this._const.corpId + key] = value; } + }; } diff --git a/src/Corporation/corporate-divisionProcessing.js b/src/Corporation/corporate-divisionProcessing.js index a5870ac1cb2d82c71067774ecc44a8ea783b16e6..28f72f12475f7fe720f57b83deda9652b9cd5a4f 100644 --- a/src/Corporation/corporate-divisionProcessing.js +++ b/src/Corporation/corporate-divisionProcessing.js @@ -1,93 +1,93 @@ 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; - } + 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 += " <span class='red'>none of its slaves</span>"; - } - else { - retval += ` <span class="green">${numberWithPlural(newSlaves, 'slave')}</span>`; - } - 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() { - App.Corporate.sellSlaves(this, this.heldSlaves); - super.dissolve(); - delete V[this._const.corpId + "Slaves"]; - delete V[this._const.corpId + "Slaves2"]; - } + //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 += " <span class='red'>none of its slaves</span>"; + } + else { + retval += ` <span class="green">${numberWithPlural(newSlaves, 'slave')}</span>`; + } + 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() { + App.Corporate.sellSlaves(this, this.heldSlaves); + super.dissolve(); + delete V[this._const.corpId + "Slaves"]; + delete V[this._const.corpId + "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); - } - }; + 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 index 1cbd33e232a6621060f31696f41bf2d7034d1ffb..7059f8bcdb92cbc1db7cc26c1c0609fce7a5bb16 100644 --- a/src/Corporation/corporate-divisionWorking.js +++ b/src/Corporation/corporate-divisionWorking.js @@ -1,95 +1,95 @@ 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; - } + 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 <span class="yellowgreen">${cashFormat(this.slaveRevenue)}</span> 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 <span class="red">no slaves</span> to ${this._const.slaveWorkDescription.future}`; - } - else { - retval += `is ${this._const.slaveWorkDescription.present} <span class="green">${numberWithPlural(this.activeSlaves, 'slave')}</span>`; - } - if(lostSlaves > 0) { - retval += `. During operations <span class="red">${numberWithPlural(lostSlaves, 'slave')}</span> ${this._const.slaveWorkDescription.past}`; - } - return retval; - } + //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 <span class="yellowgreen">${cashFormat(this.slaveRevenue)}</span> 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 <span class="red">no slaves</span> to ${this._const.slaveWorkDescription.future}`; + } + else { + retval += `is ${this._const.slaveWorkDescription.present} <span class="green">${numberWithPlural(this.activeSlaves, 'slave')}</span>`; + } + if(lostSlaves > 0) { + retval += `. During operations <span class="red">${numberWithPlural(lostSlaves, 'slave')}</span> ${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._const.corpId + "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 - } + //virtual override + get developmentCount() { return super.developmentCount; } + set developmentCount(value) { + super.developmentCount = value; + shared.SellOverflowSlaves(this); + } + dissolve() { + super.dissolve(); + delete V[this._const.corpId + "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 maintenanceSlaves() { - //maintenance is paid on working slaves, not worked slaves. - return this.activeSlaves; - } + get slaveRevenue() { + return this._const.revenue.center; + } + get maintenanceSlaves() { + //maintenance is paid on working slaves, not worked slaves. + return this.activeSlaves; + } - 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); - } - }; + 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 index 2822a20d57dca1a57af28ad0c5596b63a649c984..2900cc9d8f0c8497002dcb452e9ff0262d507ad3 100644 --- a/src/Corporation/corporate.js +++ b/src/Corporation/corporate.js @@ -1,908 +1,908 @@ 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; - } + 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; + 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 = {}; - } + 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 localRevenue( ) { return this.getStored('Rev' ); } - set localRevenue(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); } - - get economicBoost( ) { return this.getStored('EconBonus' ); } - set economicBoost(value) { return this.setStored('EconBonus' , value); } - - get economy( ) { return this.getStored('Econ' ); } - set economy(value) { return this.setStored('Econ' , value); } - - get foreignRevenue( ) { return this.getStored('NeighborBonus' ); } - set foreignRevenue(value) { return this.setStored('NeighborBonus', value); } - - copy(ledger) { - this.operations = ledger.operations; - this.localRevenue = ledger.localRevenue; - this.foreignRevenue = ledger.foreignRevenue; - this.development = ledger.development; - this.slaves = ledger.slaves; - this.overhead = ledger.overhead; - this.economicBoost = ledger.economicBoost; - this.economy = ledger.economy; - } - clear() { - this.operations = 0; - this.localRevenue = 0; - this.foreignRevenue = 0; - this.development = 0; - this.slaves = 0; - this.overhead = 0; - this.economicBoost = 0; - this.economy = 0; - } - release() { - this.deleteStored('OpCost'); - this.deleteStored('Rev'); - this.deleteStored('AssetsDev'); - this.deleteStored('AssetsSlave'); - this.deleteStored('Overhead'); - this.deleteStored('EconBonus'); - this.deleteStored('Econ'); - this.deleteStored('NeighborBonus'); - } - get profit() { - return this.revenue + this.economicBoost - - this.development - this.slaves - this.overhead - this.operations; - } - get revenue() { - return this.localRevenue + this.foreignRevenue; - } - setEconomy(economy) { - this.economy = economy; - - //NOTE: Set economicBoost to 0 so it doesn't affect this.profit! - this.economicBoost = 0; // <-- DO NOT delete - this.economicBoost = Math.trunc(this.profit * (economy - 100) / 100); - } - //private access - getStored(key) { - return this.corp.getStored(key + this.suffix); - } - setStored(key, value) { - return this.corp.setStored(key + this.suffix, value); - } - deleteStored(key){ - this.corp.deleteStored(key + this.suffix); - } - }; - 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; - this._var.canExpandNow = false; - this._var.canSpecializeNow = false; - this._var.dividend = 0; - this._var.payout = 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) * 1 - (5 - State.variables.baseDifficulty) / 8; - return Math.trunc(retval); - } - get canExpandNow() { return this._var.canExpandNow; } - set canExpandNow(value) { this._var.canExpandNow = value; } - - get hasDividend() { return this._var.dividend > 0; } - get dividend() { return this._var.dividend; } - set dividend(value) { this._var.dividend = value; } - - get hasPayout() { return this._var.payout > 0; } - get payout() { return this._var.payout; } - set payout(value) { this._var.payout = value; } - - get canSpecializeNow() { return this._var.canSpecializeNow; } - set canSpecializeNow(value) { this._var.canSpecializeNow = value; } - } - 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(division, -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 <span class="${color}">${slaveCountedNoun}</span> each week when operating at capacity (${division.developmentCount})`; - }, - MessageSlaveToMarket: function(division) { - return `The slaves from this division can be sold for <span class='yellowgreen'>${cashFormat(Math.trunc(division.soldSlaveValue * menialSlaveCost()))}</span> 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; } - App.Corporate.deleteStored = function(key ) { delete V[`corp${key}`]; } - - //Integer properties starting with corp - const propertyToStoryInt = { - cash: "Cash", - numDivisions: 'Div', - foundedDate: 'Founded', - dividend: "Dividend", - specializations: "Spec", - specializationTokens: "SpecToken", - 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", - 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, "dividendTimer", { - get: function( ) { return V.dividendTimer ; }, - set: function(value) { V.dividendTimer = 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; } - get total() { return this.personal + this.public; } - }; - 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(); - }, - release: function() { - this.old.release(); - this.current.release(); - } - }; - 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.filter(x=>x.founded)) { - division.dissolve(); - } - this.founded = false; - this.numDivisions = 0; - this.expansionTokens = 0; - this.setStored("Expand", 0); - this.specializations = 0; - this.specializationTokens = 0; - this.setStored("SpecRaces", []); - this.ledger.release(); - - // Some of these will need to be refactored into App.Corporate.Specialization - const toDelete = [ - "corpCash", - "personalShares", - "publicShares", - "corpDividend", - "dividendTimer", - "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"; - cost = Math.trunc(cost); - 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, locality) { - if(!Number.isFinite(cost)) throw "The cost provided was not real"; - cost = Math.trunc(cost); - let current = this.ledger.current; - let key = `${locality}Revenue`; - if(!(key in current)) throw `Unknown locality '${locality}'`; - current[key] += cost; - this.cash += cost; - }; - App.Corporate.chargeDividend = function(cost, weekLedger) { - if(!Number.isFinite(cost)) throw "The cost provided was not real"; - cost = Math.trunc(cost); - if(weekLedger == null) { - debugger; - throw "No weekLedger provided"; - } - this.dividend += cost; - this.cash -= cost; - weekLedger.dividend += cost; - } - App.Corporate.creditEconomy = function() { - this.ledger.current.setEconomy(V.localEcon); - this.cash += this.ledger.current.economicBoost; - } - /* 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, "local"); - 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.calculateDividend = function(weekLedger) - { - let profit = this.ledger.current.profit; - if(this.dividendRatio > 0 && profit > 0) - { - this.chargeDividend(profit * this.dividendRatio, weekLedger); - } - //Payout leftover cash should be the last thing the corporation does - //in a week so that its cash will be at the payout amount. - if(this.payoutCash) - { - let payoutAfter = this.payoutAfterCash; - if(this.cash > payoutAfter) - { - this.chargeDividend(this.cash - payoutAfter, weekLedger); - } - } - - if(this.dividendTimer <= 1) - { - weekLedger.payout = Math.trunc(this.dividend * this.shares.personal / this.shares.total); - cashX(weekLedger.payout, "stocks"); - this.dividendTimer = 14;//13 for each quarter, but +1 because we're subtracting one below. - this.dividend = 0; - } - - this.dividendTimer--; - }; - 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.chargeAsset(ledger.overhead, "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, "local"); - 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); - } - this.creditEconomy(); - - if(this.numDivisions < this.divisionList.length && !this.canExpand) - { - let expansionValue = Math.trunc(Math.pow(this.numDivisions, 1.5) + (5 * this.numDivisions + 2) / 4); - if(this.value > expansionValue * 1000000) - { - ledger.canExpandNow = true; - this.canExpand = true; - } - } - let specializationExpansion = 1.6 * Math.pow(1.25, this.specializations) - 1.2; - if(this.value > specializationExpansion * 1000000){ - this.specializationTokens++; - this.specializations++; - ledger.canSpecializeNow = true; - } - if(this.specializationTimer > 0) - { - this.specializationTimer--; - } - this.calculateDividend(ledger); - - return ledger; - }; - App.Corporate.cheatCash = function(userCash) { - userCash = Math.trunc(Number(userCash)) - if(Number.isFinite(userCash)) { - this.cash = userCash; - V.cheater = 1 - } - } + 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 localRevenue( ) { return this.getStored('Rev' ); } + set localRevenue(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); } + + get economicBoost( ) { return this.getStored('EconBonus' ); } + set economicBoost(value) { return this.setStored('EconBonus' , value); } + + get economy( ) { return this.getStored('Econ' ); } + set economy(value) { return this.setStored('Econ' , value); } + + get foreignRevenue( ) { return this.getStored('NeighborBonus' ); } + set foreignRevenue(value) { return this.setStored('NeighborBonus', value); } + + copy(ledger) { + this.operations = ledger.operations; + this.localRevenue = ledger.localRevenue; + this.foreignRevenue = ledger.foreignRevenue; + this.development = ledger.development; + this.slaves = ledger.slaves; + this.overhead = ledger.overhead; + this.economicBoost = ledger.economicBoost; + this.economy = ledger.economy; + } + clear() { + this.operations = 0; + this.localRevenue = 0; + this.foreignRevenue = 0; + this.development = 0; + this.slaves = 0; + this.overhead = 0; + this.economicBoost = 0; + this.economy = 0; + } + release() { + this.deleteStored('OpCost'); + this.deleteStored('Rev'); + this.deleteStored('AssetsDev'); + this.deleteStored('AssetsSlave'); + this.deleteStored('Overhead'); + this.deleteStored('EconBonus'); + this.deleteStored('Econ'); + this.deleteStored('NeighborBonus'); + } + get profit() { + return this.revenue + this.economicBoost + - this.development - this.slaves - this.overhead - this.operations; + } + get revenue() { + return this.localRevenue + this.foreignRevenue; + } + setEconomy(economy) { + this.economy = economy; + + //NOTE: Set economicBoost to 0 so it doesn't affect this.profit! + this.economicBoost = 0; // <-- DO NOT delete + this.economicBoost = Math.trunc(this.profit * (economy - 100) / 100); + } + //private access + getStored(key) { + return this.corp.getStored(key + this.suffix); + } + setStored(key, value) { + return this.corp.setStored(key + this.suffix, value); + } + deleteStored(key){ + this.corp.deleteStored(key + this.suffix); + } + }; + 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; + this._var.canExpandNow = false; + this._var.canSpecializeNow = false; + this._var.dividend = 0; + this._var.payout = 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) * 1 - (5 - State.variables.baseDifficulty) / 8; + return Math.trunc(retval); + } + get canExpandNow() { return this._var.canExpandNow; } + set canExpandNow(value) { this._var.canExpandNow = value; } + + get hasDividend() { return this._var.dividend > 0; } + get dividend() { return this._var.dividend; } + set dividend(value) { this._var.dividend = value; } + + get hasPayout() { return this._var.payout > 0; } + get payout() { return this._var.payout; } + set payout(value) { this._var.payout = value; } + + get canSpecializeNow() { return this._var.canSpecializeNow; } + set canSpecializeNow(value) { this._var.canSpecializeNow = value; } + } + 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(division, -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 <span class="${color}">${slaveCountedNoun}</span> each week when operating at capacity (${division.developmentCount})`; + }, + MessageSlaveToMarket: function(division) { + return `The slaves from this division can be sold for <span class='yellowgreen'>${cashFormat(Math.trunc(division.soldSlaveValue * menialSlaveCost()))}</span> 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; } + App.Corporate.deleteStored = function(key ) { delete V[`corp${key}`]; } + + //Integer properties starting with corp + const propertyToStoryInt = { + cash: "Cash", + numDivisions: 'Div', + foundedDate: 'Founded', + dividend: "Dividend", + specializations: "Spec", + specializationTokens: "SpecToken", + 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", + 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, "dividendTimer", { + get: function( ) { return V.dividendTimer ; }, + set: function(value) { V.dividendTimer = 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; } + get total() { return this.personal + this.public; } + }; + 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(); + }, + release: function() { + this.old.release(); + this.current.release(); + } + }; + 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.filter(x=>x.founded)) { + division.dissolve(); + } + this.founded = false; + this.numDivisions = 0; + this.expansionTokens = 0; + this.setStored("Expand", 0); + this.specializations = 0; + this.specializationTokens = 0; + this.setStored("SpecRaces", []); + this.ledger.release(); + + // Some of these will need to be refactored into App.Corporate.Specialization + const toDelete = [ + "corpCash", + "personalShares", + "publicShares", + "corpDividend", + "dividendTimer", + "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"; + cost = Math.trunc(cost); + 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, locality) { + if(!Number.isFinite(cost)) throw "The cost provided was not real"; + cost = Math.trunc(cost); + let current = this.ledger.current; + let key = `${locality}Revenue`; + if(!(key in current)) throw `Unknown locality '${locality}'`; + current[key] += cost; + this.cash += cost; + }; + App.Corporate.chargeDividend = function(cost, weekLedger) { + if(!Number.isFinite(cost)) throw "The cost provided was not real"; + cost = Math.trunc(cost); + if(weekLedger == null) { + debugger; + throw "No weekLedger provided"; + } + this.dividend += cost; + this.cash -= cost; + weekLedger.dividend += cost; + } + App.Corporate.creditEconomy = function() { + this.ledger.current.setEconomy(V.localEcon); + this.cash += this.ledger.current.economicBoost; + } + /* 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, "local"); + 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.calculateDividend = function(weekLedger) + { + let profit = this.ledger.current.profit; + if(this.dividendRatio > 0 && profit > 0) + { + this.chargeDividend(profit * this.dividendRatio, weekLedger); + } + //Payout leftover cash should be the last thing the corporation does + //in a week so that its cash will be at the payout amount. + if(this.payoutCash) + { + let payoutAfter = this.payoutAfterCash; + if(this.cash > payoutAfter) + { + this.chargeDividend(this.cash - payoutAfter, weekLedger); + } + } + + if(this.dividendTimer <= 1) + { + weekLedger.payout = Math.trunc(this.dividend * this.shares.personal / this.shares.total); + cashX(weekLedger.payout, "stocks"); + this.dividendTimer = 14;//13 for each quarter, but +1 because we're subtracting one below. + this.dividend = 0; + } + + this.dividendTimer--; + }; + 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.chargeAsset(ledger.overhead, "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, "local"); + 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); + } + this.creditEconomy(); + + if(this.numDivisions < this.divisionList.length && !this.canExpand) + { + let expansionValue = Math.trunc(Math.pow(this.numDivisions, 1.5) + (5 * this.numDivisions + 2) / 4); + if(this.value > expansionValue * 1000000) + { + ledger.canExpandNow = true; + this.canExpand = true; + } + } + let specializationExpansion = 1.6 * Math.pow(1.25, this.specializations) - 1.2; + if(this.value > specializationExpansion * 1000000){ + this.specializationTokens++; + this.specializations++; + ledger.canSpecializeNow = true; + } + if(this.specializationTimer > 0) + { + this.specializationTimer--; + } + this.calculateDividend(ledger); + + 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(){ //current foreignRevenue used to be used for old foreignRevenue @@ -915,12 +915,12 @@ App.Corporate.Init = function() { } }; - 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; - } + 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; + } }; @@ -928,24 +928,24 @@ App.Corporate.Init = function() { // 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))); + 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; + 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/Corporation/corporateWidgets.tw b/src/Corporation/corporateWidgets.tw index 1cefcb6b16c09cdc8329eecdadc04a3ae98e8df5..2305d778bd0e7625aedc6d821f40ac5542d0988f 100644 --- a/src/Corporation/corporateWidgets.tw +++ b/src/Corporation/corporateWidgets.tw @@ -4,8 +4,8 @@ Usage: <<CorporateLedger _ledger $week>> - _ledger: One of the members of App.Corporate.ledger, such as .current or .old - $week: The current week or the previous week, depending on wether you used current or old. + _ledger: One of the members of App.Corporate.ledger, such as .current or .old + $week: The current week or the previous week, depending on whether you used current or old. */ <<widget "CorporateLedger">> <table class="corporate"> @@ -16,7 +16,7 @@ Usage: /*Returns last week's revenue, gets calculated in corporationDevelopments, but slaves sold here also added to it for next week*/ <tr><td>Revenue</td><td><<= cashFormatColor($args[0].revenue)>></td></tr> <<if ($cheatMode) && ($cheatModeM) && App.Corporate.foreignRevenue > 0>> - <tr><td>Including Neighbor Bonus</td><td><<= cashFormatColor($args[0].foreignRevenue)>></td></tr> + <tr><td>Including Neighbor Bonus</td><td><<= cashFormatColor($args[0].foreignRevenue)>></td></tr> <</if>> /*Just like revenue, except for operating expenses (all calculated in corporationDevelopments)*/ <tr><td>Operating Expenses</td><td><<= cashFormatColor($args[0].operations, true)>></td></tr> @@ -25,23 +25,23 @@ Usage: /*costs associated with expanding divisions end up here, reports costs from last week, not current*/ <tr><td>Asset Expenses</td><td><<= cashFormatColor($args[0].development, true)>></td></tr> <<if ($cheatMode) && ($cheatModeM)>> - <tr> - <td>Economic <<if $args[0].economicBoost < 0>>Expenses<<else>>Windfall<</if>></td> - <td><<= cashFormatColor($args[0].economicBoost)>></td> - </tr> + <tr> + <td>Economic <<if $args[0].economicBoost < 0>>Expenses<<else>>Windfall<</if>></td> + <td><<= cashFormatColor($args[0].economicBoost)>></td> + </tr> <</if>> <tr><td>Overhead</td><td><<= cashFormatColor($args[0].overhead, true)>></td></tr> <tr><td>Profit</td><td> <div><<= cashFormatColor($args[0].profit)>></div> <<if $args[0].economicBoost > 0>> <div class="note"> - <<if $args[0].economy > 100>> - * Profits benefited from a strong economy. - <<elseif $args[0].economy > 60>> - * Profits were lowered by the weak economy. - <<else>> - * Profits were severely depressed by the failing economy. - <</if>> + <<if $args[0].economy > 100>> + * Profits benefited from a strong economy. + <<elseif $args[0].economy > 60>> + * Profits were lowered by the weak economy. + <<else>> + * Profits were severely depressed by the failing economy. + <</if>> </div> <</if>> </td></tr> @@ -51,20 +51,20 @@ Usage: </thead> <tbody> <tr> - <td>Liquidity</td> - <td> - <<if ($cheatMode) && ($cheatModeM)>> - <span id="corpCash"><<= cashFormatColor(App.Corporate.cash)>></span> - <<set _TcorpCash = App.Corporate.cash>> - <<textbox "_TcorpCash" _TcorpCash>> - <<link "Apply">> - <<set App.Corporate.cheatCash(_TcorpCash)>> - <<replace "#corpCash">><<= cashFormatColor(App.Corporate.cash)>><</replace>> - <</link>> - <<else>> - <<= cashFormatColor(App.Corporate.cash)>> - <</if>> - </td> + <td>Liquidity</td> + <td> + <<if ($cheatMode) && ($cheatModeM)>> + <span id="corpCash"><<= cashFormatColor(App.Corporate.cash)>></span> + <<set _TcorpCash = App.Corporate.cash>> + <<textbox "_TcorpCash" _TcorpCash>> + <<link "Apply">> + <<set App.Corporate.cheatCash(_TcorpCash)>> + <<replace "#corpCash">><<= cashFormatColor(App.Corporate.cash)>><</replace>> + <</link>> + <<else>> + <<= cashFormatColor(App.Corporate.cash)>> + <</if>> + </td> </tr> <tr><td>Corporate Value</td><td><<= cashFormatColor(App.Corporate.value)>></td></tr> <tr> @@ -72,9 +72,9 @@ Usage: <td> <div><<= cashFormatColor(App.Corporate.dividend)>></div> <div class="note">Pays out on <<=asDateString($args[1] + App.Corporate.dividendTimer, -1)>>, <<if App.Corporate.dividendTimer == 1>> - the end of this week + the end of this week <<else>> - in <<= App.Corporate.dividendTimer >> weeks + in <<= App.Corporate.dividendTimer >> weeks <</if>> </div> </td></tr> diff --git a/src/Corporation/corporationDevelopments.tw b/src/Corporation/corporationDevelopments.tw index a63df211aca26f3cc16527157db1c7762580bf1f..3f6232e22aab72d08c1a0a42da75fa27acec7f0c 100644 --- a/src/Corporation/corporationDevelopments.tw +++ b/src/Corporation/corporationDevelopments.tw @@ -3,7 +3,7 @@ /*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*/ + <<set App.Corporate.cash = Math.trunc(App.Corporate.cash * 1.02)>> /*2% weekly interest rate on negative cash*/ <</if>> <h1>Corporation Management</h1> @@ -12,44 +12,44 @@ <<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>> + <<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>> + 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*/ @@ -58,42 +58,42 @@ /*Division Expansion Tokens*/ <<if _weekLedger.canExpandNow>> - <div class="majorText">Your corporation is ready to start an additional division!</div> + <div class="majorText">Your corporation is ready to start an additional division!</div> <</if>> /*Specializations tokens*/ <<if _weekLedger.canSpecializeNow>> - <div class="majorText">Your corporation is ready to specialize its slaves further!</div> + <div class="majorText">Your corporation is ready to specialize its slaves further!</div> <</if>> /*Calculating cash set aside for dividend*/ <h2>Dividend</h2> <div> <<if App.Corporate.dividendRatio > 0>> - The corporation is currently reserving <<= Math.floor(App.Corporate.dividendRatio * 100)>>% of its profit to be paid out as dividends. + The corporation is currently reserving <<= Math.floor(App.Corporate.dividendRatio * 100)>>% of its profit to be paid out as dividends. <<else>> - The corporation is currently not reserving a portion of its profit to be paid out as dividends. + 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. + It is putting aside unused cash reserves to be paid out as dividends. <</if>> </div> <div> <<if App.Corporate.dividend > 0>> - <<if _weekLedger.hasDividend>> - It reserved <<print cashFormatColor(_weekLedger.dividend)>> this week. - <</if>> - A total of <<print cashFormatColor(App.Corporate.dividend)>> has been put aside for its shareholders. + <<if _weekLedger.hasDividend>> + It reserved <<print cashFormatColor(_weekLedger.dividend)>> this week. + <</if>> + A total of <<print cashFormatColor(App.Corporate.dividend)>> has been put aside for its shareholders. <</if>> </div> <<if _weekLedger.hasPayout>> - <div>This week the dividends were paid out, you received <<print cashFormatColor(_weekLedger.payout)>>.</div> + <div>This week the dividends were paid out, you received <<print cashFormatColor(_weekLedger.payout)>>.</div> <</if>> /*Bankrupted the Corporation*/ <<if App.Corporate.value < 0>> - <<run App.Corporation.Dissolve()>> - <br>@@.red;Your corporation went bankrupt.@@ + <<run App.Corporation.Dissolve()>> + <br>@@.red;Your corporation went bankrupt.@@ <</if>> /*This needs to be at the very end of the financials*/ <<run App.Corporate.ledger.swap()>> diff --git a/src/Corporation/manageCorporation.tw b/src/Corporation/manageCorporation.tw index 38676cea6023597f8ff17ea95af810128fbe7f0d..328e55d59aa059bdd7b4f5dcafb72de25a53cb58 100644 --- a/src/Corporation/manageCorporation.tw +++ b/src/Corporation/manageCorporation.tw @@ -16,43 +16,43 @@ /*Picking a starting division*/ <<if $vanillaShareSplit == 1>> - <<set _corpPerShares = 2000>> - <<set _corpPubShares = 1000>> + <<set _corpPerShares = 2000>> + <<set _corpPubShares = 1000>> <<else>> - <<set _corpPerShares = 8000>> - <<set _corpPubShares = 7000>> + <<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>> + <<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]] + <br>[[8-7 Share Split|Manage Corporation][$vanillaShareSplit = 0]] <<else>> - <br>[[2-1 Share Split|Manage Corporation][$vanillaShareSplit = 1]] + <br>[[2-1 Share Split|Manage Corporation][$vanillaShareSplit = 1]] <</if>> <<else>> /*When the corporation exists*/ @@ -67,196 +67,196 @@ <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() >> + <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 _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> + <<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. + <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 _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>> + <<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 <span class="red"><<print cashFormat(_depExpandCost)>></span>. Downsizing recoups 80% of the investment; slaves will be sold at the going rate.</div> - <div> - <<set _buyDevArray = [ - { 'name': 'Expand Division' , 'count':1}, - { 'name': 'Expand x10', 'count':10} - ]>> - <<set _sepObj.need = false>> - <<for _buySet range _buyDevArray.filter(buySet => App.Corporate.cash >= buySet.count * _depExpandCost)>> - <<= Seperator(_sepObj) >> - <<= "[["+_buySet.name+"|Manage Corporation]" - + "[App.Corporate.buyDevelopment('" + _div.id + "', " + _buySet.count + ")]" - + "]">> - <</for>> + /* Expanding the division*/ + <<set _depExpandCost = _div.sizeCost * 1000>> + <div>Expanding the division costs <span class="red"><<print cashFormat(_depExpandCost)>></span>. Downsizing recoups 80% of the investment; slaves will be sold at the going rate.</div> + <div> + <<set _buyDevArray = [ + { 'name': 'Expand Division' , 'count':1}, + { 'name': 'Expand x10', 'count':10} + ]>> + <<set _sepObj.need = false>> + <<for _buySet range _buyDevArray.filter(buySet => App.Corporate.cash >= buySet.count * _depExpandCost)>> + <<= 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.numDivisions > 1>> /* Cannot dissolve the last division */ - <div>Dissolve the division @@.orange;//Think before you click//@@ /* TODO: Add a confirmation button. Probably use replace?*/ - <<= "[[Dissolve|Manage Corporation]" - + "[App.Corporate.divisions['" + _div.id + "'].dissolve()]" - + "]">> - </div> - <</if>> + /* 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.numDivisions > 1>> /* Cannot dissolve the last division */ + <div>Dissolve the division @@.orange;//Think before you click//@@ /* TODO: Add a confirmation button. Probably use replace?*/ + <<= "[[Dissolve|Manage Corporation]" + + "[App.Corporate.divisions['" + _div.id + "'].dissolve()]" + + "]">> + </div> + <</if>> <</for>> <<if App.Corporate.canExpand>> /*is the corporation large enough to expand into another division?*/ <h1>Found New Division</h1> <div>The corporation can expand by founding a new division related to its current <<= onlyPlural(App.Corporate.divisionList.filter(div => div.founded).length, "division") >>.</div> - <<for _div range App.Corporate.divisionList.filter(x => !x.founded && x.relatedDivisions.anyFounded)>> - <<set _depCost = _div.foundingCost * 1000>> - <div> - <<if App.Corporate.cash >= _depCost>> - <<= "[[Add " + _div.name + " Division|Manage Corporation]" - + "[App.Corporate.divisions['"+_div.id+"'].create(App.Corporate)]]">> - (@@.yellowgreen;<<print cashFormat(_depCost)>>@@): A division focusing on <<= _div.focusDescription >>. - <<else>> - <<= _div.name >> - (@@.red;<<print cashFormat(_depCost)>>@@): - The corporation cannot afford to start a division focusing on <<= _div.focusDescription >>. - <</if>> - </div> - <</for>> + <<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> @@ -266,32 +266,32 @@ <<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>> + <<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]+"]]" >> + 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]] + 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]] + 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> @@ -300,33 +300,33 @@ 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 $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+"]]">> + <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+"]]">> + <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]] + <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]] + <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> @@ -335,809 +335,809 @@ You own <<print num($personalShares)>> shares while another <<print num($publicS <<set _splitFeeValue = _splitFeeInitial - Math.floor((_splitFeeInitial * ($PC.skill.trading / 100.0) / 2.0) / 1000) * 1000>> <<set _splitStockConstants = App.Corporate.stockSplits >> - The corporation can perform a stock split to increase the number of stocks while maintaining the same owned value. This requires paying a market fee of @@.red;<<= cashFormat(_splitFeeValue)>>@@ plus a per-share fee depending on the type of split being done. - <<if _splitFeeValue < _splitFeeInitial>> - //You negotiated lower fees due to your @@.springgreen;business acumen@@.// - <</if>> + 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.// + <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> + <<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>> + <<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. + <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>> + <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">> + <<set cashX(Math.min(corpSharePrice() * $personalShares / 1000, 1000000), "stocksTraded")>> + <<run App.Corporate.dissolve()>> + <<goto "Manage Corporation">> <</link>> @@.orange;//Warning!//@@ diff --git a/src/SecExp/secBarracks.tw b/src/SecExp/secBarracks.tw index 2da530ea9ae0c600c422a22dc835edc9fbcb191f..ada03c5458f4fe44f7ee34c8c3b2db0276cb0ebe 100644 --- a/src/SecExp/secBarracks.tw +++ b/src/SecExp/secBarracks.tw @@ -168,7 +168,7 @@ Your current maximum number of units is <<print App.SecExp.battle.maxUnits()>> ( <<else>> You have not yet installed a drone security system in your arcology, you will not be able to form a unit of drones. <</if>> - + <br><br>__Slaves__ <br>/* slaves */ You are free to organize your menial slaves into fighting units. Currently you have <<print num($menials)>> slaves available, while <<print num($slavesEmployedManpower)>> are already employed as soldiers. During all your battles you lost a total of <<print num($slavesTotalCasualties)>>. diff --git a/src/SecExp/secExpSmilingMan.tw b/src/SecExp/secExpSmilingMan.tw index e3007e4b8693681654e7cf4d4bca0694f2701d63..37710918146901ce3a76293cd5f4727e8a92f7b4 100644 --- a/src/SecExp/secExpSmilingMan.tw +++ b/src/SecExp/secExpSmilingMan.tw @@ -328,9 +328,9 @@ Well, I hope I'm everything you expected," you hear a voice say. Despite recognizing it, you struggle to convince yourself that the little $girl in front of you is indeed the famous criminal mastermind. <br>"As you can see, I have no intention of escaping. I knew my life was over the second my plan went into effect. I accepted my end a long time ago, so feel free to do your worst; my life has already ended in triumph." <br>You evaluate the situation: the burning desire of vengeance for all the damage that little twerp caused is hard to ignore, but equally so is the admiration for $his skill and determination. Indeed, $he would be a great addition to your court, as a free individual or not. - + <span id="result"> <br><br> - + <<link "Offer $him a new life">> <<set $smilingManFate = 0>> <<replace "#result">> @@ -342,7 +342,7 @@ <</link>> <</replace>> <</link>> - + <br> <<link "Make $him pay">> <<set $smilingManFate = 1>> <<replace "#result">> diff --git a/src/events/intro/initNationalities.tw b/src/events/intro/initNationalities.tw index e13a464b4a93587af7ac5a1611e20c2d5c4f95ca..d2b55a7126fdf3f954b1f37241a88bde6b45e417 100644 --- a/src/events/intro/initNationalities.tw +++ b/src/events/intro/initNationalities.tw @@ -26,7 +26,7 @@ <<set $trinkets.push("an artist's impression of an early arcology design")>> <<set $arcologyUpgrade.drones = 1, $arcologyUpgrade.hydro = 1>> <<if $secExpEnabled > 0>> - <<set $secBots.active = 1, $secBots.troops = 30, $secBots.maxTroops = 30>> + <<set $secBots.active = 1, $secBots.troops = 30, $secBots.maxTroops = 30>> <</if>> <<elseif $PC.career == "medicine">> <<set $trinkets.push("a framed postsurgical x-ray")>> diff --git a/src/gui/css/mainStyleSheet.css b/src/gui/css/mainStyleSheet.css index 0855e9cf5e27d57a28b441d279a7f0d1e0ae6d3c..cb02e8e193a2078669c3b8f70cb1467f3e354b6b 100644 --- a/src/gui/css/mainStyleSheet.css +++ b/src/gui/css/mainStyleSheet.css @@ -314,34 +314,34 @@ white-space: normal; } h1, h2, h3 { - margin-bottom: 0; - margin-top: 0.25em; + margin-bottom: 0; + margin-top: 0.25em; } .founding { - font-size: 0.8em; - margin-top: -0.8em; - margin-left: 0.5em; - font-style: italic; + 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%; + border: 3px darkgreen double; + border-collapse: collapse; + min-width: 33%; } table.corporate tbody tr:nth-child(even) { - background-color: rgb(0, 30, 0); + background-color: rgb(0, 30, 0); } table.corporate tbody tr:nth-child(odd) { - background-color: rgb(15, 40, 15); + background-color: rgb(15, 40, 15); } table.corporate td { - vertical-align: top; + vertical-align: top; } .note { - font-size: 0.75em; - font-style: italic; + font-size: 0.75em; + font-style: italic; } .majorText { - margin-top: 0.5em; - margin-bottom: 1.5em; + margin-top: 0.5em; + margin-bottom: 1.5em; } diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js index cd5fd6efe7a120ac3f2aa55da62c1579d685e8b8..cf7161a16602f3e0b2af5a75d23cafc232cb9e33 100644 --- a/src/js/DefaultRules.js +++ b/src/js/DefaultRules.js @@ -2949,8 +2949,8 @@ window.DefaultRules = (function() { return true; } window.RuleHasError = (rule) => rule.condition.function === "custom" - &&(rule.condition.data.match(rxCheckEqual) - || !compileCheck(rule.condition.data)); + &&(rule.condition.data.match(rxCheckEqual) + || !compileCheck(rule.condition.data)); window.DefaultRulesError = () => V.defaultRules.some(r => RuleHasError(r)); return DefaultRules; })(); diff --git a/src/js/rulesAssistant.js b/src/js/rulesAssistant.js index 4f4a1da41b2dd0cf2a7389476262dfa3873cdcb0..f45609aaedef7d50bc708b16e4c61c38fcedf335 100644 --- a/src/js/rulesAssistant.js +++ b/src/js/rulesAssistant.js @@ -209,7 +209,7 @@ window.ruleAppliesP = function ruleAppliesP(cond, slave) { flag = cond.data.value.includes(slave[cond.data.attribute]); break; case "custom": // user provided JS function - //TODO: This should use a cached Function instead of 'eval'ing + //TODO: This should use a cached Function instead of 'eval'ing flag = eval(cond.data)(slave); break; } diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index a4021129c66c35b652beae853f57fdb7e24c4807..49a6f28c0d8d5c5c32c7bc0b9f6abb450c85fba9 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -612,8 +612,8 @@ window.rulesAssistantOptions = (function() { setValue(what) { super.setValue(what); this.value.setAttribute("placeholder", what == null - ? `(${capFirstChar(noDefaultSetting.text)})` - : ''); + ? `(${capFirstChar(noDefaultSetting.text)})` + : ''); } getTextData() { diff --git a/src/js/slaveGenerationJS.js b/src/js/slaveGenerationJS.js index 72953069750d063321340b2ddf3b494801d0fe49..73e978efcb392495f24fba7183b76d71bfa49fdb 100644 --- a/src/js/slaveGenerationJS.js +++ b/src/js/slaveGenerationJS.js @@ -91,48 +91,48 @@ window.nationalityToName = function nationalityToName(slave) { } slave.slaveSurname = slave.birthSurname; if (V.useFSNames === 1) { - if (V.FSNamePref === 0) { - if (V.arcologies[0].FSChattelReligionist > 20) { - slave.slaveName = jsEither(setup.chattelReligionistSlaveNames); - slave.slaveSurname = 0; - } else if (V.arcologies[0].FSRomanRevivalist > 20) { - slave.slaveName = jsEither(setup.romanSlaveNames); - slave.slaveSurname = jsEither(setup.romanSlaveSurnames); - } else if (V.arcologies[0].FSAztecRevivalist > 20) { - slave.slaveName = jsEither(setup.aztecSlaveNames); - slave.slaveSurname = 0; - } else if (V.arcologies[0].FSEgyptianRevivalist > 20) { - slave.slaveName = jsEither(setup.ancientEgyptianSlaveNames); - slave.slaveSurname = 0; - } else if (V.arcologies[0].FSEdoRevivalist > 20) { - slave.slaveName = jsEither(setup.edoSlaveNames); - slave.slaveSurname = jsEither(setup.edoSlaveSurnames); - } else if (V.arcologies[0].FSDegradationist !== "unset") { - DegradingName(slave); - } - } else if (V.FSNamePref === 1) { - slave.slaveName = jsEither(setup.chattelReligionistSlaveNames); - slave.slaveSurname = 0; - } else if (V.FSNamePref === 2) { - slave.slaveName = jsEither(setup.romanSlaveNames); - slave.slaveSurname = jsEither(setup.romanSlaveSurnames); - } else if (V.FSNamePref === 3) { - slave.slaveName = jsEither(setup.aztecSlaveNames); - slave.slaveSurname = 0; - } else if (V.FSNamePref === 4) { - slave.slaveName = jsEither(setup.ancientEgyptianSlaveNames); - slave.slaveSurname = 0; - } else if (V.FSNamePref === 5) { - slave.slaveName = jsEither(setup.edoSlaveNames); - slave.slaveSurname = jsEither(setup.edoSlaveSurnames); - } else if (V.FSNamePref === 6) { - DegradingName(slave); - } else if (V.FSNamePref === 7) { - PaternalistName(slave); - } else if (V.FSNamePref === 8) { - slave.slaveName = jsEither(setup.bimboSlaveNames); - slave.slaveSurname = 0; - } + if (V.FSNamePref === 0) { + if (V.arcologies[0].FSChattelReligionist > 20) { + slave.slaveName = jsEither(setup.chattelReligionistSlaveNames); + slave.slaveSurname = 0; + } else if (V.arcologies[0].FSRomanRevivalist > 20) { + slave.slaveName = jsEither(setup.romanSlaveNames); + slave.slaveSurname = jsEither(setup.romanSlaveSurnames); + } else if (V.arcologies[0].FSAztecRevivalist > 20) { + slave.slaveName = jsEither(setup.aztecSlaveNames); + slave.slaveSurname = 0; + } else if (V.arcologies[0].FSEgyptianRevivalist > 20) { + slave.slaveName = jsEither(setup.ancientEgyptianSlaveNames); + slave.slaveSurname = 0; + } else if (V.arcologies[0].FSEdoRevivalist > 20) { + slave.slaveName = jsEither(setup.edoSlaveNames); + slave.slaveSurname = jsEither(setup.edoSlaveSurnames); + } else if (V.arcologies[0].FSDegradationist !== "unset") { + DegradingName(slave); + } + } else if (V.FSNamePref === 1) { + slave.slaveName = jsEither(setup.chattelReligionistSlaveNames); + slave.slaveSurname = 0; + } else if (V.FSNamePref === 2) { + slave.slaveName = jsEither(setup.romanSlaveNames); + slave.slaveSurname = jsEither(setup.romanSlaveSurnames); + } else if (V.FSNamePref === 3) { + slave.slaveName = jsEither(setup.aztecSlaveNames); + slave.slaveSurname = 0; + } else if (V.FSNamePref === 4) { + slave.slaveName = jsEither(setup.ancientEgyptianSlaveNames); + slave.slaveSurname = 0; + } else if (V.FSNamePref === 5) { + slave.slaveName = jsEither(setup.edoSlaveNames); + slave.slaveSurname = jsEither(setup.edoSlaveSurnames); + } else if (V.FSNamePref === 6) { + DegradingName(slave); + } else if (V.FSNamePref === 7) { + PaternalistName(slave); + } else if (V.FSNamePref === 8) { + slave.slaveName = jsEither(setup.bimboSlaveNames); + slave.slaveSurname = 0; + } } }; diff --git a/src/npc/descriptions/boobs/boobs.js b/src/npc/descriptions/boobs/boobs.js index 0b77e71508aeef9f363ea404547c4ac9515edf3e..13335d64dcd11221e99f9be05b8f6ad02e573cc2 100644 --- a/src/npc/descriptions/boobs/boobs.js +++ b/src/npc/descriptions/boobs/boobs.js @@ -213,7 +213,7 @@ App.Desc.boobBits = function() { App.Desc.boobs = function() { 'use strict'; - + /** @type {App.Utils.Pronouns} */ let pr; /** @type {string} */ diff --git a/src/player/pcSurgeryDegradation.tw b/src/player/pcSurgeryDegradation.tw index dbd422059b67ee39d4f50d3123b5784657a78946..4dc627cad3034dc0615f9548977d99be9226e428 100644 --- a/src/player/pcSurgeryDegradation.tw +++ b/src/player/pcSurgeryDegradation.tw @@ -27,7 +27,7 @@ After a few hours, you awaken in the recovery wing with a sore chest. <<if $PC.belly >= 10000>>Struggling to sit<<else>>Sitting<</if>> up, you immediately notice how much lighter your breasts are. Pulling the covers off yourself, you observe your implant free boobs in the mirror-covered wall across from your bed. "So do you like them?", asks the surgeon's assistant, seating _himselfU behind you and wrapping _hisU hands around to your natural breasts. "We made sure to tighten them up a bit, get rid of that sag from not having the silicone pouch in them anymore." _HeU begins groping your breasts, feeling for any oddities. "I know you're still a little sore, but bear with it." _HeU moves on to your nipples and begins teasing them. <<if $PC.lactation > 0>>_HeU lets out a surprised squeak when a gush of milk escapes your breasts and a moan escapes your lips. "<<if $PC.pregKnown == 1>>Should have expected that with the pregnancy and all.<<else>>You did recently have a child didn't you? Or have you just been enjoying your nipples too much?<</if>> Either way, this is a good thing. Your breasts work."<</if>> You can't help but moan under your building arousal as _heU massages and teases your breasts. "Enjoying yourself are we? Let me finish you off." _HeU sneaks a hand down to your <<if $PC.dick != 0>>stiff prick and begins stroking its length, quickly bringing you to orgasm and relieving you of your built up tension.<<else>>stiff clit and begins teasing it as well, quickly bringing you to orgasm and relieving you of your built up tension.<</if>> _HeU states, while licking _hisU fingers, "I always did enjoy the way you taste. Feel free to rest as long as you need before departing. If you need, or want, me, I'll be around." Satisfied, you lie back down to sleep off the rest of the anesthesia before returning to your arcology. <<case "breastShrinkage">> - After a few hours, you awaken in the recovery wing with a sore chest. <<if $PC.belly >= 10000>>Struggling to sit<<else>>Sitting<</if>> up, you immediately notice how much lighter your breasts are. Pulling the covers off yourself, you observe your + After a few hours, you awaken in the recovery wing with a sore chest. <<if $PC.belly >= 10000>>Struggling to sit<<else>>Sitting<</if>> up, you immediately notice how much lighter your breasts are. Pulling the covers off yourself, you observe your <<if $PC.boobs >= 1400>> smaller, but still ridiculously huge, <<elseif $PC.boobs >= 1200>> diff --git a/src/pregmod/cloningWorkaround.tw b/src/pregmod/cloningWorkaround.tw index c306b063c884ea9adfc95abc2bacf8677526a52f..ae4886a752a1ada18805bffc6d153026a78380a2 100644 --- a/src/pregmod/cloningWorkaround.tw +++ b/src/pregmod/cloningWorkaround.tw @@ -13,11 +13,11 @@ <<for _cw = 0; _cw < $slaves.length; _cw++>> <<capture _cw>> <<set _name = SlaveFullName($slaves[_cw])>> - <<if $donatrix != "Undecided" && $donatrix.ID == $slaves[_cw].ID>> - <div>//_name//</div> - <<else>> + <<if $donatrix != "Undecided" && $donatrix.ID == $slaves[_cw].ID>> + <div>//_name//</div> + <<else>> <div>[[_name|Cloning Workaround][$donatrix = $slaves[_cw]]]</div> - <</if>> + <</if>> <</capture>> <</for>> </div> @@ -28,13 +28,13 @@ <<capture _cw1>> <<if ($slaves[_cw1].ovaries > 0 || $slaves[_cw1].mpreg > 0) && isSlaveAvailable($slaves[_cw1]) && $slaves[_cw1].preg >= 0 && $slaves[_cw1].preg < 4 && $slaves[_cw1].pregWeek >= 0 && $slaves[_cw1].pubertyXX == 1 && $slaves[_cw1].pregType < 12 && $slaves[_cw1].bellyImplant == -1 && $slaves[_cw1].broodmother == 0 && $slaves[_cw1].inflation <= 2 && $slaves[_cw1].physicalAge < 70>> <<set _name2 = SlaveFullName($slaves[_cw1])>> - <div> - <<if $receptrix != "Undecided" && $receptrix.ID == $slaves[_cw1].ID>> - //_name2// - <<else>> + <div> + <<if $receptrix != "Undecided" && $receptrix.ID == $slaves[_cw1].ID>> + //_name2// + <<else>> [[_name2|Cloning Workaround][$receptrix = $slaves[_cw1]]] <<if $slaves[_cw1].pregType >= 4>>//Using a slave carrying multiples is unadvisable//<</if>> - <</if>> - </div> + <</if>> + </div> <<set _eligibility = 1>> <</if>> <</capture>> @@ -45,12 +45,12 @@ <<if $PC.vagina != -1 && $PC.preg >= 0 && $PC.preg < 4 && $PC.pregType < 8 && $PC.physicalAge < 70>> <div> - <<if $receptrix != "Undecided" && $receptrix.ID == $PC.ID>> - //Yourself// - <<else>> + <<if $receptrix != "Undecided" && $receptrix.ID == $PC.ID>> + //Yourself// + <<else>> [[Use your own womb|Cloning Workaround][$receptrix = $PC]] - <</if>> - </div> + <</if>> + </div> <</if>> </div> <h2>Implantation</h2> diff --git a/src/pregmod/theBlackMarket.tw b/src/pregmod/theBlackMarket.tw index 154e06b2d1f5b890115bb5077194b120714b4ab6..8b886f07e1d616ac4cbd78b46c7e1fc5abed58f5 100644 --- a/src/pregmod/theBlackMarket.tw +++ b/src/pregmod/theBlackMarket.tw @@ -362,7 +362,7 @@ He gestures to a door in the back of the stall. "The good shit's back there<<if <</if>> <</if>> - /* Stop fucking enabling this, it breaks everything. + /* Stop fucking enabling this, it breaks everything. <<if $farmyard>> <<if $thisWeeksIllegalWares[_bim] == "AnimalOrgans">> <br> diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 1bf25410eaea12d9422eaa84b74bd98a6a60d61a..72201cb8885ebed92a2f86ff4118ec083a0fbb24 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -770,7 +770,7 @@ <</if>> <<set WombInit(_newPC)>> - + <<set $PC = clone(_newPC)>> Standardizing player object... Done!<br> <</if>> diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw index 88fb05939963e8e4b403b7b16aea340e629e9324..e65a56fdcacf745120d103a8967e723ff3cd0ae7 100644 --- a/src/uncategorized/RESS.tw +++ b/src/uncategorized/RESS.tw @@ -6489,7 +6489,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He <<case "submissive">> and begs him submissively to do whatever he wants to $him. <<case "cumslut">> - and begs him to come over and feed $him his delicious cum. + and begs him to come over and feed $him his <<if canTaste($activeSlave)>>delicious<<else>>warm<</if>> cum. <<case "humiliation">> as $he begins to wordlessly writhe and blush with the @@.hotpink;excitement@@ of this humiliating situation. <<set $activeSlave.devotion += 2>> @@ -10832,7 +10832,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He <br><<link "Make $him cum like a girl">> <<EventNameDelink $activeSlave>> <<replace "#result">> - You order $him to get $his ass up on your desk. $He obeys, though not without a flicker of trepidation. $He points $his butt at you like a sex slave should, and doesn't crane around to see what you're doing behind $him, but $he's stiff with the awareness that <<if $PC.dick != 0>>there's almost certainly a hard<<if $PC.vagina != -1>> futa<</if>> dick about<<else>>you're almost certainly donning a strap-on<</if>> to slide inside $his girly asspussy. $He's not wrong, and $he lets out a little moan as <<if $PC.dick != 0>>your cockhead<<if $PC.vagina != -1>>, which you kindly lubed with a bit of your pussyjuice,<</if>><<else>>its broad tip<</if>> <<if $activeSlave.anus > 2>>slides easily inside $his whorish anus<<elseif $activeSlave.anus == 2>>slides up $his experienced butthole<<else>>forces its way inside $his tight sphincter<</if>>. + You order $him to get $his ass up on your desk. $He obeys, though not without a flicker of trepidation. $He points $his butt at you like a sex slave should, and doesn't crane around to <<if canSee($activeSlave)>>see<<else>>feel<</if>> what you're doing behind $him, but $he's stiff with the awareness that <<if $PC.dick != 0>>there's almost certainly a hard<<if $PC.vagina != -1>> futa<</if>> dick about<<else>>you're almost certainly donning a strap-on<</if>> to slide inside $his girly asspussy. $He's not wrong, and $he lets out a little moan as <<if $PC.dick != 0>>your cockhead<<if $PC.vagina != -1>>, which you kindly lubed with a bit of your pussyjuice,<</if>><<else>>its broad tip<</if>> <<if $activeSlave.anus > 2>>slides easily inside $his whorish anus<<elseif $activeSlave.anus == 2>>slides up $his experienced butthole<<else>>forces its way inside $his tight sphincter<</if>>. <br><br> As you fuck $him, you pull $his torso up so you can play with $his <<if $activeSlave.boobs > 2000>>udders<<elseif $activeSlave.boobs > 800>>tits<<else>>nipples<</if>> and whisper manipulation into $his ear. You tell $him $he's about to cum like a girl. $He says nothing, but $his body language communicates incomprehension. Girls, you tell $him, cum when they get fucked. They cum when <<if $PC.title == 1>>guys<<else>>their betters<</if>> stick dick inside them. $He bursts into tears, sobbing with shame and degradation even as $he shakes and <<if $activeSlave.balls > 0>>squirts cum<<else>>dribbles ejaculate<</if>>. The next time $he sees you, <<if (random(0,1) == 1)>> @@ -12910,7 +12910,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He <<link "Not so fast">> <<EventNameDelink $activeSlave>> <<replace "#result">> - As $he goes, $he follows the natural human impulse when embarrassed, and turns $his head resolutely away from you, trying very hard to forget making such a fool of $himself. This means that $he does not see your rapid, predatory pursuit of $him; nor does $he <<if canHear($activeSlave)>>hear<<else>>notice<</if>> your careful stride across the flooring. $His first indication that $he's prey is when your hands grab $him around $his + As $he goes, $he follows the natural human impulse when embarrassed, and turns $his head resolutely away from you, trying very hard to forget making such a fool of $himself. This means that $he does not see your rapid, predatory pursuit of $him, nor does $he <<if canHear($activeSlave)>>hear<<else>>notice<</if>> your careful stride across the flooring. $His first indication that $he's prey is when your hands grab $him around $his <<if $activeSlave.bellyPreg >= 5000>> pregnant belly <<elseif $activeSlave.belly >= 5000>> @@ -18438,7 +18438,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He <<else>> thin <</if>> - lips part and you insert all three of your fingers into $his hot mouth. $He quivers at the intimacy of the gesture, and the taste of $his own juices. The tremor sends a delicious motion through $his + lips part and you insert all three of your fingers into $his hot mouth. $He quivers at the intimacy of the gesture, and the <<if canTaste($activeSlave)>>taste<<else>>feel<</if>> of $his own juices. The tremor sends a delicious motion through $his <<if ($activeSlave.boobsImplant == 0) && ($activeSlave.boobs > 300)>> natural <<if $activeSlave.boobs > 2000>> @@ -18758,7 +18758,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He <<link "Follow $him">> <<EventNameDelink $activeSlave>> <<replace "#result">> - $His sheer joie de vivre is irresistible, and it certainly draws you out of your office. You're not slow, and of course you know where $he's going, so you catch up quickly. $He gives you the careful measuring glance of a devoted sex slave who's checking whether $his owner wants to fuck $him right now, and correctly decides that that isn't your intent, at least right this minute. Instead, you continue the direction $he was going, and $he follows. "<<Master>>," $he <<say>>s hesitantly, "I hope that wa<<s>> an okay thing for me to do." You assure $him it was. "Thank<<s>>, <<Master>>," $he beams, grinning like an idiot. Smiling at $his infectious enthusiasm for life, you ask $him why $he's so happy this morning. $He looks momentarily perplexed<<if $activeSlave.intelligence+$activeSlave.intelligenceImplant > 50>>, not a common look for a slave as smart as $him<</if>>. "I don't know! I just woke up thi<<s>> morning feeling really, really good. <<if $activeSlave.intelligence+$activeSlave.intelligenceImplant > 50>>I'm sure the fact that I'm benefiting from incredibly advanced medi<<c>>ine ha<<s>> <<s>>omething to do with it; thank you very much for that, <<Master>>. Other than that,<</if>> + $His sheer 'joie de vivre' is irresistible, and it certainly draws you out of your office. You're not slow, and of course you know where $he's going, so you catch up quickly. $He gives you the careful measuring glance of a devoted sex slave who's checking whether $his owner wants to fuck $him right now, and correctly decides that that isn't your intent, at least right this minute. Instead, you continue the direction $he was going, and $he follows. "<<Master>>," $he <<say>>s hesitantly, "I hope that wa<<s>> an okay thing for me to do." You assure $him it was. "Thank<<s>>, <<Master>>," $he beams, grinning like an idiot. Smiling at $his infectious enthusiasm for life, you ask $him why $he's so happy this morning. $He looks momentarily perplexed<<if $activeSlave.intelligence+$activeSlave.intelligenceImplant > 50>>, not a common look for a slave as smart as $him<</if>>. "I don't know! I just woke up thi<<s>> morning feeling really, really good. <<if $activeSlave.intelligence+$activeSlave.intelligenceImplant > 50>>I'm sure the fact that I'm benefiting from incredibly advanced medi<<c>>ine ha<<s>> <<s>>omething to do with it; thank you very much for that, <<Master>>. Other than that,<</if>> I ju<<s>>t feel happy." This has to be some sort of milestone for $him, and for you, and maybe for slavery in general: if $he can be this pleased with life, something must be going right. You walk $him to where $he's going <<switch $activeSlave.assignment>> <<case "whore">>(one of the arcology's nicer streets, where $he'll spend the day selling $his body), diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw index edebd87d70bf2b8138bd307e5631bb87750b5128..ff9a3d4f0de0156575b06ecbb6a01e9b92a1be66 100644 --- a/src/uncategorized/arcmgmt.tw +++ b/src/uncategorized/arcmgmt.tw @@ -1108,7 +1108,7 @@ _SCD = Math.trunc(($upperClass * (2 + _slaveDemandU)) + ($topClass * (12 + _slav _enslaved += _intellectualDependencyEnslaved, $lowerClass += _LCImmigration>> @@.green;<<print _intellectualDependencyEnslaved>> dumb immigrants@@ were enslaved for their own good. - <<else>> + <<else>> <<set _LCImmigration = Math.trunc((_LCD - $lowerClass) * (0.3 * _terrain)) + 1, $lowerClass += _LCImmigration>> <</if>> diff --git a/src/uncategorized/buildingWidgets.tw b/src/uncategorized/buildingWidgets.tw index ad609ec1ca4fa716ce7983a97b15d7ac37226559..7ce4c1952801094d6bd209cf054ecf1513a8ba6f 100644 --- a/src/uncategorized/buildingWidgets.tw +++ b/src/uncategorized/buildingWidgets.tw @@ -56,43 +56,43 @@ Yes, I am aware this is horrible. If anyone can figure out how to get widgets to td#Farmyard { border-color: brown; } td#Nursery { border-color: deepskyblue; } - .arcology .penthouse { - display: inline-block; - } - .arcology .penthouse .info:before { content: "("; } - .arcology .penthouse .info:after { content: ")"; } - .arcology .penthouseWrapper { - display: inline-block; - } - .arcology.verticalLinks .penthouse{ - display:block; - } - .arcology.griddedLinks .penthouseWrapper { - display: flex; - flex-wrap: wrap; - box-sizing: border-box; - } - .arcology.griddedLinks .penthouse .info:before, - .arcology.griddedLinks .penthouse .info:after { - content: ""; - } - .arcology.griddedLinks .penthouse .info { - display: block; - line-height: 0.75; - margin-top: -0.2em; - margin-bottom: 0.2em; - } - .arcology.griddedLinks .penthouseWrapper .penthouse { - flex-grow: 1; - box-sizing: border-box; - justify-content: space-between; - } - .arcology.grid2 .penthouseWrapper .penthouse { - width: 45%; - } - .arcology.grid3 .penthouseWrapper .penthouse { - width: 30%; - } + .arcology .penthouse { + display: inline-block; + } + .arcology .penthouse .info:before { content: "("; } + .arcology .penthouse .info:after { content: ")"; } + .arcology .penthouseWrapper { + display: inline-block; + } + .arcology.verticalLinks .penthouse{ + display:block; + } + .arcology.griddedLinks .penthouseWrapper { + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + } + .arcology.griddedLinks .penthouse .info:before, + .arcology.griddedLinks .penthouse .info:after { + content: ""; + } + .arcology.griddedLinks .penthouse .info { + display: block; + line-height: 0.75; + margin-top: -0.2em; + margin-bottom: 0.2em; + } + .arcology.griddedLinks .penthouseWrapper .penthouse { + flex-grow: 1; + box-sizing: border-box; + justify-content: space-between; + } + .arcology.grid2 .penthouseWrapper .penthouse { + width: 45%; + } + .arcology.grid3 .penthouseWrapper .penthouse { + width: 30%; + } </style> <<script>> @@ -176,77 +176,77 @@ if(!Macro.has('sectorblock')) { <center> <<set _arcologyTableClass = "arcology">> <<switch $verticalizeArcologyLinks>> - <<case 1>> - <<set _arcologyTableClass += " verticalLinks">> - <<case 2>> - <<set _arcologyTableClass += " griddedLinks grid2">> - <<case 3>> - <<set _arcologyTableClass += " griddedLinks grid3">> + <<case 1>> + <<set _arcologyTableClass += " verticalLinks">> + <<case 2>> + <<set _arcologyTableClass += " griddedLinks grid2">> + <<case 3>> + <<set _arcologyTableClass += " griddedLinks grid3">> <</switch>> <table @class="_arcologyTableClass"> <tr> /* Level 9, penthouse, sector 0 */ <td colspan="3"></td> <td id="Penthouse" colspan="4"> - <span class="penthouse"> - <<link "Penthouse">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Penthouse">><</link>> @@.cyan;[P]@@ - </span> - <div class="penthouseWrapper"> + <span class="penthouse"> + <<link "Penthouse">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Penthouse">><</link>> @@.cyan;[P]@@ + </span> + <div class="penthouseWrapper"> <<if $masterSuite>> - <span class="penthouse masterSuite"> + <span class="penthouse masterSuite"> <span class="name"><<print MasterSuiteUIName()>></span><span class="info">$MastSiIDs.length/$masterSuite<<if $Concubine>>, C<</if>></span> - </span> + </span> <</if>> <<if $HGSuite>> - <span class="penthouse headGirlSuite"> + <span class="penthouse headGirlSuite"> <span class="name"><<print HeadGirlSuiteUIName()>></span><<if $HeadGirl != 0>><span class="info">HG<<if $HGSuiteiIDs.length > 0>>, 1<</if>></span><</if>> - </span> + </span> <</if>> <<if $dojo > 1>> - <span class="penthouse armory"> + <span class="penthouse armory"> <span class="name">[[Armory|BG Select]]</span><<if $Bodyguard != 0>> <span class="info">BG</span><</if>> - </span> + </span> <</if>> <<if $servantsQuarters>> - <span class="penthouse servantsQuarters"> + <span class="penthouse servantsQuarters"> <span class="name"><<print ServantQuartersUIName()>></span><span class="info">$ServQiIDs.length/$servantsQuarters<<if $Stewardess>>, L<</if>></span> - </span> + </span> <</if>> <<if $spa>> - <span class="penthouse spa"> + <span class="penthouse spa"> <span class="name"><<print SpaUIName()>></span><span class="info">$SpaiIDs.length/$spa<<if $Attendant>>, L<</if>></span> - </span> + </span> <</if>> <<if $nursery>> - <span class="penthouse nursery"> + <span class="penthouse nursery"> <span class="name"><<print NurseryUIName()>></span><span class="info"><<= numberWithPluralOne($nursery-$nurseryBabies, "empty room")>>, $NurseryiIDs.length/$nurseryNannies<<if $Matron>>, L<</if>></span> <<if $readyChildren > 0>>@@.yellow;[!]@@<</if>> - </span> + </span> <</if>> <<if $clinic>> - <span class="penthouse clinic"> + <span class="penthouse clinic"> <span class="name"><<print ClinicUIName()>></span><span class="info">$CliniciIDs.length/$clinic<<if $Nurse>>, L<</if>></span> - </span> + </span> <</if>> <<if $schoolroom>> - <span class="penthouse schoolroom"> + <span class="penthouse schoolroom"> <span class="name"><<print SchoolRoomUIName()>></span><span class="info">$SchlRiIDs.length/$schoolroom<<if $Schoolteacher>>, L<</if>></span> - </span> + </span> <</if>> <<if $cellblock>> - <span class="penthouse cellblock"> + <span class="penthouse cellblock"> <span class="name"><<print CellblockUIName()>></span><span class="info">$CellBiIDs.length/$cellblock<<if $Wardeness>>, L<</if>></span> - </span> + </span> <</if>> <<if $incubator>> - <span class="penthouse incubator"> + <span class="penthouse incubator"> <span class="name"><<print IncubatorUIName()>></span><span class="info"><<=numberWithPluralOne($incubator-$tanks.length, "empty tank")>></span> <<if $readySlaves > 0>>@@.yellow;[!]@@<</if>> - </span> + </span> <</if>> <<if $researchLab.level > 0>> - <span class="penthouse researchLab"> + <span class="penthouse researchLab"> <span class="name">[[Prosthetic Lab]]</span> - </span> + </span> <</if>> - </div> + </div> </td> <td colspan="3"></td> </tr> diff --git a/src/uncategorized/reFSAcquisition.tw b/src/uncategorized/reFSAcquisition.tw index 6e783aedc02e45f8fc688d54b4021dc0dbfab5a4..b029be5062ed722c04dde13ae03d396ca06810aa 100644 --- a/src/uncategorized/reFSAcquisition.tw +++ b/src/uncategorized/reFSAcquisition.tw @@ -1564,7 +1564,7 @@ The call comes in from an office, and you suppress the urge to check whether $as <<case "Paternalist Two">> $He speaks to you as a free $woman throughout the enslavement process, but as soon as it is completed, $he stops and waits for instruction before talking. $He may not have had many prospects in $his life back home, but if $he remains this obedient $he'll fit right in here in the Free Cities. <<case "Degradationist">> - When $he arrives as part of the anonymous slave transfers that make up a good part of the inter-arcology commerce, $he has clearly had some time to mull over $his situation. As soon as $he sees you, $he blurts out, "Whatever that fucker told you, it isn't true. I'll be your little bitch bimbo, whatever you want. Ju<<s>>t don't — ju<<s>>t don't fucking hurt me." $He sticks out $his chest in a clear attempt to entice you with $his fake tits. + When $he arrives as part of the anonymous slave transfers that make up a good part of the inter-arcology commerce, $he has clearly had some time to mull over $his situation. As soon as $he sees you, $he blurts out, "Whatever that fucker told you, it i<<s>>n't true. I'll be your little bitch bimbo, whatever you want. Ju<<s>>t don't — ju<<s>>t don't fucking hurt me." $He sticks out $his chest in a clear attempt to entice you with $his fake tits. <<case "Degradationist Two">> When $he arrives as part of the anonymous slave transfers that make up a good part of the inter-arcology commerce, $he has clearly had some time to mull over $his situation. As soon as $he sees you, $he glares deep into your eyes and addresses you directly, "Tho<<s>>e fucker<<s>> threw everything they could at me; you can't break me. No one can." <<case "Intellectual Dependency">> @@ -1617,7 +1617,7 @@ The call comes in from an office, and you suppress the urge to check whether $as <<case "Chattel Religionist Two">> You complete the legalities and a clearly improvised VTOL craft arrives at $arcologies[0].name, broadcasting an erratic array of IFF codes. It seems this group hasn't quite mastered the intricacies of air travel. The aircraft doesn't seem capable of the delicate feat of landing on the pad it had been directed to: it simply hovers <<if $showInches == 2>>six feet<<else>>two meters<</if>> off the pad for the five seconds it takes to shove a canvas bag that obviously contains a struggling human form out of the side door. The condemned prays tirelessly throughout the biometric scanning process, utterly shocked and disgusted by what they've witnessed in just the few minutes they've been in your arcology. Then it's off to the penthouse for basic slave induction. <<case "Roman Revivalist">> - $He arrives wide-eyed and enthusiastic about the historical style $he saw on the way in. $He swallows nervously throughout the enslavement process and even cries a little at the end. $He's slow to undress, and when $he's finished, $he covers $his modest breasts with one arm and $his mons with the other. It seems that $he's about to have a rude awakening about the realities of being a house slave. + $He arrives wide-eyed and enthusiastic about the historical style $he <<if canSee($activeSlave)>>saw<<elseif canHear($activeSlave)>>heard<<else>>felt<</if>> on the way in. $He swallows nervously throughout the enslavement process and even cries a little at the end. $He's slow to undress, and when $he's finished, $he covers $his modest breasts with one arm and $his mons with the other. It seems that $he's about to have a rude awakening about the realities of being a house slave. <<case "Aztec Revivalist">> $He arrives awestruck by <<if canSee($activeSlave)>>all the sights<<else>>everything<</if>> $he passed through to get to your abode. $He probably didn't see anything too extreme, but $he will soon. Feeling your gaze on $his body, $he quickly abandons all fears from $his past life, strips off $his clothes, and submits to you fully. Only time will tell if $he made a mistake. <<case "Edo Revivalist">> diff --git a/src/uncategorized/remMerger.tw b/src/uncategorized/remMerger.tw index 1b8d080f8d0891be945ce7dc557d5754167523f7..e2c71a9aab351ad1cde21356c3c1583f8309c661 100644 --- a/src/uncategorized/remMerger.tw +++ b/src/uncategorized/remMerger.tw @@ -4,15 +4,15 @@ <<set $nextLink = "RIE Eligibility Check">> <<set _slaveCompany = App.Corporate.divisionList - .filter(div => div.founded && div.hasMergers) - .map (div => div.mergerChoices.map((merger, index) => ({merger, index, division:div}))) - .flat ()>> + .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 _companies = []>> <<for _index = 0; _index < _numCompanies; ++_index>> - <<run _companies.push(_slaveCompany.pluck())>> + <<run _companies.push(_slaveCompany.pluck())>> <</for>> <<set _assistant = $assistantName>> @@ -21,43 +21,43 @@ <<if _companies.length == 1>> - <<set _company = _companies[0]>> - <div class="majorText">This week you come across <<= _company.merger.text.trouble >></div> + <<set _company = _companies[0]>> + <div class="majorText">This week you come across <<= _company.merger.text.trouble >></div> <<else>> - <<for _index, _company range _companies>> - <div class="majorText">The <<= ordinalSuffixWords(_index + 1)>> is <<= _company.merger.text.trouble >></div> - <</for>> + <<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>> + <<capture _company>> <div> - <<set _absorbName = "Absorb the " + _company.merger.name>> - <<link _absorbName>> + <<set _absorbName = "Absorb the " + _company.merger.name>> + <<link _absorbName>> <<replace "#result">> - 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>> + 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>> - </div> - <</capture>> + </div> + <</capture>> <</for>> </div> diff --git a/src/uncategorized/saDiet.tw b/src/uncategorized/saDiet.tw index 5b60b88913a8ccc28e45a861bbc180950eaf0e62..a32538c6e7bca1b58e6017788b62465dc50b036a 100644 --- a/src/uncategorized/saDiet.tw +++ b/src/uncategorized/saDiet.tw @@ -313,7 +313,7 @@ <<if $slaves[$i].behavioralFlaw == "anorexic">> and $his cum addiction trumps $his desire to remain thin. $He <<else>> - $he + $he <</if>> is @@.hotpink;thrilled to get extra this week.@@ $He gobbles down every last drop like the happy <<if $slaves[$i].weight < 0>>little <<else>>chubby <</if>>cum addict $he is. <<set $slaves[$i].devotion += 2>> <</if>> diff --git a/src/uncategorized/slaveStats.tw b/src/uncategorized/slaveStats.tw index 94bcf449df526a8dad9fc690c4670bca1399358e..4cf2b2e94975c2d75ee9bd5e24a559b48d13dd57 100644 --- a/src/uncategorized/slaveStats.tw +++ b/src/uncategorized/slaveStats.tw @@ -14,63 +14,63 @@ Surname: $activeSlave.slaveSurname <br>Nationality: $activeSlave.nationality <br>Cost: $activeSlave.slaveCost -<br>Week: -Acquired: $activeSlave.weekAcquired, +<br>Week: +Acquired: $activeSlave.weekAcquired, Birth: $activeSlave.birthWeek <br>Pronoun: $activeSlave.pronoun <br>Career: $activeSlave.career <br>Origin: $activeSlave.origin <br>ID: $activeSlave.ID -<br>Prestige: $activeSlave.prestige, +<br>Prestige: $activeSlave.prestige, Desc: $activeSlave.prestigeDesc <br>CustomDesc: $activeSlave.custom.desc -<br>Indenture: $activeSlave.indenture, +<br>Indenture: $activeSlave.indenture, Restrictions: $activeSlave.indentureRestrictions -<br>Sentence: $activeSlave.sentence, +<br>Sentence: $activeSlave.sentence, Training: $activeSlave.training <br>BreedingMark: $activeSlave.breedingMark <br>Assignment: $activeSlave.assignment, -Visible: $activeSlave.assignmentVisible, +Visible: $activeSlave.assignmentVisible, choosesOwn: $activeSlave.choosesOwnAssignment -<br>Title: -Custom: $activeSlave.custom.title, -Lisp: $activeSlave.custom.titleLisp, +<br>Title: +Custom: $activeSlave.custom.title, +Lisp: $activeSlave.custom.titleLisp, Rude: $activeSlave.rudeTitle <br>Custom.label: $activeSlave.custom.label -<br><br>Drugs: $activeSlave.drugs, -Curatives: $activeSlave.curatives, -Chem: $activeSlave.chem, +<br><br>Drugs: $activeSlave.drugs, +Curatives: $activeSlave.curatives, +Chem: $activeSlave.chem, Aphrodisiacs: $activeSlave.aphrodisiacs <br>Induce: $activeSlave.induce -<br><br>Rules: -Current: $activeSlave.currentRules, -Living: $activeSlave.rules.living, -Speech: $activeSlave.rules.speech, +<br><br>Rules: +Current: $activeSlave.currentRules, +Living: $activeSlave.rules.living, +Speech: $activeSlave.rules.speech, Release: $activeSlave.rules.release -<br>Standard: -Punishment: $activeSlave.rules.punishment, +<br>Standard: +Punishment: $activeSlave.rules.punishment, Reward: $activeSlave.rules.reward -<br>UseRulesAssistant: $activeSlave.useRulesAssistant, +<br>UseRulesAssistant: $activeSlave.useRulesAssistant, ChoosesOwnChastity: $activeSlave.choosesOwnChastity -<br><br>Lifetime: -<br> Cash: -Expenses: <<= num($activeSlave.lifetimeCashExpenses)>>, +<br><br>Lifetime: +<br> Cash: +Expenses: <<= num($activeSlave.lifetimeCashExpenses)>>, Income: <<= num($activeSlave.lifetimeCashIncome)>> -<br> Rep: -Expenses: <<= num($activeSlave.lifetimeRepExpenses)>>, +<br> Rep: +Expenses: <<= num($activeSlave.lifetimeRepExpenses)>>, Income: <<= num($activeSlave.lifetimeRepIncome)>> -<br>LastWeeks: +<br>LastWeeks: <br> CashIncome: <<= num($activeSlave.lastWeeksCashIncome)>> -<br> Rep: -Expenses: <<= num($activeSlave.lastWeeksRepExpenses)>>, +<br> Rep: +Expenses: <<= num($activeSlave.lastWeeksRepExpenses)>>, Income: <<= num($activeSlave.lastWeeksRepIncome)>> <br> @@ -118,30 +118,30 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <div id="Mental" class="tabcontent"> <div class="content"> Intelligence: $activeSlave.intelligence - <br>Attraction: - XX: $activeSlave.attrXX, + <br>Attraction: + XX: $activeSlave.attrXX, XY: $activeSlave.attrXY - <br>Fetish: - Strength: $activeSlave.fetishStrength, + <br>Fetish: + Strength: $activeSlave.fetishStrength, Known: $activeSlave.fetishKnown - <br>Behavioral: - Flaw: $activeSlave.behavioralFlaw, + <br>Behavioral: + Flaw: $activeSlave.behavioralFlaw, Quirk: $activeSlave.behavioralQuirk - <br>Sexual: - Flaw: $activeSlave.sexualFlaw, + <br>Sexual: + Flaw: $activeSlave.sexualFlaw, Quirk: $activeSlave.sexualQuirk - - <br>Energy: $activeSlave.energy, + + <br>Energy: $activeSlave.energy, Tired: $activeSlave.tired - <br>Need: $activeSlave.need, + <br>Need: $activeSlave.need, Cap: $activeSlave.needCap <br>Addict: $activeSlave.addict - <br>Hormones: $activeSlave.hormones, + <br>Hormones: $activeSlave.hormones, Balance: $activeSlave.hormoneBalance - <br>Trust: $activeSlave.trust, - Previous: $activeSlave.oldTrust - <br>Devotion: $activeSlave.devotion, + <br>Trust: $activeSlave.trust, + Previous: $activeSlave.oldTrust + <br>Devotion: $activeSlave.devotion, Previous: $activeSlave.oldDevotion </div> </div> @@ -155,20 +155,20 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <br>Fuckdoll: $activeSlave.fuckdoll <br>ToyHole: $activeSlave.toyHole <br>PLimb: $activeSlave.PLimb - + <br><br>BodySwap: $activeSlave.bodySwap - <br>origBodyOwner: $activeSlave.origBodyOwner, + <br>origBodyOwner: $activeSlave.origBodyOwner, ID: $activeSlave.origBodyOwnerID - - <br><br>Age: + + <br><br>Age: Actual: $activeSlave.actualAge, Visual: $activeSlave.visualAge, - PhysicalAge: $activeSlave.physicalAge, + PhysicalAge: $activeSlave.physicalAge, Adjust: $activeSlave.ageAdjust - <br>PubertyAge: - XX: $activeSlave.pubertyAgeXX, + <br>PubertyAge: + XX: $activeSlave.pubertyAgeXX, XY: $activeSlave.pubertyAgeXY - + <br><br>Brand: <<for _brandName, _brand range $activeSlave.brand>> _brandName: _brand, @@ -177,91 +177,91 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <<for _scarName, _scar range $activeSlave.scar>> _scarName: _scar, <</for>> - - <br><br>Broodmother: - Fetuses: $activeSlave.broodmotherFetuses, + + <br><br>Broodmother: + Fetuses: $activeSlave.broodmotherFetuses, CountDown: $activeSlave.broodmotherCountDown - - <br>Diet: - Current: $activeSlave.diet, - Cum: $activeSlave.dietCum, + + <br>Diet: + Current: $activeSlave.diet, + Cum: $activeSlave.dietCum, Milk: $activeSlave.dietMilk - + <br><br> <h2>Upper</h2> - - Hair: - Length: $activeSlave.hLength, - Style: $activeSlave.hStyle, - <br>Color: $activeSlave.hColor, - Orig: $activeSlave.origHColor, + + Hair: + Length: $activeSlave.hLength, + Style: $activeSlave.hStyle, + <br>Color: $activeSlave.hColor, + Orig: $activeSlave.origHColor, Override: $activeSlave.override_H_Color - - <br>Pubic Hair: - Style: $activeSlave.pubicHStyle, + + <br>Pubic Hair: + Style: $activeSlave.pubicHStyle, Color: $activeSlave.pubicHColor, Override: $activeSlave.override_Pubic_H_Color <br><br>Eyes: <br>Eyes: $activeSlave.eyes, Color: $activeSlave.eyeColor, - Orig: $activeSlave.origEye, + Orig: $activeSlave.origEye, Override: $activeSlave.override_Eye_Color <br>eyewear: $activeSlave.eyewear <br>pupil: $activeSlave.pupil <br>sclerae: $activeSlave.sclerae - - <br><br>Ears: - Hearing: $activeSlave.hears, + + <br><br>Ears: + Hearing: $activeSlave.hears, Wear: $activeSlave.earwear - + <br><br>Face: - <br>Face: $activeSlave.face, + <br>Face: $activeSlave.face, Shape: $activeSlave.faceShape <br>Lips: $activeSlave.lips <br>Oral count: $activeSlave.counter.oral <br>Teeth: $activeSlave.teeth - + <br>Voice: $activeSlave.voice <br>Accent: $activeSlave.accent <br>Eyebrow: - <br>Fullness: $activeSlave.eyebrowFullness, - Color: $activeSlave.eyebrowHColor, + <br>Fullness: $activeSlave.eyebrowFullness, + Color: $activeSlave.eyebrowHColor, Style: $activeSlave.eyebrowHStyle, Override: $activeSlave.override_Brow_H_Color <br>Smells: $activeSlave.smells <br>Tastes: $activeSlave.tastes <br>Makeup: $activeSlave.makeup - + <br>Race: $activeSlave.race, - Orig: $activeSlave.origRace, + Orig: $activeSlave.origRace, Override: $activeSlave.override_Race <br>Skin: $activeSlave.skin, - Orig: $activeSlave.origSkin, + Orig: $activeSlave.origSkin, Override: $activeSlave.override_Skin - + <br>Haircuts: $activeSlave.haircuts, Bald: $activeSlave.bald - + <br>Collar: $activeSlave.collar <br>Height: $activeSlave.height <br>Clothes: $activeSlave.clothes, ChoosesOwn: $activeSlave.choosesOwnClothes - + <br>Shoulders: $activeSlave.shoulders <br>ArmAccessory: $activeSlave.armAccessory <br>Muscles: $activeSlave.muscles - <br>Arms: $activeSlave.arms, - <br>UnderArm: - HColor: $activeSlave.underArmHColor, - Style: $activeSlave.underArmHStyle, + <br>Arms: $activeSlave.arms, + <br>UnderArm: + HColor: $activeSlave.underArmHColor, + Style: $activeSlave.underArmHStyle, Override H Colour: $activeSlave.override_Arm_H_Color - + <br>Nails: $activeSlave.nails - + <br><br>Boobs: $activeSlave.boobs, - <br>Milk: $activeSlave.boobsMilk, - Type: $activeSlave.boobsImplantType, + <br>Milk: $activeSlave.boobsMilk, + Type: $activeSlave.boobsImplantType, Qunantity: $activeSlave.counter.milk <br>Shape: $activeSlave.boobShape <br>nipples: $activeSlave.nipples, @@ -275,38 +275,38 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <br>MammaryCount: $activeSlave.counter.mammary <br>LactationRules: $activeSlave.rules.lactation <br>BreastMesh: $activeSlave.breastMesh - + <br><br> <h2>Lower</h2> - + Weight: $activeSlave.weight <br>Waist: $activeSlave.waist <br>Hips: $activeSlave.hips - + <br><br>Belly: $activeSlave.belly, Preg: $activeSlave.bellyPreg, Fluid: $activeSlave.bellyFluid, Sag: $activeSlave.bellySag, SagPreg: $activeSlave.bellySagPreg, - Pain: $activeSlave.bellyPain, + Pain: $activeSlave.bellyPain, Accessory: $activeSlave.bellyAccessory <br>Burst: $activeSlave.burst - <br>Inflation: $activeSlave.inflation, - Type: $activeSlave.inflationType, + <br>Inflation: $activeSlave.inflation, + Type: $activeSlave.inflationType, Method: $activeSlave.inflationMethod - <br>Source: - Milk: $activeSlave.milkSource, + <br>Source: + Milk: $activeSlave.milkSource, Cum: $activeSlave.cumSource - + <br><br>Anus: $activeSlave.anus, Area: $activeSlave.analArea, Count: $activeSlave.counter.anal <br>Butt: $activeSlave.butt, Type: $activeSlave.buttImplantType, - Plug: $activeSlave.buttplug, + Plug: $activeSlave.buttplug, PlugAttachment: $activeSlave.buttplugAttachment <br>Mpreg: $activeSlave.mpreg - + <br><br>Foreskin: $activeSlave.foreskin, <br>Dick: $activeSlave.dick, Accessory: $activeSlave.dickAccessory @@ -316,7 +316,7 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> Type: $activeSlave.ballType <br>Scrotum: $activeSlave.scrotum <br>Cum released: $activeSlave.counter.cum - + <br><br>Vagina: $activeSlave.vagina, Lube: $activeSlave.vaginaLube, Accessory: $activeSlave.vaginalAccessory, @@ -325,12 +325,12 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <br>EggType: $activeSlave.eggType <br>Ovaries: $activeSlave.ovaries <br>OvaryAge: $activeSlave.ovaryAge - + <br><br>Labia: $activeSlave.labia, <br>Clit: $activeSlave.clit, Setting: $activeSlave.clitSetting - - <br>LeftLeg: $activeSlave.leg.left.type, + + <br>LeftLeg: $activeSlave.leg.left.type, RightLeg: $activeSlave.leg.right.type Accessory: $activeSlave.legAccessory <br>Heels: $activeSlave.heels @@ -347,50 +347,50 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <br>WeeklySpending: $activeSlave.porn.spending <br>Prestige: $activeSlave.porn.prestige PrestigeDesc: $activeSlave.porn.prestigeDesc - + <br><br> <h2>Type</h2> General: $activeSlave.porn.fame.general <br>Fuckdoll: $activeSlave.porn.fame.fuckdoll <br>Rape: $activeSlave.porn.fame.rape, Unflinching: $activeSlave.porn.fame.unflinching - - <br>Preggo: $activeSlave.porn.fame.preggo, - Pregnancy: $activeSlave.porn.fame.pregnancy, + + <br>Preggo: $activeSlave.porn.fame.preggo, + Pregnancy: $activeSlave.porn.fame.pregnancy, Breeder: $activeSlave.porn.fame.breeder - - <br>BBW: $activeSlave.porn.fame.BBW, + + <br>BBW: $activeSlave.porn.fame.BBW, Gainer: $activeSlave.porn.fame.gainer <br>Stud: $activeSlave.porn.fame.stud <br>Loli: $activeSlave.porn.fame.loli - <br>DeepThroat: $activeSlave.porn.fame.deepThroat, + <br>DeepThroat: $activeSlave.porn.fame.deepThroat, StruggleFuck: $activeSlave.porn.fame.struggleFuck <br>Painal: $activeSlave.porn.fame.painal <br>Tease: $activeSlave.porn.fame.tease - <br>Romantic: $activeSlave.porn.fame.romantic, + <br>Romantic: $activeSlave.porn.fame.romantic, Caring: $activeSlave.porn.fame.caring <br>Pervert: $activeSlave.porn.fame.pervert - + <br>SizeQueen: $activeSlave.porn.fame.sizeQueen - - <br>CumSlut: $activeSlave.porn.fame.cumSlut, + + <br>CumSlut: $activeSlave.porn.fame.cumSlut, <br>CumAddict: $activeSlave.porn.fame.cumAddict - <br>Anal: $activeSlave.porn.fame.anal, + <br>Anal: $activeSlave.porn.fame.anal, AnalAddict: $activeSlave.porn.fame.analAddict <br>AttentionWhore: $activeSlave.porn.fame.attentionWhore - - <br>Abusive: $activeSlave.porn.fame.abusive, - Malicious: $activeSlave.porn.fame.malicious, - <br>Neglectful: $activeSlave.porn.fame.neglectful, + + <br>Abusive: $activeSlave.porn.fame.abusive, + Malicious: $activeSlave.porn.fame.malicious, + <br>Neglectful: $activeSlave.porn.fame.neglectful, SelfHating: $activeSlave.porn.fame.selfHating - - <br>BreastGrowth: $activeSlave.porn.fame.breastGrowth, + + <br>BreastGrowth: $activeSlave.porn.fame.breastGrowth, Boobs: $activeSlave.porn.fame.boobs <br>Humiliation: $activeSlave.porn.fame.humiliation - - <br>Dom: $activeSlave.porn.fame.dom, + + <br>Dom: $activeSlave.porn.fame.dom, Sub: $activeSlave.porn.fame.sub - <br>Sadist: $activeSlave.porn.fame.sadist, + <br>Sadist: $activeSlave.porn.fame.sadist, Masochist: $activeSlave.porn.fame.masochist <br> </div> @@ -398,7 +398,7 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <div id="Impants_Piercings_Tattoos" class="tabcontent"> <div class="content"> - + <h2>Impants</h2> Height: $activeSlave.heightImplant <br>Ears: $activeSlave.earImplant @@ -415,7 +415,7 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <br>Intelligence: $activeSlave.intelligenceImplant <br>Cervix: $activeSlave.cervixImplant <br>Butt: $activeSlave.buttImplant - + <br><br> <h2>Piercings</h2> Ears: $activeSlave.earPiercing <br>Face: $activeSlave.lipsPiercing @@ -430,7 +430,7 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <br>Vagina: $activeSlave.vaginaPiercing <br>Dick: $activeSlave.dickPiercing <br>Anus: $activeSlave.anusPiercing - + <br><br> <h2>Tattoos</h2> Custom: $activeSlave.custom.tattoo <br>Shoulders: $activeSlave.shouldersTat @@ -458,20 +458,20 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> Mother: $activeSlave.mother <br>Daughters: $activeSlave.daughters, Sisters: $activeSlave.sisters - <br>Fathered: slaves: $activeSlave.counter.slavesFathered, + <br>Fathered: slaves: $activeSlave.counter.slavesFathered, PCChildren: $activeSlave.counter.PCChildrenFathered - <br>KnockedUp: slaves: $activeSlave.counter.slavesKnockedUp, + <br>KnockedUp: slaves: $activeSlave.counter.slavesKnockedUp, <br>PC: $activeSlave.counter.PCKnockedUp <br>labor: $activeSlave.labor, Count: $activeSlave.counter.laborCount <br>Births: $activeSlave.counter.births, Total: $activeSlave.counter.birthsTotal <br>PrematureBirth: $activeSlave.prematureBirth - - <br> <h2>Mods</h2> - NCS: $activeSlave.geneMods.NCS, - RapidCellGrowth: $activeSlave.geneMods.rapidCellGrowth, - + + <br> <h2>Mods</h2> + NCS: $activeSlave.geneMods.NCS, + RapidCellGrowth: $activeSlave.geneMods.rapidCellGrowth, + <br><br> <h2>Relationships</h2> <br>Rules: $activeSlave.rules.relationship <br>Relation: $activeSlave.relation, @@ -481,7 +481,7 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <br>Rivalry: $activeSlave.rivalry, Target: $activeSlave.rivalryTarget <br>SubTarget: $activeSlave.subTarget - + <br><br> <h2>Genetic Quirks</h2> Gigantism: $activeSlave.geneticQuirks.gigantism, @@ -489,24 +489,24 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <br>Fertility: $activeSlave.geneticQuirks.fertility, Hyper: $activeSlave.geneticQuirks.hyperFertility <br>Superfetation: $activeSlave.geneticQuirks.superfetation - + <br>Dwarfism: $activeSlave.geneticQuirks.dwarfism <br>Pface: $activeSlave.geneticQuirks.pFace <br>Uface: $activeSlave.geneticQuirks.uFace <br>Albinism: $activeSlave.geneticQuirks.albinism <br>RearLipedema: $activeSlave.geneticQuirks.rearLipedema <br>WellHung: $activeSlave.geneticQuirks.wellHung - <br>Weight: - Gain: $activeSlave.geneticQuirks.wGain, + <br>Weight: + Gain: $activeSlave.geneticQuirks.wGain, Loss: $activeSlave.geneticQuirks.wLoss <br>Androgyny: $activeSlave.geneticQuirks.androgyny - + <br><br> <h2>Pregmancy</h2> - <br>Week: $activeSlave.pregWeek, - isPreg: $activeSlave.preg, - Source: $activeSlave.pregSource, - Type: $activeSlave.pregType, + <br>Week: $activeSlave.pregWeek, + isPreg: $activeSlave.preg, + Source: $activeSlave.pregSource, + Type: $activeSlave.pregType, Adaptation: $activeSlave.pregAdaptation <br>Control: $activeSlave.pregControl <br>PeakFertility: $activeSlave.fertPeak @@ -517,7 +517,7 @@ Income: <<= num($activeSlave.lastWeeksRepIncome)>> <div class="content"> <br>Recruiter: $activeSlave.recruiter <br>Deadliness <<print Deadliness($activeSlave)>> - <br>Count: Penetrative: $activeSlave.counter.penetrative, + <br>Count: Penetrative: $activeSlave.counter.penetrative, Public: $activeSlave.counter.publicUse <br>pitKills: $activeSlave.counter.pitKills </div> diff --git a/src/uncategorized/universalRules.tw b/src/uncategorized/universalRules.tw index 3cbb439bf8fd394f0ad31b707182bf698d695c0b..e6803999d8bb30cde3cae45f063456a44f1c64d4 100644 --- a/src/uncategorized/universalRules.tw +++ b/src/uncategorized/universalRules.tw @@ -456,57 +456,57 @@ Slave nicknames are Future society names for new slaves are currently @@.red;NOT APPLIED.@@ [[Apply|Universal Rules][$useFSNames = 1]] <<else>> Future society names for new slaves are currently @@.cyan;APPLIED.@@ [[Stop applying|Universal Rules][$useFSNames = 0]] - + <<if $FSNamePref == 0>> - You are currently not setting direction towards which Future Society names are preferred. + You are currently not setting direction towards which Future Society names are preferred. <<elseif $FSNamePref == 1>> - New Slaves are currently being given devotional names. + New Slaves are currently being given devotional names. <<elseif $FSNamePref == 2>> - New slaves are currently being named according to Roman Custom. + New slaves are currently being named according to Roman Custom. <<elseif $FSNamePref == 3>> - New slaves are currently being named according to ancient Aztec Custom. + New slaves are currently being named according to ancient Aztec Custom. <<elseif $FSNamePref == 4>> - New slaves are currently being named according to ancient Egyptian Custom. + New slaves are currently being named according to ancient Egyptian Custom. <<elseif $FSNamePref == 5>> - New slaves are currently being named according to feudal Japanese Custom. + New slaves are currently being named according to feudal Japanese Custom. <<elseif $FSNamePref == 6>> - New slaves are currently being named according to Degradationalist Custom. + New slaves are currently being named according to Degradationalist Custom. <<elseif $FSNamePref == 7>> - New slaves are currently being named according to Paternalist Custom. + New slaves are currently being named according to Paternalist Custom. <<elseif $FSNamePref == 8>> - New slaves are currently being given simple bimbo names. + New slaves are currently being given simple bimbo names. <<elseif $FSNamePref == 9>> - New Slaves are currently being named according to Pastoralist Custom. + New Slaves are currently being named according to Pastoralist Custom. <</if>> - + <br> - + <<if $FSNamePref != 0>> - [[No Longer Specify which Future Society to Draw Names From.|Universal Rules][$FSNamePref = 0]] <br> + [[No Longer Specify which Future Society to Draw Names From.|Universal Rules][$FSNamePref = 0]] <br> <</if>> <<if $FSNamePref != 1 && $arcologies[0].FSChattelReligionist >= 20>> - [[Give New Slaves Devotional Names|Universal Rules][$FSNamePref = 1]] <br> + [[Give New Slaves Devotional Names|Universal Rules][$FSNamePref = 1]] <br> <</if>> <<if $FSNamePref != 2 && $arcologies[0].FSRomanRevivalist > 20>> - [[Give New slaves Roman Names|Universal Rules][$FSNamePref = 2]] <br> + [[Give New slaves Roman Names|Universal Rules][$FSNamePref = 2]] <br> <</if>> <<if $FSNamePref != 3 && $arcologies[0].FSAztecRevivalist > 20>> - [[Give New Slaves Ancient Aztec Names.|Universal Rules][$FSNamePref = 3]] <br> + [[Give New Slaves Ancient Aztec Names.|Universal Rules][$FSNamePref = 3]] <br> <</if>> <<if $FSNamePref != 4 && $arcologies[0].FSEgyptianRevivalist > 20>> - [[Give New Slaves Ancient Egyptian Names|Universal Rules][$FSNamePref = 4]] <br> + [[Give New Slaves Ancient Egyptian Names|Universal Rules][$FSNamePref = 4]] <br> <</if>> <<if $FSNamePref != 5 && $arcologies[0].FSEdoRevivalist > 20>> - [[Give New Slaves Feudal Japanese Names|Universal Rules][$FSNamePref = 5]] <br> + [[Give New Slaves Feudal Japanese Names|Universal Rules][$FSNamePref = 5]] <br> <</if>> <<if $FSNamePref != 6 && $arcologies[0].FSDegradationist !== "unset">> - [[Give New Slaves Degrading Names|Universal Rules][$FSNamePref = 6]] <br> + [[Give New Slaves Degrading Names|Universal Rules][$FSNamePref = 6]] <br> <</if>> <<if $FSNamePref != 7 && $arcologies[0].FSPaternalist >= 20>> - [[Give New Slaves Paternalist Names|Universal Rules][$FSNamePref = 7]] <br> + [[Give New Slaves Paternalist Names|Universal Rules][$FSNamePref = 7]] <br> <</if>> <<if $FSNamePref != 8 && $arcologies[0].FSIntellectualDependency >= 20>> - [[Give New Slaves Simple Bimbo Names|Universal Rules][$FSNamePref = 8]] + [[Give New Slaves Simple Bimbo Names|Universal Rules][$FSNamePref = 8]] <</if>> <</if>> <</if>> diff --git a/src/utility/birthWidgets.tw b/src/utility/birthWidgets.tw index 727818a51506e21d95ec60768ec66137ccef4baa..4ddd9bfd54b761f1ea6800b916cd6b78da9be41a 100644 --- a/src/utility/birthWidgets.tw +++ b/src/utility/birthWidgets.tw @@ -1791,7 +1791,7 @@ Feeling childbirth approaching, $slaves[$i].slaveName is helped to $his prepared <<else>> Quickly $he spreads $his legs apart and begins pushing out <<if $slaves[$i].broodmother > 0>><<if $slaves[$i].counter.birthsTotal == 0>>$his first<<else>>this week's<</if>> baby<<else>>$his bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>><</if>>.<<if $slaves[$i].fetish == "humiliation">> $He is thrilled that $his underwear reveals what's happening between $his legs<<else>> $He does $his best to hide what's happening between $his legs<</if>>. <</if>> - + <<case "a t-shirt and thong" "a thong" "a tube top and thong" "a bimbo outfit">> <<if $slaves[$i].fetish == "mindbroken">> Instinctively, $he begins to push out <<if $slaves[$i].broodmother > 0>><<if $slaves[$i].counter.birthsTotal == 0>>$his first<<else>>this week's<</if>> baby<<else>>$his bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>><</if>>, indifferent to the thong covering $his <<if $slaves[$i].mpreg == 1>>anus<<else>>vagina<</if>>. $He crowns into the straining undergarment until the straps give out and clear $his <<if $slaves[$i].mpreg == 1>>anus<<else>>birth canal<</if>>, allowing $him to carry on with childbirth. @@ -1812,7 +1812,7 @@ Feeling childbirth approaching, $slaves[$i].slaveName is helped to $his prepared <<else>> Quickly $he spreads $his legs apart and begins pushing out <<if $slaves[$i].broodmother > 0>><<if $slaves[$i].counter.birthsTotal == 0>>$his first<<else>>this week's<</if>> baby<<else>>$his bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>><</if>>.<<if $slaves[$i].fetish == "humiliation">> $He is thrilled that $his swimsuit fully reveals what's happening between $his legs<<else>> $He does $his best to hide what's happening between $his legs<</if>>. <</if>> - + <<case "a courtesan dress">> <<if $slaves[$i].fetish == "mindbroken">> Instinctively, $he begins to push out <<if $slaves[$i].broodmother > 0>><<if $slaves[$i].counter.birthsTotal == 0>>$his first<<else>>this week's<</if>> baby<<else>>$his bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>><</if>>, indifferent to who may be watching the show under $his parted dress. diff --git a/src/utility/descriptionWidgetsFlesh.tw b/src/utility/descriptionWidgetsFlesh.tw index 4cd8914ed198b50129656c165c877f8f523ef35e..bb36bbde986cc95b3d30922690ce23240a36a6cd 100644 --- a/src/utility/descriptionWidgetsFlesh.tw +++ b/src/utility/descriptionWidgetsFlesh.tw @@ -3845,7 +3845,7 @@ $He's got a <<if $activeSlave.dick == 0>> Bizarrely, $he's been given a functional prostate gland. It's attached to $his urethra, of course, <<if $activeSlave.balls > 0>>which in combination with $his testicles make $his squirt unreasonable volume of fluids and semen with each orgasm<<else>>meaning that when $he orgasms, $he squirts an unreasonable volume of fluid<</if>>. <<if $activeSlave.prostate > 2>> - With the implant embedded in it; that gush is insane. Everything around $him is at risk of being splashed. Changes of clothes are a must with $him, as are supplies to mop up afterwards. + With the implant embedded in it, that gush is insane. Everything around $him is at risk of being splashed. Changes of clothes are a must with $him, as are supplies to mop up afterwards. <</if>> <</if>> <</if>>