summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/food.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-23 16:18:46 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-23 16:18:46 +0000
commitbce3e13c89a5d2280eff5a16349bbcacafc8844f (patch)
tree3fe4bc771d3d33d4aee296c07ea1f84dc3a0d0bb /crawl-ref/source/food.cc
parent130e8eabe520b29fe19a12748a9b17c287054647 (diff)
downloadcrawl-ref-bce3e13c89a5d2280eff5a16349bbcacafc8844f.tar.gz
crawl-ref-bce3e13c89a5d2280eff5a16349bbcacafc8844f.zip
Since liches are US_UNDEAD, they can't eat, so remove references to
their doing so. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4547 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r--crawl-ref/source/food.cc77
1 files changed, 27 insertions, 50 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index c84cc78878..e3706f971f 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -744,11 +744,8 @@ static void describe_food_change(int food_increment)
static bool _player_can_eat_rotten_meat(bool need_msg = false)
{
- if (you.attribute[ATTR_TRANSFORMATION] == TRAN_LICH
- || player_mutation_level(MUT_SAPROVOROUS))
- {
+ if (player_mutation_level(MUT_SAPROVOROUS))
return (true);
- }
if (need_msg)
mpr("You refuse to eat that rotten meat.");
@@ -1555,8 +1552,7 @@ bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, bool reqid,
// see if you can follow along here -- except for the Amulet of the Gourmand
// addition (long missing and requested), what follows is an expansion of how
-// chunks were handled in the codebase up to this date -- I have never really
-// understood why liches are hungry and not true undead beings ... {dlb}:
+// chunks were handled in the codebase up to this date ... {dlb}
static int determine_chunk_effect(int which_chunk_type, bool rotten_chunk)
{
int this_chunk_effect = which_chunk_type;
@@ -1566,11 +1562,8 @@ static int determine_chunk_effect(int which_chunk_type, bool rotten_chunk)
{
case CE_HCL:
case CE_MUTAGEN_RANDOM:
- if (you.species == SP_GHOUL
- || you.attribute[ATTR_TRANSFORMATION] == TRAN_LICH)
- {
+ if (you.species == SP_GHOUL)
this_chunk_effect = CE_CLEAN;
- }
break;
case CE_POISONOUS:
@@ -1579,30 +1572,22 @@ static int determine_chunk_effect(int which_chunk_type, bool rotten_chunk)
break;
case CE_CONTAMINATED:
- if (you.attribute[ATTR_TRANSFORMATION] == TRAN_LICH
- && player_mutation_level(MUT_SAPROVOROUS) < 3)
- {
- this_chunk_effect = CE_CLEAN;
- }
- else
+ switch (player_mutation_level(MUT_SAPROVOROUS))
{
- switch (player_mutation_level(MUT_SAPROVOROUS))
- {
- case 1:
- if (!one_chance_in(15))
- this_chunk_effect = CE_CLEAN;
- break;
+ case 1:
+ if (!one_chance_in(15))
+ this_chunk_effect = CE_CLEAN;
+ break;
- case 2:
- if (!one_chance_in(45))
- this_chunk_effect = CE_CLEAN;
- break;
+ case 2:
+ if (!one_chance_in(45))
+ this_chunk_effect = CE_CLEAN;
+ break;
- default:
- if (!one_chance_in(3))
- this_chunk_effect = CE_CLEAN;
- break;
- }
+ default:
+ if (!one_chance_in(3))
+ this_chunk_effect = CE_CLEAN;
+ break;
}
break;
@@ -1630,28 +1615,20 @@ static int determine_chunk_effect(int which_chunk_type, bool rotten_chunk)
// one last chance for some species to safely eat rotten food {dlb}:
if (this_chunk_effect == CE_ROTTEN)
{
- if (you.attribute[ATTR_TRANSFORMATION] == TRAN_LICH
- && player_mutation_level(MUT_SAPROVOROUS) < 3)
+ switch (player_mutation_level(MUT_SAPROVOROUS))
{
- this_chunk_effect = CE_CLEAN;
- }
- else
- {
- switch (player_mutation_level(MUT_SAPROVOROUS))
- {
- case 1:
- if (!one_chance_in(5))
- this_chunk_effect = CE_CLEAN;
- break;
+ case 1:
+ if (!one_chance_in(5))
+ this_chunk_effect = CE_CLEAN;
+ break;
- case 2:
- if (!one_chance_in(15))
- this_chunk_effect = CE_CLEAN;
- break;
+ case 2:
+ if (!one_chance_in(15))
+ this_chunk_effect = CE_CLEAN;
+ break;
- default:
- break;
- }
+ default:
+ break;
}
}