diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index 33dfa89222bb3a582f7931417317a2ab0f45c7b9..fbf924a10ba2e1919f7795e4106acb66a71e38c7 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -2198,9 +2198,8 @@ window.getCost = function(array) { } if(State.variables.SF.Toggle && State.variables.SF.Active >= 1 && State.variables.SF.Subsidy) { - costs += Math.ceil((10000*(State.variables.SFUnit.Troops/10))*1+(State.variables.arcologies[0].prosperity/100)*1+(State.variables.SF.Units/100)); + costs += Math.ceil( (10000*(State.variables.SFUnit.Troops/10))+(1+(State.variables.arcologies[0].prosperity/100))+(1+(State.variables.SF.Units/100)) ); } - // clean up if(costs < 0) { costs = 0; diff --git a/src/SecExp/secBarracks.tw b/src/SecExp/secBarracks.tw index 5bfe8cd772deae362f378241ec6923ed00f105bb..5ab920dea64c5778535646c384ebb4a99d3d517e 100644 --- a/src/SecExp/secBarracks.tw +++ b/src/SecExp/secBarracks.tw @@ -257,8 +257,9 @@ You are free to organize your menial slaves into fighting units. Currently you h <<set $targetUnit = "slaveUnits">> <<set $targetIndex = _i>> <</link>> - | + <<if $slaveUnits[_i].troops < $slaveUnits[_i].maxTroops && $helots > 0>> + | <<link "Replenish unit" "secBarracks">> <<if $helots >= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> <<set $helots -= $slaveUnits[_i].maxTroops - $slaveUnits[_i].troops>> @@ -292,8 +293,9 @@ You are free to organize your menial slaves into fighting units. Currently you h <<set $slaveUnits = _newSlaveUnits>> <<set $activeUnits-->> <</link>> - | + <<if $helots > 0>> + | <<link "Reform the unit" "secBarracks">> <<if $helots >= $slaveUnits[_i].maxTroops>> <<set $slavesEmployedManpower += $slaveUnits[_i].maxTroops>> @@ -405,8 +407,9 @@ __Militia__ <<set $targetUnit = "militiaUnits">> <<set $targetIndex = _i>> <</link>> - | + <<if $militiaUnits[_i].troops < $militiaUnits[_i].maxTroops && $militiaFreeManpower > 0>> + | <<link "Replenish unit" "secBarracks">> <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> <<set $militiaFreeManpower -= $militiaUnits[_i].maxTroops - $militiaUnits[_i].troops>> @@ -441,8 +444,9 @@ __Militia__ <<set $militiaUnits = _newMilitiaUnits>> <<set $activeUnits-->> <</link>> - | + <<if $militiaFreeManpower > 0>> + | <<link "Reform the unit" "secBarracks">> <<if $militiaFreeManpower >= $militiaUnits[_i].maxTroops>> <<set $militiaEmployedManpower += $militiaUnits[_i].maxTroops>> @@ -553,8 +557,9 @@ __Mercenaries__ <<set $targetUnit = "mercUnits">> <<set $targetIndex = _i>> <</link>> - | + <<if $mercUnits[_i].troops < $mercUnits[_i].maxTroops && $mercFreeManpower > 0>> + | <<link "Replenish unit" "secBarracks">> <<if $mercFreeManpower >= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> <<set $mercFreeManpower -= $mercUnits[_i].maxTroops - $mercUnits[_i].troops>> @@ -588,8 +593,9 @@ __Mercenaries__ <<set $mercUnits = _newMercUnits>> <<set $activeUnits-->> <</link>> - | + <<if $mercFreeManpower > 0>> + | <<link "Reform the unit" "secBarracks">> <<if $mercFreeManpower >= $mercUnits[_i].maxTroops>> <<set $mercEmployedManpower += $mercUnits[_i].maxTroops>> diff --git a/src/SpecialForce/Proposal.tw b/src/SpecialForce/Proposal.tw index e583110b1a3a8c28c4f2ea4c790e6bbe010cde4d..359ef9229420911b96e01a49c948757d74cc1f06 100644 --- a/src/SpecialForce/Proposal.tw +++ b/src/SpecialForce/Proposal.tw @@ -23,7 +23,7 @@ ROE:"hold", Target:"recruit", Regs:"strict", Caps:"The Special Force", Lower:"the special force", Subsidy:1})>> <<set $cash -= _price>> <<set $SFUnit = Object.assign({}, $SFUnit, {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, - Drugs:0, PGT:0, AA:0, AT:0, SpacePlane:0, GunS:0, Satellite:0, GiantRobot:0, MissileSilo:0, + Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:0, GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0})>> <<set $arcologies[0].SFRaid = 1,$arcologies[0].SFRaidTarget = -1>> <<set $SFColonel = Object.assign({}, $SFColonel, {Core:"", Talk:0, Fun:0, Status:0})>> <<set $SFTradeShow = Object.assign({}, $SFTradeShow, {History:0, CanAttend:0, diff --git a/src/js/economyJS.tw b/src/js/economyJS.tw index 05f32a6caefc6c28f6a38599876aadea0fcf5c9e..c5db2859d0fc329d71af654efefe2cc3caf0ac6e 100644 --- a/src/js/economyJS.tw +++ b/src/js/economyJS.tw @@ -326,7 +326,7 @@ window.getCost = function(array) { } if(State.variables.SF.Toggle && State.variables.SF.Active >= 1 && State.variables.SF.Subsidy) { - costs += Math.ceil((10000*(State.variables.SFUnit.Troops/10))*1+(State.variables.arcologies[0].prosperity/100)*1+(State.variables.SF.Units/100)); + costs += Math.ceil( (10000*(State.variables.SFUnit.Troops/10))+(1+(State.variables.arcologies[0].prosperity/100))+(1+(State.variables.SF.Units/100)) ); } // clean up if(costs < 0) { diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 65a33648a747e227b4efa446f9fcffd4b9a95cc6..587897030fe5a23f32658a66741f0ea9858107c3 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -1044,6 +1044,12 @@ <<set $SF.Facility = Object.assign({}, $SF.Facility, {Toggle:0, Active:0, LC:0, Workers:0, Max:5, Caps:"Special force support facility", Lower:"special force support facility", Decoration:"standard", Speed:0, Upgrade:0, IDs:[]})>> <</if>> <</if>> +<<if def $SFUnit>> + <<if def $SFUnit.AT>> + <<run delete $SFUnit.AT>> + <<set $SFUnit.TA = 0>> + <</if>> +<</if>> <<if ndef $useSlaveSummaryTabs>> <<set $useSlaveSummaryTabs = 0>> diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw index 5dded971f9c727399d09718e9e5e84f49252dee4..f2078f269f76bd51afa0ca82d437176d959f9376 100644 --- a/src/uncategorized/RESS.tw +++ b/src/uncategorized/RESS.tw @@ -6685,7 +6685,8 @@ $He cranes her neck, glancing over her shoulder to give you a pleading look. <</if>> <</replace>> <</link>><<if ($activeSlave.anus == 0 && canDoAnal($activeSlave)) || ($activeSlave.vagina == 0 && canDoVaginal($activeSlave))>> //This option will take virginity//<</if>> -<<if ($cumSlaves >= 5)>> +<<set _cumSlaves = $slaves.filter(function(s) { return s.assignment == "work in the dairy" && s.balls > 0 && isSlaveAvailable(s) && canPenetrate(s); })>> +<<if _cumSlaves.length >= 5>> <br><<link "Replace the machines with cockmilkees from the Dairy">> <<EventNameDelink $activeSlave>> <<replace "#result">> @@ -6700,18 +6701,17 @@ $He cranes her neck, glancing over her shoulder to give you a pleading look. <</if>> <<set $activeSlave.devotion += 4>> <<set _totalFuckers = 0>> - <<for _RESS = 0; _RESS < $slaves.length; _RESS++>> - <<if $slaves[_RESS].assignment == "work in the dairy" && $slaves[_RESS].balls != 0 && canPenetrate($slaves[_RESS])>> - <<set $slaves[_RESS].devotion += 4, $slaves[_RESS].penetrativeCount++>> - <<set $penetrativeTotal++, _totalFuckers++>> - <<if canImpreg($activeSlave, $slaves[_RESS])>> - <<if canDoAnal($activeSlave) && canDoVaginal($activeSlave)>> - <<= knockMeUp($activeSlave, 5, 2, $slaves[_RESS].ID)>> - <<elseif canDoVaginal($activeSlave)>> - <<= knockMeUp($activeSlave, 5, 0, $slaves[_RESS].ID)>> - <<elseif canDoAnal($activeSlave)>> - <<= knockMeUp($activeSlave, 5, 1, $slaves[_RESS].ID)>> - <</if>> + <<for _ress = 0; _ress < _cumSlaves.length; _ress++>> + <<set _RESS = $slaveIndices[_cumSlaves[_ress].ID]>> + <<set $slaves[_RESS].devotion += 4, $slaves[_RESS].penetrativeCount++>> + <<set $penetrativeTotal++, _totalFuckers++>> + <<if canImpreg($activeSlave, $slaves[_RESS])>> + <<if canDoAnal($activeSlave) && canDoVaginal($activeSlave)>> + <<= knockMeUp($activeSlave, 5, 2, $slaves[_RESS].ID)>> + <<elseif canDoVaginal($activeSlave)>> + <<= knockMeUp($activeSlave, 5, 0, $slaves[_RESS].ID)>> + <<elseif canDoAnal($activeSlave)>> + <<= knockMeUp($activeSlave, 5, 1, $slaves[_RESS].ID)>> <</if>> <</if>> <</for>> diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw index 38a57dfda34649e3049ec7fa47893b35fe05365e..c3ace6928c139430e16d09524bcac14ad2f1c767 100644 --- a/src/uncategorized/costsReport.tw +++ b/src/uncategorized/costsReport.tw @@ -32,7 +32,7 @@ your __personal living expenses__ are <<print cashFormat(($girls*(250+($economy* <<if $breederOrphanageTotal > 0>><<set _breederTuition = 50>><<else>><<set _breederTuition = 0>><</if>> <<if $citizenOrphanageTotal+$privateOrphanageTotal+$breederOrphanageTotal > 0>> - __Orphanage__ fee: @@.yellowgreen;<<print cashFormat($citizenOrphanageTotal*100+$privateOrphanageTotal*500+_breederTuition)>>@@ + <br> __Orphanage__ fee: @@.yellowgreen;<<print cashFormat($citizenOrphanageTotal*100+$privateOrphanageTotal*500+_breederTuition)>>@@ <<if $citizenOrphanageTotal > 0>> <br> Citizen: @@.yellowgreen;<<print cashFormat(100)>>@@ per child. Currently <<print commaNum($citizenOrphanageTotal)>> are being taught, bringing the total to @@.yellowgreen;<<print cashFormat($citizenOrphanageTotal*100)>>@@. <</if>> @@ -45,11 +45,11 @@ your __personal living expenses__ are <<print cashFormat(($girls*(250+($economy* <</if>> <<if $peacekeepers != 0 && $peacekeepers.undermining != 0>> - <<print cashFormat($peacekeepers.undermining)>> to undermine political support for the nearby old world peacekeeping mission. + <br> <<print cashFormat($peacekeepers.undermining)>> to undermine political support for the nearby old world peacekeeping mission. <</if>> <<if $SF.Toggle && $SF.Active >= 1 && $SF.Subsidy>> - <br>__Finacinally supporting $SF.Caps unitll self sufficiency:__ <<print cashFormat(Math.ceil((10000*($SFUnit.Troops/10))*1+($arcologies[0].prosperity/100)*1+($SF.Units/100)))>> + <br>__Finacinally supporting $SF.Caps unitll self sufficiency:__ <<print cashFormat(Math.ceil( (10000*($SFUnit.Troops/10))+(1+($arcologies[0].prosperity/100))+(1+($SF.Units/100)) ))>> <</if>> <<if $mercenaries > 0>> <<set _mercCosts = $mercenaries*2000>> diff --git a/src/uncategorized/genericPlotEvents.tw b/src/uncategorized/genericPlotEvents.tw index 9f0579359463153e120cd04995dd83c123c581fb..4ac76364f039ac0e5626031c5a44dc46ce3f11d1 100644 --- a/src/uncategorized/genericPlotEvents.tw +++ b/src/uncategorized/genericPlotEvents.tw @@ -1074,7 +1074,6 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your are extremely grateful, though they would be less hopeful if they knew the true nature of the aircraft coming to retrieve them. <<set $PAid = 1>> <<set $cash -= _price>> - <</if>> <</replace>> <</link>> //This will cost <<print cashFormat(_price)>>// diff --git a/src/uncategorized/randomIndividualEvent.tw b/src/uncategorized/randomIndividualEvent.tw index fd287d76a0b66432a50b214993e0e3ec06b90972..75978ee01a4d8d5f6e181032a90a2efb21e968cd 100644 --- a/src/uncategorized/randomIndividualEvent.tw +++ b/src/uncategorized/randomIndividualEvent.tw @@ -86,6 +86,13 @@ <</if>> <</if>> <</if>> + <<if $slaves[$i].anus > 0 && canDoAnal($slaves[$i])>> + <<if $slaves[$i].devotion > 50>> + <<if $slaves[$i].amp == 0>> + <<set $RERepressedAnalVirginSubIDs.push($slaves[$i].ID)>> + <</if>> + <</if>> + <</if>> <</if>> <<if $slaves[$i].assignmentVisible == 1>> <<if $slaves[$i].livingRules == "luxurious">> @@ -96,13 +103,6 @@ <</if>> <</if>> <</if>> - <<if $slaves[$i].anus > 0 && canDoAnal($slaves[$i])>> - <<if $slaves[$i].devotion > 50>> - <<if $slaves[$i].amp == 0>> - <<set $RERepressedAnalVirginSubIDs.push($slaves[$i].ID)>> - <</if>> - <</if>> - <</if>> <</if>> <</if>> <<if $slaves[$i].assignment == "work in the dairy" || $slaves[$i].assignment == "get milked">>