Lua tests: monster creation coverage

Expose constants NUMMONS, LOW_PM, and HIGH_PM to lua.
Allow converting an int to monster type name.
Create one of each type of monster in the lua tests.
This commit is contained in:
Pasi Kallinen
2026-01-25 18:32:43 +02:00
parent 62f3969899
commit 92a8d1dab3
3 changed files with 42 additions and 0 deletions

View File

@@ -124,6 +124,11 @@ function test_monster()
des.monster({ id = "Angel", align = "law" });
des.monster({ id = "archeologist" });
des.monster({ id = "wizard", name = "Rincewind", peaceful = true });
for i = nhc.LOW_PM, nhc.HIGH_PM do
des.monster({ id = nh.int_to_pmname(i) });
end
des.reset_level();
des.level_init();
end