From 08b4268403417a483e56c5d93398ce94bda1ebda Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Sun, 25 Oct 2009 15:42:54 -0500 Subject: Add proper checks for artefacts that Cheibriados doesn't like. --- crawl-ref/source/artefact.cc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'crawl-ref/source/artefact.cc') diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc index c5675cd360..55ceb2af3b 100644 --- a/crawl-ref/source/artefact.cc +++ b/crawl-ref/source/artefact.cc @@ -90,6 +90,18 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item, } break; + case GOD_CHEIBRIADOS: + // Slow god: no quick blades, no berserking, no resist slowing. + if (item.base_type == OBJ_WEAPONS && item.sub_type == WPN_QUICK_BLADE) + type_bad = true; + + if (item.base_type == OBJ_JEWELLERY && (item.sub_type == AMU_RAGE + || item.sub_type == AMU_RESIST_SLOW)) + { + type_bad = true; + } + break; + default: break; } @@ -107,6 +119,7 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item, return (false); const int brand = get_weapon_brand(item); + const int ego = get_armour_ego_type(item); if (is_evil_god(which_god) && brand == SPWPN_HOLY_WRATH) return (false); @@ -187,6 +200,21 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item, } break; + case GOD_CHEIBRIADOS: + // Slow god: no speed, no berserking. + if (brand == SPWPN_SPEED) + return (false); + + if (ego == SPARM_RUNNING) + return (false); + + if (artefact_wpn_property(item, ARTP_ANGRY) + || artefact_wpn_property(item, ARTP_BERSERK)) + { + return (false); + } + break; + default: break; } -- cgit v1.2.3-54-g00ecf