Skip to content

Commit

Permalink
v3.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
DuckySoLucky committed Dec 30, 2022
1 parent a64220a commit 356536a
Show file tree
Hide file tree
Showing 49 changed files with 4,535 additions and 1,703 deletions.
100 changes: 89 additions & 11 deletions API/constants/pets.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ class Pet {
case "farming_fortune":
list.push(`§7Farming Fortune: ${formatStat(newStats[stat])}`);
break;
case "fishing_speed":
list.push(`§7Fishing Speed: ${formatStat(newStats[stat])}`);
break;
default:
list.push(`§cUNKNOWN: ${stat}`);
break;
Expand Down Expand Up @@ -517,7 +520,7 @@ class Bat extends Pet {
class Endermite extends Pet {
get stats() {
return {
intelligence: this.level * 1,
intelligence: this.level * 1.5,
pet_luck: this.level * 0.1,
};
}
Expand Down Expand Up @@ -662,15 +665,15 @@ class Rock extends Pet {
const mult = getValue(this.rarity, { rare: 0.2, epic: 0.25 });
return {
name: "§6Fortify",
desc: [`§7While sitting on your rock, gain +§a${round(this.level * mult, 1)}% §7defense`],
desc: [`§7While sitting on your rock, gain §a+${round(this.level * mult, 1)}% §7defense`],
};
}

get fourth() {
const mult = getValue(this.rarity, { legendary: 0.3 });
return {
name: "§6Steady Ground",
desc: [`§7While sitting on your rock, gain +§a${round(this.level * mult, 1)}§7% damage`],
desc: [`§7While sitting on your rock, gain §c+${round(this.level * mult, 1)}% §7damage`],
};
}
}
Expand Down Expand Up @@ -1009,9 +1012,13 @@ class GoldenDragon extends Pet {
get stats() {
const stats = {};
if (this.level >= 100) {
stats.strength = round(Math.max(0, this.level - 100) * 0.25 + 25 - 0.01, 0);
stats.bonus_attack_speed = round(Math.max(0, this.level - 100) * 0.25 + 25 - 0.01, 0);
stats.magic_find = round(floor(this.level / 10) * 0.5, 2);
stats.strength =
round(25 + Math.max(0, this.level - 100) * 0.25, 0) +
10 * Math.max(Math.floor(Math.log10(Math.abs(this.profile?.collections?.GOLD_INGOT?.totalAmount || 0))), 0);
stats.bonus_attack_speed = round(25 + Math.max(0, this.level - 100) * 0.25, 0);
stats.magic_find =
round(25 + Math.max(0, this.level - 100) * 0.25, 0) +
2 * Math.max(Math.floor(Math.log10(Math.abs(this.profile?.collections?.GOLD_INGOT?.totalAmount || 0))), 0);
}
return stats;
}
Expand Down Expand Up @@ -2541,7 +2548,7 @@ class FlyingFish extends Pet {
}

get first() {
const mult = getValue(this.rarity, { rare: 0.6, epic: 0.75 });
const mult = getValue(this.rarity, { rare: 0.6, epic: 0.8 });
return {
name: "§6Quick Reel",
desc: [`§7Grants §b+${round(this.level * mult, 2)}${symbols.fishing_speed.symbol} Fishing Speed§7.`],
Expand Down Expand Up @@ -2880,6 +2887,7 @@ class Bingo extends Pet {
return {
health: 25 + this.level * 0.75,
strength: 5 + this.level * 0.2,
speed: 25 + this.level * 0.5,
};
}

Expand Down Expand Up @@ -2912,7 +2920,9 @@ class Bingo extends Pet {
const mult = getValue(this.rarity, { uncommon: 0.1 });
return {
name: "§6Fast Learner",
desc: [`§7Gain §c${floor(5 + this.level * mult, 1)}% §7more Skill Experience and §9Slayer §7Experience.`],
desc: [
`§7Gain §c${floor(5 + this.level * mult, 1)}% §7more Skill Experience, HOTM Experience, and Slayer Experience.`,
],
};
}

Expand All @@ -2933,10 +2943,16 @@ class Bingo extends Pet {
}

get fifth() {
const mult = getValue(this.rarity, { legendary: 0.08 });
const mult = getValue(this.rarity, { legendary: 0.5 });

return {
name: "§6Scavenger",
desc: [`§7Recover §b${round(2 + this.level * mult, 1)} mana §7when using mana.`],
name: "§6Recovery",
desc: [
`§7Upon death, your active potion effects will be retained with §c${round(
25 + this.level * mult,
1
)}% §7of their time.`,
],
};
}
}
Expand Down Expand Up @@ -3228,6 +3244,60 @@ class Kuudra extends Pet {
}
}

class Reindeer extends Pet {
get stats() {
return {
health: this.level * 1,
sea_creature_chance: this.level * 0.05,
fishing_speed: this.level * 0.25,
};
}

get abilities() {
const list = [this.first, this.second, this.third, this.fourth];

return list;
}

get first() {
return {
name: "§6Water Sprint",
desc: [`§7Gain §ddouble §7pet §aEXP§7.`],
};
}

get second() {
const mult = getValue(this.rarity, { legendary: 0.75 });

return {
name: "§6Infused",
desc: [
`§7Gives +§b${round(this.level * mult, 1)}${symbols.fishing_speed.symbol} Fishing Speed §7and §3+10 ${
symbols.sea_creature_chance.symbol
} Sea Creature Chance §7while on §cJerry's Workshop.`,
],
};
}

get third() {
const mult = getValue(this.rarity, { legendary: 0.05 });

return {
name: "§6Snow Power",
desc: [`§7Grants §a+${round(this.level * mult, 1)}% §7bonus gift chance during the §cGift Attack §7event.`],
};
}

get fourth() {
const mult = getValue(this.rarity, { legendary: 0.2 });

return {
name: "§6Icy Wind",
desc: [`§7Grants a §a+${round(this.level * mult, 1)}% §7chance of getting double §bIce Essence§7.`],
};
}
}

class QuestionMark extends Pet {
get stats() {
return {};
Expand Down Expand Up @@ -3314,6 +3384,7 @@ const petStats = {
PIGMAN: Pigman,
RABBIT: Rabbit,
RAT: Rat,
REINDEER: Reindeer,
ROCK: Rock,
SCATHA: Scatha,
SHEEP: Sheep,
Expand Down Expand Up @@ -3773,6 +3844,13 @@ const PET_RARITY_OFFSET = {
ignoresTierBoost: true,
typeGroup: "WISP",
},
REINDEER: {
head: "/head/a2df65c6fd19a58bee38252192ac7ce2cf1dc8632c3547a9228b6b697240d098",
type: "fishing",
maxTier: "legendary",
maxLevel: 100,
emoji: "🦌",
},
};

const pet_value = {
Expand Down
139 changes: 136 additions & 3 deletions API/constants/weight.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//CREDIT: https://github.com/Senither/hypixel-skyblock-facade
/*eslint-disable */
const dungeon_weights = {
catacombs: 0.0002149604615,
healer: 0.0000045254834,
Expand Down Expand Up @@ -76,7 +75,7 @@ const skill_weights = {
},
};

module.exports = function calculateWeight(type, level = null, experience) {
function calculateSenitherWeight(type, level = null, experience) {
const slayers = ["revenant", "tarantula", "sven", "enderman"];
const dungeons = ["catacombs", "healer", "mage", "berserk", "archer", "tank"];
const skills = [
Expand All @@ -95,7 +94,7 @@ module.exports = function calculateWeight(type, level = null, experience) {
else if (skills.includes(type))
return calculateSkillWeight(type, level, experience);
else return null;
};
}

function calculateDungeonWeight(type, level, experience) {
let percentageModifier = dungeon_weights[type];
Expand Down Expand Up @@ -182,3 +181,137 @@ function calculateSlayerWeight(type, experience) {
weight_overflow: overflow,
};
}

const calcSkill = require("./skills.js");

function calculateTotalSenitherWeight(profile) {
const weight = {
skills: {
farming: calculateSenitherWeight(
"farming",
calcSkill("farming", profile?.experience_skill_farming || 0)
.levelWithProgress,
profile?.experience_skill_farming || 0
),
mining: calculateSenitherWeight(
"mining",
calcSkill("mining", profile?.experience_skill_mining || 0)
.levelWithProgress,
profile?.experience_skill_mining || 0
),
combat: calculateSenitherWeight(
"combat",
calcSkill("combat", profile?.experience_skill_combat || 0)
.levelWithProgress,
profile?.experience_skill_combat || 0
),
foraging: calculateSenitherWeight(
"foraging",
calcSkill("foraging", profile?.experience_skill_foraging || 0)
.levelWithProgress,
profile?.experience_skill_foraging || 0
),
fishing: calculateSenitherWeight(
"fishing",
calcSkill("fishing", profile?.experience_skill_fishing || 0)
.levelWithProgress,
profile?.experience_skill_fishing || 0
),
enchanting: calculateSenitherWeight(
"enchanting",
calcSkill("enchanting", profile?.experience_skill_enchanting || 0)
.levelWithProgress,
profile?.experience_skill_enchanting || 0
),
alchemy: calculateSenitherWeight(
"alchemy",
calcSkill("alchemy", profile?.experience_skill_alchemy || 0)
.levelWithProgress,
profile?.experience_skill_alchemy || 0
),
taming: calculateSenitherWeight(
"taming",
calcSkill("taming", profile?.experience_skill_taming || 0)
.levelWithProgress,
profile?.experience_skill_taming || 0
),
},
slayer: {
revenant: calculateSenitherWeight(
"revenant",
null,
profile.slayer_bosses?.zombie?.xp || 0
),
tarantula: calculateSenitherWeight(
"tarantula",
null,
profile.slayer_bosses?.spider?.xp || 0
),
sven: calculateSenitherWeight(
"sven",
null,
profile.slayer_bosses?.wolf?.xp || 0
),
enderman: calculateSenitherWeight(
"enderman",
null,
profile.slayer_bosses?.enderman?.xp || 0
),
},
dungeons: {
catacombs: calculateSenitherWeight(
"catacombs",
calcSkill(
"dungeoneering",
profile.dungeons?.dungeon_types?.catacombs?.experience || 0
).levelWithProgress,
profile.dungeons?.dungeon_types?.catacombs?.experience || 0
),
classes: {
healer: calculateSenitherWeight(
"healer",
calcSkill(
"dungeoneering",
profile.dungeons?.player_classes?.healer?.experience || 0
).levelWithProgress,
profile.dungeons?.player_classes?.healer?.experience || 0
),
mage: calculateSenitherWeight(
"mage",
calcSkill(
"dungeoneering",
profile.dungeons?.player_classes?.mage?.experience || 0
).levelWithProgress,
profile.dungeons?.player_classes?.mage?.experience || 0
),
berserk: calculateSenitherWeight(
"berserk",
calcSkill(
"dungeoneering",
profile.dungeons?.player_classes?.berserk?.experience || 0
).levelWithProgress,
profile.dungeons?.player_classes?.berserk?.experience || 0
),
archer: calculateSenitherWeight(
"archer",
calcSkill(
"dungeoneering",
profile.dungeons?.player_classes?.archer?.experience || 0
).levelWithProgress,
profile.dungeons?.player_classes?.archer?.experience || 0
),
tank: calculateSenitherWeight(
"tank",
calcSkill(
"dungeoneering",
profile.dungeons?.player_classes?.tank?.experience || 0
).levelWithProgress,
profile.dungeons?.player_classes?.tank?.experience || 0
),
},
},
};
return weight;
}

module.exports = { calculateTotalSenitherWeight };
21 changes: 9 additions & 12 deletions API/functions/getFetchur.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
const items = require("../constants/fetchur_items.js");

function getFetchur() {
try {
const today = new Date();
today.setHours(today.getHours() - 6);
const day = today.getDate();
let item;
if (day <= 12) {
item = items[day];
}
item = items[day % 12];
return item;
} catch (error) {
console.log(error);
const today = new Date();
today.setHours(today.getHours() - 6);
const day = today.getDate();
let item;
if (day <= 12) {
item = items[day];
}
item = items[day % 12];

return item;
}

module.exports = { getFetchur };
Loading

0 comments on commit 356536a

Please sign in to comment.