Release Healer Man 0.1.15

This commit is contained in:
phenom committed 2026-09-05 15:33:06 -04:00
1 parent 7b41b102fa
commit f49e54f35f
43 files changed
+1478 -112

No files matched your search

+31 -4
View File
@@ -1,5 +1,11 @@
import { useCombatStore } from "../game/combatStore";
import { useGameStore } from "../game/store";
import { classCanEquipItem, PLAYER_EQUIPMENT_OWNER_ID } from "../game/equipment";
import {
compareEquipmentUpgrade,
resolvedEquipmentLoadout,
} from "../game/heirloomEquipment";
import { gearProfileFor } from "../game/specializationCatalog";
function itemType(inventorySlot: string): string {
return inventorySlot
@@ -11,8 +17,25 @@ function itemType(inventorySlot: string): string {
export function BossLootWindow() {
const reward = useCombatStore((state) => state.bossLootRewards[0] ?? null);
const classId = useCombatStore((state) => state.classId);
const specializationId = useCombatStore((state) => state.specializationId);
const role = useCombatStore((state) => state.gearRole);
const level = useCombatStore((state) => state.level);
const equipment = useCombatStore((state) => state.equipment);
const inventory = useCombatStore((state) => state.inventory);
if (!reward) return null;
const profile = gearProfileFor(classId, specializationId, role);
const heirloomContext = {
ownerId: PLAYER_EQUIPMENT_OWNER_ID,
ownerKind: "player" as const,
classId,
specializationId,
role,
level,
};
const loadout = resolvedEquipmentLoadout(equipment, inventory, heirloomContext);
const dismiss = () => useCombatStore.getState().dismissBossLootReward(reward.id);
const viewInventory = () => {
dismiss();
@@ -39,8 +62,11 @@ export function BossLootWindow() {
<div className="boss-loot-window__body">
<p className="boss-loot-window__eyebrow">Loot acquired automatically</p>
<div className="boss-loot-window__items">
{reward.items.map((item) => (
<article
{reward.items.map((item) => {
const comparison = classCanEquipItem(classId, item)
? compareEquipmentUpgrade(item, loadout, profile, heirloomContext)
: null;
return <article
key={item.instanceId}
className={`boss-loot-window__item equipment-quality--${item.quality}`}
>
@@ -48,10 +74,11 @@ export function BossLootWindow() {
<p>
<strong>{item.name}</strong>
<small>{item.quality} · Item level {item.itemLevel} · {itemType(item.inventorySlot)}</small>
{comparison && <small>{comparison.isUpgrade ? `Upgrade · +${comparison.scoreDelta.toFixed(1)} score` : `${comparison.scoreDelta.toFixed(1)} score`}</small>}
</p>
{item.quantity > 1 ? <em>×{item.quantity}</em> : null}
</article>
))}
</article>;
})}
{!reward.items.length ? (
<p className="boss-loot-window__empty">No items dropped this time.</p>
) : null}