diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-13 14:07:56 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-13 14:07:56 +0000 |
commit | 2a9689ff31d9b420120db477c7121e6d3fa114f3 (patch) | |
tree | 82dbbeaf538857dedeee03d2e871f572f1cf5c45 /crawl-ref/source/religion.cc | |
parent | 0cac1ce29227a7352540e9b3479db5b3fc8f55d6 (diff) | |
download | crawl-ref-2a9689ff31d9b420120db477c7121e6d3fa114f3.tar.gz crawl-ref-2a9689ff31d9b420120db477c7121e6d3fa114f3.zip |
Clean up holiness handling, as well as a few other miscellaneous things.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3621 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 7cb079748f..f6b737fd25 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1667,7 +1667,7 @@ bool did_god_conduct( conduct_type thing_done, int level, bool known, #if DEBUG_DIAGNOSTICS if (ret) { - static const char *conducts[] = + static const char *conducts[] = { "", "Necromancy", "Unholy", "Attack Holy", "Attack Friend", @@ -3532,7 +3532,7 @@ void altar_prayer(void) && you.piety > 160) { const int wpn = get_player_wielded_weapon(); - + if (wpn != -1 && get_weapon_brand(you.inv[wpn]) != SPWPN_DISTORTION) bless_weapon(GOD_LUGONU, SPWPN_DISTORTION, RED); } @@ -3544,20 +3544,19 @@ bool god_hates_attacking_friend(god_type god, const actor *fr) { if (!fr || fr->kill_alignment() != KC_FRIENDLY) return (false); - + switch (god) { - case GOD_ZIN: - case GOD_SHINING_ONE: - case GOD_ELYVILON: - case GOD_OKAWARU: - return (true); - - case GOD_BEOGH: // added penance to avoid killings for loot - return (fr && mons_species(fr->id()) == MONS_ORC); + case GOD_ZIN: + case GOD_SHINING_ONE: + case GOD_ELYVILON: + case GOD_OKAWARU: + return (true); + case GOD_BEOGH: // added penance to avoid killings for loot + return (mons_species(fr->id()) == MONS_ORC); - default: - return (false); + default: + return (false); } } |