Remove silly tests that need constant changing

This commit is contained in:
2026-10-01 17:01:46 -03:00
parent 1fc92a7b00
commit ea9f3f61bb
6 changed files with 44 additions and 41 deletions
+6 -4
View File
@@ -13,19 +13,21 @@ async function setup() {
t.send(1, { type: "chat", text: "/give artifacts:power_glove" });
t.send(1, { type: "chat", text: "/give artifacts:feral_claws" });
t.take(1);
return { ...t, alice: t.game.players()[0] };
const alice = t.game.players()[0];
// the curios slot artifacts go in, after the player's own menu's. which others there are depends on every mod
const hands = PLAYER_MENU_EXTRA + alice.inventory_menu.extra.findIndex((s) => s.icon === "bworld:empty_hands_slot");
return { ...t, alice, hands };
}
Deno.test("the power glove and feral claws go in the hands slot, and only work while worn", async () => {
const t = await setup();
// the hands slot is the second curios one, after the body slot, which are after the player's own menu's
t.send(1, { type: "click", menu: 0, slot: 0, button: 0, shift: true });
t.game.tick();
assertEquals(t.alice.attribute(ATTRIBUTES.attack_damage), 1 + 4);
// swapped for the claws by hand: the glove's damage goes, the claws' speed comes
t.send(1, { type: "click", menu: 0, slot: 1, button: 0 });
t.send(1, { type: "click", menu: 0, slot: PLAYER_MENU_EXTRA + 1, button: 0 });
t.send(1, { type: "click", menu: 0, slot: t.hands, button: 0 });
t.game.tick();
assertEquals(t.alice.attribute(ATTRIBUTES.attack_damage), 1);
assertEquals(t.alice.attribute(ATTRIBUTES.attack_speed), 4 * 1.3);
@@ -35,7 +37,7 @@ Deno.test("worn artifacts work again after rejoining, and say what they do", asy
const t = await setup();
t.send(1, { type: "click", menu: 0, slot: 0, button: 0, shift: true });
const worn = t.take(1).findLast((m: Msg) => m.type === "container" && m.container === "extra").items;
assertEquals(worn[1].lore, "When worn:\n+4 Attack Damage");
assertEquals(worn[t.hands - PLAYER_MENU_EXTRA].lore, "When worn:\n+4 Attack Damage");
t.game.on_disconnect(1);
t.join(1, "alice");