forked from phenom/healer-man
Release Healer Man 0.1.20
This commit is contained in:
1 parent
d9bebb4e81
commit
699fc858c9
22 files changed
+551
-295
No files matched your search
@@ -77,6 +77,57 @@ describe("generated dungeon campaign catalog", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("runs Wailing Caverns with the complete server population and authored presentation", () => {
|
||||
const wailing = requireDungeonDefinition("wailing-caverns");
|
||||
const runtimePopulation = wailing.staticSpawns.length
|
||||
+ wailing.roamingPacks.reduce((total, pack) => total + pack.members.length, 0);
|
||||
|
||||
expect(runtimePopulation).toBeGreaterThan(250);
|
||||
expect(wailing.staticSpawns.some((spawn) => spawn.id === "creature-18678")).toBe(true);
|
||||
expect(wailing.staticSpawns.some((spawn) => spawn.id === "lady-anacondra-spawn")).toBe(true);
|
||||
expect(wailing.roamingPacks.some((pack) => pack.id === "kresh-patrol")).toBe(true);
|
||||
expect(wailing.entities["entry-3636"]).toMatchObject({
|
||||
name: "Deviate Ravager",
|
||||
combat: { serverEntry: 3636 },
|
||||
visual: {
|
||||
model: { url: "/assets/creatures/wailing-caverns/deviate-ravager-animated.glb" },
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("never replaces a generated dungeon with a smaller live population", () => {
|
||||
for (const source of generated.definitions) {
|
||||
const runtime = requireDungeonDefinition(source.id);
|
||||
const sourcePopulation = source.staticSpawns.length
|
||||
+ source.roamingPacks.reduce((total, pack) => total + pack.members.length, 0);
|
||||
const runtimePopulation = runtime.staticSpawns.length
|
||||
+ runtime.roamingPacks.reduce((total, pack) => total + pack.members.length, 0);
|
||||
|
||||
expect(runtimePopulation, source.id).toBeGreaterThanOrEqual(sourcePopulation);
|
||||
}
|
||||
});
|
||||
|
||||
it("preserves source-side random rare spawns without making rare bosses mandatory", () => {
|
||||
const chanceSpawns = generated.definitions.flatMap((dungeon) => [
|
||||
...dungeon.staticSpawns.filter((spawn) => "spawnChance" in spawn),
|
||||
...dungeon.roamingPacks.filter((pack) => "spawnChance" in pack),
|
||||
]) as unknown as ReadonlyArray<{ readonly spawnChance: number }>;
|
||||
const optionalBosses = generated.definitions.flatMap((dungeon) => (
|
||||
dungeon.objectiveOrder.filter((objective) => "optional" in objective && objective.optional)
|
||||
));
|
||||
|
||||
expect(chanceSpawns).toHaveLength(24);
|
||||
expect(chanceSpawns.every((spawn) => spawn.spawnChance > 0 && spawn.spawnChance < 1)).toBe(true);
|
||||
expect(optionalBosses.map((boss) => boss.name)).toEqual([
|
||||
"Earthcaller Halmgar",
|
||||
"Ragglesnout",
|
||||
"Crystal Fang",
|
||||
"Spirestone Battle Lord",
|
||||
"Spirestone Butcher",
|
||||
"Meshlok the Harvester",
|
||||
]);
|
||||
});
|
||||
|
||||
it("reuses each complete optimized map package for dungeons and Manastorms", () => {
|
||||
const packagesByMap = new Map(
|
||||
manastormPackages.packages.map((assetPackage) => [assetPackage.mapId, assetPackage]),
|
||||
|
||||
+42
-16
@@ -25,30 +25,56 @@ function normalizedName(value: string): string {
|
||||
return value.toLowerCase().replace(/[^a-z0-9]+/g, "");
|
||||
}
|
||||
|
||||
/** Keep authored/server-backed WC combat; use generated kits only for unmapped fixtures. */
|
||||
/** Keep authored WC presentation and encounters while restoring its complete server population. */
|
||||
function enrichAuthoredDefinition(
|
||||
authored: DungeonDefinition,
|
||||
generated: DungeonDefinition | undefined,
|
||||
): DungeonDefinition {
|
||||
if (!generated) return authored;
|
||||
const generatedByName = new Map(
|
||||
Object.values(generated.entities).map((entity) => [normalizedName(entity.name), entity]),
|
||||
const authoredByName = new Map(
|
||||
Object.values(authored.entities).map((entity) => [normalizedName(entity.name), entity]),
|
||||
);
|
||||
const generatedEntities = Object.fromEntries(
|
||||
Object.entries(generated.entities).filter(([, entity]) => entity.kind !== "boss").map(([id, entity]) => {
|
||||
const authoredEntity = authoredByName.get(normalizedName(entity.name));
|
||||
return [
|
||||
id,
|
||||
authoredEntity
|
||||
? {
|
||||
...entity,
|
||||
visual: authoredEntity.visual,
|
||||
...(authoredEntity.combat ? { combat: authoredEntity.combat } : {}),
|
||||
}
|
||||
: entity,
|
||||
];
|
||||
}),
|
||||
);
|
||||
const generatedBossEntityIds = new Set(
|
||||
Object.entries(generated.entities)
|
||||
.filter(([, entity]) => entity.kind === "boss")
|
||||
.map(([id]) => id),
|
||||
);
|
||||
const authoredBossEntityIds = new Set(
|
||||
Object.entries(authored.entities)
|
||||
.filter(([, entity]) => entity.kind === "boss")
|
||||
.map(([id]) => id),
|
||||
);
|
||||
return {
|
||||
...authored,
|
||||
entities: Object.fromEntries(
|
||||
Object.entries(authored.entities).map(([id, entity]) => {
|
||||
const generatedEntity = generatedByName.get(normalizedName(entity.name));
|
||||
return [
|
||||
id,
|
||||
entity.combat
|
||||
? entity
|
||||
: generatedEntity?.combat
|
||||
? { ...entity, combat: generatedEntity.combat }
|
||||
: entity,
|
||||
];
|
||||
}),
|
||||
),
|
||||
entities: {
|
||||
...generatedEntities,
|
||||
...authored.entities,
|
||||
},
|
||||
staticSpawns: [
|
||||
...generated.staticSpawns.filter((spawn) => !generatedBossEntityIds.has(spawn.entityId)),
|
||||
...authored.staticSpawns,
|
||||
],
|
||||
roamingPacks: [
|
||||
...generated.roamingPacks,
|
||||
...authored.roamingPacks.filter((pack) => (
|
||||
pack.members.some((member) => authoredBossEntityIds.has(member.entityId))
|
||||
)),
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { dungeonSpawnSelected, selectDungeonSessionPopulation } from "./dungeonSpawnSelection";
|
||||
|
||||
describe("dungeon spawn selection", () => {
|
||||
it("keeps ordinary spawns and honors source chance boundaries", () => {
|
||||
expect(dungeonSpawnSelected("deadmines", 1, { id: "ordinary" })).toBe(true);
|
||||
expect(dungeonSpawnSelected("deadmines", 1, { id: "never", spawnChance: 0 })).toBe(false);
|
||||
expect(dungeonSpawnSelected("deadmines", 1, { id: "always", spawnChance: 1 })).toBe(true);
|
||||
});
|
||||
|
||||
it("selects rare spawns deterministically within a dungeon session", () => {
|
||||
const results = Array.from({ length: 100 }, (_, sessionRevision) => (
|
||||
dungeonSpawnSelected("blackrock-spire", sessionRevision, {
|
||||
id: "creature-43519",
|
||||
spawnChance: 0.15,
|
||||
})
|
||||
));
|
||||
|
||||
expect(results.some(Boolean)).toBe(true);
|
||||
expect(results.some((selected) => !selected)).toBe(true);
|
||||
expect(results).toEqual(Array.from({ length: 100 }, (_, sessionRevision) => (
|
||||
dungeonSpawnSelected("blackrock-spire", sessionRevision, {
|
||||
id: "creature-43519",
|
||||
spawnChance: 0.15,
|
||||
})
|
||||
)));
|
||||
});
|
||||
|
||||
it("filters static and roaming source populations with the same session rule", () => {
|
||||
const population = selectDungeonSessionPopulation("stockades", 4, [
|
||||
{ id: "ordinary", entityId: "guard", position: [0, 0, 0] },
|
||||
{ id: "removed", entityId: "rare", position: [1, 0, 0], spawnChance: 0 },
|
||||
], [{
|
||||
id: "removed-patrol",
|
||||
name: "Rare Patrol",
|
||||
speed: 1,
|
||||
formationSource: "database-solo",
|
||||
spawnChance: 0,
|
||||
waypoints: [[0, 0, 0], [1, 0, 0]],
|
||||
members: [{ id: "member", entityId: "rare", role: "leader", formationOffset: [0, 0, 0] }],
|
||||
}]);
|
||||
|
||||
expect(population.staticSpawns.map((spawn) => spawn.id)).toEqual(["ordinary"]);
|
||||
expect(population.roamingPacks).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,46 @@
|
||||
import type { MobPackDefinition, StaticMobSpawnDefinition } from "./mobPopulation";
|
||||
|
||||
interface ChanceSpawn {
|
||||
readonly id: string;
|
||||
readonly spawnChance?: number;
|
||||
}
|
||||
|
||||
function stableUnit(seed: string): number {
|
||||
let hash = 2_166_136_261;
|
||||
for (let index = 0; index < seed.length; index += 1) {
|
||||
hash ^= seed.charCodeAt(index);
|
||||
hash = Math.imul(hash, 16_777_619);
|
||||
}
|
||||
return (hash >>> 0) / 4_294_967_296;
|
||||
}
|
||||
|
||||
/** Reproduces source-side random despawn rules once per dungeon session. */
|
||||
export function dungeonSpawnSelected(
|
||||
dungeonId: string,
|
||||
sessionRevision: number,
|
||||
spawn: ChanceSpawn,
|
||||
): boolean {
|
||||
const chance = Math.max(0, Math.min(1, spawn.spawnChance ?? 1));
|
||||
if (chance <= 0) return false;
|
||||
if (chance >= 1) return true;
|
||||
return stableUnit(`${dungeonId}:${sessionRevision}:${spawn.id}:initialize`) < chance;
|
||||
}
|
||||
|
||||
export function selectDungeonSessionPopulation(
|
||||
dungeonId: string,
|
||||
sessionRevision: number,
|
||||
staticSpawns: readonly StaticMobSpawnDefinition[],
|
||||
roamingPacks: readonly MobPackDefinition[],
|
||||
): {
|
||||
readonly staticSpawns: readonly StaticMobSpawnDefinition[];
|
||||
readonly roamingPacks: readonly MobPackDefinition[];
|
||||
} {
|
||||
return {
|
||||
staticSpawns: staticSpawns.filter((spawn) => (
|
||||
dungeonSpawnSelected(dungeonId, sessionRevision, spawn)
|
||||
)),
|
||||
roamingPacks: roamingPacks.filter((pack) => (
|
||||
dungeonSpawnSelected(dungeonId, sessionRevision, pack)
|
||||
)),
|
||||
};
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
// Generated by npm run dungeon:catalog. Do not edit.
|
||||
export default "H4sIAAAAAAACCuy9a5PbyJUo+FcY3N24MxFkKs/J10lF3A/9GI+96x57W147NhwdN0AgWcURH7UgS2p1h/77xskESJAASbBISaWy/EHuQhLIzJPn/crfh+v8Piyyv4dyPVsth69hNFyvHss8DF//PsyzxUM2u1v+lC1n07DeDF8Pi8flXVgtxw+zhzCfLcOr+kH9W/Hf69VyOBqG5btZuVouwnLz1yx/m92F9fD1P4frMn91ly3Cq7uwDGW2CcWr6exd+Os8+xDKH9O3/rR4WJWbdf2ljlcW2TJbb1bl4rv1Omy/H18Y/Nsm8PtZ+WEwzebzSZa//ffhL7ygfPW43ITyh2yTzVd3w9cnv/zz43IzW4Tqx/Vast9Cudrc/7Aqww+rxWLGINGFL6DQE+NQBQKfm1x5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YkTRUVArSaTqQrZNBRBeyomU3TTibQKCg1eFlPlpgi5lLLQMGXVAGHidttU3pBs06azyvvObR7XguA6LQi6tCCkXNHEkM5tXlCGAQk9eG8okNOQyaktzGSaBQpWaydVbjn7uZAhBN0UKJ7gEi0IjmtBcJ0WBB1akMmtd56NZT+xNndOEoSJC84GnE40WAw6gNUyoJxKJVFhwFxPMum1dQ2BgqBUF6e1jnTnNo9rQXCdFgQdWpCHPLg8965wBq2ZoCzAW2WsNQCFl+TJoIdM5Xk2LShoZ6yc5jK3KsiparAgrUBDW3dnztV9nMfVILhODYIONciyPjuZaFYQlC2mE1TW2rzIMlJTkkCWILOeFPrC5BkG67Wy2dTiVJJ32e440akO4rROkenc5nE1CK5Tg6BDDZITRThRbI9YpCxMZK4zm0uVGQ2UhRyDchonoShwQhhkPvFTlRVukk3l1DXVIPDuAokCx9UguE4Ngg41iELIZeGDnErjvXVocEJK596aqWK1wYQJTOR0YmkSfI4ZepPUQm08qN02lVW2Y5tOe9lNnMfVILhODYIONchQbomCUQSTzOQYiDcqyWSFdXnQhLrwCjGfZkZrK3NrIASvtcYJaIc7pLWku1gtEXZv87gaBNepQdChBjkqiGzmC/Jg0Ml8okEHLVU2MSqnTAPK3E+mboo+R6Nt5q3BgIVVJoep2m7TSOl1W9vzDrBbcB5Xg+A6NQg61CBVFASQ68Jq5VloThypSZ6bSeE8SI9agVSZy6koKGM/yqQwWTEtMJdu6nfeIUVWdZyms1Kprm3icTUIr1ODsEMN0hOZFZnxRqLSLF2UdZkzaprlpjAmI0eZx1BIZbydkp3oQmkDhZtOpkiyYaI
Line truncated
|
||||
@@ -1 +1 @@
|
||||
{"schemaVersion":1,"source":{"campaignManifest":"dungeon-pipeline/dungeon-campaign.json","environmentPackages":["src/game/generated/fivePlayerDungeonImports.json","src/game/generated/manastormAssetPackages.json (temporary fallback)"],"encounterCatalog":"src/game/generated/manastormRuntimeCatalog.json","azerothCoreCommit":"4d9d1d4b5723e819c5c390f6ca1177283dbfb8e3","azerothCoreSourceLock":"src/game/generated/azerothCoreSourceLock.json","spellCatalog":{"ascension":"../LadiksMPQEditor/client-current/area-52/patch-D/DBFilesClient/Spell.dbc","epoch":"../HealerMan-Storage/pipeline-work/dungeons/epoch-client/DBFilesClient/Spell.dbc"}},"coverage":[{"dungeonId":"shadowfang-keep","mapId":33,"encounters":7,"entities":31,"staticSpawns":109,"roamingPacks":24,"source":"azerothcore"},{"dungeonId":"stormwind-stockade","mapId":34,"encounters":5,"entities":11,"staticSpawns":93,"roamingPacks":0,"source":"azerothcore"},{"dungeonId":"deadmines","mapId":36,"encounters":7,"entities":22,"staticSpawns":179,"roamingPacks":23,"source":"azerothcore"},{"dungeonId":"wailing-caverns","mapId":43,"encounters":8,"entities":20,"staticSpawns":252,"roamingPacks":7,"source":"azerothcore"},{"dungeonId":"razorfen-kraul","mapId":47,"encounters":7,"entities":38,"staticSpawns":179,"roamingPacks":12,"source":"azerothcore"},{"dungeonId":"blackfathom-deeps","mapId":48,"encounters":6,"entities":27,"staticSpawns":201,"roamingPacks":10,"source":"azerothcore"},{"dungeonId":"uldaman","mapId":70,"encounters":7,"entities":38,"staticSpawns":302,"roamingPacks":12,"source":"azerothcore"},{"dungeonId":"gnomeregan","mapId":90,"encounters":4,"entities":31,"staticSpawns":371,"roamingPacks":31,"source":"azerothcore"},{"dungeonId":"sunken-temple","mapId":109,"encounters":4,"entities":33,"staticSpawns":245,"roamingPacks":4,"source":"azerothcore"},{"dungeonId":"razorfen-downs","mapId":129,"encounters":6,"entities":25,"staticSpawns":194,"roamingPacks":13,"source":"azerothcore"},{"dungeonId":"scarlet-monastery","mapId":189,"encounters":5,"entities":37,"staticSpawns":310,"roamingPacks":16,"source":"azerothcore"},{"dungeonId":"zulfarrak","mapId":209,"encounters":5,"entities":21,"staticSpawns":252,"roamingPacks":14,"source":"azerothcore"},{"dungeonId":"blackrock-spire","mapId":229,"encounters":15,"entities":78,"staticSpawns":566,"roamingPacks":22,"source":"azerothcore"},{"dungeonId":"blackrock-depths","mapId":230,"encounters":13,"entities":61,"staticSpawns":1040,"roamingPacks":15,"source":"azerothcore"},{"dungeonId":"scholomance","mapId":289,"encounters":8,"entities":38,"staticSpawns":327,"roamingPacks":15,"source":"azerothcore"},{"dungeonId":"stratholme","mapId":329,"encounters":9,"entities":50,"staticSpawns":431,"roamingPacks":29,"source":"azerothcore"},{"dungeonId":"maraudon","mapId":349,"encounters":8,"entities":33,"staticSpawns":525,"roamingPacks":20,"source":"azerothcore"},{"dungeonId":"ragefire-chasm","mapId":389,"encounters":4,"entities":11,"staticSpawns":127,"roamingPacks":4,"source":"azerothcore"},{"dungeonId":"dire-maul","mapId":429,"encounters":12,"entities":75,"staticSpawns":756,"roamingPacks":59,"source":"azerothcore"},{"dungeonId":"shattered-halls","mapId":540,"encounters":3,"entities":32,"staticSpawns":198,"roamingPacks":13,"source":"azerothcore"},{"dungeonId":"blood-furnace","mapId":542,"encounters":3,"entities":17,"staticSpawns":139,"roamingPacks":13,"source":"azerothcore"},{"dungeonId":"hellfire-ramparts","mapId":543,"encounters":2,"entities":12,"staticSpawns":85,"roamingPacks":12,"source":"azerothcore"},{"dungeonId":"steamvault","mapId":545,"encounters":3,"entities":17,"staticSpawns":127,"roamingPacks":17,"source":"azerothcore"},{"dungeonId":"underbog","mapId":546,"encounters":4,"entities":22,"staticSpawns":161,"roamingPacks":23,"source":"azerothcore"},{"dungeonId":"slave-pens","mapId":547,"encounters":3,"entities":21,"staticSpawns":122,"roamingPacks":32,"source":"azerothcore"},{"dungeonId":"arcatraz","mapId":552,"encounters":4,"entities":29,"staticSpawns":85,"roamingPacks":9,"source":"azerothcore"},{"dungeonId":"botanica","mapId":553,"encounters":5,"entities":29,"staticSpawns":171,"roamingPacks":13,"source":"azerothcore"},{"dungeonId":"mechanar","mapId":554,"encounters":3,"entities":17,"staticSpawns":84,"roamingPacks":14,"source":"azerothcore"},{"dungeonId":"shadow-labyrinth","mapId":555,"encounters":4,"entities":22,"staticSpawns":189,"roamingPacks":13,"source":"azerothcore"},{"dungeonId":"sethekk-halls","mapId":556,"encounters":2,"entities":16,"staticSpawns":104,"roamingPacks":24,"source":"azerothcore"},{"dungeonId":"mana-tombs","mapId":557,"encounters":3,"entities":14,"staticSpawns":119,"roamingPacks":15,"source":"azerothcore"},{"dungeonId":"auchenai-crypts","mapId":558,"encounters":2,"entities":14,"staticSpawns":93,"roamingPacks":37,"source":"azerothcore"},{"dungeonId":"magisters-terrace","mapId":585,"encounters":3,"entities":18,"staticSpawns":147,"roamingPacks":6,"source":"azerothcore"},{"dungeonId":"black-morass","mapId":269,"encounters":3,"entitiesLine truncated
|
||||
{"schemaVersion":1,"source":{"campaignManifest":"dungeon-pipeline/dungeon-campaign.json","environmentPackages":["src/game/generated/fivePlayerDungeonImports.json","src/game/generated/manastormAssetPackages.json (temporary fallback)"],"encounterCatalog":"src/game/generated/manastormRuntimeCatalog.json","azerothCoreCommit":"4d9d1d4b5723e819c5c390f6ca1177283dbfb8e3","azerothCoreSourceLock":"src/game/generated/azerothCoreSourceLock.json","spellCatalog":{"ascension":"../LadiksMPQEditor/client-current/area-52/patch-D/DBFilesClient/Spell.dbc","epoch":"../HealerMan-Storage/pipeline-work/dungeons/epoch-client/DBFilesClient/Spell.dbc"}},"coverage":[{"dungeonId":"shadowfang-keep","mapId":33,"encounters":7,"entities":31,"staticSpawns":109,"roamingPacks":24,"source":"azerothcore"},{"dungeonId":"stormwind-stockade","mapId":34,"encounters":5,"entities":11,"staticSpawns":93,"roamingPacks":0,"source":"azerothcore"},{"dungeonId":"deadmines","mapId":36,"encounters":7,"entities":22,"staticSpawns":179,"roamingPacks":23,"source":"azerothcore"},{"dungeonId":"wailing-caverns","mapId":43,"encounters":8,"entities":20,"staticSpawns":252,"roamingPacks":7,"source":"azerothcore"},{"dungeonId":"razorfen-kraul","mapId":47,"encounters":7,"entities":38,"staticSpawns":179,"roamingPacks":12,"source":"azerothcore"},{"dungeonId":"blackfathom-deeps","mapId":48,"encounters":6,"entities":27,"staticSpawns":201,"roamingPacks":10,"source":"azerothcore"},{"dungeonId":"uldaman","mapId":70,"encounters":7,"entities":38,"staticSpawns":302,"roamingPacks":12,"source":"azerothcore"},{"dungeonId":"gnomeregan","mapId":90,"encounters":4,"entities":31,"staticSpawns":371,"roamingPacks":31,"source":"azerothcore"},{"dungeonId":"sunken-temple","mapId":109,"encounters":4,"entities":33,"staticSpawns":245,"roamingPacks":4,"source":"azerothcore"},{"dungeonId":"razorfen-downs","mapId":129,"encounters":6,"entities":25,"staticSpawns":194,"roamingPacks":13,"source":"azerothcore"},{"dungeonId":"scarlet-monastery","mapId":189,"encounters":5,"entities":37,"staticSpawns":310,"roamingPacks":16,"source":"azerothcore"},{"dungeonId":"zulfarrak","mapId":209,"encounters":5,"entities":21,"staticSpawns":252,"roamingPacks":14,"source":"azerothcore"},{"dungeonId":"blackrock-spire","mapId":229,"encounters":15,"entities":78,"staticSpawns":566,"roamingPacks":22,"source":"azerothcore"},{"dungeonId":"blackrock-depths","mapId":230,"encounters":13,"entities":61,"staticSpawns":1040,"roamingPacks":15,"source":"azerothcore"},{"dungeonId":"scholomance","mapId":289,"encounters":8,"entities":38,"staticSpawns":327,"roamingPacks":15,"source":"azerothcore"},{"dungeonId":"stratholme","mapId":329,"encounters":9,"entities":50,"staticSpawns":431,"roamingPacks":29,"source":"azerothcore"},{"dungeonId":"maraudon","mapId":349,"encounters":8,"entities":33,"staticSpawns":525,"roamingPacks":20,"source":"azerothcore"},{"dungeonId":"ragefire-chasm","mapId":389,"encounters":4,"entities":11,"staticSpawns":127,"roamingPacks":4,"source":"azerothcore"},{"dungeonId":"dire-maul","mapId":429,"encounters":12,"entities":75,"staticSpawns":756,"roamingPacks":59,"source":"azerothcore"},{"dungeonId":"shattered-halls","mapId":540,"encounters":3,"entities":32,"staticSpawns":198,"roamingPacks":13,"source":"azerothcore"},{"dungeonId":"blood-furnace","mapId":542,"encounters":3,"entities":17,"staticSpawns":139,"roamingPacks":13,"source":"azerothcore"},{"dungeonId":"hellfire-ramparts","mapId":543,"encounters":2,"entities":12,"staticSpawns":85,"roamingPacks":12,"source":"azerothcore"},{"dungeonId":"steamvault","mapId":545,"encounters":3,"entities":17,"staticSpawns":127,"roamingPacks":17,"source":"azerothcore"},{"dungeonId":"underbog","mapId":546,"encounters":4,"entities":22,"staticSpawns":161,"roamingPacks":23,"source":"azerothcore"},{"dungeonId":"slave-pens","mapId":547,"encounters":3,"entities":21,"staticSpawns":122,"roamingPacks":32,"source":"azerothcore"},{"dungeonId":"arcatraz","mapId":552,"encounters":4,"entities":29,"staticSpawns":85,"roamingPacks":9,"source":"azerothcore"},{"dungeonId":"botanica","mapId":553,"encounters":5,"entities":29,"staticSpawns":171,"roamingPacks":13,"source":"azerothcore"},{"dungeonId":"mechanar","mapId":554,"encounters":3,"entities":17,"staticSpawns":84,"roamingPacks":14,"source":"azerothcore"},{"dungeonId":"shadow-labyrinth","mapId":555,"encounters":4,"entities":22,"staticSpawns":189,"roamingPacks":13,"source":"azerothcore"},{"dungeonId":"sethekk-halls","mapId":556,"encounters":2,"entities":16,"staticSpawns":104,"roamingPacks":24,"source":"azerothcore"},{"dungeonId":"mana-tombs","mapId":557,"encounters":3,"entities":14,"staticSpawns":119,"roamingPacks":15,"source":"azerothcore"},{"dungeonId":"auchenai-crypts","mapId":558,"encounters":2,"entities":14,"staticSpawns":93,"roamingPacks":37,"source":"azerothcore"},{"dungeonId":"magisters-terrace","mapId":585,"encounters":3,"entities":18,"staticSpawns":147,"roamingPacks":6,"source":"azerothcore"},{"dungeonId":"black-morass","mapId":269,"encounters":3,"entitiesLine truncated
|
||||
@@ -72,6 +72,8 @@ export interface MobPackDefinition {
|
||||
readonly formationSource: "database-solo" | "inferred-followers";
|
||||
/** Trinity-style difficulty mask. Omitted legacy fixtures default to normal (1). */
|
||||
readonly spawnMask?: number;
|
||||
/** Per-instance survival chance after source initialization scripts run. */
|
||||
readonly spawnChance?: number;
|
||||
readonly waypoints: readonly MobVector3[];
|
||||
readonly members: readonly MobPackMemberDefinition[];
|
||||
}
|
||||
@@ -83,6 +85,8 @@ export interface StaticMobSpawnDefinition {
|
||||
readonly yaw?: number;
|
||||
/** Trinity-style difficulty mask. Omitted legacy fixtures default to normal (1). */
|
||||
readonly spawnMask?: number;
|
||||
/** Per-instance survival chance after source initialization scripts run. */
|
||||
readonly spawnChance?: number;
|
||||
}
|
||||
|
||||
export interface StaticMobSpawnCluster {
|
||||
@@ -183,6 +187,7 @@ export function normalizeMobPopulationPaths(
|
||||
anchor[2] - member.formationOffset[2],
|
||||
],
|
||||
spawnMask: pack.spawnMask,
|
||||
spawnChance: pack.spawnChance,
|
||||
}));
|
||||
});
|
||||
return {
|
||||
|
||||
@@ -121,7 +121,8 @@ export function activePartyBossObjectives(): readonly PartyBossObjective[] {
|
||||
}] : [];
|
||||
}
|
||||
const game = useGameStore.getState();
|
||||
const objectives = requireDungeonDefinition(game.activeDungeonId).objectiveOrder;
|
||||
const objectives = requireDungeonDefinition(game.activeDungeonId).objectiveOrder
|
||||
.filter((objective) => !objective.optional);
|
||||
if (game.activeDungeonId !== "wailing-caverns") return objectives;
|
||||
const phase = useWailingEncounterStore.getState().phase;
|
||||
return phase === "mutanus" || phase === "complete"
|
||||
|
||||
+11
-2
@@ -51,6 +51,7 @@ import { useCombatStore } from "../game/combatStore";
|
||||
import { numericFrameRateLimit } from "../game/frameRateSettings";
|
||||
import { useDocumentVisibility } from "../platform/useDocumentVisibility";
|
||||
import { CappedFrameLoop } from "./CappedFrameLoop";
|
||||
import { selectDungeonSessionPopulation } from "../game/dungeonSpawnSelection";
|
||||
|
||||
export function GameScene() {
|
||||
const activeDungeonId = useGameStore((state) => state.activeDungeonId);
|
||||
@@ -86,16 +87,24 @@ export function GameScene() {
|
||||
: { entities: dungeon.entities, staticSpawns: dungeon.staticSpawns },
|
||||
[dungeon, gameMode, manastormEncounter],
|
||||
);
|
||||
const roamingPacks = manastormStageRoamingPacks(
|
||||
const difficultyRoamingPacks = manastormStageRoamingPacks(
|
||||
dungeon.roamingPacks.filter((pack) => spawnMatchesDifficulty(pack.spawnMask, difficultyMask)),
|
||||
gameMode === "manastorm" ? manastormEncounter : null,
|
||||
);
|
||||
const difficultySpawns = stagePopulation.staticSpawns.filter(
|
||||
(spawn) => spawnMatchesDifficulty(spawn.spawnMask, difficultyMask),
|
||||
);
|
||||
const staticSpawns = activeDungeonId === "wailing-caverns" && gameMode === "dungeon"
|
||||
const phasedStaticSpawns = activeDungeonId === "wailing-caverns" && gameMode === "dungeon"
|
||||
? wailingStaticSpawnsForPhase(difficultySpawns, wailingPhase)
|
||||
: difficultySpawns;
|
||||
const sessionPopulation = selectDungeonSessionPopulation(
|
||||
activeDungeonId,
|
||||
sessionRevision,
|
||||
phasedStaticSpawns,
|
||||
difficultyRoamingPacks,
|
||||
);
|
||||
const staticSpawns = sessionPopulation.staticSpawns;
|
||||
const roamingPacks = sessionPopulation.roamingPacks;
|
||||
const paused = useGameStore((state) => state.paused);
|
||||
const mapOpen = useGameStore((state) => state.mapOpen);
|
||||
const companionOpen = useGameStore((state) => state.companionOpen);
|
||||
|
||||
@@ -1426,7 +1426,7 @@ export function PartyPopulation({
|
||||
&& wailingPhase !== "mutanus"
|
||||
&& wailingPhase !== "complete"
|
||||
? dungeon.objectiveOrder.filter((objective) => !objective.eventOnly)
|
||||
: dungeon.objectiveOrder
|
||||
: dungeon.objectiveOrder.filter((objective) => !objective.optional)
|
||||
: [];
|
||||
const assets = useMemo(
|
||||
() => manastormPackage
|
||||
|
||||
@@ -7,7 +7,8 @@ import {
|
||||
auraDefinitionIcon,
|
||||
auraDefinitionIsLongTerm,
|
||||
auraDescription,
|
||||
} from "./AuraStrip";
|
||||
groupAurasForDisplay,
|
||||
} from "./auraDisplay";
|
||||
|
||||
function aura(overrides: Partial<AuraDefinition> = {}): AuraDefinition {
|
||||
return {
|
||||
@@ -71,4 +72,25 @@ describe("aura strip visibility", () => {
|
||||
absorbs: [{ id: "test-absorb", amount: 250 }],
|
||||
}), 175))).toBe("Absorbs up to 175 incoming damage.");
|
||||
});
|
||||
|
||||
it("shows multi-effect and repeatedly sourced spell auras as one icon", () => {
|
||||
const first = activeAura(aura({
|
||||
id: "frostbolt-slow",
|
||||
name: "Frostbolt (DBC 116, Aura 33)",
|
||||
icon: "/assets/ui/spells/frostbolt.png",
|
||||
}));
|
||||
const second = {
|
||||
...activeAura(aura({
|
||||
id: "frostbolt-secondary",
|
||||
name: "Frostbolt (DBC 116, Aura 118)",
|
||||
icon: "/assets/ui/spells/frostbolt.png",
|
||||
})),
|
||||
instanceId: "second-frostbolt-aura",
|
||||
sourceId: "second-mage",
|
||||
appliedAt: 2_000,
|
||||
expiresAt: 14_000,
|
||||
};
|
||||
|
||||
expect(groupAurasForDisplay([first, second])).toEqual([second]);
|
||||
});
|
||||
});
|
||||
+11
-42
@@ -1,11 +1,17 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import type { ActiveAura, AuraDefinition, AuraDisposition } from "../game/combatAuras";
|
||||
import type { AuraDisposition } from "../game/combatAuras";
|
||||
import { useCombatStore } from "../game/combatStore";
|
||||
import { formatTimedEffectTimer } from "../game/timedEffectDisplay";
|
||||
import {
|
||||
auraDefinitionDisplaysInStrip,
|
||||
auraDefinitionIcon,
|
||||
auraDefinitionIsLongTerm,
|
||||
auraDescription,
|
||||
auraDisplayName,
|
||||
groupAurasForDisplay,
|
||||
} from "./auraDisplay";
|
||||
import type { StatusEffectInspectHandler, StatusEffectInspection } from "./statusEffectInspection";
|
||||
|
||||
export const LONG_TERM_AURA_DURATION_MS = 60_000;
|
||||
|
||||
interface AuraStripProps {
|
||||
readonly targetId: string;
|
||||
readonly targetIds?: readonly string[];
|
||||
@@ -18,43 +24,6 @@ interface AuraStripProps {
|
||||
readonly tooltipId?: string;
|
||||
}
|
||||
|
||||
export function auraDefinitionDisplaysInStrip(definition: AuraDefinition): boolean {
|
||||
return definition.hideFromAuraStrip !== true;
|
||||
}
|
||||
|
||||
export function auraDefinitionIcon(definition: AuraDefinition): string | null {
|
||||
return definition.icon?.trim() || null;
|
||||
}
|
||||
|
||||
export function auraDisplayName(definition: AuraDefinition): string {
|
||||
return definition.name.replace(/\s+\((?:DBC\s+\d+,\s*)?Aura\s+\d+\)$/i, "").trim();
|
||||
}
|
||||
|
||||
/** Permanent and one-minute-or-longer auras are persistent party-frame clutter. */
|
||||
export function auraDefinitionIsLongTerm(definition: AuraDefinition): boolean {
|
||||
return definition.durationMs === null || definition.durationMs >= LONG_TERM_AURA_DURATION_MS;
|
||||
}
|
||||
|
||||
export function auraDescription(aura: ActiveAura): string {
|
||||
const authored = aura.definition.description?.trim();
|
||||
if (authored) return authored;
|
||||
|
||||
const absorb = aura.absorbs.reduce((total, pool) => total + pool.remaining, 0);
|
||||
if (absorb > 0) return `Absorbs up to ${Math.ceil(absorb)} incoming damage.`;
|
||||
if (aura.definition.controlImmunities?.length) {
|
||||
return `Grants immunity to ${aura.definition.controlImmunities.join(", ")}.`;
|
||||
}
|
||||
if (aura.definition.modifiers?.length) {
|
||||
return aura.definition.disposition === "buff"
|
||||
? "Improves combat attributes while active."
|
||||
: "Reduces combat effectiveness while active.";
|
||||
}
|
||||
if (aura.definition.procs?.length) return "Can trigger an additional effect during combat.";
|
||||
return aura.definition.disposition === "buff"
|
||||
? "A beneficial effect is active."
|
||||
: "A harmful effect is active.";
|
||||
}
|
||||
|
||||
export function AuraStrip({
|
||||
targetId,
|
||||
targetIds,
|
||||
@@ -69,14 +38,14 @@ export function AuraStrip({
|
||||
const allAuras = useCombatStore((state) => state.auras);
|
||||
const [now, setNow] = useState(() => Date.now());
|
||||
const requestedTargetIds = targetIds ?? [targetId];
|
||||
const auras = allAuras.filter((aura) => (
|
||||
const auras = groupAurasForDisplay(allAuras.filter((aura) => (
|
||||
requestedTargetIds.includes(aura.targetId)
|
||||
&& dispositions.includes(aura.definition.disposition)
|
||||
&& auraDefinitionDisplaysInStrip(aura.definition)
|
||||
&& (!hideLongTerm || !auraDefinitionIsLongTerm(aura.definition))
|
||||
&& (!showOnlyLongTerm || auraDefinitionIsLongTerm(aura.definition))
|
||||
&& (aura.expiresAt === null || aura.expiresAt > now)
|
||||
));
|
||||
)));
|
||||
|
||||
useEffect(() => {
|
||||
if (!auras.some((aura) => aura.expiresAt !== null)) return undefined;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { PLAYER_AGGRO_ID } from "../game/aggro";
|
||||
import type { ActiveAura, AuraDefinition } from "../game/combatAuras";
|
||||
import { auraDisplaysInPlayerStatusPanel } from "./PlayerStatusPanel";
|
||||
import { auraDisplaysInPlayerStatusPanel } from "./auraDisplay";
|
||||
|
||||
function activeAura(
|
||||
targetId: string,
|
||||
@@ -31,18 +31,16 @@ function activeAura(
|
||||
|
||||
describe("top-right status visibility", () => {
|
||||
const now = 20_000;
|
||||
const partyTargets = new Set(["party-1"]);
|
||||
|
||||
it("shows every player aura and centralizes long-term party auras", () => {
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura(PLAYER_AGGRO_ID, 15_000), now, partyTargets)).toBe(true);
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura("party-1", 60_000), now, partyTargets)).toBe(true);
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura("party-1", null), now, partyTargets)).toBe(true);
|
||||
it("shows every active player aura without including party-member copies", () => {
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura(PLAYER_AGGRO_ID, 15_000), now)).toBe(true);
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura("party-1", 60_000), now)).toBe(false);
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura("party-1", null), now)).toBe(false);
|
||||
});
|
||||
|
||||
it("leaves short party effects on party frames and rejects unrelated, hidden, or expired auras", () => {
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura("party-1", 30_000), now, partyTargets)).toBe(false);
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura("stranger", 60_000), now, partyTargets)).toBe(false);
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura(PLAYER_AGGRO_ID, 60_000, 70_000, true), now, partyTargets)).toBe(false);
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura(PLAYER_AGGRO_ID, 5_000, 15_000), now, partyTargets)).toBe(false);
|
||||
it("rejects unrelated, hidden, or expired auras", () => {
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura("stranger", 60_000), now)).toBe(false);
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura(PLAYER_AGGRO_ID, 60_000, 70_000, true), now)).toBe(false);
|
||||
expect(auraDisplaysInPlayerStatusPanel(activeAura(PLAYER_AGGRO_ID, 5_000, 15_000), now)).toBe(false);
|
||||
});
|
||||
});
|
||||
@@ -1,17 +1,15 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { abilityById } from "../game/abilityCatalog";
|
||||
import { PLAYER_AGGRO_ID } from "../game/aggro";
|
||||
import type { ActiveAura } from "../game/combatAuras";
|
||||
import { useCombatStore } from "../game/combatStore";
|
||||
import { usePartyStore } from "../game/partyStore";
|
||||
import { formatTimedEffectTimer, timedEffectRemainingMs } from "../game/timedEffectDisplay";
|
||||
import { AuraStrip } from "./AuraStrip";
|
||||
import {
|
||||
AuraStrip,
|
||||
auraDefinitionDisplaysInStrip,
|
||||
auraDefinitionIsLongTerm,
|
||||
auraDisplaysInPlayerStatusPanel,
|
||||
auraDescription,
|
||||
auraDisplayName,
|
||||
} from "./AuraStrip";
|
||||
groupAurasForDisplay,
|
||||
} from "./auraDisplay";
|
||||
import { TimedEffectStrip } from "./TimedEffectStrip";
|
||||
import {
|
||||
timedEffectDescription,
|
||||
@@ -25,34 +23,16 @@ function statusLabel(disposition: StatusEffectInspection["disposition"]): string
|
||||
return disposition === "buff" ? "Buff" : "Debuff";
|
||||
}
|
||||
|
||||
export function auraDisplaysInPlayerStatusPanel(
|
||||
aura: ActiveAura,
|
||||
now: number,
|
||||
partyTargetIds: ReadonlySet<string>,
|
||||
): boolean {
|
||||
const belongsInPanel = aura.targetId === PLAYER_AGGRO_ID
|
||||
|| (partyTargetIds.has(aura.targetId) && auraDefinitionIsLongTerm(aura.definition));
|
||||
return belongsInPanel
|
||||
&& auraDefinitionDisplaysInStrip(aura.definition)
|
||||
&& (aura.expiresAt === null || aura.expiresAt > now);
|
||||
}
|
||||
|
||||
export function PlayerStatusPanel({ now }: { readonly now: number }) {
|
||||
const auras = useCombatStore((state) => state.auras);
|
||||
const effects = useCombatStore((state) => state.effects);
|
||||
const shield = useCombatStore((state) => state.shield);
|
||||
const shieldExpiresAt = useCombatStore((state) => state.shieldExpiresAt);
|
||||
const partyMembers = usePartyStore((state) => state.members);
|
||||
const [inspected, setInspected] = useState<StatusEffectInspection | null>(null);
|
||||
|
||||
const partyAuraTargetIds = partyMembers.map((member) => member.id);
|
||||
const partyAuraTargetIdSet = new Set(partyAuraTargetIds);
|
||||
const partyAuraTargetLabels = Object.fromEntries(
|
||||
partyMembers.map((member) => [member.id, member.name]),
|
||||
);
|
||||
const activeAuras = auras.filter((aura) => (
|
||||
auraDisplaysInPlayerStatusPanel(aura, now, partyAuraTargetIdSet)
|
||||
));
|
||||
const activeAuras = groupAurasForDisplay(auras.filter((aura) => (
|
||||
auraDisplaysInPlayerStatusPanel(aura, now)
|
||||
)));
|
||||
const activeEffects = effects.filter((effect) => (
|
||||
PLAYER_EFFECT_TARGETS.includes(effect.targetId)
|
||||
&& timedEffectRemainingMs(effect, now) > 0
|
||||
@@ -152,18 +132,6 @@ export function PlayerStatusPanel({ now }: { readonly now: number }) {
|
||||
onInspect={setInspected}
|
||||
tooltipId={TOOLTIP_ID}
|
||||
/>
|
||||
{partyAuraTargetIds.length ? (
|
||||
<AuraStrip
|
||||
targetId={partyAuraTargetIds[0]}
|
||||
targetIds={partyAuraTargetIds}
|
||||
dispositions={["buff"]}
|
||||
className="player-status-panel__strip"
|
||||
showOnlyLongTerm
|
||||
targetLabels={partyAuraTargetLabels}
|
||||
onInspect={setInspected}
|
||||
tooltipId={TOOLTIP_ID}
|
||||
/>
|
||||
) : null}
|
||||
<TimedEffectStrip
|
||||
targetId={null}
|
||||
targetIds={PLAYER_EFFECT_TARGETS}
|
||||
@@ -189,18 +157,6 @@ export function PlayerStatusPanel({ now }: { readonly now: number }) {
|
||||
onInspect={setInspected}
|
||||
tooltipId={TOOLTIP_ID}
|
||||
/>
|
||||
{partyAuraTargetIds.length ? (
|
||||
<AuraStrip
|
||||
targetId={partyAuraTargetIds[0]}
|
||||
targetIds={partyAuraTargetIds}
|
||||
dispositions={["debuff"]}
|
||||
className="player-status-panel__strip"
|
||||
showOnlyLongTerm
|
||||
targetLabels={partyAuraTargetLabels}
|
||||
onInspect={setInspected}
|
||||
tooltipId={TOOLTIP_ID}
|
||||
/>
|
||||
) : null}
|
||||
<TimedEffectStrip
|
||||
targetId={null}
|
||||
targetIds={PLAYER_EFFECT_TARGETS}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
import { PLAYER_AGGRO_ID } from "../game/aggro";
|
||||
import type { ActiveAura, AuraDefinition } from "../game/combatAuras";
|
||||
|
||||
export const LONG_TERM_AURA_DURATION_MS = 60_000;
|
||||
|
||||
export function auraDefinitionDisplaysInStrip(definition: AuraDefinition): boolean {
|
||||
return definition.hideFromAuraStrip !== true;
|
||||
}
|
||||
|
||||
export function auraDefinitionIcon(definition: AuraDefinition): string | null {
|
||||
return definition.icon?.trim() || null;
|
||||
}
|
||||
|
||||
export function auraDisplayName(definition: AuraDefinition): string {
|
||||
return definition.name.replace(/\s+\((?:DBC\s+\d+,\s*)?Aura\s+\d+\)$/i, "").trim();
|
||||
}
|
||||
|
||||
function auraDisplayGroupKey(aura: ActiveAura): string {
|
||||
return [
|
||||
aura.targetId,
|
||||
aura.definition.disposition,
|
||||
auraDisplayName(aura.definition).toLowerCase(),
|
||||
auraDefinitionIcon(aura.definition) ?? "",
|
||||
].join("\u0000");
|
||||
}
|
||||
|
||||
function auraDisplayExpiry(aura: ActiveAura): number {
|
||||
return aura.expiresAt ?? Number.POSITIVE_INFINITY;
|
||||
}
|
||||
|
||||
/** Collapses a spell's multiple DBC aura effects and repeated sources into one HUD icon. */
|
||||
export function groupAurasForDisplay(auras: readonly ActiveAura[]): ActiveAura[] {
|
||||
const grouped = new Map<string, ActiveAura>();
|
||||
for (const aura of auras) {
|
||||
const key = auraDisplayGroupKey(aura);
|
||||
const existing = grouped.get(key);
|
||||
if (!existing) {
|
||||
grouped.set(key, aura);
|
||||
continue;
|
||||
}
|
||||
const representative = auraDisplayExpiry(aura) > auraDisplayExpiry(existing)
|
||||
|| (auraDisplayExpiry(aura) === auraDisplayExpiry(existing) && aura.appliedAt > existing.appliedAt)
|
||||
? aura
|
||||
: existing;
|
||||
const stacks = Math.max(existing.stacks, aura.stacks);
|
||||
grouped.set(key, representative.stacks === stacks
|
||||
? representative
|
||||
: { ...representative, stacks });
|
||||
}
|
||||
return [...grouped.values()];
|
||||
}
|
||||
|
||||
/** Permanent and one-minute-or-longer auras are persistent party-frame clutter. */
|
||||
export function auraDefinitionIsLongTerm(definition: AuraDefinition): boolean {
|
||||
return definition.durationMs === null || definition.durationMs >= LONG_TERM_AURA_DURATION_MS;
|
||||
}
|
||||
|
||||
export function auraDescription(aura: ActiveAura): string {
|
||||
const authored = aura.definition.description?.trim();
|
||||
if (authored) return authored;
|
||||
|
||||
const absorb = aura.absorbs.reduce((total, pool) => total + pool.remaining, 0);
|
||||
if (absorb > 0) return `Absorbs up to ${Math.ceil(absorb)} incoming damage.`;
|
||||
if (aura.definition.controlImmunities?.length) {
|
||||
return `Grants immunity to ${aura.definition.controlImmunities.join(", ")}.`;
|
||||
}
|
||||
if (aura.definition.modifiers?.length) {
|
||||
return aura.definition.disposition === "buff"
|
||||
? "Improves combat attributes while active."
|
||||
: "Reduces combat effectiveness while active.";
|
||||
}
|
||||
if (aura.definition.procs?.length) return "Can trigger an additional effect during combat.";
|
||||
return aura.definition.disposition === "buff"
|
||||
? "A beneficial effect is active."
|
||||
: "A harmful effect is active.";
|
||||
}
|
||||
|
||||
export function auraDisplaysInPlayerStatusPanel(
|
||||
aura: ActiveAura,
|
||||
now: number,
|
||||
): boolean {
|
||||
return aura.targetId === PLAYER_AGGRO_ID
|
||||
&& auraDefinitionDisplaysInStrip(aura.definition)
|
||||
&& (aura.expiresAt === null || aura.expiresAt > now);
|
||||
}
|
||||
Reference in new issue
Block a user