Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
Icecreamdudes committed Mar 23, 2024
1 parent 1d8df4f commit 8aeca97
Show file tree
Hide file tree
Showing 11 changed files with 216 additions and 18 deletions.
24 changes: 12 additions & 12 deletions js/checkback.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
layers.cb.levelup();
}

player.cb.levelEffect = player.cb.level.pow(3)
player.cb.levelEffect = player.cb.level.pow(3).pow(player.d.dicePointsEffect)

if (player.cb.level.gte(3))
[
Expand Down Expand Up @@ -155,11 +155,11 @@

player.cb.lockedImg = "<img src='resources/secret.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>"

player.cb.commonPetImage = ["<img src='resources/gwaCommonPet.png'style='width:calc(120%);height:calc(120%);margin:-20%'></img>",
"<img src='resources/eggCommonPet.png'style='width:calc(120%);height:calc(120%);margin:-20%'></img>",
"<img src='resources/unsmithCommonPet.png'style='width:calc(120%);height:calc(120%);margin:-20%'></img>",
"<img src='resources/checkpointCommonPet.png'style='width:calc(120%);height:calc(120%);margin:-20%'></img>",
"<img src='resources/slaxCommonPet.png'style='width:calc(120%);height:calc(120%);margin:-20%'></img>",]
player.cb.commonPetImage = ["<img src='resources/gwaCommonPet.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>",
"<img src='resources/eggCommonPet.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>",
"<img src='resources/unsmithCommonPet.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>",
"<img src='resources/checkpointCommonPet.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>",
"<img src='resources/slaxCommonPet.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>",]

player.cb.commonPetReq = [
player.cb.commonPetLevels[0].add(1),
Expand Down Expand Up @@ -192,11 +192,11 @@
"THE WATCHING EYE: " + formatWhole(player.cb.uncommonPetAmounts[4]) + "/" + formatWhole(player.cb.uncommonPetReq[4]) + " to level up. (Currently level " + formatWhole(player.cb.uncommonPetLevels[4]) + ")",
]

player.cb.uncommonPetImage = ["<img src='resources/testeUncommonPet.png'style='width:calc(120%);height:calc(120%);margin:-20%'></img>",
"<img src='resources/starUncommonPet.png'style='width:calc(120%);height:calc(120%);margin:-20%'></img>",
"<img src='resources/normalFaceUncommonPet.png'style='width:calc(120%);height:calc(120%);margin:-20%'></img>",
"<img src='resources/sharkUncommonPet.png'style='width:calc(120%);height:calc(120%);margin:-20%'></img>",
"<img src='resources/eyeUncommonPet.png'style='width:calc(120%);height:calc(120%);margin:-20%'></img>",
player.cb.uncommonPetImage = ["<img src='resources/testeUncommonPet.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>",
"<img src='resources/starUncommonPet.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>",
"<img src='resources/normalFaceUncommonPet.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>",
"<img src='resources/sharkUncommonPet.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>",
"<img src='resources/eyeUncommonPet.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>",
]

player.cb.uncommonPetReq = [
Expand All @@ -221,7 +221,7 @@
"Nova: " + formatWhole(player.cb.rarePetAmounts[0]) + "/" + formatWhole(player.cb.rarePetReq[0]) + " to level up. (Currently level " + formatWhole(player.cb.rarePetLevels[0]) + ")",
]

player.cb.rarePetImage = ["<img src='resources/novaRarePet.png'style='width:calc(120%);height:calc(120%);margin:-20%'></img>",
player.cb.rarePetImage = ["<img src='resources/novaRarePet.png'style='width:calc(125%);height:calc(125%);margin:-20%'></img>",
]

player.cb.rarePetReq = [
Expand Down
194 changes: 190 additions & 4 deletions js/dice.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
startData() { return {
unlocked: true,
dicePoints: new Decimal(0),
dicePointsEffect: new Decimal(1),

//dice
dice: new Decimal(1),
Expand All @@ -24,6 +25,29 @@
autoRollTime: new Decimal(0),

lowestRoll: new Decimal(1),

//Booster
currentBoosterText: "",
currentBoosterRoll: new Decimal(-1),
/*
0 - Points
1 - Factor Power
2 - Prestige Points
3 - Trees
4 - Leaves
5 - Grass Value
6 - Grasshoppers
7 - Fertilizer
8 - Mods
9 - Lines of Code
10 - Code Experience
*/
boosterDiceCooldown: new Decimal(0),

diceEffects: [new Decimal(1),new Decimal(1),new Decimal(1),new Decimal(1),new Decimal(1),new Decimal(1),new Decimal(1),new Decimal(1),new Decimal(1),new Decimal(1),new Decimal(1),],

addDiceEffect: new Decimal(0),
dicePointsMult: new Decimal(1),
}
},
automate() {
Expand All @@ -48,23 +72,46 @@
player.d.diceSides = new Decimal(6)
player.d.diceSides = player.d.diceSides.add(buyableEffect("d", 12))

player.d.dicePointsMult = new Decimal(1)
player.d.dicePointsMult = player.d.dicePointsMult.mul(buyableEffect("d", 15))

if (player.d.autoRollCooldown.lt(0))
{
for (let i = 0; i < player.d.diceRolls.length; i++)
{
player.d.diceRolls[i] = Decimal.add(getRandomInt(player.d.diceSides.sub(player.d.lowestRoll)), player.d.lowestRoll)
player.d.gainedDicePoints = player.d.gainedDicePoints.mul(player.d.diceRolls[i])
}
player.d.gainedDicePoints = player.d.gainedDicePoints.mul(player.d.dicePointsMult)
player.d.gainedDicePointsDisplay = player.d.gainedDicePoints
player.d.dicePoints = player.d.dicePoints.add(player.d.gainedDicePoints)
player.d.diceCooldown = new Decimal(1)

player.d.autoRollCooldown = player.d.autoRollTime
layers.d.addDiceEffect()
}
player.d.autoRollCooldown = player.d.autoRollCooldown.sub(onepersec.mul(delta))

player.d.autoRollTime = buyableEffect("d", 13)
player.d.lowestRoll = buyableEffect("d", 14)

player.d.dicePointsEffect = player.d.dicePoints.log10().mul(0.1).add(1)

player.d.currentBoosterText = [
"Currently boosting points.",
"Currently boosting factor power.",
"Currently boosting prestige points.",
"Currently boosting trees.",
"Currently boosting leaves.",
"Currently boosting grass value.",
"Currently boosting grasshoppers.",
"Currently boosting fertilizer.",
"Currently boosting mods.",
"Currently boosting lines of code.",
"Currently boosting code experience.",
"Currently boosting check back xp.",
]

player.d.boosterDiceCooldown = player.d.boosterDiceCooldown.sub(onepersec.mul(delta))
},
branches: ["cb"],
clickables: {
Expand All @@ -88,13 +135,103 @@
player.d.diceRolls[i] = Decimal.add(getRandomInt(player.d.diceSides.sub(player.d.lowestRoll)), player.d.lowestRoll)
player.d.gainedDicePoints = player.d.gainedDicePoints.mul(player.d.diceRolls[i])
}
player.d.gainedDicePointsDisplay = player.d.gainedDicePoints
player.d.gainedDicePoints = player.d.gainedDicePoints.mul(player.d.dicePointsMult)
player.d.gainedDicePointsDisplay = player.d.gainedDicePoints
player.d.dicePoints = player.d.dicePoints.add(player.d.gainedDicePoints)
player.d.diceCooldown = new Decimal(1)
layers.d.addDiceEffect()
},
style: { width: '100px', "min-height": '100px' },
},
12: {
title() { return player.d.boosterDiceCooldown.gt(0) ? formatTime(player.d.boosterDiceCooldown) : "<h2>Roll to change currency boost!"},
canClick() { return player.d.boosterDiceCooldown.lt(0) },
unlocked() { return true },
onClick() {
player.d.currentBoosterRoll = getRandomInt(player.d.diceEffects.length)
player.d.boosterDiceCooldown = new Decimal(120)
},
style: { width: '200px', "min-height": '100px' },
},
/*
0 - Points
1 - Factor Power
2 - Prestige Points
3 - Trees
4 - Leaves
5 - Grass Value
6 - Grasshoppers
7 - Fertilizer
8 - Mods
9 - Lines of Code
10 - Code Experience
*/
13: {
title() { return "<h3>View Effects"},
canClick() { return true },
unlocked() { return true },
onClick() {
callAlert("Points: x" + format(player.d.diceEffects[0]) + "\n" +
"Factor Power: x" + format(player.d.diceEffects[1]) + "\n" +
"Prestige Points: x" + format(player.d.diceEffects[2]) + "\n" +
"Trees: x" + format(player.d.diceEffects[3]) + "\n" +
"Leaves: x" + format(player.d.diceEffects[4]) + "\n" +
"Grass Value: x" + format(player.d.diceEffects[5]) + "\n" +
"Grasshoppers: x" + format(player.d.diceEffects[6]) + "\n" +
"Fertilizer: x" + format(player.d.diceEffects[7]) + "\n" +
"Mods: x" + format(player.d.diceEffects[8]) + "\n" +
"Lines of Code: x" + format(player.d.diceEffects[9]) + "\n" +
"Code Experience: x" + format(player.d.diceEffects[10]) + "\n"
)
},
style: { width: '100px', "min-height": '100px' },
},
},
addDiceEffect()
{
let sum = new Decimal(0)
for (let i = 0; i < player.d.diceRolls.length; i++)
{
sum = sum.add(player.d.diceRolls[i])
}

if (player.d.currentBoosterRoll == 0)
{
player.d.addDiceEffect = sum.mul(0.0025).pow(1.1)
player.d.diceEffects[0] = player.d.diceEffects[0].add(player.d.addDiceEffect)
} else if (player.d.currentBoosterRoll == 1) {
player.d.addDiceEffect = sum.mul(0.002).pow(0.95)
player.d.diceEffects[1] = player.d.diceEffects[1].add(player.d.addDiceEffect)
} else if (player.d.currentBoosterRoll == 2) {
player.d.addDiceEffect = sum.mul(0.0016).pow(0.92)
player.d.diceEffects[2] = player.d.diceEffects[2].add(player.d.addDiceEffect)
} else if (player.d.currentBoosterRoll == 3) {
player.d.addDiceEffect = sum.mul(0.0008).pow(0.8)
player.d.diceEffects[3] = player.d.diceEffects[3].add(player.d.addDiceEffect)
} else if (player.d.currentBoosterRoll == 4) {
player.d.addDiceEffect = sum.mul(0.0012).pow(0.8)
player.d.diceEffects[4] = player.d.diceEffects[4].add(player.d.addDiceEffect)
} else if (player.d.currentBoosterRoll == 5) {
player.d.addDiceEffect = sum.mul(0.0008).pow(0.75)
player.d.diceEffects[5] = player.d.diceEffects[5].add(player.d.addDiceEffect)
} else if (player.d.currentBoosterRoll == 6) {
player.d.addDiceEffect = sum.mul(0.0007).pow(0.7)
player.d.diceEffects[6] = player.d.diceEffects[6].add(player.d.addDiceEffect)
} else if (player.d.currentBoosterRoll == 7) {
player.d.addDiceEffect = sum.mul(0.0008).pow(0.7)
player.d.diceEffects[7] = player.d.diceEffects[7].add(player.d.addDiceEffect)
} else if (player.d.currentBoosterRoll == 8) {
player.d.addDiceEffect = sum.mul(0.0005).pow(0.7)
player.d.diceEffects[8] = player.d.diceEffects[8].add(player.d.addDiceEffect)
} else if (player.d.currentBoosterRoll == 9) {
player.d.addDiceEffect = sum.mul(0.0007).pow(0.7)
player.d.diceEffects[9] = player.d.diceEffects[9].add(player.d.addDiceEffect)
} else if (player.d.currentBoosterRoll == 10) {
player.d.addDiceEffect = sum.mul(0.0006).pow(0.7)
player.d.diceEffects[10] = player.d.diceEffects[10].add(player.d.addDiceEffect)

}
},
bars: {
},
upgrades: {
Expand All @@ -114,6 +251,7 @@
buy() {
let base = new Decimal(100)
let growth = 100
if (player.d.dice.gt(3)) growth = 10000
let buyonecost = new Decimal(growth).pow(getBuyableAmount(this.layer, this.id)).mul(base)
player.d.dice = player.d.dice.add(1)
setBuyableAmount(this.layer, this.id, getBuyableAmount(this.layer, this.id).add(1))
Expand Down Expand Up @@ -219,6 +357,38 @@
},
style: { width: '175px', height: '100px', }
},
15: {
cost(x) { return new Decimal(1.75).pow(x || getBuyableAmount(this.layer, this.id)).mul(6000) },
effect(x) { return new getBuyableAmount(this.layer, this.id).pow(1.1).add(1) },
unlocked() { return true },
canAfford() { return player.d.dicePoints.gte(this.cost())},
title() {
return format(getBuyableAmount(this.layer, this.id), 0) + "<br/>DP Multiplier"
},
display() {
return "which are boosting dice points by x" + format(tmp[this.layer].buyables[this.id].effect) + ".\n\
Cost: " + format(tmp[this.layer].buyables[this.id].cost) + " Dice Points"
},
buy() {
let base = new Decimal(6000)
let growth = 1.75
if (player.buyMax == false)
{
let buyonecost = new Decimal(growth).pow(getBuyableAmount(this.layer, this.id)).mul(base)
player.d.dicePoints = player.d.dicePoints.sub(buyonecost)
setBuyableAmount(this.layer, this.id, getBuyableAmount(this.layer, this.id).add(1))
} else
{

let max = Decimal.affordGeometricSeries(player.d.dicePoints, base, growth, getBuyableAmount(this.layer, this.id))
let cost = Decimal.sumGeometricSeries(max, base, growth, getBuyableAmount(this.layer, this.id))
player.d.dicePoints = player.d.dicePoints.sub(cost)

setBuyableAmount(this.layer, this.id, getBuyableAmount(this.layer, this.id).add(max))
}
},
style: { width: '175px', height: '100px', }
},
},
milestones: {

Expand All @@ -241,16 +411,32 @@
["raw-html", function () { return "Current rolls: " + player.d.rollText + '.'}, { "color": "white", "font-size": "24px", "font-family": "monospace" }],
["raw-html", function () { return "+" + formatWhole(player.d.gainedDicePointsDisplay) + ' DP.'}, { "color": "white", "font-size": "24px", "font-family": "monospace" }],
["blank", "25px"],
["row", [["buyable", 12], ["buyable", 13], ["buyable", 14]]],
["row", [["buyable", 12], ["buyable", 13], ["buyable", 14], ["buyable", 15]]],
]

},
"Booster Dice": {
buttonStyle() { return { 'color': 'white' } },
unlocked() { return true },
content:
[
["blank", "25px"],
["raw-html", function () { return player.d.currentBoosterText[player.d.currentBoosterRoll] + " (Currently x" + format(player.d.diceEffects[player.d.currentBoosterRoll]) + ")" }, { "color": "white", "font-size": "24px", "font-family": "monospace" }],
["blank", "25px"],
["row", [["clickable", 12], ["clickable", 13]]],
["blank", "25px"],
["row", [["clickable", 11]]],
["raw-html", function () { return "Current rolls: " + player.d.rollText + '.'}, { "color": "white", "font-size": "24px", "font-family": "monospace" }],
["raw-html", function () { return "+" + format(player.d.addDiceEffect) + 'x to the effect.'}, { "color": "white", "font-size": "24px", "font-family": "monospace" }],
]

},
},
},

tabFormat: [
["raw-html", function () { return "You have <h3>" + format(player.points) + "</h3> celestial points (" + format(player.gain) + "/s)." }, { "color": "white", "font-size": "12px", "font-family": "monospace" }],
["raw-html", function () { return "You have <h3>" + formatWhole(player.d.dicePoints) + "</h3> dice points." }, { "color": "white", "font-size": "24px", "font-family": "monospace" }],
["raw-html", function () { return "You have <h3>" + formatWhole(player.d.dicePoints) + "</h3> dice points, which boost check back effect by ^" + format(player.d.dicePointsEffect) + "." }, { "color": "white", "font-size": "24px", "font-family": "monospace" }],
["row", [["clickable", 1]]],
["microtabs", "stuff", { 'border-width': '0px' }],
],
Expand Down
1 change: 1 addition & 0 deletions js/factors.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
player.f.factorPowerPerSecond = player.f.factorPowerPerSecond.mul(player.gh.grasshopperEffects[1])
player.f.factorPowerPerSecond = player.f.factorPowerPerSecond.mul(buyableEffect("m", 14))
player.f.factorPowerPerSecond = player.f.factorPowerPerSecond.mul(player.cb.commonPetEffects[2][0])
player.f.factorPowerPerSecond = player.f.factorPowerPerSecond.mul(player.d.diceEffects[1])

player.f.factorPower = player.f.factorPower.add(player.f.factorPowerPerSecond.mul(delta))
player.f.factorPowerEffect = player.f.factorPower.pow(0.5).div(3).add(1)
Expand Down
1 change: 1 addition & 0 deletions js/grass.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
player.g.grassVal = player.g.grassVal.mul(buyableEffect("f", 7))
player.g.grassVal = player.g.grassVal.mul(buyableEffect("f", 8))
player.g.grassVal = player.g.grassVal.mul(player.cb.commonPetEffects[3][0])
player.g.grassVal = player.g.grassVal.mul(player.d.diceEffects[5])

player.g.grassReq = new Decimal(4)
player.g.grassReq = player.g.grassReq.div(buyableEffect("g", 12))
Expand Down
2 changes: 2 additions & 0 deletions js/grasshop.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
{
player.gh.grasshoppersToGet = player.g.grass.div(15000).pow(0.45).add(50000)
player.gh.grasshoppersToGet = player.gh.grasshoppersToGet.mul(player.cb.uncommonPetEffects[0][1])
player.gh.grasshoppersToGet = player.gh.grasshoppersToGet.mul(player.d.diceEffects[6])
}

if (player.gh.grasshopPause.gt(0)) {
Expand All @@ -49,6 +50,7 @@
player.gh.fertilizerPerSecond = player.gh.grasshoppers.pow(1.4).div(10)
player.gh.fertilizerPerSecond = player.gh.fertilizerPerSecond.mul(player.cb.uncommonPetEffects[0][2])
player.gh.fertilizerPerSecond = player.gh.fertilizerPerSecond.mul(player.cb.rarePetEffects[0][0])
player.gh.fertilizerPerSecond = player.gh.fertilizerPerSecond.mul(player.d.diceEffects[7])
player.gh.fertilizer = player.gh.fertilizer.add(player.gh.fertilizerPerSecond.mul(delta))
},
branches: ["g"],
Expand Down
1 change: 1 addition & 0 deletions js/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ addLayer("i", {
player.gain = player.gain.mul(buyableEffect("m", 14))
player.gain = player.gain.mul(player.cb.levelEffect)
player.gain = player.gain.mul(player.cb.commonPetEffects[0][0])
player.gain = player.gain.mul(player.d.diceEffects[0])

player.points = player.points.add(player.gain.mul(delta))

Expand Down
Loading

0 comments on commit 8aeca97

Please sign in to comment.