summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-17 19:18:51 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-17 19:18:51 +0000
commit12096345ed3ac56efc5e8bb238786b43c6f1e033 (patch)
tree2272647723f6253a6c782ba8b47c22d51c9bc1d7 /crawl-ref/source/religion.cc
parentdf7642d92e70c45d2d886090423f814b8292443d (diff)
downloadcrawl-ref-12096345ed3ac56efc5e8bb238786b43c6f1e033.tar.gz
crawl-ref-12096345ed3ac56efc5e8bb238786b43c6f1e033.zip
When destroying weapons with Elyvilon's power, gain piety after
displaying the weapon destruction message instead of before. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9605 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 3dc98e8679..39ff2b638e 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -3906,17 +3906,14 @@ bool ely_destroy_weapons()
piety_gain_t pgain = PIETY_NONE;
const bool is_evil_weapon = is_evil_item(item);
+
if (is_evil_weapon || _destroyed_valuable_weapon(value, item.base_type))
- {
pgain = PIETY_SOME;
- gain_piety(1);
- }
if (get_weapon_brand(item) == SPWPN_HOLY_WRATH)
{
// Weapons blessed by TSO don't get destroyed but are instead
// returned whence they came. (jpeg)
-// _print_sacrifice_message(GOD_SHINING_ONE, item, pgain);
simple_god_message(
make_stringf(" %sreclaims %s.",
pgain == PIETY_SOME ? "gladly " : "",
@@ -3936,6 +3933,9 @@ bool ely_destroy_weapons()
}
}
+ if (pgain == PIETY_SOME)
+ gain_piety(1);
+
destroy_item(si.link());
success = true;
}
@@ -4041,6 +4041,7 @@ bool trog_burn_spellbooks()
simple_god_message(" is delighted!", GOD_TROG);
gain_piety(totalpiety);
}
+
return (true);
}