Skip to content

Commit 7e5fd01

Browse files
committed
feat: level 11 for aura
1 parent 37a5914 commit 7e5fd01

File tree

1 file changed

+42
-18
lines changed

1 file changed

+42
-18
lines changed

src/commands/aura.ts

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,24 @@ function hashString(str: string): number {
1212
return hash;
1313
}
1414

15+
// prettier-ignore
16+
const auraLevelNames = [
17+
"Vile", // 0
18+
"Invisible", // 1
19+
"Weak", // 2
20+
"Frail", // 3
21+
"Mid", // 4
22+
"Noticed", // 5
23+
"Vibrant", // 6
24+
"Strong", // 7
25+
"Radiant", // 8
26+
"Legendary", // 9
27+
"Mythical", // 10
28+
"Omnipotent", // 11
29+
];
30+
1531
const flavorSet1 = [
32+
"An aura so cursed, even homeless bums avoid you!",
1633
"Your aura is basically nonexistent. NPC energy.",
1734
"Your vibe is weak. People forget you exist mid-conversation.",
1835
"You got potential, but right now you're background noise.",
@@ -23,10 +40,12 @@ const flavorSet1 = [
2340
"You light up the room. Everyone wants you on their team.",
2441
"A divinelike presence, bending the fabric of reality.",
2542
"A legendary aura, echoing through the cosmos eternally.",
43+
"Your presence is truly, truly unmatched.",
2644
];
2745

2846
const flavorSet2 = [
2947
"Your presence is weaker than your dad's commitment.",
48+
"Please go, you're making the room uncomfortable.",
3049
"Your aura is so weak, even the Normals avoid you.",
3150
"Barely a vibe, as if you fell down a 4 person tall staircase.",
3251
"You're like a level 0 Sniper on Wave 40—absolutely useless and proud of it.",
@@ -36,24 +55,11 @@ const flavorSet2 = [
3655
"You walk in, and the atmosphere changes. Eyes turn.",
3756
"Near-mythical aura, you're as lethal as King Von.",
3857
"God-tier vibes, I'd rub your feet.",
58+
"Paradoxically omnipotent. Are you Ego himself?",
3959
];
4060

4161
const flavorSets = [flavorSet1, flavorSet2];
4262

43-
const auraLevelNames = [
44-
"Vile", // 0
45-
"Invisible", // 1
46-
"Weak", // 2
47-
"Frail", // 3
48-
"Mid", // 4
49-
"Noticed", // 5
50-
"Vibrant", // 6
51-
"Strong", // 7
52-
"Radiant", // 8
53-
"Legendary", // 9
54-
"Mythical", // 10
55-
];
56-
5763
export const data = new SlashCommandBuilder()
5864
.setName("aura")
5965
.setDescription("Calculate your aura based on your display name")
@@ -81,10 +87,26 @@ export async function execute(
8187
let level: number;
8288
let flavorText: string;
8389

84-
if (displayName === "toru") {
85-
percentage = -100;
86-
level = 0;
87-
flavorText = "An aura so cursed, even homeless bums avoid you!";
90+
const nameToLevel: { [key: string]: number } = {
91+
toru: 0,
92+
toru1: 1,
93+
toru2: 2,
94+
toru3: 3,
95+
toru4: 4,
96+
toru5: 5,
97+
toru6: 6,
98+
toru7: 7,
99+
toru8: 8,
100+
toru9: 9,
101+
toru10: 10,
102+
toru11: 11,
103+
};
104+
105+
if (displayName in nameToLevel) {
106+
level = nameToLevel[displayName];
107+
percentage = level === 0 ? -100 : level === 11 ? 100 : (level - 1) * 10 + 9;
108+
const chosenSet = flavorSets[Math.floor(Math.random() * flavorSets.length)];
109+
flavorText = chosenSet[Math.max(0, Math.min(level, chosenSet.length - 1))];
88110
} else {
89111
const chosenSet = flavorSets[Math.floor(Math.random() * flavorSets.length)];
90112
const hash = hashString(displayName);
@@ -94,6 +116,8 @@ export async function execute(
94116
level = 0;
95117
} else if (percentage <= 9) {
96118
level = 1;
119+
} else if (percentage === 100) {
120+
level = 11;
97121
} else {
98122
level = Math.ceil((percentage - 9) / 10) + 1;
99123
if (level > 10) level = 10;

0 commit comments

Comments
 (0)