Release Healer Man 0.1.54
This commit is contained in:
1 parent
d6976e6ef6
commit
2dbb0acfc1
26 files changed
+1893
-912
No files matched your search
@@ -9,6 +9,7 @@ import {
|
||||
} from "../../src/app/characterCatalog";
|
||||
import type { ContentCategoryId } from "../../src/app/contentCategories";
|
||||
import {
|
||||
abilityById,
|
||||
abilitiesForCharacter,
|
||||
learnedAbilityForBuild,
|
||||
preloadAbilityCatalogsForClasses,
|
||||
@@ -17,6 +18,7 @@ import { aiHintsForAbility } from "../../src/game/abilityRules";
|
||||
import { PLAYER_AGGRO_ID } from "../../src/game/aggro";
|
||||
import { installCombatClock } from "../../src/game/combatClock";
|
||||
import { subscribeCombatEvents } from "../../src/game/combatEvents";
|
||||
import { subscribeCombatPresentation } from "../../src/game/combatPresentation";
|
||||
import { resetCombatSpatialProvider } from "../../src/game/combatSpatial";
|
||||
import { useCombatStore } from "../../src/game/combatStore";
|
||||
import { dungeonEnemyScaling } from "../../src/game/dungeonBossScaling";
|
||||
@@ -238,6 +240,13 @@ function abilityMetrics(member: MutableMemberMetrics, abilityId: string | undefi
|
||||
return created;
|
||||
}
|
||||
|
||||
function abilityProducesAttributedCombatEvent(abilityId: string | undefined): boolean {
|
||||
const ability = abilityId ? abilityById(abilityId) : null;
|
||||
return ability?.effects.some((effect) => [
|
||||
"damage", "dot", "finisher-damage", "execute", "heal", "hot", "shield", "resurrection",
|
||||
].includes(effect.kind)) ?? true;
|
||||
}
|
||||
|
||||
function currentHealth(actorId: string): readonly [number, number] {
|
||||
const combat = useCombatStore.getState();
|
||||
if (actorId === PLAYER_AGGRO_ID) return [combat.health, combat.maxHealth];
|
||||
@@ -371,10 +380,22 @@ async function runBoss(
|
||||
}));
|
||||
const byActorId = new Map(memberMetrics.map((metrics) => [metrics.actorId, metrics]));
|
||||
const bossAbilities = new Map<string, MutableAbilityMetrics>();
|
||||
// Instant resource, aura, pet, and summon actions do not produce the damage,
|
||||
// healing, absorb, or cast events used by the original report collector.
|
||||
// Count their completed release once so Balance Lab does not label working
|
||||
// actions such as Bloodrage and Feral Spirit as available-but-unused.
|
||||
const stopPresentation = subscribeCombatPresentation((message) => {
|
||||
if (message.kind !== "event" || message.event.phase !== "release") return;
|
||||
const source = byActorId.get(message.event.sourceActorId);
|
||||
if (!source || abilityProducesAttributedCombatEvent(message.event.abilityId)) return;
|
||||
source.casts += 1;
|
||||
abilityMetrics(source, message.event.abilityId).casts += 1;
|
||||
});
|
||||
const stopEvents = subscribeCombatEvents((event) => {
|
||||
const source = byActorId.get(event.sourceActorId);
|
||||
const target = byActorId.get(event.targetActorId);
|
||||
if (event.kind === "cast" && source) {
|
||||
if (!abilityProducesAttributedCombatEvent(event.abilityId)) return;
|
||||
source.casts += 1;
|
||||
abilityMetrics(source, event.abilityId).casts += 1;
|
||||
} else if (event.kind === "damage") {
|
||||
@@ -531,6 +552,7 @@ async function runBoss(
|
||||
|| left.abilityId.localeCompare(right.abilityId)),
|
||||
};
|
||||
} finally {
|
||||
stopPresentation();
|
||||
stopEvents();
|
||||
restoreClock();
|
||||
clearMobRuntimeRegistry();
|
||||
|
||||
Reference in new issue
Block a user