Effect command

This commit is contained in:
2026-10-02 13:19:12 -03:00
parent f749f6be79
commit cd07d441b2
5 changed files with 38 additions and 0 deletions
+8
View File
@@ -209,3 +209,11 @@ Deno.test("the effects that show an icon are sent to the player when they change
t.game.tick();
assert(!t.take(1).some((m: Msg) => m.type === "effects"), "not again while they only count down");
});
Deno.test("/effect gives you an effect, for 30 seconds or as many as you say", async () => {
const t = await setup();
t.send(1, { type: "chat", text: "/effect bworld:speed" });
assertEquals(t.player.get_effect("bworld:speed")?.duration, 600);
t.send(1, { type: "chat", text: "/effect bworld:regeneration 5" });
assertEquals(t.player.get_effect("bworld:regeneration")?.duration, 100);
});