Skip to content

Commit

Permalink
Merge pull request #2314 from gylfirst/development
Browse files Browse the repository at this point in the history
Fix: new forgeable pets able to display forge timing
  • Loading branch information
Shiiyu authored Dec 17, 2024
2 parents 49176db + 621554d commit 2b6371e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 33 deletions.
16 changes: 8 additions & 8 deletions src/constants/forge.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ export const FORGE_TIMES = {
PERFECT_PERIDOT_GEM: 20 * 60,
// Pets
BEJEWELED_COLLAR: 2 * 60,
LVL_1_LEGENDARY_MOLE: 3 * 24 * 60,
LVL_1_LEGENDARY_AMMONITE: 3 * 24 * 60,
LVL_1_LEGENDARY_PENGUIN: 7 * 24 * 60,
LVL_1_LEGENDARY_TYRANNOSAURUS: 7 * 24 * 60,
LVL_1_LEGENDARY_SPINOSAURUS: 7 * 24 * 60,
LVL_1_LEGENDARY_GOBLIN: 7 * 24 * 60,
LVL_1_LEGENDARY_ANKYLOSAURUS: 7 * 24 * 60,
LVL_1_LEGENDARY_MAMMOTH: 7 * 24 * 60,
MOLE: 3 * 24 * 60,
AMMONITE: 3 * 24 * 60,
PENGUIN: 7 * 24 * 60,
TYRANNOSAURUS: 7 * 24 * 60,
SPINOSAURUS: 7 * 24 * 60,
GOBLIN: 7 * 24 * 60,
ANKYLOSAURUS: 7 * 24 * 60,
MAMMOTH: 7 * 24 * 60,
// Other
BEACON_2: 20 * 60,
BEACON_3: 1 * 24 * 60 + 6 * 60,
Expand Down
48 changes: 24 additions & 24 deletions src/constants/pet-stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,9 @@ class Rabbit extends Pet {
if (this.rarity >= LEGENDARY) {
list.push(this.third);
}
if (this.rarity >= MYTHIC) {
list.push(this.fourth);
}
return list;
}

Expand All @@ -483,6 +486,15 @@ class Rabbit extends Pet {
desc: [`§7Farming minions work §a${round(this.level * mult, 1)}% §7faster while on your island.`],
};
}

get fourth() {
return {
name: "§6Chocolate Injections",
desc: [
`§7Increases §6Chocolate Factory§7 production by §a+${round(0.01 + (this.level - 1) * 0.0004, 3)}x§7. Duplicate §aChocolate Rabbits§7 that you find grant §6${round(1.3 + (this.level - 1) * 0.32, 1)}% Chocolate§7.`,
],
};
}
}

class Armadillo extends Pet {
Expand All @@ -493,56 +505,44 @@ class Armadillo extends Pet {
}

get abilities() {
const list = [this.first, this.second, this.third];
const list = [this.first, this.second];
if (this.rarity >= RARE) {
list.push(this.fourth);
list.push(this.third);
}
if (this.rarity >= LEGENDARY) {
list.push(this.fifth);
list.push(this.fourth);
}
return list;
}

get first() {
return {
name: "§6Rideable",
desc: [`§7Right-click on your summoned pet to ride it!`],
desc: [`§7Right-click on your summoned pet to ride it! Moves faster based on your §f${SYMBOLS.speed} Speed§7.`],
};
}

get second() {
return {
name: "§6Tunneler",
desc: [
`§7The Armadillo breaks all stone or ore in its path while you are riding it in the §3Crystal Hollows §7using your held item.`,
],
desc: [`§7While riding in the §5Crystal Hollows§7, this Pet breaks all blocks in its path using your held item.`],
};
}

get third() {
return {
name: "§6Earth Surfer",
desc: [`§7The Armadillo moves faster based on your §f${SYMBOLS.speed} Speed§7.`],
};
}

get fourth() {
const mult = getValue(this.rarity, { rare: 0.2, epic: 0.3 });
const mult = getValue(this.rarity, { rare: 0.2, epic: 0.3, legendary: 0.4 });
return {
name: "§6Rolling Miner",
desc: [`§7Every §a${round(60 - this.level * mult, 1)} §7seconds, the next gemstone you mine gives §a2x §7drops.`],
desc: [
`§7Every §a${round(60 - this.level * mult, 1)} §7seconds, the next §5Gemstone§7 you mine gives §a2x §7drops.`,
],
};
}

get fifth() {
const mult = getValue(this.rarity, { legendary: 0.5 });
get fourth() {
return {
name: "§6Mobile Tank",
desc: [
`§7For every §a${round(100 - this.level * mult, 1)} ${SYMBOLS.defense} Defense§7, gain §f+1 ${
SYMBOLS.speed
} Speed §7and §6+1 ${SYMBOLS.mining_speed} Mining Speed§7.`,
],
name: "§6Long Claws",
desc: [`§7Grants §e+${round(this.level * 3)} ${SYMBOLS.mining_spread} Mining Spread§7 while mining Hard Stone.`],
};
}
}
Expand Down
7 changes: 6 additions & 1 deletion src/stats/mining.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ async function getForge(userProfile) {
forgeTime *= constants.QUICK_FORGE_MULTIPLIER[quickForge];
}

forgeItem.name = item.id == "PET" ? "[Lvl 1] Ammonite" : dbObject ? dbObject.name : item.id;
if (item.id == "BEJEWELED_COLLAR") {
forgeItem.name = helper.titleCase(item.id.replace("_", " "));
} else {
forgeItem.name =
item.type == "PETS" ? "[Lvl 1] " + helper.titleCase(item.id) : dbObject ? dbObject.name : item.id;
}

const timeFinished = item.startTime + forgeTime;
forgeItem.timeFinished = timeFinished;
Expand Down

0 comments on commit 2b6371e

Please sign in to comment.