summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-09-24 18:41:59 -0500
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-09-24 18:41:59 -0500
commit4f86bfa5a02da4400537f6fdfbda81a41aa85c5f (patch)
treea034cba462ae3fb87e68ad536e0c8acedf68851a /crawl-ref/source/spl-cast.cc
parent18bb78ba4812729d6e4be90c51f51f8abdde4e48 (diff)
downloadcrawl-ref-4f86bfa5a02da4400537f6fdfbda81a41aa85c5f.tar.gz
crawl-ref-4f86bfa5a02da4400537f6fdfbda81a41aa85c5f.zip
Apply anonymous patch in [2836447], with a few tweaks, to fix spell
hunger descriptions.
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index b2a24c538d..d32187743f 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -2296,16 +2296,21 @@ static unsigned int _breakpoint_rank(int val, const int breakpoints[],
return result;
}
-const char* spell_hunger_string( spell_type spell )
+const char* spell_hunger_string(spell_type spell)
{
if (you.is_undead == US_UNDEAD)
- return "N/A";
+ return ("N/A");
const int hunger = spell_hunger(spell);
+
+ // Spell hunger is "Fruit" if casting the spell five times costs at
+ // most one "Fruit".
const char* hunger_descriptions[] = {
- "None", "Grape", "Apple", "Choko", "Ration"
+ "None", "Sultana", "Strawberry", "Choko", "Honeycomb", "Ration"
};
- const int breakpoints[] = { 1, 25, 150, 500 };
+
+ const int breakpoints[] = { 1, 15, 41, 121, 401 };
+
return (hunger_descriptions[_breakpoint_rank(hunger, breakpoints,
ARRAYSZ(breakpoints))]);
}