forked from phenom/healer-man
Release Healer Man 0.1.15
This commit is contained in:
1 parent
7b41b102fa
commit
f49e54f35f
43 files changed
+1478
-112
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import generatedLootCatalog from "./generated/lootCatalog.json";
|
||||
|
||||
export type ItemQuality = "common" | "uncommon" | "rare" | "epic" | "legendary";
|
||||
export type ItemQuality = "common" | "uncommon" | "rare" | "epic" | "legendary" | "heirloom";
|
||||
export type DamageSchool = "physical" | "holy" | "fire" | "nature" | "frost" | "shadow" | "arcane";
|
||||
|
||||
export interface WeaponStats {
|
||||
@@ -109,6 +109,7 @@ export const EMPTY_ITEM_STATS: ItemStats = Object.freeze({
|
||||
|
||||
export const HEALTH_PER_STAMINA = 10;
|
||||
export const MANA_PER_INTELLECT = 15;
|
||||
export const MAX_PERSISTED_ITEM_LEVEL = 255;
|
||||
|
||||
const QUALITY_MULTIPLIER: Readonly<Record<ItemQuality, number>> = Object.freeze({
|
||||
common: 0.8,
|
||||
@@ -116,6 +117,7 @@ const QUALITY_MULTIPLIER: Readonly<Record<ItemQuality, number>> = Object.freeze(
|
||||
rare: 1.25,
|
||||
epic: 1.55,
|
||||
legendary: 2,
|
||||
heirloom: 1.65,
|
||||
});
|
||||
|
||||
const SLOT_WEIGHT: Readonly<Record<string, number>> = Object.freeze({
|
||||
@@ -198,7 +200,7 @@ function fallbackSourceStats(source: ItemStatSource): {
|
||||
readonly stats: SourceItemStats;
|
||||
readonly weapon: WeaponStats | null;
|
||||
} {
|
||||
const level = Math.max(1, Math.min(80, Math.trunc(source.sourceItemLevel ?? source.itemLevel)));
|
||||
const level = Math.max(1, Math.min(MAX_PERSISTED_ITEM_LEVEL, Math.trunc(source.sourceItemLevel ?? source.itemLevel)));
|
||||
const quality = QUALITY_MULTIPLIER[source.quality];
|
||||
const slotWeight = SLOT_WEIGHT[source.inventorySlot] ?? 0.65;
|
||||
const budget = Math.max(1, level * quality * slotWeight);
|
||||
@@ -232,7 +234,7 @@ export function itemStatsFor(source: ItemStatSource): ItemStats {
|
||||
1,
|
||||
Math.trunc(source.sourceItemLevel ?? authored?.sourceItemLevel ?? source.itemLevel),
|
||||
);
|
||||
const itemLevel = Math.max(1, Math.min(80, Math.trunc(source.itemLevel)));
|
||||
const itemLevel = Math.max(1, Math.min(MAX_PERSISTED_ITEM_LEVEL, Math.trunc(source.itemLevel)));
|
||||
const fallback = fallbackSourceStats(source);
|
||||
const sourceStats = source.sourceStats
|
||||
?? authored?.sourceStats
|
||||
|
||||
Reference in new issue
Block a user