Move effects into the modding api

This commit is contained in:
2026-10-02 11:53:44 -03:00
parent 4309c700d2
commit e5dcb97643
33 changed files with 458 additions and 109 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import { assert, assertEquals } from "@std/assert";
import { PLAYER_MENU_EXTRA, PROTOCOL_VERSION } from "$/common/protocol.ts";
import { copy_dir, test_game } from "./helpers.ts";
import type { WorldSave } from "$/server/game/saves.ts";
import { EFFECTS } from "$/server/game/entity/effects.ts";
// deno-lint-ignore no-explicit-any
type Msg = any;
@@ -163,7 +162,7 @@ Deno.test("the giant chestplate gives regeneration III after 10 seconds without
const alice = t.game.players()[0];
t.send(1, { type: "click", menu: 0, slot, button: 0, shift: true });
t.game.damage_player(alice, 2, "test");
const regeneration = () => alice.get_effect(EFFECTS.regeneration);
const regeneration = () => alice.get_effect("bworld:regeneration");
for (let i = 0; i < 199; i++) t.game.tick();
assertEquals(regeneration(), undefined);