diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-05 08:39:20 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-05 08:39:20 +0000 |
commit | 3423bbab5a0f024eeafffe6b8260c8c088647db1 (patch) | |
tree | 7ac6d73449b874aba363c80d57a097833bcf7613 /crawl-ref/source/effects.cc | |
parent | 166e51b5cc6e35ec1bea7dd24e9e6ae549ac3dde (diff) | |
download | crawl-ref-3423bbab5a0f024eeafffe6b8260c8c088647db1.tar.gz crawl-ref-3423bbab5a0f024eeafffe6b8260c8c088647db1.zip |
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
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index e55da931e8..e5cf28d11c 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1632,12 +1632,8 @@ bool acquirement(object_class_type class_wanted, int agent, else if (quant > 1) thing.quantity = quant; - if (thing.base_type == OBJ_POTIONS - && (thing.sub_type == POT_BLOOD - || thing.sub_type == POT_BLOOD_COAGULATED)) - { + if (is_blood_potion(thing)) init_stack_blood_potions(thing); - } // remove curse flag from item do_uncurse_item( thing ); @@ -2288,15 +2284,10 @@ static bool food_item_needs_time_check(item_def &item) } if (item.base_type == OBJ_FOOD && item.sub_type != FOOD_CHUNK) - { return false; - } - if (item.base_type == OBJ_POTIONS && item.sub_type != POT_BLOOD - && item.sub_type != POT_BLOOD_COAGULATED) - { + if (item.base_type == OBJ_POTIONS && !is_blood_potion(item)) return false; - } return true; } |