fc16721fb4ef20ed5da9d080eca08cd26caa9009
[crawl.git] / crawl-ref / source / godabil.h
1 /**
2  * @file
3  * @brief God-granted abilities.
4 **/
5
6 #ifndef GODABIL_H
7 #define GODABIL_H
8
9 #include "enum.h"
10 #include "externs.h"
11 #include "spl-cast.h"
12
13 #define BEOGH_WPN_GIFT_KEY "given beogh weapon"
14 #define BEOGH_ARM_GIFT_KEY "given beogh armour"
15 #define BEOGH_SH_GIFT_KEY "given beogh shield"
16
17 struct sacrifice_def
18 {
19     ability_type  sacrifice;        // The ability that executes the sacrifice.
20     mutation_type mutation;         // The mutation that will be inflicted.
21     const char*   sacrifice_text;   // Format: "sacrifice your hand"
22                                     // in case of variable sacrifices or sac
23                                     // hand, this will be extended later
24     const char*   milestone_text;   // Format: "sacrificed <foo>"
25                                     // in case of variable sacrifices this will
26                                     // be extended later
27     int           base_piety;       // The piety that will be gained, modified
28                                     // by the skill points in the skill below.
29     skill_type    sacrifice_skill;  // This skill will be eliminated.
30     const char*   sacrifice_vector; // This is used for sacrifices which give
31                                     // multiple mutations. It is a key into
32                                     // you.props, yielding a list of mutations
33                                     // granted by the sacrifice.
34 };
35
36 struct bolt;
37 class stack_iterator;
38
39 string zin_recite_text(const int seed, const int prayertype, int step);
40 bool zin_check_able_to_recite(bool quiet = false);
41 int zin_check_recite_to_monsters(bool quiet = false);
42 bool zin_recite_to_single_monster(const coord_def& where);
43 void zin_recite_interrupt();
44 bool zin_vitalisation();
45 void zin_remove_divine_stamina();
46 bool zin_remove_all_mutations();
47 bool zin_sanctuary();
48
49 void tso_divine_shield();
50 void tso_remove_divine_shield();
51
52 void elyvilon_purification();
53 bool elyvilon_divine_vigour();
54 void elyvilon_remove_divine_vigour();
55
56 bool vehumet_supports_spell(spell_type spell);
57
58 bool trog_burn_spellbooks();
59 void trog_do_trogs_hand(int power);
60 void trog_remove_trogs_hand();
61
62 void jiyva_paralyse_jellies();
63 bool jiyva_remove_bad_mutation();
64
65 bool beogh_water_walk();
66 bool beogh_can_gift_items_to(const monster* mons, bool quiet = true);
67 bool beogh_gift_item();
68
69 bool yred_injury_mirror();
70 bool yred_can_animate_dead();
71 bool yred_animate_remains_or_dead();
72 void yred_make_enslaved_soul(monster* mon, bool force_hostile = false);
73
74 bool kiku_receive_corpses(int pow);
75 bool kiku_take_corpse();
76
77 bool fedhas_passthrough_class(const monster_type mc);
78 bool fedhas_passthrough(const monster* target);
79 bool fedhas_passthrough(const monster_info* target);
80 bool fedhas_shoot_through(const bolt& beam, const monster* victim);
81 int fedhas_fungal_bloom();
82 spret_type fedhas_sunlight(bool fail = false);
83 void process_sunlights(bool future = false);
84 bool prioritise_adjacent(const coord_def& target, vector<coord_def>& candidates);
85 bool fedhas_plant_ring_from_fruit();
86 int fedhas_rain(const coord_def &target);
87 int count_corpses_in_los(vector<stack_iterator> *positions);
88 int fedhas_check_corpse_spores(bool quiet = false);
89 int fedhas_corpse_spores(beh_type attitude = BEH_FRIENDLY);
90 bool mons_is_evolvable(const monster* mon);
91 bool fedhas_check_evolve_flora(bool quiet = false);
92 void fedhas_evolve_flora();
93
94 void lugonu_bend_space();
95
96 void cheibriados_time_bend(int pow);
97 void cheibriados_temporal_distortion();
98 bool cheibriados_slouch(int pow);
99 void cheibriados_time_step(int pow);
100 bool ashenzari_transfer_knowledge();
101 bool ashenzari_end_transfer(bool finished = false, bool force = false);
102
103 bool can_convert_to_beogh();
104 void spare_beogh_convert();
105
106 bool dithmenos_shadow_step();
107 monster* shadow_monster(bool equip = true);
108 void shadow_monster_reset(monster *mon);
109 void dithmenos_shadow_melee(actor* target);
110 void dithmenos_shadow_throw(coord_def target, const item_def &item);
111 void dithmenos_shadow_spell(bolt* orig_beam, spell_type spell);
112
113 int gozag_porridge_price();
114 bool gozag_setup_potion_petition(bool quiet = false);
115 bool gozag_potion_petition();
116 int gozag_price_for_shop(bool max = false);
117 bool gozag_setup_call_merchant(bool quiet = false);
118 bool gozag_call_merchant();
119 int gozag_type_bribable(monster_type type, bool force = false);
120 branch_type gozag_bribable_branch(monster_type type);
121 bool gozag_branch_bribable(branch_type branch);
122 int gozag_branch_bribe_susceptibility(branch_type branch);
123 void gozag_deduct_bribe(branch_type br, int amount);
124 bool gozag_check_bribe_branch(bool quiet = false);
125 bool gozag_bribe_branch();
126
127 spret_type qazlal_upheaval(coord_def target, bool quiet = false,
128                            bool fail = false);
129 void qazlal_elemental_force();
130 bool qazlal_disaster_area();
131
132 void init_sac_index();
133 const sacrifice_def& get_sacrifice_def(ability_type sac);
134 const skill_type arcane_mutation_to_skill(mutation_type mutation);
135 const char* arcane_mutation_to_school_name(mutation_type mutation);
136 vector<ability_type> get_possible_sacrifices();
137 void ru_offer_new_sacrifices();
138 bool ru_do_sacrifice(sacrifice_def sac_data);
139 bool ru_reject_sacrifices();
140 void ru_reset_sacrifice_timer(bool clear_timer = false);
141 void ru_expire_sacrifices();
142 bool will_ru_retaliate();
143 void ru_do_retribution(monster* mons, int damage);
144 void ru_draw_out_power();
145 bool ru_power_leap();
146 bool ru_apocalypse();
147 #endif