Fixed corner case in preventdeath function

case 1: monster killing another monster would not remove the killed one
from the list of alive monsters
case 2: player killing himself would not call playerDied function