summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/mapdef.cc18
1 files changed, 18 insertions, 0 deletions
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
};
@@ -3374,6 +3378,20 @@ item_spec item_list::parse_single_spec(std::string s)
}
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());
return (result);