mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-22 00:21:32 +00:00
Beta v1.1 Alpha 4
This commit is contained in:
parent
cfaac5b325
commit
5f5cbaf5b2
4 changed files with 105 additions and 8 deletions
23
index.html
23
index.html
|
@ -92,6 +92,11 @@
|
||||||
<li>Implemented some new milestones</li>
|
<li>Implemented some new milestones</li>
|
||||||
<li>Balanced up to 15 Hindrance Spirit & 15 Quirks</li>
|
<li>Balanced up to 15 Hindrance Spirit & 15 Quirks</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<h3>Beta v1.1 Alpha 4</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Add the first Hindrance</li>
|
||||||
|
<li>Implemented some new milestones</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="player.tab=='credits'" class="col right">
|
<div v-if="player.tab=='credits'" class="col right">
|
||||||
<button class="back" onclick="showTab('tree')">←</button><br><br><br><br><br>
|
<button class="back" onclick="showTab('tree')">←</button><br><br><br><br><br>
|
||||||
|
@ -228,6 +233,7 @@
|
||||||
<tr><td v-bind:class="{ milestone: player.h.best.lt(5), milestoneDone: player.h.best.gte(5) }">5 Hindrance Spirit<br>Automatically purchase Extra Time Capsules <button v-if="player.h.best.gte(5)" class="smallUpg can t" onclick="toggleAuto('t', 'Cap')">{{player.t.autoCap?"ON":"OFF"}}</button></td></tr>
|
<tr><td v-bind:class="{ milestone: player.h.best.lt(5), milestoneDone: player.h.best.gte(5) }">5 Hindrance Spirit<br>Automatically purchase Extra Time Capsules <button v-if="player.h.best.gte(5)" class="smallUpg can t" onclick="toggleAuto('t', 'Cap')">{{player.t.autoCap?"ON":"OFF"}}</button></td></tr>
|
||||||
<tr><td v-bind:class="{ milestone: player.h.best.lt(10), milestoneDone: player.h.best.gte(10) }">10 Hindrance Spirit<br>Keep Prestige & Super-Booster Upgrades on all fourth row resets</td></tr>
|
<tr><td v-bind:class="{ milestone: player.h.best.lt(10), milestoneDone: player.h.best.gte(10) }">10 Hindrance Spirit<br>Keep Prestige & Super-Booster Upgrades on all fourth row resets</td></tr>
|
||||||
<tr><td v-bind:class="{ milestone: player.h.best.lt(15), milestoneDone: player.h.best.gte(15) }">15 Hindrance Spirit<br>Automatically purchase Super-Boosters <button v-if="player.h.best.gte(15)" class="smallUpg can sb" onclick="toggleAuto('sb')">{{player.sb.auto?"ON":"OFF"}}</button></td></tr>
|
<tr><td v-bind:class="{ milestone: player.h.best.lt(15), milestoneDone: player.h.best.gte(15) }">15 Hindrance Spirit<br>Automatically purchase Super-Boosters <button v-if="player.h.best.gte(15)" class="smallUpg can sb" onclick="toggleAuto('sb')">{{player.sb.auto?"ON":"OFF"}}</button></td></tr>
|
||||||
|
<tr><td v-bind:class="{ milestone: player.h.best.lt(25), milestoneDone: player.h.best.gte(25) }">25 Hindrance Spirit<br>Time resets reset nothing</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="layer=='q'">
|
<div v-if="layer=='q'">
|
||||||
|
@ -238,6 +244,7 @@
|
||||||
<tr><td v-bind:class="{ milestone: player.q.best.lt(5), milestoneDone: player.q.best.gte(5) }">5 Quirks<br>Automatically purchase Enhancers <button v-if="player.q.best.gte(5)" class="smallUpg can e" onclick="toggleAuto('e')">{{player.e.auto?"ON":"OFF"}}</button></td></tr>
|
<tr><td v-bind:class="{ milestone: player.q.best.lt(5), milestoneDone: player.q.best.gte(5) }">5 Quirks<br>Automatically purchase Enhancers <button v-if="player.q.best.gte(5)" class="smallUpg can e" onclick="toggleAuto('e')">{{player.e.auto?"ON":"OFF"}}</button></td></tr>
|
||||||
<tr><td v-bind:class="{ milestone: player.q.best.lt(10), milestoneDone: player.q.best.gte(10) }">10 Quirks<br>Automatically purchase Time Capsules & Space Energy<br><button v-if="player.q.best.gte(10)" class="smallUpg can t" onclick="toggleAuto('t')">{{player.t.auto?"ON":"OFF"}}</button> <button v-if="player.q.best.gte(10)" class="smallUpg can s" onclick="toggleAuto('s')">{{player.s.auto?"ON":"OFF"}}</button></td></tr>
|
<tr><td v-bind:class="{ milestone: player.q.best.lt(10), milestoneDone: player.q.best.gte(10) }">10 Quirks<br>Automatically purchase Time Capsules & Space Energy<br><button v-if="player.q.best.gte(10)" class="smallUpg can t" onclick="toggleAuto('t')">{{player.t.auto?"ON":"OFF"}}</button> <button v-if="player.q.best.gte(10)" class="smallUpg can s" onclick="toggleAuto('s')">{{player.s.auto?"ON":"OFF"}}</button></td></tr>
|
||||||
<tr><td v-bind:class="{ milestone: player.q.best.lt(15), milestoneDone: player.q.best.gte(15) }">15 Quirks<br>Gain 100% of Enhance Point gain every second</td></tr>
|
<tr><td v-bind:class="{ milestone: player.q.best.lt(15), milestoneDone: player.q.best.gte(15) }">15 Quirks<br>Gain 100% of Enhance Point gain every second</td></tr>
|
||||||
|
<tr><td v-bind:class="{ milestone: player.q.best.lt(25), milestoneDone: player.q.best.gte(25) }">25 Quirks<br>Space resets reset nothing</td></tr>
|
||||||
</table><br><br>
|
</table><br><br>
|
||||||
<button v-bind:class="{ upgBig: true, can: player.q.points.gte(getQuirkLayerCost()), locked: player.q.points.lt(getQuirkLayerCost()), q: true }" onclick="buyQuirkLayer()">Increment your Quirk Layer<br>Cost: {{formatWhole(getQuirkLayerCost())}} Quirks<br>Layers: {{formatWhole(player.q.layers)}}</button>
|
<button v-bind:class="{ upgBig: true, can: player.q.points.gte(getQuirkLayerCost()), locked: player.q.points.lt(getQuirkLayerCost()), q: true }" onclick="buyQuirkLayer()">Increment your Quirk Layer<br>Cost: {{formatWhole(getQuirkLayerCost())}} Quirks<br>Layers: {{formatWhole(player.q.layers)}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -250,7 +257,21 @@
|
||||||
<div v-for="col in LAYER_UPGS[layer].cols"><button v-if="LAYER_UPGS[layer][row*10+col].unl()" v-on:click="buyUpg(layer, row*10+col)" v-bind:class="{ [layer]: true, upg: true, bought: player[layer].upgrades.includes(row*10+col), locked: (player[layer].points.lt(LAYER_UPGS[layer][row*10+col].cost)&&!player[layer].upgrades.includes(row*10+col)), can: (player[layer].points.gte(LAYER_UPGS[layer][row*10+col].cost)&&!player[layer].upgrades.includes(row*10+col)) }">{{ LAYER_UPGS[layer][row*10+col].desc }}<br>Cost: {{ formatWhole(LAYER_UPGS[layer][row*10+col].cost) }} {{LAYER_RES[layer]}}<span v-if="LAYER_UPGS[layer][row*10+col].currently"><br>Currently: {{LAYER_UPGS[layer][row*10+col].effDisp(LAYER_UPGS[layer][row*10+col].currently())}}</span></button></div>
|
<div v-for="col in LAYER_UPGS[layer].cols"><button v-if="LAYER_UPGS[layer][row*10+col].unl()" v-on:click="buyUpg(layer, row*10+col)" v-bind:class="{ [layer]: true, upg: true, bought: player[layer].upgrades.includes(row*10+col), locked: (player[layer].points.lt(LAYER_UPGS[layer][row*10+col].cost)&&!player[layer].upgrades.includes(row*10+col)), can: (player[layer].points.gte(LAYER_UPGS[layer][row*10+col].cost)&&!player[layer].upgrades.includes(row*10+col)) }">{{ LAYER_UPGS[layer][row*10+col].desc }}<br>Cost: {{ formatWhole(LAYER_UPGS[layer][row*10+col].cost) }} {{LAYER_RES[layer]}}<span v-if="LAYER_UPGS[layer][row*10+col].currently"><br>Currently: {{LAYER_UPGS[layer][row*10+col].effDisp(LAYER_UPGS[layer][row*10+col].currently())}}</span></button></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br><br><br><br>
|
<br><br>
|
||||||
|
<div v-if="layer=='h'" class="upgTable">
|
||||||
|
<div v-for="row in H_CHALLS.rows" class="upgRow">
|
||||||
|
<div v-for="col in H_CHALLS.cols">
|
||||||
|
<div v-if="H_CHALLS[row*10+col].unl()" v-bind:class="{hChall: true, done: player.h.challs.includes(row*10+col)}">
|
||||||
|
<br><h3>{{H_CHALLS[row*10+col].name}}</h3><br><br>
|
||||||
|
<button class="longUpg can h" v-on:click="startHindrance(row*10+col)">{{HCActive(row*10+col)?(player.points.gte(H_CHALLS[row*10+col].goal)?"Finish":"Exit Early"):(player.h.challs.includes(row*10+col)?"Completed":"Start")}}</button><br><br>
|
||||||
|
{{H_CHALLS[row*10+col].desc}}<br>
|
||||||
|
Goal: {{format(H_CHALLS[row*10+col].goal)}} Points<br>
|
||||||
|
Reward: {{H_CHALLS[row*10+col].reward}}<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
70
js/game.js
70
js/game.js
|
@ -82,6 +82,7 @@ function getStartPlayer() {
|
||||||
unl: false,
|
unl: false,
|
||||||
points: new Decimal(0),
|
points: new Decimal(0),
|
||||||
best: new Decimal(0),
|
best: new Decimal(0),
|
||||||
|
active: 0,
|
||||||
challs: [],
|
challs: [],
|
||||||
upgrades: [],
|
upgrades: [],
|
||||||
},
|
},
|
||||||
|
@ -179,14 +180,21 @@ const ROW_LAYERS = [
|
||||||
]
|
]
|
||||||
|
|
||||||
const LAYER_EFFS = {
|
const LAYER_EFFS = {
|
||||||
b: function() { return Decimal.pow(Decimal.add(2, tmp.atbb), player.b.points.plus(getFreeBoosters())) },
|
b: function() {
|
||||||
|
if (HCActive(11)) return new Decimal(1);
|
||||||
|
return Decimal.pow(Decimal.add(2, tmp.atbb), player.b.points.plus(getFreeBoosters()))
|
||||||
|
},
|
||||||
g: function() { return Decimal.pow(Decimal.add(2, tmp.atgb), player.g.points).sub(1).times(getGenPowerGainMult()) },
|
g: function() { return Decimal.pow(Decimal.add(2, tmp.atgb), player.g.points).sub(1).times(getGenPowerGainMult()) },
|
||||||
t: function() { return {
|
t: function() { return {
|
||||||
gain: Decimal.pow(3, player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap))).sub(1).times(getTimeEnergyGainMult()),
|
gain: Decimal.pow(3, player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap))).sub(1).times(getTimeEnergyGainMult()),
|
||||||
limit: Decimal.pow(2, player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap))).sub(1).times(100).times(getTimeEnergyLimitMult()),
|
limit: Decimal.pow(2, player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap))).sub(1).times(100).times(getTimeEnergyLimitMult()),
|
||||||
}},
|
}},
|
||||||
sb: function() { return Decimal.pow(1.5, player.sb.points.times(getSuperBoosterPow())) },
|
sb: function() { return Decimal.pow(1.5, player.sb.points.times(getSuperBoosterPow())) },
|
||||||
h: function() { return player.h.points.plus(1).times(player.points.times(player.h.points).plus(1).log10().plus(1).log10().plus(1)).log10().times(5).root(player.q.upgrades.includes(12)?1.25:2) },
|
h: function() {
|
||||||
|
let ret = player.h.points.plus(1).times(player.points.times(player.h.points).plus(1).log10().plus(1).log10().plus(1)).log10().times(5).root(player.q.upgrades.includes(12)?1.25:2);
|
||||||
|
if (ret.gte(100)) ret = ret.log10().times(50).min(ret);
|
||||||
|
return ret;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const LAYER_UPGS = {
|
const LAYER_UPGS = {
|
||||||
|
@ -658,7 +666,7 @@ const LAYER_UPGS = {
|
||||||
},
|
},
|
||||||
q: {
|
q: {
|
||||||
rows: 1,
|
rows: 1,
|
||||||
cols: 2,
|
cols: 3,
|
||||||
11: {
|
11: {
|
||||||
desc: "Quirks & Hindrance Spirit boost Point, Prestige Point, and Enhance Point gain.",
|
desc: "Quirks & Hindrance Spirit boost Point, Prestige Point, and Enhance Point gain.",
|
||||||
cost: new Decimal(1),
|
cost: new Decimal(1),
|
||||||
|
@ -671,6 +679,11 @@ const LAYER_UPGS = {
|
||||||
cost: new Decimal(5),
|
cost: new Decimal(5),
|
||||||
unl: function() { return player.q.upgrades.includes(11)&&player.h.best.gte(3) },
|
unl: function() { return player.q.upgrades.includes(11)&&player.h.best.gte(3) },
|
||||||
},
|
},
|
||||||
|
13: {
|
||||||
|
desc: "Quirk Layers are twice as fast.",
|
||||||
|
cost: new Decimal(50),
|
||||||
|
unl: function() { return player.q.upgrades.includes(11)&&player.h.challs.includes(11) },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -824,6 +837,7 @@ function checkForVars() {
|
||||||
if (player.timePlayed === undefined) player.timePlayed = 0
|
if (player.timePlayed === undefined) player.timePlayed = 0
|
||||||
if (player.hasNaN === undefined) player.hasNaN = false
|
if (player.hasNaN === undefined) player.hasNaN = false
|
||||||
if (player.h === undefined) player.h = getStartPlayer().h
|
if (player.h === undefined) player.h = getStartPlayer().h
|
||||||
|
if (player.h.active === undefined) player.h.active = 0
|
||||||
if (player.q === undefined) player.q = getStartPlayer().q
|
if (player.q === undefined) player.q = getStartPlayer().q
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1146,6 +1160,7 @@ function doReset(layer, force=false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((layer=="b"&&player.t.best.gte(12))||(layer=="g"&&player.s.best.gte(12))) return;
|
if ((layer=="b"&&player.t.best.gte(12))||(layer=="g"&&player.s.best.gte(12))) return;
|
||||||
|
if ((layer=="t"&&player.h.best.gte(25))||(layer=="s"&&player.q.best.gte(25))) return;
|
||||||
let row = LAYER_ROW[layer]
|
let row = LAYER_ROW[layer]
|
||||||
if (row==0) rowReset(0, layer)
|
if (row==0) rowReset(0, layer)
|
||||||
else for (let x=row;x>=1;x--) rowReset(x, layer)
|
else for (let x=row;x>=1;x--) rowReset(x, layer)
|
||||||
|
@ -1228,10 +1243,12 @@ function getGenPowerEffExp() {
|
||||||
if (player.b.upgrades.includes(21)) exp = exp.times(2)
|
if (player.b.upgrades.includes(21)) exp = exp.times(2)
|
||||||
if (player.b.upgrades.includes(22)) exp = exp.times(1.2)
|
if (player.b.upgrades.includes(22)) exp = exp.times(1.2)
|
||||||
if (player.e.upgrades.includes(21)) exp = exp.times(1.15)
|
if (player.e.upgrades.includes(21)) exp = exp.times(1.15)
|
||||||
|
if (player.h.challs.includes(11)) exp = exp.times(1.25)
|
||||||
return exp;
|
return exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getGenPowerEff() {
|
function getGenPowerEff() {
|
||||||
|
if (HCActive(11)) return new Decimal(1)
|
||||||
let eff = player.g.power.plus(1).pow(getGenPowerEffExp());
|
let eff = player.g.power.plus(1).pow(getGenPowerEffExp());
|
||||||
return eff
|
return eff
|
||||||
}
|
}
|
||||||
|
@ -1477,13 +1494,26 @@ function getQuirkLayerCost() {
|
||||||
return cost.max(1);
|
return cost.max(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getQuirkLayerMult() {
|
||||||
|
let mult = new Decimal(1)
|
||||||
|
if (player.q.upgrades.includes(13)) mult = mult.times(2)
|
||||||
|
return mult
|
||||||
|
}
|
||||||
|
|
||||||
function getQuirkEnergyGainExp() {
|
function getQuirkEnergyGainExp() {
|
||||||
return player.q.layers.sub(1)
|
return player.q.layers.sub(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getQuirkEnergyEff() {
|
function getQuirkEnergyEff() {
|
||||||
let eff = player.q.energy.plus(1).pow(2)
|
let eff = player.q.energy.plus(1).pow(2)
|
||||||
if (player.q.upgrades.includes(12)) eff = eff.pow(player.q.energy.plus(1).log10().plus(1).log10().plus(1))
|
if (player.q.upgrades.includes(12)) {
|
||||||
|
let mod = player.q.energy.plus(1).log10().plus(1).log10().plus(1)
|
||||||
|
if (mod.gte(2)) {
|
||||||
|
eff = eff.times(mod.div(2).pow(10))
|
||||||
|
mod = new Decimal(2)
|
||||||
|
}
|
||||||
|
eff = eff.pow(mod)
|
||||||
|
}
|
||||||
return eff;
|
return eff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1495,6 +1525,33 @@ function buyQuirkLayer() {
|
||||||
player.q.layers = player.q.layers.plus(1)
|
player.q.layers = player.q.layers.plus(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const H_CHALLS = {
|
||||||
|
rows: 1,
|
||||||
|
cols: 1,
|
||||||
|
11: {
|
||||||
|
name: "Skip the Second",
|
||||||
|
desc: "Boosters and Generator Power do nothing",
|
||||||
|
unl: function() { return player.h.best.gt(0) },
|
||||||
|
goal: new Decimal("1e2400"),
|
||||||
|
reward: "The generator power effect is raised to the power of 1.25",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
function HCActive(x) {
|
||||||
|
return player.h.active==x;
|
||||||
|
}
|
||||||
|
|
||||||
|
function startHindrance(x) {
|
||||||
|
if (!player.h.unl) return
|
||||||
|
if (player.h.active==x) {
|
||||||
|
if (player.points.gte(H_CHALLS[x].goal) && !player.h.challs.includes(x)) player.h.challs.push(x);
|
||||||
|
player.h.active = 0
|
||||||
|
} else {
|
||||||
|
player.h.active = x
|
||||||
|
}
|
||||||
|
doReset("h", true)
|
||||||
|
}
|
||||||
|
|
||||||
function gameLoop(diff) {
|
function gameLoop(diff) {
|
||||||
if (isNaN(diff)) diff = 0;
|
if (isNaN(diff)) diff = 0;
|
||||||
player.timePlayed += diff
|
player.timePlayed += diff
|
||||||
|
@ -1506,9 +1563,10 @@ function gameLoop(diff) {
|
||||||
player.t.energy = player.t.energy.plus(data.gain.times(diff)).min(data.limit)
|
player.t.energy = player.t.energy.plus(data.gain.times(diff)).min(data.limit)
|
||||||
}
|
}
|
||||||
if (player.q.unl) {
|
if (player.q.unl) {
|
||||||
player.q.time = player.q.time.plus(diff)
|
let mult = getQuirkLayerMult()
|
||||||
|
player.q.time = player.q.time.plus(mult.times(diff))
|
||||||
let exp = getQuirkEnergyGainExp()
|
let exp = getQuirkEnergyGainExp()
|
||||||
if (exp.gte(0)) player.q.energy = player.q.energy.plus(player.q.time.pow(exp).times(diff))
|
if (exp.gte(0)) player.q.energy = player.q.energy.plus(player.q.time.pow(exp).times(mult).times(diff))
|
||||||
}
|
}
|
||||||
if (player.q.best.gte(15)) player.e.points = player.e.points.plus(tmp.resetGain.e.times(diff))
|
if (player.q.best.gte(15)) player.e.points = player.e.points.plus(tmp.resetGain.e.times(diff))
|
||||||
|
|
||||||
|
|
5
js/v.js
5
js/v.js
|
@ -22,13 +22,16 @@ function loadVue() {
|
||||||
buyBuilding,
|
buyBuilding,
|
||||||
getQuirkLayerCost,
|
getQuirkLayerCost,
|
||||||
buyQuirkLayer,
|
buyQuirkLayer,
|
||||||
|
startHindrance,
|
||||||
|
HCActive,
|
||||||
LAYERS,
|
LAYERS,
|
||||||
LAYER_RES,
|
LAYER_RES,
|
||||||
LAYER_TYPE,
|
LAYER_TYPE,
|
||||||
LAYER_UPGS,
|
LAYER_UPGS,
|
||||||
LAYER_EFFS,
|
LAYER_EFFS,
|
||||||
LAYER_AMT_NAMES,
|
LAYER_AMT_NAMES,
|
||||||
LAYER_RES_CEIL
|
LAYER_RES_CEIL,
|
||||||
|
H_CHALLS
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
15
style.css
15
style.css
|
@ -351,6 +351,21 @@ ul {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hChall {
|
||||||
|
background-color: #fa7f8a;
|
||||||
|
border: 4px solid #ff0017;
|
||||||
|
color: #ff0017;
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
border-radius: 33.33%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hChall.done {
|
||||||
|
background-color: #95fcb4;
|
||||||
|
border: 4px solid #038c2c;
|
||||||
|
color: #038c2c;
|
||||||
|
}
|
||||||
|
|
||||||
[tooltip] {
|
[tooltip] {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|
Loading…
Reference in a new issue