From 12096345ed3ac56efc5e8bb238786b43c6f1e033 Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 17 Apr 2009 19:18:51 +0000 Subject: 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 --- crawl-ref/source/religion.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/religion.cc') 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); } -- cgit v1.2.3-54-g00ecf