summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-11-12 15:12:56 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-11-12 15:12:56 +0100
commit03cb73a11319d74a385522b9b04f4e140f11f305 (patch)
treef334e0b34af82b0c0199314ecce464f9186a49e8 /crawl-ref/source/mapdef.cc
parent5eb5710adc406eb7cab2c8028cad52cbb8e63474 (diff)
downloadcrawl-ref-03cb73a11319d74a385522b9b04f4e140f11f305.tar.gz
crawl-ref-03cb73a11319d74a385522b9b04f4e140f11f305.zip
Include the new brands. Dissallow clubs of penetration, caps of running and such.
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-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);