Exemple #1
0
bool Dungeon::change_floor_down()
{
	clear_event_queue();
	if (floors.size() <= active_floor+1) {
		Floor *f = new Floor();
		f->spawn_pc(PC::instance());
		f->place_at_stairs(true);
		s_instance->floors.push_back(f);

		s_instance->active_floor++;
		s_instance->generate_monsters();
		s_instance->generate_objects();
		s_instance->active_floor--;
	}
	s_instance->floors.at(active_floor)->reset_current_vision();
	s_instance->active_floor++;
	queue_monster_turns();
	PC::instance()->update_vision(floors.at(active_floor));
	return true;
}