1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-24 09:21:46 +00:00

Merge (Beta v1.2 Alpha 12 -> v1.1)

This commit is contained in:
Aarex Tiaokhiao 2020-09-08 12:52:19 -04:00
commit 71365bec97
4 changed files with 175 additions and 20 deletions

View file

@ -23,6 +23,14 @@
</div> </div>
<div v-if="player.tab=='changelog_beta'" class="col right"> <div v-if="player.tab=='changelog_beta'" class="col right">
<button class="back" onclick="showTab('changelog')"></button><br> <button class="back" onclick="showTab('changelog')"></button><br>
<h3>Beta v1.2 Alpha 12</h3>
<ul>
<li>Balanced up to 1e9,200,000 Points, 5e18 Magic, and 1e16 Balance Energy</li>
</ul><br>
<h3>Beta v1.2 Alpha 11</h3>
<ul>
<li>Balanced up to 1e7,650,000 Points, 1e16 Magic, and 4e13 Balance Energy</li>
</ul><br>
<h3>Beta v1.2 Alpha 10</h3> <h3>Beta v1.2 Alpha 10</h3>
<ul> <ul>
<li>Made a few visual fixes</li> <li>Made a few visual fixes</li>
@ -454,12 +462,15 @@
</div> </div>
<div v-if="layer=='m'"> <div v-if="layer=='m'">
<br> <br>
Note: Activating a Spell uses 1 Magic.<br><br> Note: Activating a Spell costs Magic.<br><br>
<div class="upgRow"> <div class="upgRow">
<div v-for="id in 3"> <div v-for="id in 3">
<button v-bind:class="{ upg: true, bought: spellActive(id), can: ((player.m.points.gte(1))&&player.m.unl&&!spellActive(id)), locked: (!(player.m.points.gte(1)||spellActive(id))), m: true }" v-on:click="activateSpell(id)"><h3>{{SPELL_NAMES[id]}}</h3><br>Time Left: {{formatTime(player.m.spellTimes[id])}}<br>Effect: {{getSpellDesc(id)}}</button> <button v-bind:class="{ upg: true, bought: spellActive(id), can: ((player.m.points.gte(player.m.toCast[id]))&&player.m.unl&&!spellActive(id)), locked: (!(player.m.points.gte(player.m.toCast[id])||spellActive(id))), m: true }" v-on:click="activateSpell(id)"><h3>{{SPELL_NAMES[id]}}</h3><br>Time Left: {{formatTime(player.m.spellTimes[id])}}<br>Effect: {{getSpellDesc(id)}}</button><br><br>
<div v-if="player.m.upgrades.includes(41)">
<input v-model="player.m.toCast[id]" v-on:change="updateToCast(id)"></input><br><br>
</div>
</div> </div>
</div><br><br> </div>
You have {{formatWhole(player.m.hexes)}} Hexes, which are multiplying Hindrance Spirit & Quirk gain by {{format(tmp.hexEff)}}<br><br> You have {{formatWhole(player.m.hexes)}} Hexes, which are multiplying Hindrance Spirit & Quirk gain by {{format(tmp.hexEff)}}<br><br>
<table> <table>
<tr><td v-if="milestoneShown(player.m.best.gte(1))" v-bind:class="{ milestone: player.m.best.lt(1), milestoneDone: player.m.best.gte(1) }">1 Magic<br>Keep row 4 milestones on all resets</td></tr> <tr><td v-if="milestoneShown(player.m.best.gte(1))" v-bind:class="{ milestone: player.m.best.lt(1), milestoneDone: player.m.best.gte(1) }">1 Magic<br>Keep row 4 milestones on all resets</td></tr>

View file

@ -140,6 +140,16 @@ function getStartPlayer() {
3: 0, 3: 0,
}, },
hexes: new Decimal(0), hexes: new Decimal(0),
toCast: {
1: "1",
2: "1",
3: "1",
},
casted: {
1: new Decimal(1),
2: new Decimal(1),
3: new Decimal(1),
},
upgrades: [], upgrades: [],
}, },
ba: { ba: {
@ -279,8 +289,8 @@ const LAYER_EFFS = {
}, },
g: function() { return Decimal.pow(Decimal.add(2, tmp.atgb).times(tmp.sGenPowEff).times((player.ss.upgrades.includes(23) ? LAYER_UPGS.ss[23].currently() : 1)).max(0), player.g.points.times(getGenPow())).sub(1).times(getGenPowerGainMult()).max(0) }, g: function() { return Decimal.pow(Decimal.add(2, tmp.atgb).times(tmp.sGenPowEff).times((player.ss.upgrades.includes(23) ? LAYER_UPGS.ss[23].currently() : 1)).max(0), player.g.points.times(getGenPow())).sub(1).times(getGenPowerGainMult()).max(0) },
t: function() { return { t: function() { return {
gain: Decimal.pow(3, player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap).times(getFreeExtPow())).times(getCapPow())).sub(1).times(getTimeEnergyGainMult()), gain: Decimal.pow(Decimal.add(3, tmp.attb), player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap).times(getFreeExtPow())).times(getCapPow())).sub(1).times(getTimeEnergyGainMult()),
limit: Decimal.pow(2, player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap).times(getFreeExtPow())).times(getCapPow())).sub(1).times(100).times(getTimeEnergyLimitMult()), limit: Decimal.pow(Decimal.add(2, tmp.attb), player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap).times(getFreeExtPow())).times(getCapPow())).sub(1).times(100).times(getTimeEnergyLimitMult()),
}}, }},
sb: function() { return Decimal.pow(Decimal.add(1.5, addToSBBase()), player.sb.points.times(getSuperBoosterPow())) }, sb: function() { return Decimal.pow(Decimal.add(1.5, addToSBBase()), player.sb.points.times(getSuperBoosterPow())) },
sg: function() { return Decimal.pow(Decimal.add(2, addToSGBase()), player.sg.points).sub(1).times(getSuperGenPowerGainMult()).max(0) }, sg: function() { return Decimal.pow(Decimal.add(2, addToSGBase()), player.sg.points).sub(1).times(getSuperGenPowerGainMult()).max(0) },
@ -736,7 +746,7 @@ const LAYER_UPGS = {
}, },
}, },
s: { s: {
rows: 3, rows: 4,
cols: 4, cols: 4,
11: { 11: {
desc: "Add a free level to all Space Buildings.", desc: "Add a free level to all Space Buildings.",
@ -810,6 +820,28 @@ const LAYER_UPGS = {
currently: function() { return Decimal.pow(Object.values(player.s.buildings).reduce((a,b) => Decimal.add(a,b)), 0.2).div(17.5) }, currently: function() { return Decimal.pow(Object.values(player.s.buildings).reduce((a,b) => Decimal.add(a,b)), 0.2).div(17.5) },
effDisp: function(x) { return "Add "+format(x)+" to exponent" }, effDisp: function(x) { return "Add "+format(x)+" to exponent" },
}, },
41: {
desc: "Total Space cheapens Space Buildings.",
cost: new Decimal(128),
unl: function() { return player.ba.upgrades.includes(51) },
currently: function() { return Decimal.pow("1e4000", getSpace().plus(player.s.spent).sqrt()) },
effDisp: function(x) { return "/"+format(x) },
},
42: {
desc: "The Space Building cost formula is 40% weaker.",
cost: new Decimal(131),
unl: function() { return player.ba.upgrades.includes(51) },
},
43: {
desc: "Space Building 2 uses a better formula.",
cost: new Decimal(133),
unl: function() { return player.ba.upgrades.includes(51) },
},
44: {
desc: "Placeholder",
cost: new Decimal(1/0),
unl: function() { return player.ba.upgrades.includes(51) },
},
}, },
sb: { sb: {
rows: 2, rows: 2,
@ -856,7 +888,7 @@ const LAYER_UPGS = {
cols: 0, cols: 0,
}, },
q: { q: {
rows: 4, rows: 5,
cols: 4, cols: 4,
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.",
@ -884,7 +916,7 @@ const LAYER_UPGS = {
desc: "Quirk Layers are faster based on your Quirks.", desc: "Quirk Layers are faster based on your Quirks.",
cost: new Decimal(160), cost: new Decimal(160),
unl: function() { return (player.q.upgrades.includes(12)||player.q.upgrades.includes(13))&&player.h.challs.includes(12) }, unl: function() { return (player.q.upgrades.includes(12)||player.q.upgrades.includes(13))&&player.h.challs.includes(12) },
currently: function() { return player.q.points.plus(1).log10().plus(1) }, currently: function() { return player.q.points.plus(1).log10().plus(1).pow(player.m.upgrades.includes(42)?1.5:1) },
effDisp: function(x) { return format(x)+"x" }, effDisp: function(x) { return format(x)+"x" },
}, },
22: { 22: {
@ -955,6 +987,28 @@ const LAYER_UPGS = {
currently: function() { return player.q.energy.plus(1).log10().plus(1) }, currently: function() { return player.q.energy.plus(1).log10().plus(1) },
effDisp: function(x) { return format(x)+"x" }, effDisp: function(x) { return format(x)+"x" },
}, },
51: {
desc: "Get free Quirk Layers based on your Quirk Energy.",
cost: new Decimal("1e2100"),
unl: function() { return player.ba.upgrades.includes(52) },
currently: function() { return player.q.energy.plus(1).log10().plus(1).log10() },
effDisp: function(x) { return "+"+format(x) },
},
52: {
desc: "Placeholder",
cost: new Decimal(1/0),
unl: function() { return player.ba.upgrades.includes(52) },
},
53: {
desc: "Placeholder",
cost: new Decimal(1/0),
unl: function() { return player.ba.upgrades.includes(52) },
},
54: {
desc: "Placeholder",
cost: new Decimal(1/0),
unl: function() { return player.ba.upgrades.includes(52) },
},
}, },
hb: { hb: {
rows: 1, rows: 1,
@ -1051,7 +1105,7 @@ const LAYER_UPGS = {
}, },
}, },
m: { m: {
rows: 3, rows: 4,
cols: 4, cols: 4,
11: { 11: {
desc: "Hexes boost all Spells.", desc: "Hexes boost all Spells.",
@ -1073,7 +1127,7 @@ const LAYER_UPGS = {
effDisp: function(x) { return "+"+format(x)+" to base" }, effDisp: function(x) { return "+"+format(x)+" to base" },
}, },
14: { 14: {
desc: "You get more Hexes when casting Spells based on your best Magic.", desc: "You get more Hexes based on your best Magic.",
cost: new Decimal(100), cost: new Decimal(100),
unl: function() { return player.m.upgrades.includes(12) }, unl: function() { return player.m.upgrades.includes(12) },
currently: function() { return player.m.best.div(3).plus(1).pow(0.8) }, currently: function() { return player.m.best.div(3).plus(1).pow(0.8) },
@ -1127,9 +1181,33 @@ const LAYER_UPGS = {
cost: new Decimal(4e10), cost: new Decimal(4e10),
unl: function() { return player.m.upgrades.includes(32) }, unl: function() { return player.m.upgrades.includes(32) },
}, },
41: {
desc: "You can insert more Magic into Spells, making them stronger.",
cost: new Decimal(2.5e14),
unl: function() { return player.m.upgrades.includes(34) },
},
42: {
desc: "Quirk Upgrade 5 is 50% stronger.",
cost: new Decimal(1e15),
unl: function() { return player.m.upgrades.includes(34) },
},
43: {
desc: "Spells last longer based on your Hexes.",
cost: new Decimal(2e15),
unl: function() { return player.m.upgrades.includes(41) },
currently: function() { return player.m.hexes.plus(1).log10().plus(1).sqrt().min(86400) },
effDisp: function(x) { return format(x)+"x" },
},
44: {
desc: "Magic adds to the Time Capsule base.",
cost: new Decimal(4e15),
unl: function() { return player.m.upgrades.includes(41) },
currently: function() { return player.m.points.plus(1).log10().div(10) },
effDisp: function(x) { return "+"+format(x) },
},
}, },
ba: { ba: {
rows: 4, rows: 5,
cols: 4, cols: 4,
11: { 11: {
desc: "All Balance Energy effects use better formulas.", desc: "All Balance Energy effects use better formulas.",
@ -1223,6 +1301,26 @@ const LAYER_UPGS = {
unl: function() { return player.ba.upgrades.includes(41)||player.ba.upgrades.includes(42) }, unl: function() { return player.ba.upgrades.includes(41)||player.ba.upgrades.includes(42) },
}, },
44: { 44: {
desc: "Space Buildings are 50% stronger.",
cost: new Decimal(2e12),
unl: function() { return player.ba.upgrades.includes(42)||player.ba.upgrades.includes(43) },
},
51: {
desc: "Unlock 4 new Space Upgrades.",
cost: new Decimal(4e13),
unl: function() { return player.ba.upgrades.includes(43) },
},
52: {
desc: "Unlock 4 new Quirk Upgrades.",
cost: new Decimal(2e14),
unl: function() { return player.ba.upgrades.includes(51) },
},
53: {
desc: "???",
cost: new Decimal(1/0),
unl: function() { return false },
},
54: {
desc: "???", desc: "???",
cost: new Decimal(1/0), cost: new Decimal(1/0),
unl: function() { return false }, unl: function() { return false },
@ -1442,6 +1540,8 @@ function checkForVars() {
if (player.ss.auto === undefined) player.ss.auto = false if (player.ss.auto === undefined) player.ss.auto = false
if (player.m === undefined) player.m = start.m if (player.m === undefined) player.m = start.m
if (player.m.auto === undefined) player.m.auto = false if (player.m.auto === undefined) player.m.auto = false
if (player.m.toCast === undefined) player.m.toCast = start.m.toCast
if (player.m.casted === undefined) player.m.casted = start.m.casted
if (player.ba === undefined) player.ba = start.ba if (player.ba === undefined) player.ba = start.ba
if (player.offlineProd === undefined) player.offlineProd = true if (player.offlineProd === undefined) player.offlineProd = true
} }
@ -1486,6 +1586,7 @@ function convertToDecimal() {
player.m.points = new Decimal(player.m.points) player.m.points = new Decimal(player.m.points)
player.m.best = new Decimal(player.m.best) player.m.best = new Decimal(player.m.best)
player.m.hexes = new Decimal(player.m.hexes) player.m.hexes = new Decimal(player.m.hexes)
for (let i=1;i<=3;i++) player.m.casted[i] = new Decimal(player.m.casted[i])
player.ba.points = new Decimal(player.ba.points) player.ba.points = new Decimal(player.ba.points)
player.ba.best = new Decimal(player.ba.best) player.ba.best = new Decimal(player.ba.best)
player.ba.power = new Decimal(player.ba.power) player.ba.power = new Decimal(player.ba.power)
@ -1951,6 +2052,7 @@ function buyUpg(layer, id) {
if (layer=="s"&&id==33) player.s.order = 0; if (layer=="s"&&id==33) player.s.order = 0;
if (layer=="hb"&&id==13) player.hb.order = 0; if (layer=="hb"&&id==13) player.hb.order = 0;
if (layer=="ss"&&id==15) player.ss.order = 0; if (layer=="ss"&&id==15) player.ss.order = 0;
if (layer=="m"&&id==43) for (let i=1;i<=3;i++) player.m.spellTimes[i] *= LAYER_UPGS.m[43].currently().toNumber()
} }
function getPointGen() { function getPointGen() {
@ -2189,6 +2291,12 @@ function maxExtTimeCapsules() {
player.t.extCapsules = player.t.extCapsules.max(target) player.t.extCapsules = player.t.extCapsules.max(target)
} }
function addToTimeBase() {
let toAdd = new Decimal(0)
if (player.m.upgrades.includes(44)) toAdd = toAdd.plus(LAYER_UPGS.m[44].currently())
return toAdd
}
function getSpace() { function getSpace() {
let baseSpace = player.s.best.pow(1.1).times(3).floor() let baseSpace = player.s.best.pow(1.1).times(3).floor()
if (player.s.upgrades.includes(13)&&!(tmp.hcActive?tmp.hcActive[12]:true)) baseSpace = baseSpace.plus(2); if (player.s.upgrades.includes(13)&&!(tmp.hcActive?tmp.hcActive[12]:true)) baseSpace = baseSpace.plus(2);
@ -2200,13 +2308,15 @@ function getSpace() {
function getSpaceBuildingCostMod() { function getSpaceBuildingCostMod() {
let mod = new Decimal(1) let mod = new Decimal(1)
if (player.s.upgrades.includes(24)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mod = new Decimal(0.5) if (player.s.upgrades.includes(24)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mod = mod.times(0.5)
if (player.s.upgrades.includes(42)) mod = mod.times(0.6)
return mod; return mod;
} }
function getSpaceBuildingCostMult() { function getSpaceBuildingCostMult() {
let mult = new Decimal(1) let mult = new Decimal(1)
if (player.ss.unl) mult = mult.div(tmp.ssEff2) if (player.ss.unl) mult = mult.div(tmp.ssEff2)
if (player.s.upgrades.includes(41)) mult = mult.div(LAYER_UPGS.s[41].currently())
return mult return mult
} }
@ -2235,6 +2345,7 @@ function getSpaceBuildingPow() {
if (player.s.upgrades.includes(23)&&!(tmp.hcActive?tmp.hcActive[12]:true)) pow = pow.times(LAYER_UPGS.s[23].currently()) if (player.s.upgrades.includes(23)&&!(tmp.hcActive?tmp.hcActive[12]:true)) pow = pow.times(LAYER_UPGS.s[23].currently())
if (player.q.upgrades.includes(41)) pow = pow.times(1.4) if (player.q.upgrades.includes(41)) pow = pow.times(1.4)
if (player.ss.unl) pow = pow.times(tmp.ssEff3) if (player.ss.unl) pow = pow.times(tmp.ssEff3)
if (player.ba.upgrades.includes(44)) pow = pow.times(1.5)
return pow return pow
} }
@ -2261,8 +2372,9 @@ function getSpaceBuildingEff(x) {
if (player.ba.upgrades.includes(42)) ret = ret.pow(LAYER_UPGS.ba[42].currently()) if (player.ba.upgrades.includes(42)) ret = ret.pow(LAYER_UPGS.ba[42].currently())
return ret; return ret;
break; break;
case 2: case 2:
return bought.sqrt() if (player.s.upgrades.includes(43)) return Decimal.pow(1.0001, bought).times(bought.sqrt())
else return bought.sqrt()
break; break;
case 3: case 3:
return Decimal.pow(1e18, bought.pow(0.9)) return Decimal.pow(1e18, bought.pow(0.9))
@ -2397,6 +2509,7 @@ function getQuirkLayerMult() {
function getExtraQuirkLayers() { function getExtraQuirkLayers() {
let layers = new Decimal(0); let layers = new Decimal(0);
if (player.q.upgrades.includes(51)) layers = layers.plus(LAYER_UPGS.q[51].currently())
if (player.m.upgrades.includes(24)) layers = layers.plus(LAYER_UPGS.m[24].currently()) if (player.m.upgrades.includes(24)) layers = layers.plus(LAYER_UPGS.m[24].currently())
if (player.m.upgrades.includes(34)) layers = layers.plus(1) if (player.m.upgrades.includes(34)) layers = layers.plus(1)
return layers; return layers;
@ -2715,6 +2828,7 @@ function getSpellPower(x) {
if (player.m.upgrades.includes(11)) power = power.times(LAYER_UPGS.m[11].currently()) if (player.m.upgrades.includes(11)) power = power.times(LAYER_UPGS.m[11].currently())
if (player.m.upgrades.includes(21) && (x==2||x==3)) power = power.times(LAYER_UPGS.m[21].currently()) if (player.m.upgrades.includes(21) && (x==2||x==3)) power = power.times(LAYER_UPGS.m[21].currently())
if (player.m.upgrades.includes(22) && (x==2)) power = power.times(10) if (player.m.upgrades.includes(22) && (x==2)) power = power.times(10)
if (player.m.upgrades.includes(41)) power = power.times(player.m.casted[x].max(1).log10().plus(1).log10().div(5).plus(1))
return power; return power;
} }
@ -2734,6 +2848,7 @@ function getSpellDesc(x) {
function getSpellTime() { function getSpellTime() {
let time = 20 let time = 20
if (player.m.best.gte(2.5e9)) time *= 10 if (player.m.best.gte(2.5e9)) time *= 10
if (player.m.upgrades.includes(43)) time *= LAYER_UPGS.m[43].currently().toNumber()
return time return time
} }
@ -2743,13 +2858,17 @@ function spellActive(x) {
return player.m.spellTimes[x]>0 return player.m.spellTimes[x]>0
} }
function activateSpell(x) { function activateSpell(x, force=false) {
if (!player.m.unl) return let toCast = setToCast(player.m.toCast[x])
if (spellActive(x)) return if (!force) {
if (player.m.points.lt(1)) return if (!player.m.unl) return
player.m.points = player.m.points.sub(1) if (spellActive(x)) return
if (player.m.points.lt(toCast)) return
}
player.m.points = player.m.points.sub(toCast)
player.m.casted[x] = toCast
player.m.spellTimes[x] = getSpellTime() player.m.spellTimes[x] = getSpellTime()
player.m.hexes = player.m.hexes.plus(getHexGain()) if (!force) player.m.hexes = player.m.hexes.plus(getHexGain())
} }
function getHexGain() { function getHexGain() {
@ -2763,6 +2882,29 @@ function getHexEff() {
return eff; return eff;
} }
function isToCastValid(val) {
try {
val = new Decimal(val).floor()
if (val.eq(undefined) || val.eq(null)) return false
if (val.lt(1)) return false
if (val.gt(player.m.points)) return false
return val;
} catch(e) {
return false;
}
}
function setToCast(val) {
if (!player.m.upgrades.includes(41)) return new Decimal(1)
let validVal = isToCastValid(val)
if (!validVal) return new Decimal(1)
else return validVal
}
function updateToCast(id) {
activateSpell(id, true)
}
function getSGenPowEff() { function getSGenPowEff() {
if (!player.sg.unl) return new Decimal(1) if (!player.sg.unl) return new Decimal(1)
if (!player.h.challs.includes(62)) return new Decimal(1) if (!player.h.challs.includes(62)) return new Decimal(1)

View file

@ -41,6 +41,7 @@ function updateTemp() {
tmp.freeExtCap = getFreeExtCapsules() tmp.freeExtCap = getFreeExtCapsules()
tmp.timeEff = getTimeEnergyEff() tmp.timeEff = getTimeEnergyEff()
tmp.attb = addToTimeBase()
if (!tmp.spaceBuildEff) tmp.spaceBuildEff = {} if (!tmp.spaceBuildEff) tmp.spaceBuildEff = {}
for (let i=1;i<=5;i++) tmp.spaceBuildEff[i] = getSpaceBuildingEff(i) for (let i=1;i<=5;i++) tmp.spaceBuildEff[i] = getSpaceBuildingEff(i)

View file

@ -31,6 +31,7 @@ function loadVue() {
getSpellDesc, getSpellDesc,
activateSpell, activateSpell,
spellActive, spellActive,
updateToCast,
LAYERS, LAYERS,
LAYER_RES, LAYER_RES,
LAYER_TYPE, LAYER_TYPE,