Update Healer Man server
This commit is contained in:
1 parent
6114a2295f
commit
69809f7228
593 files changed
+903643
-40774
No files matched your search
+26
-2
@@ -53,7 +53,7 @@ import {
|
||||
type ResourceType,
|
||||
} from "./abilityCatalog";
|
||||
import { createDeathKnightRunes, type CombatActorCastState, type DeathKnightRuneState } from "./combatActors";
|
||||
import { romFiveIdentity } from "./romFiveIdentities";
|
||||
import { ROM_FIVE_IDENTITIES, romFiveIdentity } from "./romFiveIdentities";
|
||||
|
||||
export {
|
||||
classCanFillPartyRole,
|
||||
@@ -167,6 +167,11 @@ export interface CompanionPartyGenerationOptions {
|
||||
readonly allowedCompanionSpecializationIds?: readonly string[];
|
||||
/** All real-player roles in a shared party, including the local player. */
|
||||
readonly occupiedHumanRoles?: readonly PartyRole[];
|
||||
/** The active RoM pair, used to exclude that native identity when the rest can fill the party. */
|
||||
readonly playerRomClassPair?: {
|
||||
readonly primaryClassId: ClassId;
|
||||
readonly secondaryClassId: ClassId | null;
|
||||
};
|
||||
}
|
||||
|
||||
function companionTemplateFor(specializationId: string): PartyTemplate {
|
||||
@@ -563,9 +568,28 @@ export function createDungeonParty(
|
||||
}).slice(0, npcSeats);
|
||||
const seatsByRole: Record<PartyRole, number> = { tank: 0, healer: 0, damage: 0 };
|
||||
for (const role of npcRoles) seatsByRole[role] += 1;
|
||||
const playerRomIdentity = categoryId === "rom" && options.playerRomClassPair?.secondaryClassId
|
||||
? ROM_FIVE_IDENTITIES.find((identity) => (
|
||||
identity.classId === options.playerRomClassPair?.primaryClassId
|
||||
&& identity.secondaryClassId === options.playerRomClassPair?.secondaryClassId
|
||||
))
|
||||
: undefined;
|
||||
const canUseRomComplement = Boolean(playerRomIdentity) && (Object.keys(seatsByRole) as PartyRole[]).every((role) => (
|
||||
ROM_FIVE_IDENTITIES.filter((identity) => (
|
||||
identity.role === role
|
||||
&& !(identity.classId === playerRomIdentity?.classId
|
||||
&& identity.secondaryClassId === playerRomIdentity?.secondaryClassId)
|
||||
)).length >= seatsByRole[role]
|
||||
));
|
||||
const sourceForRole = (role: PartyRole): readonly PartyTemplate[] => {
|
||||
if (categoryId === "rom") {
|
||||
return role === "tank" ? ROM_TANK_TEMPLATES : role === "healer" ? ROM_HEALER_TEMPLATES : ROM_DAMAGE_TEMPLATES;
|
||||
const templates = role === "tank" ? ROM_TANK_TEMPLATES : role === "healer" ? ROM_HEALER_TEMPLATES : ROM_DAMAGE_TEMPLATES;
|
||||
return canUseRomComplement && playerRomIdentity
|
||||
? templates.filter((template) => (
|
||||
template.classId !== playerRomIdentity.classId
|
||||
|| template.secondaryClassId !== playerRomIdentity.secondaryClassId
|
||||
))
|
||||
: templates;
|
||||
}
|
||||
return wowTemplates(role, options, seatsByRole[role]);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user