From 59eb3c3f326a284b63b58b95d9396746d9664bbe Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 16 Apr 2008 01:29:47 +0000 Subject: Let TSO's weapon blessing for players work on weapons that have the holy wrath brand, and which can be in a blessed form but aren't. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4253 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/itemprop.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'crawl-ref/source/itemprop.cc') diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 5c531b280f..5fae319d04 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -1648,6 +1648,30 @@ bool is_blessed( const item_def &item ) return (false); } // end is_blessed() +bool is_blessable( const item_def &item ) +{ + if (item.base_type == OBJ_WEAPONS) + { + switch (item.sub_type) + { + case WPN_FALCHION: + case WPN_LONG_SWORD: + case WPN_SCIMITAR: + case WPN_KATANA: + case WPN_DEMON_BLADE: + case WPN_DOUBLE_SWORD: + case WPN_GREAT_SWORD: + case WPN_TRIPLE_SWORD: + return (true); + + default: + break; + } + } + + return (false); +} // end is_blessable() + bool normal2good( item_def &item, bool allow_blessed ) { if (item.base_type != OBJ_WEAPONS) -- cgit v1.2.3-54-g00ecf