From 03cb73a11319d74a385522b9b04f4e140f11f305 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Thu, 12 Nov 2009 15:12:56 +0100 Subject: Include the new brands. Dissallow clubs of penetration, caps of running and such. --- crawl-ref/source/mapdef.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'crawl-ref') diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc index 041d107429..d97ec87d83 100644 --- a/crawl-ref/source/mapdef.cc +++ b/crawl-ref/source/mapdef.cc @@ -3072,6 +3072,8 @@ static int str_to_ego(item_spec &spec, std::string ego_str) "archmagi", "preservation", "reflection", + "spirit shield", + "archery", NULL }; @@ -3096,6 +3098,8 @@ static int str_to_ego(item_spec &spec, std::string ego_str) "returning", "chaos", "confuse", // 20 + "penetration", + "reaping", NULL }; @@ -3373,6 +3377,20 @@ item_spec item_list::parse_single_spec(std::string s) return (result); } else if (ego == -1) + { + error = make_stringf("Ego '%s' is invalid for item '%s'.", + ego_str.c_str(), s.c_str()); + return (result); + } + else if (result.sub_type == OBJ_RANDOM) + { + // it will be assigned among appropiate ones later + } + else if (result.base_type == OBJ_WEAPONS + && !is_weapon_brand_ok(result.sub_type, ego) + || result.base_type == OBJ_ARMOUR + && !is_armour_brand_ok(result.sub_type, ego)) + // no missile brands are dissallowed yet { error = make_stringf("Ego '%s' is incompatible with item '%s'.", ego_str.c_str(), s.c_str()); -- cgit v1.2.3-54-g00ecf