summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/effects.cc3
-rw-r--r--crawl-ref/source/enum.h5
-rw-r--r--crawl-ref/source/externs.h2
-rw-r--r--crawl-ref/source/food.cc12
-rw-r--r--crawl-ref/source/mutation.cc35
-rw-r--r--crawl-ref/source/newgame.cc1
-rw-r--r--crawl-ref/source/player.cc12
7 files changed, 40 insertions, 30 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index b14caada0a..3c4e77a854 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1431,7 +1431,7 @@ static void _do_book_acquirement(item_def &book, int agent)
{
choice = random_choose_weighted(
30, BOOK_RANDART_THEME,
- agent == GOD_SIF_MUNA ? 10 : 40, book.sub_type,
+ agent == GOD_SIF_MUNA ? 10 : 40, NUM_BOOKS, // normal books
level == -1 ? 0 : 1, BOOK_RANDART_LEVEL, 0);
}
@@ -1446,6 +1446,7 @@ static void _do_book_acquirement(item_def &book, int agent)
switch (choice)
{
default:
+ case NUM_BOOKS:
{
int total_weights = 0;
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 9c298c19e4..cd00fccf46 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2315,8 +2315,9 @@ enum mutation_type
MUT_BLUE_MARKS, // decorative, as in "mark of the devil"
MUT_GREEN_MARKS,
MUT_SAPROVOROUS,
- MUT_SHAGGY_FUR, // new in 0.4
- MUT_HIGH_MAGIC, // new in 0.4 -- 70
+ MUT_GOURMAND,
+ MUT_SHAGGY_FUR, // new in 0.4 -- 70
+ MUT_HIGH_MAGIC, // new in 0.4
MUT_LOW_MAGIC, // new in 0.4
// several types of scales (affect AC and sometimes more)
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 850a5ccb37..cd33b5565b 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1102,8 +1102,6 @@ public:
bool confusable() const;
bool slowable() const;
- bool omnivorous() const;
-
flight_type flight_mode() const;
bool permanent_levitation() const;
bool permanent_flight() const;
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 40208fcae2..b392fce971 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -1508,6 +1508,18 @@ int prompt_eat_chunks()
if (player_mutation_level(MUT_HERBIVOROUS) == 3)
return (0);
+ // If we *know* player doesn't have the gourmand effect, don't prompt.
+ if (!player_mutation_level(MUT_GOURMAND)
+ && player_mutation_level(MUT_CARNIVOROUS) < 3)
+ {
+ if (!player_wearing_slot(EQ_AMULET))
+ return (0);
+
+ const item_def& amu(you.inv[you.equip[EQ_AMULET]]);
+ if (item_type_known(amu) && amu.sub_type != AMU_THE_GOURMAND)
+ return (0);
+ }
+
bool found_valid = false;
std::vector<item_def *> chunks;
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index edc8dcded6..6aa07adc27 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -276,7 +276,7 @@ const char *mutation_descrip[][3] = {
"Your tail ends in a sharp poisonous barb.",
"Your tail ends in a wicked poisonous barb."}, //jmf: nagas & dracos
- {"Your wings are large and strong.", "", ""}, //jmf: dracos only
+ {"Your wings are large and strong.", "", ""}, //jmf: dracos only
//jmf: these next two are for evil gods to mark their followers; good gods
// will never accept a 'marked' worshipper
@@ -292,11 +292,13 @@ const char *mutation_descrip[][3] = {
{"You can tolerate rotten meat.", "You can eat rotten meat.",
"You thrive on rotten meat."},
+ {"You like to eat raw meat.", "", ""},
+
+// 70
{"You are covered in fur.",
"You are covered in thick fur.",
"Your thick and shaggy fur keeps you warm."},
-// 70
{"You have an increased reservoir of magic (+10 percent mp).",
"You have a strongly increased reservoir of magic (+20 percent mp).",
"You have an extremely increased reservoir of magic (+30 percent mp)."},
@@ -554,14 +556,15 @@ const char *gain_mutation[][3] = {
{"Your chest itches.", "Your chest and abdomen itch.",
"Your chest, abdomen and neck itch."},
- // saprovorous: can never be gained or lost, only started with
+ // saprovorous/gourmand: can never be gained or lost, only started with
+ {"", "", ""},
{"", "", ""},
+// 70
{"Fur sprouts all over your body.",
"Your fur grows into a thick mane.",
"Your thick fur grows shaggy and warm."},
-// 70
{"You feel more energetic.", "You feel more energetic.",
"You feel more energetic."},
@@ -785,14 +788,15 @@ const char *lose_mutation[][3] = {
{"", "", ""},
{"", "", ""},
- // saprovorous: can never be gained or lost, only started with
+ // saprovorous/gourmand: can never be gained or lost, only started with
+ {"", "", ""},
{"", "", ""},
+// 70
{"You shed all your fur.",
"Your thick fur recedes somewhat.",
"Your shaggy fur recedes somewhat."},
-// 70
{"You feel less energetic.", "You feel less energetic.",
"You feel less energetic."},
@@ -946,22 +950,23 @@ static mutation_def mutation_defs[] = {
{ MUT_BREATHE_POISON, 0, 1, false, false },
// Naga and Draconian only
{ MUT_STINGER, 0, 3, false, true },
+
+// 65
// Draconian only
{ MUT_BIG_WINGS, 0, 1, false, true },
-// 65
// used by evil gods to mark followers (currently UNUSED)
{ MUT_BLUE_MARKS, 0, 3, false, true },
{ MUT_GREEN_MARKS, 0, 3, false, true },
- // species-dependent innate mutation
+ // species-dependent innate mutations
{ MUT_SAPROVOROUS, 0, 3, false, false },
-
- { MUT_SHAGGY_FUR, 2, 3, false, true },
+ { MUT_GOURMAND, 0, 1, false, false },
// 70
+ { MUT_SHAGGY_FUR, 2, 3, false, true },
{ MUT_HIGH_MAGIC, 1, 3, false, false },
{ MUT_LOW_MAGIC, 9, 3, true, false },
- { RANDOM_MUTATION, 0, 3, false, false },
+
{ RANDOM_MUTATION, 0, 3, false, false },
{ RANDOM_MUTATION, 0, 3, false, false },
@@ -1349,10 +1354,6 @@ formatted_string describe_mutations()
result += colourname;
result += ">";
result += EOL;
-
- // Gourmand is *not* identical to being saprovorous, therefore...
- if (i == MUT_SAPROVOROUS && you.omnivorous())
- result += "<lightblue>You like to eat raw meat.</lightblue>" EOL;
}
}
@@ -1944,8 +1945,8 @@ bool mutate(mutation_type which_mutation, bool failMsg,
return (false);
}
- // Saprovorous can't be randomly acquired.
- if (mutat == MUT_SAPROVOROUS && !force_mutation)
+ // Saprovorous/gourmand can't be randomly acquired.
+ if (!force_mutation && (mutat == MUT_SAPROVOROUS || mutat == MUT_GOURMAND))
return (false);
// Mutation resistance can't be acquired from god gifts.
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index dfd7dc34e8..06875f9eea 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -2895,6 +2895,7 @@ void give_basic_mutations(species_type speci)
you.mutation[MUT_REGENERATION] = 2;
you.mutation[MUT_FAST_METABOLISM] = 3;
you.mutation[MUT_SAPROVOROUS] = 2;
+ you.mutation[MUT_GOURMAND] = 1;
you.mutation[MUT_SHAGGY_FUR] = 1;
break;
case SP_KOBOLD:
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index f5eee7b98a..2bf3a2170f 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -1294,7 +1294,8 @@ bool player_can_smell()
bool player_likes_chunks()
{
- return (you.omnivorous() || player_mutation_level(MUT_CARNIVOROUS) > 0);
+ return (player_mutation_level(MUT_GOURMAND)
+ || player_mutation_level(MUT_CARNIVOROUS) > 0);
}
// If temp is set to false, temporary sources or resistance won't be counted.
@@ -4401,7 +4402,7 @@ int player_mental_clarity(bool calc_unid, bool items)
// from a non-amulet source.
bool extrinsic_amulet_effect(jewellery_type amulet)
{
- switch ( amulet )
+ switch (amulet)
{
case AMU_CONTROLLED_FLIGHT:
return (you.duration[DUR_CONTROLLED_FLIGHT]
@@ -4424,7 +4425,7 @@ bool wearing_amulet(jewellery_type amulet, bool calc_unid)
if (extrinsic_amulet_effect(amulet))
return (true);
- if (you.equip[EQ_AMULET] == -1)
+ if (!player_wearing_slot(EQ_AMULET))
return (false);
const item_def& amu(you.inv[you.equip[EQ_AMULET]]);
@@ -6886,11 +6887,6 @@ bool player::slowable() const
return (!wearing_amulet(AMU_RESIST_SLOW));
}
-bool player::omnivorous() const
-{
- return (species == SP_TROLL || species == SP_OGRE);
-}
-
flight_type player::flight_mode() const
{
if (attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON