Release Healer Man 0.1.41
This commit is contained in:
1 parent
197a64117c
commit
c3f8a69b51
42 files changed
+886
-127
No files matched your search
@@ -4,6 +4,13 @@ import {
|
||||
type CombatActorState,
|
||||
} from "./combatActors";
|
||||
import type { PartyMember } from "./partyStore";
|
||||
import { baseClassFor, isRomClassId } from "../app/characterCatalog";
|
||||
import { deriveCharacterStats } from "./wotlkStats";
|
||||
|
||||
export function companionResourceMaximum(member: PartyMember, id: string): number {
|
||||
return id === member.resourceType ? member.maxResource : id === "mana" && !isRomClassId(member.classId)
|
||||
? deriveCharacterStats(baseClassFor(member.classId), member.level, member.gearStats, member.raceId).mana : 100;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the authoritative companion actor. Existing actor values win over
|
||||
@@ -21,7 +28,7 @@ export function companionActorFromMember(
|
||||
normalizeActorResourcePool(
|
||||
id,
|
||||
current ?? 0,
|
||||
id === member.resourceType ? member.maxResource : 100,
|
||||
companionResourceMaximum(member, id),
|
||||
id === member.resourceType ? profile.regenerationPerSecond : 0,
|
||||
member.lastResourceSpentAt[id as ResourceType] ?? 0,
|
||||
),
|
||||
@@ -84,7 +91,7 @@ export function companionActorWithMemberRuntime(
|
||||
normalizeActorResourcePool(
|
||||
id,
|
||||
current ?? 0,
|
||||
id === member.resourceType ? member.maxResource : actor.resources[id]?.maximum ?? 100,
|
||||
companionResourceMaximum(member, id),
|
||||
id === member.resourceType ? profile.regenerationPerSecond : actor.resources[id]?.regenerationPerSecond ?? 0,
|
||||
member.lastResourceSpentAt[id as ResourceType] ?? actor.resources[id]?.lastSpentAt ?? 0,
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user