mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-09-20 19:11:46 +00:00
reality autobuyer, fix tick of unupdated production after reality
This commit is contained in:
parent
8a07daea14
commit
a4a7a341ae
140
index.html
140
index.html
|
@ -1999,77 +1999,89 @@
|
|||
<button class="storebtn" id="togglebulk" style="font-size: 100%; width: 150px; height: 40px;margin: 3px" onclick="toggleBulk()">Disable bulk buy </button>
|
||||
<button class="storebtn" id="togglecrunchmode" style="font-size: 100%; width: 150px; height: 40px;margin: 3px; display: none" onclick="toggleCrunchMode()">Auto crunch mode: amount</button>
|
||||
<button class="storebtn" id="toggleeternitymode" style="font-size: 100%; width: 150px; height: 40px;margin: 3px; display: none" onclick="toggleEternityMode()">Auto eternity mode: amount</button>
|
||||
<button class="storebtn" id="togglerealitymode" style="font-size: 100%; width: 150px; height: 40px;margin: 3px; display: none" onclick="toggleRealityMode()">Auto reality mode: RM</button>
|
||||
<br>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" style="opacity: 0">
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" id="autoBuyerEter">
|
||||
<div>Automatic Eternity</div><br>
|
||||
<div><span id="eternitylimittext">Amount of EP to wait until reset:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="priority13"></input></div>
|
||||
<br>
|
||||
<span style="font-size: 80%">Is active:</span>
|
||||
<input type="checkbox" class="checkbox" onchange="updateAutobuyers()" id="eternityison"></input>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" id="autoBuyerReality">
|
||||
<div>Automatic Reality</div><br>
|
||||
<div><span>Target reality machines:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="priority14"></input></div>
|
||||
<div><span>Target glyph level:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="priority15"></input></div>
|
||||
<br>
|
||||
<span style="font-size: 80%">Is active:</span>
|
||||
<input type="checkbox" class="checkbox" onchange="updateAutobuyers()" id="realityison"></input>
|
||||
</div>
|
||||
</td>
|
||||
</td>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" style="opacity: 0"></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" id="autoBuyerEter" style="margin-left: -268px;">
|
||||
<div>Automatic Eternity</div><br>
|
||||
<div><span id="eternitylimittext">Amount of EP to wait until reset:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="priority13"></input></div>
|
||||
<br>
|
||||
<span style="font-size: 80%">Is active:</span>
|
||||
<input type="checkbox" class="checkbox" onchange="updateAutobuyers()" id="eternityison"></input>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" id="autoBuyerDimBoost" style="font-size: 11px;">
|
||||
<div>Automatic DimBoosts</div>
|
||||
<button class="autobuyerbtn" id="buyerBtnDimBoost">46% smaller interval<br>Cost: 2 points</button>
|
||||
<div style="font-size: 80%"id="intervalDimBoost">Current interval: 30 seconds</div>
|
||||
<span style="font-size: 80%">Max DimBoosts:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="priority10"></input>
|
||||
<br>
|
||||
<span style="font-size: 80%">Galaxies required to always Dimboost:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="overGalaxies"></input>
|
||||
<br>
|
||||
<div id="bulkdimboost">
|
||||
<span style="font-size: 80%" id="bulklabel">Bulk DimBoost amount:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="bulkDimboost"></input>
|
||||
</div>
|
||||
<br>
|
||||
<span style="font-size: 80%">Is active:</span>
|
||||
<input type="checkbox" class="checkbox" onchange="updateAutobuyers()" id="10ison"></input>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" id="autoBuyerDimBoost" style="font-size: 11px;">
|
||||
<div>Automatic DimBoosts</div>
|
||||
<button class="autobuyerbtn" id="buyerBtnDimBoost">46% smaller interval<br>Cost: 2 points</button>
|
||||
<div style="font-size: 80%"id="intervalDimBoost">Current interval: 30 seconds</div>
|
||||
<span style="font-size: 80%">Max DimBoosts:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="priority10"></input>
|
||||
<br>
|
||||
<span style="font-size: 80%">Galaxies required to always Dimboost:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="overGalaxies"></input>
|
||||
<br>
|
||||
<div id="bulkdimboost">
|
||||
<span style="font-size: 80%" id="bulklabel">Bulk DimBoost amount:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="bulkDimboost"></input>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" id="autoBuyerGalaxies">
|
||||
<div>Automatic Galaxies</div>
|
||||
<button class="autobuyerbtn" id="buyerBtnGalaxies">46% smaller interval<br>Cost: 2 points</button>
|
||||
<div style="font-size: 80%"id="intervalGalaxies">Current interval: 30 seconds</div>
|
||||
<span>Max Galaxies:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="priority11"></input>
|
||||
<br>
|
||||
<div id="galaxybulk" style="display: none">
|
||||
<span style="font-size: 80%">Buy max galaxies every X seconds (0 to always buy):</span>
|
||||
<input type="text" onchange="updatePriorities()" id="bulkgalaxy"></input>
|
||||
</div>
|
||||
<br>
|
||||
<span style="font-size: 80%">Is active:</span>
|
||||
<input type="checkbox" class="checkbox" onchange="updateAutobuyers()" id="11ison"></input>
|
||||
<br>
|
||||
<span style="font-size: 80%">Is active:</span>
|
||||
<input type="checkbox" class="checkbox" onchange="updateAutobuyers()" id="10ison"></input>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" id="autoBuyerGalaxies">
|
||||
<div>Automatic Galaxies</div>
|
||||
<button class="autobuyerbtn" id="buyerBtnGalaxies">46% smaller interval<br>Cost: 2 points</button>
|
||||
<div style="font-size: 80%"id="intervalGalaxies">Current interval: 30 seconds</div>
|
||||
<span>Max Galaxies:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="priority11"></input>
|
||||
<br>
|
||||
<div id="galaxybulk" style="display: none">
|
||||
<span style="font-size: 80%">Buy max galaxies every X seconds (0 to always buy):</span>
|
||||
<input type="text" onchange="updatePriorities()" id="bulkgalaxy"></input>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" id="autoBuyerInf">
|
||||
<div>Automatic Big Crunch</div>
|
||||
<button class="autobuyerbtn" id="buyerBtnInf">46% smaller interval<br>Cost: 2 points</button>
|
||||
<div style="font-size: 80%"id="intervalInf">Current interval: 60 seconds</div>
|
||||
<div id="iplimit"><span id="limittext">Amount of IP to wait until reset:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="priority12"></input></div>
|
||||
<br>
|
||||
<span style="font-size: 80%">Is active:</span>
|
||||
<input type="checkbox" class="checkbox" onchange="updateAutobuyers()" id="12ison"></input>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<br>
|
||||
<span style="font-size: 80%">Is active:</span>
|
||||
<input type="checkbox" class="checkbox" onchange="updateAutobuyers()" id="11ison"></input>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" id="autoBuyerInf">
|
||||
<div>Automatic Big Crunch</div>
|
||||
<button class="autobuyerbtn" id="buyerBtnInf">46% smaller interval<br>Cost: 2 points</button>
|
||||
<div style="font-size: 80%"id="intervalInf">Current interval: 60 seconds</div>
|
||||
<div id="iplimit"><span id="limittext">Amount of IP to wait until reset:</span>
|
||||
<input type="text" onchange="updatePriorities()" id="priority12"></input></div>
|
||||
<br>
|
||||
<span style="font-size: 80%">Is active:</span>
|
||||
<input type="checkbox" class="checkbox" onchange="updateAutobuyers()" id="12ison"></input>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="autoBuyerDiv" id="autoBuyer1">
|
||||
|
@ -2465,7 +2477,7 @@
|
|||
<td><div class="realityUpgrade" onclick="buyRealityUpg(22)" id="rupg22"><b>Requires: 1e85 DT</b><br>Some time based multiplier to TD, Currently Xx<br>Cost: 100,000 RM</div></td>
|
||||
<td><div class="realityUpgrade" onclick="buyRealityUpg(23)" id="rupg23"><b>Requires: Reality in under 15 minutes</b><br>Eternity multipliers affect eternity generation<br>Cost: 100,000 RM</div></td>
|
||||
<td><div class="realityUpgrade" onclick="buyRealityUpg(24)" id="rupg24"><b>Requires: Reality for 5000 RM without glyphs</b><br>Gain another glyph slot<br>Cost: 100,000 RM</div></td>
|
||||
<td><div class="realityUpgrade" onclick="buyRealityUpg(25)" id="rupg25"><b>Requires: Gain 1e10500 EP</b><br>Reality autobuyer (not implemented)<br>Cost: 100,000 RM</div></td>
|
||||
<td><div class="realityUpgrade" onclick="buyRealityUpg(25)" id="rupg25"><b>Requires: Gain 1e10500 EP</b><br>Reality autobuyer<br>Cost: 100,000 RM</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -189,6 +189,7 @@ function onLoad() {
|
|||
$("#ttautobuyer").text(player.ttbuyer ? "Automator: ON" : "Automator: OFF")
|
||||
|
||||
if (player.autoEternityMode === undefined) player.autoEternityMode = "amount";
|
||||
if (player.autoRealityMode === undefined) player.autoRealityMode = "rm";
|
||||
Theme.set(player.options.theme);
|
||||
|
||||
if (player.secretUnlocks.fixed === "hasbeenfixed") {
|
||||
|
@ -433,10 +434,17 @@ if (player.version < 5) {
|
|||
|
||||
if (player.replicanti.auto === undefined) player.replicanti.auto = [false, false, false]
|
||||
if (player.eternityBuyer === undefined) {
|
||||
player.eternityBuyer = {
|
||||
limit: new Decimal(0),
|
||||
isOn: false
|
||||
}
|
||||
player.eternityBuyer = {
|
||||
limit: new Decimal(0),
|
||||
isOn: false
|
||||
}
|
||||
}
|
||||
if (player.realityBuyer === undefined) {
|
||||
player.realityBuyer = {
|
||||
rm: new Decimal(0),
|
||||
glyph: 0,
|
||||
isOn: false
|
||||
}
|
||||
}
|
||||
|
||||
transformSaveToDecimal();
|
||||
|
@ -641,6 +649,13 @@ if (player.version < 5) {
|
|||
toggleCrunchMode()
|
||||
toggleCrunchMode()
|
||||
toggleCrunchMode()
|
||||
toggleEternityMode()
|
||||
toggleEternityMode()
|
||||
toggleEternityMode()
|
||||
toggleRealityMode()
|
||||
toggleRealityMode()
|
||||
toggleRealityMode()
|
||||
toggleRealityMode()
|
||||
updateCheckBoxes()
|
||||
loadAutoBuyerSettings()
|
||||
|
||||
|
@ -910,6 +925,7 @@ function transformSaveToDecimal() {
|
|||
player.epmultCost = new Decimal(player.epmultCost)
|
||||
player.epmult = new Decimal(player.epmult)
|
||||
player.eternityBuyer.limit = new Decimal(player.eternityBuyer.limit)
|
||||
player.realityBuyer.rm = new Decimal(player.realityBuyer.rm)
|
||||
player.eternityChallGoal = new Decimal(player.eternityChallGoal)
|
||||
player.replicanti.amount = new Decimal(player.replicanti.amount)
|
||||
|
||||
|
@ -954,6 +970,8 @@ function loadAutoBuyerSettings() {
|
|||
document.getElementById("prioritySac").value = player.autoSacrifice.priority
|
||||
document.getElementById("bulkgalaxy").value = player.autobuyers[10].bulk
|
||||
document.getElementById("priority13").value = player.eternityBuyer.limit
|
||||
document.getElementById("priority14").value = player.realityBuyer.rm
|
||||
document.getElementById("priority15").value = player.realityBuyer.glyph
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -248,6 +248,7 @@ var player = {
|
|||
infMultBuyer: false,
|
||||
autoCrunchMode: "amount",
|
||||
autoEternityMode: "amount",
|
||||
autoRealityMode: "amount",
|
||||
respec: false,
|
||||
eternityBuyer: {
|
||||
limit: new Decimal(0),
|
||||
|
@ -276,6 +277,11 @@ var player = {
|
|||
realities: 0,
|
||||
thisReality: 0,
|
||||
bestReality: 999999999999,
|
||||
realityBuyer: {
|
||||
rm: new Decimal(0),
|
||||
glyph: 0,
|
||||
isOn: false
|
||||
},
|
||||
reality: {
|
||||
realityMachines: new Decimal(0),
|
||||
glyphs: {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
function reality(force, reset) {
|
||||
function reality(force, reset, auto) {
|
||||
if (!((player.eternityPoints.gte("1e4000") && player.dilation.studies.includes(6) && (glyphSelected || realizationCheck === 1 || !player.options.confirmations.reality || confirm("Reality will reset everything except challenge records, and will lock your achievements, which you will regain over the course of 2 days. You will also gain reality machines based on your EP, a glyph with a power level based on your EP, Replicanti, and Dilated Time, and unlock various upgrades."))) || force)) {
|
||||
return;
|
||||
}
|
||||
if (!glyphSelected && player.reality.perks.includes(0)) {
|
||||
if (!glyphSelected && player.reality.perks.includes(0) && !auto) {
|
||||
possibleGlyphs.push(generateRandomGlyph(gainedGlyphLevel()));
|
||||
setTimeout(function() {
|
||||
possibleGlyphs.push(generateRandomGlyph(gainedGlyphLevel()))
|
||||
|
@ -19,7 +19,7 @@ function reality(force, reset) {
|
|||
}, 100);
|
||||
return
|
||||
}
|
||||
if ((player.options.animations.reality) && realizationCheck === 0) {
|
||||
if ((player.options.animations.reality) && realizationCheck === 0 && !auto) {
|
||||
realizationCheck = 1;
|
||||
document.getElementById("container").style.animation = "realize 10s 1";
|
||||
document.getElementById("realityanimbg").style.animation = "realizebg 10s 1";
|
||||
|
@ -39,7 +39,7 @@ function reality(force, reset) {
|
|||
return
|
||||
}
|
||||
realizationCheck = 0;
|
||||
if (!player.reality.perks.includes(0) && !reset) player.reality.glyphs.inventory.push(generateRandomGlyph(gainedGlyphLevel()));
|
||||
if ((!player.reality.perks.includes(0) || auto) && !reset) player.reality.glyphs.inventory.push(generateRandomGlyph(gainedGlyphLevel()));
|
||||
if (player.thisReality < player.bestReality && !force) {
|
||||
player.bestEternity = player.thisEternity
|
||||
}
|
||||
|
@ -78,6 +78,19 @@ function reality(force, reset) {
|
|||
if (player.reality.respec) {
|
||||
respecGlyphs();
|
||||
}
|
||||
|
||||
//reset global values to avoid a tick of unupdated production
|
||||
totalMult = 1;
|
||||
currentMult = 1;
|
||||
infinitiedMult = 1;
|
||||
achievementMult = 1;
|
||||
challengeMult = 1;
|
||||
unspentBonus = 1;
|
||||
infDimPow = 1;
|
||||
postc8Mult = new Decimal(0);
|
||||
mult18 = new Decimal(1);
|
||||
ec10bonus = new Decimal(1);
|
||||
|
||||
player.sacrificed = new Decimal(0);
|
||||
player.challenges = player.reality.upg.includes(10) ? ["challenge1", "challenge2", "challenge3", "challenge4", "challenge5", "challenge6", "challenge7", "challenge8", "challenge9", "challenge10", "challenge11", "challenge12"] : [];
|
||||
player.currentChallenge = "";
|
||||
|
|
|
@ -905,6 +905,22 @@ function toggleEternityMode() {
|
|||
}
|
||||
}
|
||||
|
||||
function toggleRealityMode() {
|
||||
if (player.autoRealityMode == "rm") {
|
||||
player.autoRealityMode = "glyph"
|
||||
document.getElementById("togglerealitymode").textContent = "Auto reality mode: glyph level"
|
||||
} else if (player.autoRealityMode == "glyph"){
|
||||
player.autoRealityMode = "either"
|
||||
document.getElementById("togglerealitymode").textContent = "Auto reality mode: either"
|
||||
} else if (player.autoRealityMode == "either"){
|
||||
player.autoRealityMode = "both"
|
||||
document.getElementById("togglerealitymode").textContent = "Auto reality mode: both"
|
||||
} else {
|
||||
player.autoRealityMode = "rm"
|
||||
document.getElementById("togglerealitymode").textContent = "Auto reality mode: reality machines"
|
||||
}
|
||||
}
|
||||
|
||||
buyAutobuyer = function(id) {
|
||||
if (player.infinityPoints.lt(player.autobuyers[id].cost)) return false;
|
||||
if (player.autobuyers[id].bulk >= 1e100) return false;
|
||||
|
@ -1347,6 +1363,10 @@ function updateAutobuyers() {
|
|||
document.getElementById("autoBuyerEter").style.display = "none"
|
||||
}
|
||||
|
||||
if (!player.reality.upg.includes(25)) {
|
||||
document.getElementById("autoBuyerReality").style.display = "none"
|
||||
}
|
||||
|
||||
if (player.infinityUpgrades.includes("autoBuyerUpgrade")) {
|
||||
document.getElementById("interval1").textContent = "Current interval: " + (player.autobuyers[0].interval/2000).toFixed(2) + " seconds"
|
||||
document.getElementById("interval2").textContent = "Current interval: " + (player.autobuyers[1].interval/2000).toFixed(2) + " seconds"
|
||||
|
@ -1443,6 +1463,7 @@ function updateAutobuyers() {
|
|||
|
||||
player.autoSacrifice.isOn = document.getElementById("13ison").checked
|
||||
player.eternityBuyer.isOn = document.getElementById("eternityison").checked
|
||||
player.realityBuyer.isOn = document.getElementById("realityison").checked
|
||||
priorityOrder()
|
||||
}
|
||||
|
||||
|
@ -1596,6 +1617,9 @@ function updatePriorities() {
|
|||
player.autobuyers[10].bulk = parseFloat(document.getElementById("bulkgalaxy").value)
|
||||
const eterValue = fromValue(document.getElementById("priority13").value)
|
||||
if (!isNaN(eterValue)) player.eternityBuyer.limit = eterValue
|
||||
const realityValue1 = fromValue(document.getElementById("priority14").value)
|
||||
if (!isNaN(realityValue1)) player.realityBuyer.rm = realityValue1
|
||||
player.realityBuyer.glyph = parseInt(document.getElementById("priority15").value)
|
||||
|
||||
priorityOrder()
|
||||
}
|
||||
|
@ -1610,6 +1634,7 @@ function updateCheckBoxes() {
|
|||
if (player.autoSacrifice.isOn) document.getElementById("13ison").checked = "true"
|
||||
else document.getElementById("13ison").checked = ""
|
||||
document.getElementById("eternityison").checked = player.eternityBuyer.isOn
|
||||
document.getElementById("realityison").checked = player.realityBuyer.isOn
|
||||
|
||||
}
|
||||
|
||||
|
@ -1623,6 +1648,7 @@ function toggleAutoBuyers() {
|
|||
}
|
||||
player.autoSacrifice.isOn = !bool
|
||||
player.eternityBuyer.isOn = !bool
|
||||
player.realityBuyer.isOn = !bool
|
||||
updateCheckBoxes()
|
||||
updateAutobuyers()
|
||||
}
|
||||
|
@ -2360,6 +2386,9 @@ setInterval(function() {
|
|||
if (player.eternities >= 80) document.getElementById("replauto3").style.visibility = "visible"
|
||||
else document.getElementById("replauto3").style.visibility = "hidden"
|
||||
if (player.eternities >= 100) document.getElementById("autoBuyerEter").style.display = "inline-block"
|
||||
if (player.reality.upg.includes(25)) {
|
||||
document.getElementById("autoBuyerReality").style.display = "inline-block"
|
||||
}
|
||||
|
||||
|
||||
// EC goal IP text
|
||||
|
@ -2468,6 +2497,10 @@ setInterval(function() {
|
|||
document.getElementById("epmultbuyer").style.display = "none"
|
||||
}
|
||||
|
||||
if (player.reality.upg.includes(25)) document.getElementById("togglerealitymode").style.display = "inline-block"
|
||||
else document.getElementById("togglerealitymode").style.display = "none"
|
||||
|
||||
|
||||
updateRealityUpgrades()
|
||||
|
||||
if (player.totalTimePlayed > 1000 * 60 * 60 * 24 * 365 * 2) unlockRealityUpgrade(20)
|
||||
|
@ -3481,6 +3514,18 @@ function autoBuyerTick() {
|
|||
}
|
||||
}
|
||||
|
||||
if (player.reality.upg.includes(25) && player.realityBuyer.isOn ) {
|
||||
if (player.autoRealityMode == "rm") {
|
||||
if (gainedRealityMachines().gte(player.realityBuyer.rm)) reality(false, false, true)
|
||||
} else if (player.autoRealityMode == "glyph") {
|
||||
if (gainedGlyphLevel() >= player.realityBuyer.glyph) reality(false, false, true)
|
||||
} else if (player.autoRealityMode == "either") {
|
||||
if (gainedGlyphLevel() >= player.realityBuyer.glyph || gainedRealityMachines().gte(player.realityBuyer.rm)) reality(false, false, true)
|
||||
} else if (player.autoRealityMode == "both") {
|
||||
if (gainedGlyphLevel() >= player.realityBuyer.glyph && gainedRealityMachines().gte(player.realityBuyer.rm)) reality(false, false, true)
|
||||
}
|
||||
}
|
||||
|
||||
if (player.autobuyers[11]%1 !== 0) {
|
||||
if (player.autobuyers[11].ticks*100 >= player.autobuyers[11].interval && player.money.gte(Number.MAX_VALUE)) {
|
||||
if (player.autobuyers[11].isOn) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user