diff options
author | Brendan Hickey <brendan@bhickey.net> | 2013-07-28 11:43:44 -0700 |
---|---|---|
committer | Brendan Hickey <brendan@bhickey.net> | 2013-07-28 12:11:41 -0700 |
commit | d34c657c4e4eff20e0d19b75d0e5214211384be8 (patch) | |
tree | 50f18b471e24673e0c708f988ab1998d4924ff22 /crawl-ref/source/spl-miscast.cc | |
parent | 92a6f35f339cb52a0fd7ec4ad2014142fb80e110 (diff) | |
download | crawl-ref-d34c657c4e4eff20e0d19b75d0e5214211384be8.tar.gz crawl-ref-d34c657c4e4eff20e0d19b75d0e5214211384be8.zip |
Replace 'you.penance' checks with function calls
Replace you.penance[FOO] with player_under_penance[FOO].
Diffstat (limited to 'crawl-ref/source/spl-miscast.cc')
-rw-r--r-- | crawl-ref/source/spl-miscast.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/spl-miscast.cc b/crawl-ref/source/spl-miscast.cc index fcac3eccac..baf9f58311 100644 --- a/crawl-ref/source/spl-miscast.cc +++ b/crawl-ref/source/spl-miscast.cc @@ -542,7 +542,7 @@ bool MiscastEffect::_ouch(int dam, beam_type flavour) { god_type god = static_cast<god_type>(-source); - if (god == GOD_XOM && you.penance[GOD_XOM] == 0) + if (god == GOD_XOM && !player_under_penance(GOD_XOM)) method = KILLED_BY_XOM; else method = KILLED_BY_DIVINE_WRATH; @@ -713,7 +713,7 @@ bool MiscastEffect::_create_monster(monster_type what, int abj_deg, // hostile_at() assumes the monster is hostile to the player, // but should be hostile to the target monster unless the miscast // is a result of either divine wrath or a Zot trap. - if (target->is_monster() && you.penance[god] == 0 + if (target->is_monster() && !player_under_penance(god) && source != ZOT_TRAP_MISCAST) { monster* mon_target = target_as_monster(); @@ -743,7 +743,7 @@ bool MiscastEffect::_create_monster(monster_type what, int abj_deg, { if (what == RANDOM_MOBILE_MONSTER) data.summon_type = SPELL_SHADOW_CREATURES; - else if (you.penance[god] > 0) + else if (player_under_penance(god)) data.summon_type = MON_SUMM_WRATH; else if (source == ZOT_TRAP_MISCAST) data.summon_type = MON_SUMM_ZOT; |