Release Healer Man 0.1.21
This commit is contained in:
1 parent
699fc858c9
commit
f6f2375145
210 files changed
+976039
-6247
No files matched your search
+20
-8
@@ -128,6 +128,7 @@ import {
|
||||
type TriggeredAuraProc,
|
||||
} from "./combatAuras";
|
||||
import { rollBossLoot } from "./lootCatalog";
|
||||
import { adaptRunewakerEnemyDamage } from "./runewakerCombatFormula";
|
||||
import { normalizeInventory, type InventoryItem } from "./lootTypes";
|
||||
import {
|
||||
PLAYER_EQUIPMENT_OWNER_ID,
|
||||
@@ -185,7 +186,10 @@ import {
|
||||
type AzerothCoreMechanic,
|
||||
type AzerothCoreSchool,
|
||||
} from "./azerothCoreReference";
|
||||
import { useWailingEncounterStore } from "./wailingCavernsEncounter";
|
||||
import {
|
||||
dispatchDungeonEncounterSignal,
|
||||
dungeonEncounterStateMatches,
|
||||
} from "./dungeonEncounterRuntime";
|
||||
import {
|
||||
PLAYER_AGGRO_ID,
|
||||
addActorThreat,
|
||||
@@ -325,6 +329,7 @@ export interface MobCombatState {
|
||||
readonly name: string;
|
||||
readonly serverEntry: number | null;
|
||||
readonly summonedBy?: string;
|
||||
readonly spawnGroupId?: string;
|
||||
readonly boss: boolean;
|
||||
readonly lootSourceId: string | null;
|
||||
readonly level: number;
|
||||
@@ -1762,8 +1767,7 @@ function enemyAbilityConditionMet(
|
||||
return percent >= condition.minimum && percent <= condition.maximum;
|
||||
}
|
||||
if (condition.kind === "encounter-state") {
|
||||
if (condition.encounterId !== "wailing-caverns:naralex") return false;
|
||||
return condition.states.includes(useWailingEncounterStore.getState().phase);
|
||||
return dungeonEncounterStateMatches(condition.encounterId, condition.states);
|
||||
}
|
||||
const origin = getMobPosition(mob.id);
|
||||
if (!origin) return false;
|
||||
@@ -1803,6 +1807,7 @@ function summonedMobCombatState(
|
||||
creatureEntry: number,
|
||||
targetActorId: AggroActorId,
|
||||
position: CombatPosition,
|
||||
spawnGroupId?: string,
|
||||
): MobCombatState {
|
||||
const stats = defaultMobStats(summoner.level, false, creatureEntry);
|
||||
const template = creatureTemplateReference(creatureEntry);
|
||||
@@ -1817,6 +1822,7 @@ function summonedMobCombatState(
|
||||
name: template?.name ?? `Summoned Creature ${creatureEntry}`,
|
||||
serverEntry: creatureEntry,
|
||||
summonedBy: summoner.id,
|
||||
...(spawnGroupId ? { spawnGroupId } : {}),
|
||||
boss: false,
|
||||
lootSourceId: null,
|
||||
level: summoner.level,
|
||||
@@ -6540,7 +6546,13 @@ export const useCombatStore = create<CombatState>((set, get) => ({
|
||||
actorPosition(runtimeState, presentationTargetId),
|
||||
);
|
||||
if (effect.kind === "damage") {
|
||||
const attackDamage = Math.max(0, Math.round(mob.attackDamage * effect.multiplier));
|
||||
const baselineDamage = Math.max(0, Math.round(mob.attackDamage * effect.multiplier));
|
||||
const attackDamage = attack.runewakerFormula
|
||||
? adaptRunewakerEnemyDamage({
|
||||
formula: attack.runewakerFormula,
|
||||
baselineDamage: mob.attackDamage,
|
||||
}).amount
|
||||
: baselineDamage;
|
||||
for (const actorId of targets) {
|
||||
incomingHits.push({
|
||||
actorId,
|
||||
@@ -6668,7 +6680,8 @@ export const useCombatStore = create<CombatState>((set, get) => ({
|
||||
} else if (effect.kind === "summon") {
|
||||
const castNumber = (abilityCastCounts[attack.id] ?? 0) + 1;
|
||||
for (let summonIndex = 0; summonIndex < effect.count; summonIndex += 1) {
|
||||
const summonId = `${id}:${attack.id}:summon:${castNumber}:${summonIndex + 1}`;
|
||||
const summonNamespace = effect.entityId?.trim() || `${id}:${attack.id}:summon`;
|
||||
const summonId = `${summonNamespace}:${castNumber}:${summonIndex + 1}`;
|
||||
if (mobs[summonId]) continue;
|
||||
const angle = summonIndex * 2.399963229728653;
|
||||
const summonPosition: CombatPosition = [
|
||||
@@ -6683,12 +6696,11 @@ export const useCombatStore = create<CombatState>((set, get) => ({
|
||||
effect.creatureEntry,
|
||||
resolution.targetActorId,
|
||||
summonPosition,
|
||||
effect.spawnGroupId,
|
||||
);
|
||||
}
|
||||
} else if (effect.kind === "encounter-event") {
|
||||
if (effect.eventId === "wailing-caverns:naralex-start") {
|
||||
useWailingEncounterStore.getState().start(now);
|
||||
}
|
||||
dispatchDungeonEncounterSignal(effect.eventId, now);
|
||||
}
|
||||
attackRevision += 1;
|
||||
abilityCastCounts[attack.id] = (abilityCastCounts[attack.id] ?? 0) + 1;
|
||||
|
||||
Reference in new issue
Block a user