summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/command.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-20 21:50:54 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-20 21:50:54 +0000
commitf86f721a09fef1f93958a2abc37da555d87f8971 (patch)
tree1851c4f80e2848734dc5c2202b3478f890818253 /crawl-ref/source/command.cc
parent3219115e22de903dd8795fc40e101d6c05ab3291 (diff)
downloadcrawl-ref-f86f721a09fef1f93958a2abc37da555d87f8971.tar.gz
crawl-ref-f86f721a09fef1f93958a2abc37da555d87f8971.zip
* Add ability descriptions to the database search.
* Xom no longer gifts stuff that unquestionably makes for a more boring adventure (scrolls of Detect/Remove Curse, Magic Mapping, Identify; potion of cure mutation, amulet of resist mutation, ring of control teleport). * Xom's "niceness" is no longer automatically defined by his mood, but it's now randomly picked according to piety > random2(200), which translates to nice, else the opposite. A "beloved toy" is extremely likely to get nice effects, and vice versa for the "beloved plaything". * In xom_acts, instead of 50% chance for piety flip, there's now a 20% chance of piety being randomly rerolled. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9523 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/command.cc')
-rw-r--r--crawl-ref/source/command.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 229f93f937..bcf81f4281 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -1123,6 +1123,15 @@ static bool _card_filter(std::string key, std::string body)
return (true);
}
+static bool _ability_filter(std::string key, std::string body)
+{
+ key = lowercase_string(key);
+ if (string_matches_ability_name(key))
+ return (false);
+
+ return (true);
+}
+
typedef void (*db_keys_recap)(std::vector<std::string>&);
static void _recap_mon_keys(std::vector<std::string> &keys)
@@ -1487,7 +1496,7 @@ static bool _find_description(bool &again, std::string& error_inout)
if (!error_inout.empty())
mpr(error_inout.c_str(), MSGCH_PROMPT);
mpr("Describe a (M)onster, (S)pell, s(K)ill, (I)tem, (F)eature, (G)od, "
- "(B)ranch, or (C)ard?", MSGCH_PROMPT);
+ "(A)bility, (B)ranch, or (C)ard?", MSGCH_PROMPT);
int ch = toupper(getch());
std::string type;
@@ -1520,6 +1529,10 @@ static bool _find_description(bool &again, std::string& error_inout)
type = "skill";
filter = _skill_filter;
break;
+ case 'A':
+ type = "ability";
+ filter = _ability_filter;
+ break;
case 'C':
type = "card";
filter = _card_filter;