Talk:Tales from the Labyrinth/@comment-76.238.194.159-20141223191802/@comment-20371365-20141223215047

Sorry to hear about the game glitching like that, but thanks for reporting it on here. I'm not sure but it seems like somehow the game thought the troll and the mage were on the same tile, which is not something that should ever be possible. When placing the monsters in the roooms the game does check first if the tile is unoccupied, so I'm not sure how it could have put two of them in the same space. Also, when the monsters move the game checks if the target tile to move to is occupied or not and if it is, the monster will not move into that space.

It seems like in this instance the game thought there was a monster on that black square, but when checking the value of MONS(I,0) to see what type it was, it found the value -1 which is used as a 'null' or empty value, causing the game to crash as it is trying to attack a non existant monster. It may be that because the game thought there were 2 monsters on the same space that it got confused as to whether the space was really empty or not after the first monster was killed, resulting in the crash.

I'll have to take another look through the monster placement and movement code to see if there are any special cases I may have missed that may be causing the glitch. Another one for the list of things to resolve in a possible version 1.1! :-)