diff options
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r-- | crawl-ref/source/initfile.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index be738cfb0c..158112a087 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -39,6 +39,7 @@ #include "player.h" #include "religion.h" #include "species.h" +#include "spl-util.h" #include "stash.h" #include "state.h" #include "stuff.h" @@ -234,6 +235,28 @@ int str_to_fprop ( const std::string &str) return (FPROP_NONE); } +// Summon types can be any of mon_summon_type (enum.h), or a relevant summoning +// spell. +int str_to_summon_type (const std::string &str) +{ + if (str == "clone") + return (MON_SUMM_CLONE); + if (str == "animate") + return (MON_SUMM_ANIMATE); + if (str == "chaos") + return (MON_SUMM_CHAOS); + if (str == "miscast") + return (MON_SUMM_MISCAST); + if (str == "zot") + return (MON_SUMM_ZOT); + if (str == "wrath") + return (MON_SUMM_WRATH); + if (str == "aid") + return (MON_SUMM_AID); + + return (spell_by_name(str)); +} + static std::string _wand_to_str( int weapon ) { switch (weapon) |