Skip to content

Commit

Permalink
LootDrops added and lees ehre deflation (#456)
Browse files Browse the repository at this point in the history
* bisschen loot hinzugefügt und deflation von internetpunkten geviertelt

* vielleicht so

* die bilder in question, git add -A muss man auch noch machen
  • Loading branch information
Feluin authored Jul 18, 2024
1 parent ab38ef9 commit 530d4b2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
Binary file added assets/loot/22-sahne.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/loot/23-ehre.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/service/lootService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export enum LootTypeId {
FERRIS = 19,
HOMEPOD = 20,
RADIOACTIVE_WASTE = 21,
SAHNE = 22,
AEHRE = 23,
}
const lootTemplates: loot.LootTemplate[] = [
{
Expand Down Expand Up @@ -280,6 +282,29 @@ const lootTemplates: loot.LootTemplate[] = [
emote: "☢️",
asset: "assets/loot/21-radioaktiver-muell.jpg",
},
{
id: LootTypeId.SAHNE,
weight: 1,
displayName: "Sprühsahne",
titleText: "Sprühsahne",
description: "Fürs Frühstück oder so",
emote: ":sahne:",
asset: "assets/loot/22-sahne.jpg",
},
{
id: LootTypeId.AEHRE,
weight: 1,
displayName: "Ehre",
titleText: "Ehre aus Mitleid",
description:
"Irgendjemand muss ja den Server am laufen halten, kriegst dafür wertlose Internetpunkte",
emote: ":aehre:",
asset: "assets/loot/23-ehre.jpg",
specialAction: async (context, winner, _channel, _loot) => {
const ehre = await import("../storage/ehre.js");
await ehre.addPoints(winner.id, 1);
},
},
] as const;

/*
Expand Down
2 changes: 1 addition & 1 deletion src/storage/ehre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function runDeflation(ctx = db()) {
await ctx
.updateTable("ehrePoints")
.set(eb => ({
points: eb("points", "*", 0.98),
points: eb("points", "*", 0.995),
}))
.execute();
}
Expand Down

0 comments on commit 530d4b2

Please sign in to comment.