1 /**
2  * @file
3  * @brief Spell miscast class.
4 **/
5 
6 #pragma once
7 
8 #include "spl-util.h"
9 
10 // scale miscast severity
11 const int MISCAST_DIVISOR = 9;
12 
13 // cutoff for getting a miscast
14 const int MISCAST_THRESHOLD = 150;
15 
16 enum class miscast_source
17 {
18     hell_effect,
19     melee,
20     spell,
21     wizard,
22     deck,
23     god
24 };
25 
26 class actor;
27 
28 struct miscast_source_info
29 {
30     // The source of the miscast
31     miscast_source source;
32     // If source == miscast_source::god, the god the miscast was created by
33     god_type god;
34 };
35 
36 
37 void miscast_effect(spell_type spell, int fail);
38 void miscast_effect(actor& target, actor* source, miscast_source_info mc_info,
39                     spschool school, int level, int fail, string cause);
40