Change giant chestplate to regen 3

This commit is contained in:
2026-10-01 20:55:58 -03:00
parent 8396e8e895
commit 6e5703a482
3 changed files with 13 additions and 13 deletions
+5 -5
View File
@@ -132,7 +132,7 @@ Deno.test("the giant chestplate goes in the body slot and gives 20 more health w
assertEquals(curios_items(t.take(1))[body], {
id: "bworld:giant_chestplate",
count: 1,
lore: "When worn:\n+20 Max Health\nAfter 10s unhurt: Regeneration II",
lore: "When worn:\n+20 Max Health\nAfter 10s unhurt: Regeneration III",
});
assertEquals(alice.max_health, 40);
@@ -156,7 +156,7 @@ Deno.test("the giant chestplate goes in the body slot and gives 20 more health w
assertEquals(t.game.players()[0].health, 20);
});
Deno.test("the giant chestplate gives regeneration II after 10 seconds without being hurt", async () => {
Deno.test("the giant chestplate gives regeneration III after 10 seconds without being hurt", async () => {
const t = await setup();
t.send(1, { type: "chat", text: "/give bworld:giant_chestplate" });
const slot = last_container(t.take(1), "inventory").findIndex((i: Msg) => i?.id === "bworld:giant_chestplate");
@@ -168,17 +168,17 @@ Deno.test("the giant chestplate gives regeneration II after 10 seconds without b
for (let i = 0; i < 199; i++) t.game.tick();
assertEquals(regeneration(), undefined);
t.game.tick();
assertEquals(regeneration()?.amplifier, 1);
assertEquals(regeneration()?.amplifier, 2);
// it keeps being topped up while they stay unhurt
for (let i = 0; i < 200; i++) t.game.tick();
assertEquals(regeneration()?.amplifier, 1);
assertEquals(regeneration()?.amplifier, 2);
// being hurt starts the 10 seconds again, what they were given runs out
t.game.damage_player(alice, 2, "test");
for (let i = 0; i < 199; i++) t.game.tick();
assertEquals(regeneration(), undefined);
t.game.tick();
assertEquals(regeneration()?.amplifier, 1);
assertEquals(regeneration()?.amplifier, 2);
});
Deno.test("everyone sees what a player wears that has a worn model, and players joining later too", async () => {