Feature: implement post-combat rewards system with XP tracking and creature defeat logging

This commit is contained in:
Keith Solomon
2026-03-15 14:16:37 -05:00
parent d504008030
commit cf98636a52
7 changed files with 951 additions and 116 deletions

View File

@@ -61,3 +61,16 @@ export function findCreatureByName(
return creature;
}
export function findCreatureById(
content: ContentPack,
creatureId: string,
): CreatureDefinition {
const creature = content.creatures.find((entry) => entry.id === creatureId);
if (!creature) {
throw new Error(`Unknown creature id: ${creatureId}`);
}
return creature;
}