Start of movement tests

Adds the following lua functions:

- nh.pushkey("x")
    Pushes a key into the command queue. Support is spotty,
    currently only the keys handled in rhack.
- nh.doturn()
    Runs one turn of main loop, or if optional boolean param
    is true, until g.multi == 0
- nh.monster_generation(false)
    Disable monster generation, and kill off all monsters.

Adds a testmove.lua script to test hero movement. Currently
covers only hjklyubn and HJKLYUBN.
This commit is contained in:
Pasi Kallinen
2021-07-28 19:11:30 +03:00
parent fa8c3f82be
commit 65b320de39
6 changed files with 171 additions and 31 deletions

View File

@@ -1123,6 +1123,9 @@ makemon(register struct permonst *ptr,
fakemon = cg.zeromonst;
cc.x = cc.y = 0;
if (iflags.debug_mongen)
return (struct monst *) 0;
/* if caller wants random location, do it here */
if (x == 0 && y == 0) {
fakemon.data = ptr; /* set up for goodpos */