Release Healer Man 0.1.22
This commit is contained in:
1 parent
f6f2375145
commit
7f6001723a
144 files changed
+54107
-690
No files matched your search
@@ -11,6 +11,8 @@ import { useCombatStore } from "./combatStore";
|
||||
import { useGameStore } from "./store";
|
||||
import type { DungeonEncounterEffectEnvelope } from "./dungeonEncounterTypes";
|
||||
import { publishOnlinePartyTeleport } from "./onlineSessionRuntime";
|
||||
import { dungeonDefinitionById } from "./dungeonRegistry";
|
||||
import { removeMobPosition } from "./mobRuntimeRegistry";
|
||||
|
||||
function grantEncounterLoot(lootTableId: string, now: number): boolean {
|
||||
const table = LOOT_CATALOG.bosses.find((candidate) => candidate.lootTableId === lootTableId);
|
||||
@@ -33,7 +35,7 @@ export function DungeonEncounterEffectBridge() {
|
||||
}
|
||||
|
||||
export function applyDungeonEncounterEffect(
|
||||
{ effect }: DungeonEncounterEffectEnvelope,
|
||||
{ dungeonId, effect }: DungeonEncounterEffectEnvelope,
|
||||
now = Date.now(),
|
||||
): void {
|
||||
if (effect.kind === "signal") {
|
||||
@@ -49,6 +51,18 @@ export function applyDungeonEncounterEffect(
|
||||
publishOnlinePartyTeleport(effect.destination, effect.actionId, now);
|
||||
return;
|
||||
}
|
||||
if (effect.kind === "despawn-group") {
|
||||
const group = dungeonDefinitionById(dungeonId)?.encounterSpawnGroups?.find(
|
||||
(candidate) => candidate.id === effect.spawnGroupId,
|
||||
);
|
||||
if (!group) return;
|
||||
const combat = useCombatStore.getState();
|
||||
for (const spawn of group.spawns) {
|
||||
combat.removeMob(spawn.id);
|
||||
removeMobPosition(spawn.id);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (effect.kind === "loot-grant" && !grantEncounterLoot(effect.lootTableId, now)) {
|
||||
useShellStore.getState().setNotice(`Loot table ${effect.lootTableId} is not packaged for this encounter.`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user