summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-27 23:41:46 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-27 23:41:46 +0000
commit018f10b4f4caff42e663eb68bc03f083323ba1d0 (patch)
treef337c06ea4802fa74d995b76b869e06be2935a82 /crawl-ref/source/spl-cast.cc
parenta65b46bf18b32d66d1dc808f8c427f878e867c8a (diff)
downloadcrawl-ref-018f10b4f4caff42e663eb68bc03f083323ba1d0.tar.gz
crawl-ref-018f10b4f4caff42e663eb68bc03f083323ba1d0.zip
Xom-forced spells shouldn't trigger penance. [2509398]
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8829 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 7b9c50fdec..52643974dd 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -796,7 +796,9 @@ static void _spellcasting_side_effects(spell_type spell, bool idonly = false)
if (idonly)
return;
- if (!_spell_is_utility_spell(spell))
+ // If you are casting while a god is acting, then don't do conducts.
+ // (Presumably Xom is forcing you to cast a spell.)
+ if (!_spell_is_utility_spell(spell) && !crawl_state.is_god_acting())
did_god_conduct(DID_SPELL_NONUTILITY, 10 + spell_difficulty(spell));
if (spell_typematch(spell, SPTYP_HOLY))
@@ -804,15 +806,20 @@ static void _spellcasting_side_effects(spell_type spell, bool idonly = false)
// Self-banishment gets a special exemption - you're there to spread
// light.
- if (_spell_is_unholy(spell) && !you.banished)
+ if (_spell_is_unholy(spell)
+ && !you.banished
+ && !crawl_state.is_god_acting())
+ {
did_god_conduct(DID_UNHOLY, 10 + spell_difficulty(spell));
+ }
// Linley says: Condensation Shield needs some disadvantages to keep
// it from being a no-brainer... this isn't much, but its a start -- bwr
if (spell_typematch(spell, SPTYP_FIRE))
expose_player_to_element(BEAM_FIRE, 0);
- if (spell_typematch(spell, SPTYP_NECROMANCY))
+ if (spell_typematch(spell, SPTYP_NECROMANCY)
+ && !crawl_state.is_god_acting())
{
did_god_conduct(DID_NECROMANCY, 10 + spell_difficulty(spell));