Update Healer Man server
This commit is contained in:
1 parent
1fedb9368d
commit
cc3b2fa4d5
27 files changed
+1988
-83
No files matched your search
@@ -12,7 +12,7 @@ import {
|
||||
type CompanionCooldownPolicy,
|
||||
} from "./companionCooldownPolicy";
|
||||
|
||||
export const COMBAT_ROTATION_VERSION = "playerbots-inspired-v5-ready-five";
|
||||
export const COMBAT_ROTATION_VERSION = "playerbots-inspired-v6-reactive-ready-five";
|
||||
|
||||
export interface RotationProfile {
|
||||
readonly id: string;
|
||||
@@ -64,6 +64,12 @@ export interface RotationContext {
|
||||
readonly hostileCount?: number;
|
||||
readonly targetIsLoose?: boolean;
|
||||
readonly hasDangerousThreat?: boolean;
|
||||
/** The current hostile can make ordinary melee attacks against this actor. */
|
||||
readonly enemyUsesMeleeAttacks?: boolean;
|
||||
/** A telegraphed high-impact melee attack is about to hit this actor. */
|
||||
readonly incomingMeleeDanger?: boolean;
|
||||
/** The actor should create distance immediately rather than keep casting. */
|
||||
readonly needsEscape?: boolean;
|
||||
readonly requiredControl?: boolean;
|
||||
readonly moving?: boolean;
|
||||
readonly maintainedAbilityIds?: ReadonlySet<string>;
|
||||
@@ -107,7 +113,7 @@ export const CLASSIC_ROTATION_PROFILES: readonly RotationProfile[] = Object.free
|
||||
profile("hunter:beast-mastery", "hunter", ["Aspect of the Dragonhawk", "Aspect of the Hawk", "Call Pet", "Kill Command", "Bestial Wrath", "Serpent Sting", "Arcane Shot", "Multi-Shot", "Steady Shot"]),
|
||||
profile("hunter:marksmanship", "hunter", ["Aspect of the Dragonhawk", "Aspect of the Hawk", "Call Pet", "Misdirection", "Rapid Fire", "Readiness", "Kill Shot", "Chimera Shot", "Aimed Shot", "Serpent Sting", "Arcane Shot", "Steady Shot", "Silencing Shot", "Disengage", "Feign Death"]),
|
||||
profile("hunter:survival", "hunter", ["Aspect of the Dragonhawk", "Aspect of the Hawk", "Call Pet", "Kill Shot", "Explosive Shot", "Black Arrow", "Serpent Sting", "Aimed Shot", "Arcane Shot", "Steady Shot"]),
|
||||
profile("rogue:assassination", "rogue", ["Deadly Poison", "Instant Poison", "Tricks of the Trade", "Cold Blood", "Envenom", "Rupture", "Mutilate", "Eviscerate", "Sinister Strike", "Kick", "Evasion", "Cloak of Shadows", "Vanish"]),
|
||||
profile("rogue:assassination", "rogue", ["Deadly Poison", "Instant Poison", "Tricks of the Trade", "Cold Blood", "Envenom", "Shiv", "Rupture", "Mutilate", "Eviscerate", "Sinister Strike", "Kick", "Evasion", "Cloak of Shadows", "Vanish"]),
|
||||
profile("rogue:combat", "rogue", ["Killing Spree", "Blade Flurry", "Eviscerate", "Sinister Strike"]),
|
||||
profile("rogue:subtlety", "rogue", ["Shadow Dance", "Rupture", "Eviscerate", "Hemorrhage", "Backstab"]),
|
||||
profile("priest:discipline", "priest", ["Inner Fire", "Pain Suppression", "Inner Focus", "Power Infusion", "Shadowfiend", "Divine Hymn", "Penance", "Power Word: Shield", "Flash Heal", "Greater Heal", "Renew", "Dispel Magic", "Cure Disease", "Resurrection"]),
|
||||
@@ -148,6 +154,7 @@ const DEFENSIVE_COOLDOWN_NAMES = new Set([
|
||||
]);
|
||||
|
||||
const THREAT_REDIRECT_NAMES = new Set(["Misdirection", "Tricks of the Trade"]);
|
||||
const ESCAPE_MOVEMENT_NAMES = new Set(["Blink", "Disengage"]);
|
||||
|
||||
const TARGET_HEALTH_GATES = new Map<string, number>([
|
||||
["Drain Soul", 0.25],
|
||||
@@ -410,6 +417,53 @@ function scoreAbility(
|
||||
if (context.role !== "tank" || !context.targetIsLoose) return null;
|
||||
return { ability, score: 1_017_000, ruleId: "reactive-taunt", reason: "loose hostile target", targetId: context.hostileTarget?.id ?? null };
|
||||
}
|
||||
if (ability.name === "Inner Focus") {
|
||||
const lowAllies = (context.friendlyTargets ?? []).filter((target) => (
|
||||
!target.fallen && target.health > 0 && target.health / Math.max(1, target.maxHealth) <= 0.6
|
||||
));
|
||||
const shouldPrepareHeal = context.role === "healer"
|
||||
&& (lowestHealth <= 0.4 || lowAllies.length >= 2);
|
||||
return shouldPrepareHeal ? {
|
||||
ability,
|
||||
score: 1_018_500,
|
||||
ruleId: lowAllies.length >= 2 ? "prepare-area-heal" : "prepare-emergency-heal",
|
||||
reason: lowAllies.length >= 2 ? "multiple allies need empowered healing" : "an ally needs empowered healing",
|
||||
targetId: context.selfId ?? null,
|
||||
} : null;
|
||||
}
|
||||
if (ability.name === "Vanish") {
|
||||
const bossHasAggro = Boolean(context.hasDangerousThreat && context.hostileTarget?.boss);
|
||||
const nearDeath = selfHealth <= 0.2;
|
||||
return bossHasAggro || nearDeath ? {
|
||||
ability,
|
||||
score: nearDeath ? 1_017_500 : 1_016_750,
|
||||
ruleId: nearDeath ? "emergency-vanish" : "boss-threat-vanish",
|
||||
reason: nearDeath ? "reset threat and escape lethal danger" : "reset boss threat and escape",
|
||||
targetId: context.selfId ?? null,
|
||||
} : null;
|
||||
}
|
||||
if (ability.name === "Evasion") {
|
||||
const bossHasAggro = Boolean(context.hasDangerousThreat && context.hostileTarget?.boss);
|
||||
const lowAgainstMelee = selfHealth <= 0.4 && Boolean(context.enemyUsesMeleeAttacks);
|
||||
return bossHasAggro || lowAgainstMelee || context.incomingMeleeDanger ? {
|
||||
ability,
|
||||
score: context.incomingMeleeDanger ? 1_017_000 : 1_016_500,
|
||||
ruleId: context.incomingMeleeDanger ? "preemptive-melee-evasion" : "reactive-melee-evasion",
|
||||
reason: context.incomingMeleeDanger
|
||||
? "avoid an imminent strong melee attack"
|
||||
: bossHasAggro ? "avoid boss attacks while holding threat" : "low health against a melee attacker",
|
||||
targetId: context.selfId ?? null,
|
||||
} : null;
|
||||
}
|
||||
if (ESCAPE_MOVEMENT_NAMES.has(ability.name)) {
|
||||
return context.needsEscape ? {
|
||||
ability,
|
||||
score: 1_016_250,
|
||||
ruleId: "reactive-danger-escape",
|
||||
reason: "create distance from immediate danger",
|
||||
targetId: context.selfId ?? null,
|
||||
} : null;
|
||||
}
|
||||
if (categories.has("threat") && !damaging && !maintenanceBuff) {
|
||||
if (THREAT_REDIRECT_NAMES.has(ability.name) && context.role !== "tank" && durableTarget) {
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user