forked from phenom/healer-man
Release Healer Man 0.1.37
This commit is contained in:
1 parent
03a4e3f51c
commit
361734bc41
41 files changed
+1714
-110
No files matched your search
@@ -13,7 +13,8 @@ import {
|
||||
} from "./partyNavigation";
|
||||
import { preparePartyNavigationGraph } from "./partyNavigationAssetCache";
|
||||
import { shouldLoadPartyNavigation } from "./partyNavigationPolicy";
|
||||
import { planPartyRoute } from "./partyPathing";
|
||||
import { emptyPartyRouteState, planPartyRoute } from "./partyPathing";
|
||||
import { partyRejoinMovement } from "./partyRejoin";
|
||||
import { partyCombatMovementGoal, stepPartyPosition } from "./partyMovement";
|
||||
import { derivePartySpawnSlots } from "./partySpawnSlots";
|
||||
import { collisionTrimeshes, collisionLineOfSightTrimeshes, prepareCollision } from "../scene/productionDungeonCollision";
|
||||
@@ -111,6 +112,42 @@ function distance(left: readonly number[], right: readonly number[]): number {
|
||||
}
|
||||
|
||||
describe("Stormwind Stockade party navigation", () => {
|
||||
it("returns resurrected teammates from the entrance and every boss checkpoint through approved shipping corridors", () => {
|
||||
const world = collisionWorld(true, true);
|
||||
try {
|
||||
const directSegmentAllowed = createPartyDirectSegmentValidator(RAPIER, world);
|
||||
const routeSegmentAllowed = createPartyRouteSegmentValidator(RAPIER, world);
|
||||
const checkpoints = [stockades.entrance, ...stockades.bosses.map((boss) => ({ footPosition: boss.position, yaw: stockades.entrance.yaw }))];
|
||||
for (const checkpoint of checkpoints) {
|
||||
const player = findNearestPartyNavigationSurface(graph, stockades.entrance.footPosition, 6)!.position;
|
||||
for (const slot of derivePartySpawnSlots(checkpoint, 5).slice(1)) {
|
||||
const origin = findNearestPartyNavigationSurface(graph, slot.footPosition, 6)?.position;
|
||||
expect(origin, JSON.stringify(slot)).toBeDefined();
|
||||
let result = partyRejoinMovement("returning-member", origin!, player, 0, graph, emptyPartyRouteState(), {
|
||||
directSegmentAllowed, routeSegmentAllowed,
|
||||
});
|
||||
expect(result.blocked, JSON.stringify({ checkpoint, origin, waypoints: result.route.waypoints })).toBe(false);
|
||||
expect(result.rejoined || result.waypoint !== null).toBe(true);
|
||||
for (let index = 1; index < result.route.waypoints.length; index += 1) {
|
||||
expect(routeSegmentAllowed(result.route.waypoints[index - 1], result.route.waypoints[index])).toBe(true);
|
||||
}
|
||||
const current: [number, number, number] = [...origin!];
|
||||
const next: [number, number, number] = [0, 0, 0];
|
||||
for (let frame = 1; frame <= 4_000 && !result.rejoined; frame += 1) {
|
||||
if (result.waypoint) {
|
||||
stepPartyPosition(current, result.waypoint, .175, next);
|
||||
current[0] = next[0]; current[1] = next[1]; current[2] = next[2];
|
||||
}
|
||||
result = partyRejoinMovement("returning-member", current, player, frame * 50, graph, result.route, {
|
||||
directSegmentAllowed, routeSegmentAllowed,
|
||||
});
|
||||
}
|
||||
expect(result.rejoined, JSON.stringify({ checkpoint, origin, current, result })).toBe(true);
|
||||
}
|
||||
}
|
||||
} finally { world.free(); }
|
||||
}, 60_000);
|
||||
|
||||
it("blocks combat sight across shipping room walls in both directions while preserving clear stair sight", () => {
|
||||
const world = collisionWorld(true, true);
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user