Feature: enhance encounter resolution with creature names and result labels

This commit is contained in:
Keith Solomon
2026-03-15 13:11:28 -05:00
parent 1ff20723ec
commit 39703ce6b0
5 changed files with 196 additions and 1 deletions

View File

@@ -49,7 +49,15 @@ function cloneRoom(room: RoomState): RoomState {
dimensions: { ...room.dimensions },
exits: room.exits.map((exit) => ({ ...exit })),
discovery: { ...room.discovery },
encounter: room.encounter ? { ...room.encounter, creatureIds: [...room.encounter.creatureIds] } : undefined,
encounter: room.encounter
? {
...room.encounter,
creatureIds: [...room.encounter.creatureIds],
creatureNames: room.encounter.creatureNames
? [...room.encounter.creatureNames]
: undefined,
}
: undefined,
objects: room.objects.map((object) => ({
...object,
effects: object.effects ? [...object.effects] : undefined,