From 4e05412f06cc34b882d1f1f6aa03a1cbe558578c Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 18 Apr 2008 05:51:51 +0000 Subject: Simplify TSO randart gift checking. Also, make sure any randart gifts from Lugonu that are weapons get the distortion brand, since it's his associated brand, as holy wrath is for TSO. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4320 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/randart.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index 6f59c64456..4e9ab1a8ed 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -92,14 +92,12 @@ static bool god_fits_artefact(const god_type which_god, const item_def &item) case GOD_SHINING_ONE: // holiness, honourable combat if (item.base_type != OBJ_WEAPONS - || weapon_skill(item) != SK_LONG_BLADES) + || weapon_skill(item) != SK_LONG_BLADES + || brand != SPWPN_HOLY_WRATH) { return (false); } - if (brand != SPWPN_HOLY_WRATH) - return (false); - if (randart_wpn_property( item, RAP_INVISIBLE ) || randart_wpn_property( item, RAP_STEALTH ) > 0) { @@ -128,6 +126,11 @@ static bool god_fits_artefact(const god_type which_god, const item_def &item) break; + case GOD_LUGONU: // corruption + if (item.base_type == OBJ_WEAPONS && brand != SPWPN_DISTORTION) + return (false); + break; + case GOD_SIF_MUNA: case GOD_KIKUBAAQUDGHA: case GOD_VEHUMET: -- cgit v1.2.3-54-g00ecf