1 /**
2  * @file
3  * @brief Misc abyss specific functions.
4 **/
5 
6 #pragma once
7 
8 // When shifting areas in the abyss, shift the square containing player LOS
9 // plus a little extra so that the player won't be disoriented by taking a
10 // step backward after an abyss shift.
11 const int ABYSS_AREA_SHIFT_RADIUS = LOS_RADIUS + 2;
12 const int ABYSSAL_RUNE_MIN_LEVEL = 3;
13 extern const coord_def ABYSS_CENTRE;
14 
15 /// How much XP does the player need to earn to spawn the next exit/stair?
16 #define ABYSS_STAIR_XP_KEY "abyss_stair_xp" // not actually xp... complicated
17 /// Has the Abyss spawned an exit for the player due to earned XP in this trip?
18 #define ABYSS_SPAWNED_XP_EXIT_KEY "abyss_spawned_xp_exit"
19 const int EXIT_XP_COST = 10; // ref _reduce_abyss_xp_timer() for details
20 // but it's equivalent to roughly half the recharge xp for an elemental evoker
21 
22 struct abyss_state
23 {
24     coord_def major_coord;
25     uint32_t seed;
26     uint32_t depth;
27     double phase;
28     level_id level;
29     bool destroy_all_terrain;
30 };
31 
32 extern abyss_state abyssal_state;
33 
34 void abyss_morph();
35 
36 void banished(const string &who = "", const int power = 0);
37 void push_features_to_abyss();
38 
39 void generate_abyss();
40 void maybe_shift_abyss_around_player();
41 void abyss_maybe_spawn_xp_exit();
42 void abyss_teleport();
43 void save_abyss_uniques();
44 bool is_level_incorruptible(bool quiet = false);
45 bool lugonu_corrupt_level(int power);
46 void run_corruption_effects(int duration);
47 void set_abyss_state(coord_def coord, uint32_t depth);
48 void destroy_abyss();
49