Update Healer Man server
This commit is contained in:
1 parent
6114a2295f
commit
69809f7228
593 files changed
+903643
-40774
No files matched your search
@@ -33,7 +33,7 @@ export type ProcTrigger =
|
||||
| "periodic"
|
||||
| "kill";
|
||||
|
||||
export type AuraModifier =
|
||||
export type AuraModifier = (
|
||||
| {
|
||||
readonly kind: "stat";
|
||||
readonly stat: string;
|
||||
@@ -54,6 +54,8 @@ export type AuraModifier =
|
||||
readonly direction: "dealt" | "taken";
|
||||
readonly school?: DamageSchool;
|
||||
readonly attackKind?: AttackKind;
|
||||
/** Sourced flat incoming bonuses can precede armor/block instead of following them. */
|
||||
readonly phase?: "pre-mitigation";
|
||||
readonly operation: AuraModifierOperation;
|
||||
readonly value: number;
|
||||
readonly perStack?: boolean;
|
||||
@@ -64,7 +66,7 @@ export type AuraModifier =
|
||||
readonly operation: AuraModifierOperation;
|
||||
readonly value: number;
|
||||
readonly perStack?: boolean;
|
||||
};
|
||||
}) & { /** Opt-in source multiplier; ordinary percentage modifiers retain their existing sum. */ readonly multiplicative?: boolean };
|
||||
|
||||
export interface AuraAbsorbDefinition {
|
||||
readonly id: string;
|
||||
@@ -446,15 +448,17 @@ function resolveModifiedValue(
|
||||
): number {
|
||||
let flat = 0;
|
||||
let percent = 0;
|
||||
let multiplier = 1;
|
||||
for (const aura of current) {
|
||||
for (const modifier of aura.definition.modifiers ?? []) {
|
||||
if (!matches(modifier)) continue;
|
||||
const value = modifier.value * modifierStackMultiplier(modifier, aura);
|
||||
if (modifier.operation === "flat") flat += value;
|
||||
else if (modifier.multiplicative) multiplier *= 1 + value;
|
||||
else percent += value;
|
||||
}
|
||||
}
|
||||
return Math.max(0, (base + flat) * (1 + percent));
|
||||
return Math.max(0, (base + flat) * (1 + percent) * multiplier);
|
||||
}
|
||||
|
||||
export function resolveStatValue(
|
||||
@@ -482,6 +486,7 @@ export interface DamageModifierContext {
|
||||
readonly direction: "dealt" | "taken";
|
||||
readonly school: DamageSchool;
|
||||
readonly attackKind: AttackKind;
|
||||
readonly phase?: "pre-mitigation";
|
||||
}
|
||||
|
||||
export function resolveDamageValue(
|
||||
@@ -492,6 +497,7 @@ export function resolveDamageValue(
|
||||
return resolveModifiedValue(base, current, (modifier) =>
|
||||
modifier.kind === "damage" &&
|
||||
modifier.direction === context.direction &&
|
||||
modifier.phase === context.phase &&
|
||||
(modifier.school === undefined || modifier.school === context.school) &&
|
||||
(modifier.attackKind === undefined || modifier.attackKind === context.attackKind));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user