✨Feature: implement post-combat rewards system with XP tracking and creature defeat logging
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user