Release Healer Man 0.1.17

This commit is contained in:
phenom committed 2026-09-05 21:27:30 -04:00
1 parent b57d2b2839
commit fc8a7a722a
13 files changed
+235 -41

No files matched your search

+1
View File
@@ -39,6 +39,7 @@ export declare const ARENA_TICK_MS: 50;
export declare class ArenaSimulation {
constructor(options: ArenaSimulationOptions);
start(): this;
resetPreparationClock(startedAt?: number): boolean;
stop(): void;
step(): void;
snapshot(): ArenaAuthoritativeSnapshot;
+7
View File
@@ -156,6 +156,13 @@ export class ArenaSimulation {
return this;
}
resetPreparationClock(startedAt = Date.now()) {
if (this.interval || this.tickNumber !== 0 || this.phase !== "preparation" || this.finished) return false;
this.startedAt = Number(startedAt);
this.phaseEndsAt = this.startedAt + 10_000;
return true;
}
stop() {
if (this.interval) clearInterval(this.interval);
this.interval = null;
+8
View File
@@ -26,6 +26,14 @@ test("authoritative simulation seals ten seconds, runs 20 Hz, and rejects duplic
assert.ok(simulation.actor("left-healer").position[0] > before);
});
test("a deferred practice start receives a fresh preparation clock", () => {
const stage = ARENA_STAGES.find((entry) => entry.id === "warnorken-arena");
const simulation = new ArenaSimulation({ id: "deferred", stage, bracket: "2v2", mode: "practice", ruleset: "wow", participants: participants(), startedAt: 1_000 });
assert.equal(simulation.resetPreparationClock(20_000), true);
assert.equal(simulation.snapshot().serverTime, 20_000);
assert.equal(simulation.snapshot().phaseEndsAt, 30_000);
});
test("Dalaran and Ring of Valor mechanics synchronize collision state", () => {
const dalaran = ARENA_STAGES.find((entry) => entry.id === "dalaran-sewers");
const warning = arenaDynamicObjectState(dalaran, 27_000).find((entry) => entry.id === "waterfall");