mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-11-10 14:12:02 +00:00
add enslaved
This commit is contained in:
parent
2116fadbac
commit
32454bcf90
@ -560,6 +560,7 @@
|
||||
|
||||
<script type="text/javascript" src="javascripts/core/celestials/effarig.js"></script>
|
||||
<script type="text/javascript" src="javascripts/core/celestials/teresa.js"></script>
|
||||
<script type="text/javascript" src="javascripts/core/celestials/enslaved.js"></script>
|
||||
|
||||
<script type="text/javascript" src="javascripts/components/challenges/challenges-tab.js"></script>
|
||||
<script type="text/javascript" src="javascripts/components/challenges/challenge-box.js"></script>
|
||||
|
@ -14,16 +14,16 @@ Vue.component('celestials-tab', {
|
||||
component: "teresa-tab",
|
||||
condition: function() { return this.teresaUnlocked }.bind(this)
|
||||
},
|
||||
{
|
||||
name: "V",
|
||||
id: "V",
|
||||
component: "v-tab",
|
||||
condition: function() { return false }
|
||||
},
|
||||
{
|
||||
name: "The Enslaved Ones",
|
||||
id: "Enslaved",
|
||||
component: "enslaved-tab",
|
||||
condition: function() { return true }
|
||||
},
|
||||
{
|
||||
name: "V",
|
||||
id: "V",
|
||||
component: "v-tab",
|
||||
condition: function() { return false }
|
||||
},
|
||||
{
|
||||
|
@ -1,16 +1,31 @@
|
||||
Vue.component('enslaved-tab', {
|
||||
data: function() {
|
||||
return {
|
||||
|
||||
store: false,
|
||||
stored: 0
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
|
||||
this.store = player.celestials.enslaved.store
|
||||
this.stored = player.celestials.enslaved.stored
|
||||
},
|
||||
toggleStore() {
|
||||
Enslaved.toggleStore()
|
||||
},
|
||||
useStored() {
|
||||
Enslaved.useStoredTime()
|
||||
},
|
||||
timeDisplayShort(ms) {
|
||||
return timeDisplayShort(ms)
|
||||
}
|
||||
},
|
||||
template:
|
||||
`<div class="l-enslaved-celestial-tab">
|
||||
<p>enslaved here</p>
|
||||
<div class="l-enslaved-top-container">
|
||||
<div class="o-enslaved-stored-time"> You have {{ timeDisplayShort(stored) }} stored</div>
|
||||
<button class="o-enslaved-shop-button" :class="{storeing: store}" @click="toggleStore()">{{ store ? "Storing wormhole time": "Store wormhole time" }}</button>
|
||||
<button class="o-enslaved-shop-button" @click="useStored()">Use all stored time in a single tick</button>
|
||||
</div>
|
||||
</div>`
|
||||
});
|
11
javascripts/core/celestials/enslaved.js
Normal file
11
javascripts/core/celestials/enslaved.js
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
Enslaved = {
|
||||
toggleStore() {
|
||||
player.celestials.enslaved.store = !player.celestials.enslaved.store
|
||||
},
|
||||
useStoredTime() {
|
||||
gameLoop(player.celestials.enslaved.stored, true)
|
||||
player.celestials.enslaved.stored = 0
|
||||
}
|
||||
}
|
@ -175,7 +175,7 @@ const newsArray = [
|
||||
["If you notice any issues with a news ticker message, please report them on the <a href='https://discord.gg/Z628PkM' target='_blank'>Discord</a> by clicking that link right there.", "a172"],
|
||||
|
||||
// Patreon ones
|
||||
["Is this a jojo reference?", true, "pat1"],
|
||||
["Is this a jojo reference?", "pat1"],
|
||||
|
||||
//basic (pre-inf)
|
||||
["You just made your 1,000,000,000,000,000 antimatter. This one tastes like chicken", "b1", () => player.money.e === 15],
|
||||
|
@ -381,6 +381,10 @@ var player = {
|
||||
eternities: 25
|
||||
},
|
||||
typePriorityOrder: ["Power", "Time", "Infinity", "Dilation", "Replication"]
|
||||
},
|
||||
enslaved: {
|
||||
store: false,
|
||||
stored: 0
|
||||
}
|
||||
},
|
||||
autoEcIsOn: true,
|
||||
|
@ -838,7 +838,7 @@ function getGameSpeedupFactor(takeGlyphsIntoAccount = true) {
|
||||
|
||||
let autobuyerOnGameLoop = true;
|
||||
|
||||
function gameLoop(diff) {
|
||||
function gameLoop(diff, enslavedTick = false) {
|
||||
PerformanceStats.start("Frame Time");
|
||||
PerformanceStats.start("Game Update");
|
||||
var thisUpdate = new Date().getTime();
|
||||
@ -861,8 +861,16 @@ function gameLoop(diff) {
|
||||
}
|
||||
|
||||
const speedFactor = getGameSpeedupFactor();
|
||||
DeltaTimeState.update(diff, speedFactor);
|
||||
diff *= speedFactor;
|
||||
if (!player.celestials.enslaved.store && !enslavedTick) {
|
||||
DeltaTimeState.update(diff, speedFactor);
|
||||
diff *= speedFactor;
|
||||
} else {
|
||||
const wormHoleSpeedFactor = getGameSpeedupFactor(false);
|
||||
const glyphSpeedFactor = speedFactor / wormHoleSpeedFactor;
|
||||
DeltaTimeState.update(diff, glyphSpeedFactor);
|
||||
if (!enslavedTick) player.celestials.enslaved.stored += diff * (wormHoleSpeedFactor - 1)
|
||||
}
|
||||
|
||||
if (player.thisInfinityTime < -10) player.thisInfinityTime = Infinity
|
||||
if (player.bestInfinityTime < -10) player.bestInfinityTime = Infinity
|
||||
|
||||
@ -1179,10 +1187,16 @@ function gameLoop(diff) {
|
||||
document.getElementById("realitymachine").className = "infotooltip"
|
||||
$("#realitymachine").append('<span class="infotooltiptext">' + nextRMText + glyphLevelFactorText + "</span>");
|
||||
|
||||
if (player.wormhole[0].unlocked) {
|
||||
wormHoleLoop(diff, 0)
|
||||
wormHoleLoop(diff, 1)
|
||||
wormHoleLoop(diff, 2)
|
||||
if (player.wormhole[0].unlocked && !enslavedTick) {
|
||||
if (!player.celestials.enslaved.store) {
|
||||
wormHoleLoop(diff, 0)
|
||||
wormHoleLoop(diff, 1)
|
||||
wormHoleLoop(diff, 2)
|
||||
} else {
|
||||
wormHoleLoop(diff * speedFactor, 0)
|
||||
wormHoleLoop(diff * speedFactor, 1)
|
||||
wormHoleLoop(diff * speedFactor, 2)
|
||||
}
|
||||
}
|
||||
|
||||
// Reality unlock and TTgen perk autobuy
|
||||
|
@ -4849,6 +4849,26 @@ screen and (max-width: 480px) {
|
||||
|
||||
/* #endregion teresa tab*/
|
||||
|
||||
/* #startregion enslaved tab */
|
||||
|
||||
.o-enslaved-shop-button {
|
||||
padding: 17px;
|
||||
font-size: 2rem;
|
||||
background-color: #5151ec;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
margin: 10px;
|
||||
cursor: pointer;
|
||||
transition-duration: 0.12s;
|
||||
}
|
||||
|
||||
.o-enslaved-shop-button.storeing {
|
||||
background-color: rebeccapurple;
|
||||
}
|
||||
|
||||
/* #endregion enslaved tab*/
|
||||
|
||||
.c-performance-stats {
|
||||
width: 25rem;
|
||||
padding: .3rem;
|
||||
|
Loading…
Reference in New Issue
Block a user