summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/artefact.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-10-25 15:42:54 -0500
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-10-25 15:42:54 -0500
commit08b4268403417a483e56c5d93398ce94bda1ebda (patch)
tree1331ed01887a4cafa51a17791467f64b13c440d5 /crawl-ref/source/artefact.cc
parent6c4ddca9969fed40930b6c1ad8e7846bad17c935 (diff)
downloadcrawl-ref-08b4268403417a483e56c5d93398ce94bda1ebda.tar.gz
crawl-ref-08b4268403417a483e56c5d93398ce94bda1ebda.zip
Add proper checks for artefacts that Cheibriados doesn't like.
Diffstat (limited to 'crawl-ref/source/artefact.cc')
-rw-r--r--crawl-ref/source/artefact.cc28
1 files changed, 28 insertions, 0 deletions
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;
}