1 #pragma once
2 
3 #include "beam.h"
4 #include "beh-type.h"
5 #include "enum.h"
6 #include "god-type.h"
7 #include "item-prop-enum.h"
8 #include "spl-cast.h"
9 
10 //Bitfield for animate dead messages
11 #define DEAD_ARE_WALKING 1
12 #define DEAD_ARE_SWIMMING 2
13 #define DEAD_ARE_FLYING 4
14 #define DEAD_ARE_SLITHERING 8
15 #define DEAD_ARE_HOPPING 16
16 #define DEAD_ARE_CRAWLING 32
17 
18 // How many aut until the next doom hound pops out of doom howl?
19 #define NEXT_DOOM_HOUND_KEY "next_doom_hound"
20 
21 spret cast_summon_small_mammal(int pow, god_type god, bool fail);
22 
23 spret cast_call_canine_familiar(int pow, god_type god, bool fail);
24 spret cast_summon_armour_spirit(int pow, god_type god, bool fail);
25 spret cast_summon_ice_beast(int pow, god_type god, bool fail);
26 spret cast_monstrous_menagerie(actor* caster, int pow, god_type god,
27                                  bool fail = false);
28 spret cast_summon_dragon(actor *caster, int pow,
29                               god_type god = GOD_NO_GOD, bool fail = false);
30 spret cast_summon_hydra(actor *caster, int pow, god_type god = GOD_NO_GOD,
31                              bool fail = false);
32 spret cast_summon_mana_viper(int pow, god_type god, bool fail);
33 bool summon_berserker(int pow, actor *caster,
34                       monster_type override_mons = MONS_PROGRAM_BUG);
35 bool summon_holy_warrior(int pow, bool punish);
36 
37 bool tukima_affects(const actor &target);
38 void cast_tukimas_dance(int pow, actor *target);
39 spret cast_conjure_ball_lightning(int pow, god_type god, bool fail);
40 int ball_lightning_hd(int pow, bool random = true);
41 int mons_ball_lightning_hd(int pow, bool random = true);
42 int mons_ball_lightning_per_cast(int pow, bool random = true);
43 spret cast_summon_lightning_spire(int pow, god_type god, bool fail);
44 
45 spret cast_call_imp(int pow, god_type god, bool fail);
46 bool summon_demon_type(monster_type mon, int pow, god_type god = GOD_NO_GOD,
47                        int spell = 0, bool friendly = true);
48 spret cast_summon_demon(int pow);
49 spret cast_shadow_creatures(int st = SPELL_SHADOW_CREATURES,
50                                  god_type god = GOD_NO_GOD,
51                                  level_id place = level_id::current(),
52                                  bool fail = false);
53 spret cast_summon_horrible_things(int pow, god_type god, bool fail);
54 bool can_cast_malign_gateway();
55 void create_malign_gateway(coord_def point, beh_type beh, string cause,
56                            int pow, god_type god = GOD_NO_GOD,
57                            bool is_player = false);
58 spret cast_malign_gateway(actor* caster, int pow,
59                                god_type god = GOD_NO_GOD, bool fail = false);
60 coord_def find_gateway_location(actor* caster);
61 spret cast_summon_forest(actor* caster, int pow, god_type god, bool fail, bool test=false);
62 spret cast_summon_guardian_golem(int pow, god_type god, bool fail);
63 
64 spret cast_dragon_call(int pow, bool fail);
65 void do_dragon_call(int time);
66 
67 void doom_howl(int time);
68 
69 spell_type player_servitor_spell();
70 bool spell_servitorable(spell_type spell);
71 void init_servitor(monster* servitor, actor* caster);
72 spret cast_spellforged_servitor(int pow, god_type god, bool fail);
73 
74 int animate_remains(const coord_def &a, corpse_type class_allowed,
75                     beh_type beha, int pow, unsigned short hitting,
76                     actor *as = nullptr, string nas = "",
77                     god_type god = GOD_NO_GOD, bool actual = true,
78                     bool quiet = false, bool apply_lovelessness = true,
79                     monster** mon = nullptr, int* motions = nullptr);
80 
81 coord_def find_animatable_skeleton(coord_def c);
82 spret cast_animate_skeleton(int pow, god_type god, bool fail);
83 spret cast_animate_dead(int pow, god_type god, bool fail);
84 int animate_dead(actor *caster, int pow, beh_type beha,
85                  unsigned short hitting, actor *as = nullptr, string nas = "",
86                  god_type god = GOD_NO_GOD, bool actual = true);
87 
88 int find_simulacrable_corpse(coord_def c);
89 spret cast_simulacrum(int pow, god_type god, bool fail);
90 
91 monster_type pick_random_wraith();
92 spret cast_haunt(int pow, const coord_def& where, god_type god, bool fail);
93 
94 monster* find_battlesphere(const actor* agent);
95 spret cast_battlesphere(actor* agent, int pow, god_type god, bool fail);
96 void end_battlesphere(monster* mons, bool killed);
97 bool battlesphere_can_mirror(spell_type spell);
98 bool aim_battlesphere(actor* agent, spell_type spell);
99 bool trigger_battlesphere(actor* agent);
100 bool fire_battlesphere(monster* mons);
101 void reset_battlesphere(monster* mons);
102 dice_def battlesphere_damage(int pow);
103 
104 spret cast_fulminating_prism(actor* caster, int pow,
105                                   const coord_def& where, bool fail);
106 int prism_hd(int pow, bool random = true);
107 
108 monster* find_spectral_weapon(const actor* agent);
109 void end_spectral_weapon(monster* mons, bool killed, bool quiet = false);
110 
111 spret cast_infestation(int pow, bolt &beam, bool fail);
112 
113 void summoned_monster(const monster* mons, const actor* caster,
114                       spell_type spell);
115 bool summons_are_capped(spell_type spell);
116 int summons_limit(spell_type spell);
117 int count_summons(const actor *summoner, spell_type spell);
118 
119 bool fedhas_wall_of_briars();
120 spret fedhas_grow_ballistomycete(bool fail);
121 spret fedhas_overgrow(bool fail);
122 spret fedhas_grow_oklob(bool fail);
123 
124 spret cast_foxfire(actor &agent, int pow, god_type god, bool fail);
125