- if (one_chance_in(10))
- {
- const int teleportitis_level = player_teleport();
- // this is instantaneous
- if (teleportitis_level > 0 && one_chance_in(100 / teleportitis_level))
- you_teleport_now(true);
- else if (you.level_type == LEVEL_ABYSS)
- {
- if (one_chance_in(30))
- abyss_teleport(coinflip());
- else
- abyss_morph();
- }
- }