diff options
author | Shmuale Mark <shm.mark@gmail.com> | 2014-06-12 14:22:19 -0400 |
---|---|---|
committer | Shmuale Mark <shm.mark@gmail.com> | 2014-06-12 14:29:26 -0400 |
commit | 872d5c48c9ab0301c6a83c7c537ebcadc3af4471 (patch) | |
tree | 120f5f40b689e59af255e9256ccd2f0848f2af96 /crawl-ref/source/item_use.cc | |
parent | 62da3a1b50ace201ebcccd202515e3685b5e3234 (diff) | |
download | crawl-ref-872d5c48c9ab0301c6a83c7c537ebcadc3af4471.tar.gz crawl-ref-872d5c48c9ab0301c6a83c7c537ebcadc3af4471.zip |
More fixes for temporary brands.
Don't keep the old brand on Tukima's, make ?bw make sense, and don't
allow rebranding a blessed weapon (this includes with the scroll).
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 1e6984b8aa..3c736ebbbe 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -56,6 +56,7 @@ #include "spl-selfench.h" #include "spl-summoning.h" #include "spl-transloc.h" +#include "spl-wpnench.h" #include "state.h" #include "stuff.h" #include "target.h" @@ -2139,9 +2140,9 @@ static bool _god_hates_brand(const int brand) static void _rebrand_weapon(item_def& wpn) { + if (&wpn == you.weapon() && you.duration[DUR_WEAPON_BRAND]) + end_weapon_brand(wpn); int old_brand = get_weapon_brand(wpn); - if (you.duration[DUR_WEAPON_BRAND]) - old_brand = you.props["orig brand"]; int new_brand = old_brand; const string itname = wpn.name(DESC_YOUR); |