summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/itemprop.cc24
-rw-r--r--crawl-ref/source/itemprop.h1
-rw-r--r--crawl-ref/source/religion.cc8
3 files changed, 31 insertions, 2 deletions
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)
diff --git a/crawl-ref/source/itemprop.h b/crawl-ref/source/itemprop.h
index 82a70ae16e..ab8b39bbdf 100644
--- a/crawl-ref/source/itemprop.h
+++ b/crawl-ref/source/itemprop.h
@@ -669,6 +669,7 @@ int double_wpn_awkward_speed( const item_def &item );
bool is_demonic( const item_def &item );
bool is_blessed( const item_def &item );
+bool is_blessable( const item_def &item );
bool normal2good( item_def &item, bool allow_blessed = true );
int get_vorpal_type( const item_def &item );
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index e6e5c5de1c..6cf6e0195b 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -4150,7 +4150,7 @@ static void _altar_prayer()
god_acting gdact;
- // TSO blesses weapons with holy wrath
+ // TSO blesses weapons with holy wrath, and long blades specially
if (you.religion == GOD_SHINING_ONE
&& !you.num_gifts[GOD_SHINING_ONE]
&& !player_under_penance()
@@ -4158,8 +4158,12 @@ static void _altar_prayer()
{
const int wpn = get_player_wielded_weapon();
- if (wpn != -1 && get_weapon_brand(you.inv[wpn]) != SPWPN_HOLY_WRATH)
+ if (wpn != -1
+ && (get_weapon_brand(you.inv[wpn]) != SPWPN_HOLY_WRATH
+ || is_blessable(you.inv[wpn])))
+ {
_bless_weapon(GOD_SHINING_ONE, SPWPN_HOLY_WRATH, YELLOW);
+ }
}
// Lugonu blesses weapons with distortion