fix dungeon algorithm and resource