Update Healer Man server
This commit is contained in:
1 parent
69809f7228
commit
ff20ab8779
101 files changed
+16713
-945
No files matched your search
@@ -2,7 +2,7 @@ import { armorReductionPercent, type DamageSchool } from "./itemStats";
|
||||
import type { CharacterStats, WotlkAttackKind } from "./wotlkStats";
|
||||
|
||||
export type CombatAttackKind = WotlkAttackKind;
|
||||
export type CombatOutcome = "hit" | "crit" | "miss" | "dodge" | "parry" | "block" | "resist";
|
||||
export type CombatOutcome = "hit" | "crit" | "miss" | "dodge" | "parry" | "block" | "resist" | "deflect";
|
||||
export type CombatResistanceMode = "none" | "partial" | "binary";
|
||||
export type CombatRollStage = "outcome" | "resistance" | "block" | "critical-block";
|
||||
|
||||
@@ -87,6 +87,8 @@ export interface CombatResult {
|
||||
readonly parried: boolean;
|
||||
readonly blocked: boolean;
|
||||
readonly avoided: boolean;
|
||||
/** Exact source spell deflection avoids the packet rather than absorbing it. */
|
||||
readonly deflected?: boolean;
|
||||
readonly fullyResisted: boolean;
|
||||
readonly partiallyResisted: boolean;
|
||||
readonly rawDamage: number;
|
||||
@@ -110,6 +112,41 @@ export interface CombatResult {
|
||||
readonly criticalBlocked?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exact 100% source deflection is applied after the existing miss/full-resist
|
||||
* result, before any damage or proc is committed. It cannot replace avoidance.
|
||||
* Partial-resist and block calculations on the discarded packet are not damage.
|
||||
*/
|
||||
export function deflectLandedCombatResult(result: CombatResult): CombatResult {
|
||||
if (!result.landed || result.avoided || result.fullyResisted) return result;
|
||||
const { postHitBlockRoll: _blockRoll, postHitBlockChancePercent: _blockChance,
|
||||
criticalBlockRoll: _criticalBlockRoll, criticalBlockChancePercent: _criticalBlockChance,
|
||||
criticalBlocked: _criticalBlocked, ...retained } = result;
|
||||
return Object.freeze({
|
||||
...retained,
|
||||
outcome: "deflect",
|
||||
landed: false,
|
||||
critical: false,
|
||||
missed: false,
|
||||
dodged: false,
|
||||
parried: false,
|
||||
blocked: false,
|
||||
avoided: true,
|
||||
deflected: true,
|
||||
fullyResisted: false,
|
||||
partiallyResisted: false,
|
||||
damageBeforeMitigation: 0,
|
||||
effectiveArmor: 0,
|
||||
armorReductionPercent: 0,
|
||||
armorMitigatedAmount: 0,
|
||||
blockedAmount: 0,
|
||||
resistedAmount: 0,
|
||||
damageReductionAmount: 0,
|
||||
finalDamage: 0,
|
||||
resistanceFraction: 0,
|
||||
});
|
||||
}
|
||||
|
||||
const DEFAULT_CRITICAL_DAMAGE_MULTIPLIER = 2;
|
||||
const DUAL_WIELD_AUTO_ATTACK_MISS_PENALTY = 19;
|
||||
const PARTIAL_RESIST_STEP = 0.1;
|
||||
|
||||
Reference in new issue
Block a user