diff --git a/src/js/storyJS.tw b/src/js/storyJS.tw index a1c9a19c4b3e42d46df69fdcb0e8e08e810a098f..40cd00653224f1255ac7d17806a7b4d6889d089e 100644 --- a/src/js/storyJS.tw +++ b/src/js/storyJS.tw @@ -1327,6 +1327,23 @@ window.totalPlayerRelatives = function(pc) { return relatives }; +window.isVegetable = function(slave) { + slave = slave || State.variables.activeSlave; + if(!slave) { return false; } + return (slave.fetish === 'mindbroken'); +}; + +window.repGainSacrifice = function(slave, arcology) { + slave = slave || State.variables.activeSlave; + arcology = arcology || State.variables.arcologies[0]; + if(!slave || !arcology || arcology.FSAztecRevivalist === "unset" || arcology.FSAztecRevivalist <= 0) { + return 0; + } + return Math.ceil( + (Math.min(100, Math.pow(1.0926, State.variables.week - slave.weekAcquired)) + slave.prestige * 30) + * arcology.FSAztecRevivalist / 100 / ((State.variables.slavesSacrificedThisWeek || 0) + 1)); +}; + window.ngUpdateGenePool = function(genePool) { var transferredSlaveIds = (SugarCube.State.variables.slaves || []) .filter(function(s) { return s.ID >= 1200000; }) diff --git a/src/societies/aztec/slaveSacrifice.tw b/src/societies/aztec/slaveSacrifice.tw new file mode 100644 index 0000000000000000000000000000000000000000..7e03c4fb2fa77a799f7c79dd256d68134baa17b5 --- /dev/null +++ b/src/societies/aztec/slaveSacrifice.tw @@ -0,0 +1,17 @@ +:: Aztec Slave Sacrifice + +<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Main", $showEncyclopedia = 1, $encyclopedia = "Aztec Revivalism">> +<<SlavePronouns $activeSlave>> + +<<set _activeSlaveRepSacrifice = repGainSacrifice()>> + +$pronounCap dies screaming as $possessive still beating heart is ripped out of $possessive body. <<if _activeSlaveRepSacrifice <= 0>>Nobody cares.<<elseif _activeSlaveRepSacrifice < 10>>The few spectators are suitably impressed.<<elseif _activeSlaveRepSacrifice < 100>>The small crowd appreciates your devotion to the Aztec culture.<<else>>The crowd cheers to the bloody spectacle.<</if>><<if $slaves.length > 0>> On the other hand, your remaining <<if $slaves.length == 1>>slave is<<else>>slaves are<</if>> suitably @@.gold;horrified@@.<</if>> + +<<set $rep = Math.min(20000, $rep + _activeSlaveRepSacrifice)>> +<<run $slaves.filter(function(s) { return !isVegetable(s); }).forEach(function(s) { s.trust -= 5 + random(5); })>> +<<if $arcologies[0].FSAztecRevivalist !== "unset" && $arcologies[0].FSAztecRevivalist < 100>> + <<set $arcologies[0].FSAztecRevivalist += 1>> +<</if>> +<<set $slavesSacrificedThisWeek = ($slavesSacrificedThisWeek || 0) + 1>> + +<<include "Remove activeSlave">> diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw index 202c98d111a7ec7108d001f6810545dff3810faa..6c927853acf07af71b626f9d18496ce6e3adc4fe 100644 --- a/src/uncategorized/nextWeek.tw +++ b/src/uncategorized/nextWeek.tw @@ -209,7 +209,7 @@ <</if>> <</if>> -<<set $coursed = 0, $eventDescription = 0, $manuallyRetired = 0, $pitFought = 0, $preOwnedViewed = 0, $prestigeAuctioned = 0, $repGain = 0, $shelterSlave = 0, $shelterSlaveBought = 0, $slaveMarketLimit = 10 + ($rep / 1000), $slavesSeen = 0>> +<<set $coursed = 0, $eventDescription = 0, $manuallyRetired = 0, $pitFought = 0, $preOwnedViewed = 0, $prestigeAuctioned = 0, $repGain = 0, $shelterSlave = 0, $shelterSlaveBought = 0, $slaveMarketLimit = 10 + ($rep / 1000), $slavesSeen = 0, $slavesSacrificedThisWeek = 0>> /% These are variables that either should be made into _temp vars or should be Zeroed out once done with them instead of here. This can also interfere with debugging or hide NaN's as zeroing things out would clear a NaN. Also could stop from NaN's getting worse? %/ /% Integer and float variables. No real need to zero them out but doesn't hurt to have them in a known state, though this might mask variables NaN'ing out. Takes up the least amount of Memory besides a "" string. %/ diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index 4e4f6a3dc682b2a5587593d4bde9f3677e18b453..cf1d0a3e8fd401f1d71739e26d7363d163bcd167 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -311,6 +311,10 @@ | <<link "Fuck its rear hole">><<replace "#miniscene">><<FFuckdollAnal>><br><</replace>><</link>> <</if>> <</if>> +<<set _activeSlaveRepSacrifice = repGainSacrifice()>> +<<if _activeSlaveRepSacrifice > 0>> + | [[Sacrifice her on the altar|Aztec Slave Sacrifice]] //This will kill her and gain you _activeSlaveRepSacrifice reputation// +<</if>> /* pregmod start */ <<if $familyTesting == 1>>