From 3423bbab5a0f024eeafffe6b8260c8c088647db1 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 5 May 2008 08:39:20 +0000 Subject: First attempt at making vampire feeding interruptible. It doesn't work yet (I had "You stop feeding" followed by "You continue feeding" including full effects), but it's probably better to commit now anyway. Known potions of blood or porridge cannot be quaffed when engorged (alive). Also clean up blood potions check. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4871 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/itemprop.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crawl-ref/source/itemprop.cc') diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 27c2bfe7b2..4108fb0738 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -28,6 +28,7 @@ #include "food.h" #include "items.h" #include "itemprop.h" +#include "it_use2.h" #include "macro.h" #include "mon-util.h" #include "notes.h" @@ -2156,6 +2157,15 @@ bool food_is_veg( const item_def &item ) return (Food_prop[ Food_index[item.sub_type] ].herb_mod > 0); } +bool is_blood_potion( const item_def &item) +{ + if (item.base_type != OBJ_POTIONS) + return false; + + return (item.sub_type == POT_BLOOD + || item.sub_type == POT_BLOOD_COAGULATED); +} + // returns food value for one turn of eating int food_value( const item_def &item ) { -- cgit v1.2.3-54-g00ecf