summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/delay.cc10
-rw-r--r--crawl-ref/source/misc.cc9
-rw-r--r--crawl-ref/source/travel.cc2
-rw-r--r--crawl-ref/source/view.cc2
4 files changed, 17 insertions, 6 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 822b77c358..e3b1d677ac 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -615,12 +615,18 @@ void handle_delay( void )
mpr("The corpse rots.", MSGCH_ROTTEN_MEAT);
delay.parm2 = 99; // don't give the message twice
- if (you.species != SP_VAMPIRE
- && you.is_undead != US_UNDEAD
+ if (you.is_undead != US_UNDEAD
&& you.mutation[MUT_SAPROVOROUS] < 3)
{
xom_check_corpse_waste();
}
+ // Vampires won't continue bottling rotting corpses.
+ if (can_bottle_blood_from_corpse(mitm[delay.parm1].plus))
+ {
+ mpr("You stop bottling this corpse's foul smelling "
+ "blood!");
+ delay.duration = 0;
+ }
}
// mark work done on the corpse in case we stop -- bwr
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 90f3d53e9e..489b507f6a 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -157,6 +157,9 @@ void turn_corpse_into_chunks( item_def &item )
create_monster_hide(mons_class);
}
+// Deliberately don't check for rottenness here, so this check
+// can also be used to verify whether you *could* have bottled
+// a now rotten corpse.
bool can_bottle_blood_from_corpse(int mons_type)
{
if (you.species != SP_VAMPIRE || you.experience_level < 6
@@ -172,6 +175,8 @@ bool can_bottle_blood_from_corpse(int mons_type)
return (false);
}
+// Maybe potions should automatically merge into those already on the floor,
+// or the player's inventory.
void turn_corpse_into_blood_potions( item_def &item )
{
ASSERT( item.base_type == OBJ_CORPSES );
@@ -193,8 +198,8 @@ void turn_corpse_into_blood_potions( item_def &item )
// lower number of potions obtained from contaminated chunk type corpses
if (mons_corpse_effect( mons_class ) == CE_CONTAMINATED)
{
- item.quantity /= random2(3);
-
+ item.quantity /= (random2(3) + 1);
+
if (item.quantity < 1)
item.quantity = 1;
}
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 332727cb0e..fabc3e436c 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -227,7 +227,7 @@ static bool is_excluded(const coord_def &p,
return (false);
}
-inline bool is_excluded(const coord_def &p)
+bool is_excluded(const coord_def &p)
{
return is_excluded(p, curr_excludes);
}
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index a4e00b5885..2a79c9fd4c 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -4680,7 +4680,7 @@ void viewwindow(bool draw_it, bool do_updates)
buffy[bufcount + 1] = DARKGREY;
if (Options.colour_map)
- {
+ {
buffy[bufcount + 1] =
colour_code_map(gc.x, gc.y, Options.item_colour);
}