chore: the WS end-to-end check reads the quest book and collects level rewards

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Fabian @ Blax Software 2026-10-29 10:06:50 +01:00
parent 2336d746ff
commit 17c448ca0c
1 changed files with 4 additions and 0 deletions

View File

@ -53,5 +53,9 @@ const after = await call('village.show', { village_id: id })
log('after finish -> push received:', pushed, '| queue', after.data.queue.length, '| timber camp', JSON.stringify(after.data.buildings.find((b) => b.type === 'timber_camp'))) log('after finish -> push received:', pushed, '| queue', after.data.queue.length, '| timber camp', JSON.stringify(after.data.buildings.find((b) => b.type === 'timber_camp')))
const map = await call('map.view', { world_id: dev.id, w: 41, h: 41 }) const map = await call('map.view', { world_id: dev.id, w: 41, h: 41 })
log('map.view ->', map.ok, 'centre', JSON.stringify(map.data.center), 'window', map.data.x, map.data.y, map.data.w, map.data.h, '| villages', map.data.villages.length, '| own', JSON.stringify(map.data.villages.find((v) => v.own)), '| barbarians', map.data.villages.filter((v) => !v.player).length) log('map.view ->', map.ok, 'centre', JSON.stringify(map.data.center), 'window', map.data.x, map.data.y, map.data.w, map.data.h, '| villages', map.data.villages.length, '| own', JSON.stringify(map.data.villages.find((v) => v.own)), '| barbarians', map.data.villages.filter((v) => !v.player).length)
const book = await call('quest.index', { village_id: id })
log('quest.index ->', book.ok, '| lines', book.data.lines.map((l) => l.line + ':' + (l.quest?.key ?? '-')).join(' '), '| rewards', JSON.stringify(book.data.rewards.map((r) => r.type + ' ' + r.level)), '| badge', JSON.stringify(after.data.quests))
const collected = await call('quest.collect', { village_id: id })
log('quest.collect ->', collected.ok, '| rewards left', collected.data.book.rewards.length, '| wood', Math.round(collected.data.village.resources.wood))
ws.close() ws.close()
process.exit(0) process.exit(0)