diff options
author | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2010-01-08 17:01:00 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2010-01-08 17:05:44 +0100 |
commit | 21bbd0b71258395c9f2b6cbecfad426afe72a510 (patch) | |
tree | cdd06515db82de8dd855be4e20dbb2980efafe5f /crawl-ref/source/fight.cc | |
parent | c82178a80fe72434e46942c03632c0b7ee885494 (diff) | |
download | crawl-ref-21bbd0b71258395c9f2b6cbecfad426afe72a510.tar.gz crawl-ref-21bbd0b71258395c9f2b6cbecfad426afe72a510.zip |
Make harpies also steal food from the ground at the player's position.
Previously, players could (and did!) drop all their food before engaging
in combat with harpies. As long as they didn't step off the grid, their
stash of food was safe. This is now no longer the case.
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 9bcc3a5256..1b7e53e9fd 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -5185,17 +5185,29 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) break; case AF_STEAL_FOOD: + { // Monsters don't carry food. if (defender->atype() != ACT_PLAYER) break; - if (expose_player_to_element(BEAM_STEAL_FOOD, 10) && needs_message) + const bool stolen = expose_player_to_element(BEAM_STEAL_FOOD, 10); + const bool ground = expose_items_to_element(BEAM_STEAL_FOOD, you.pos(), + 10); + if (needs_message) { - mprf("%s steals some of your food!", - atk_name(DESC_CAP_THE).c_str()); + if (stolen) + { + mprf("%s steals some of your food!", + atk_name(DESC_CAP_THE).c_str()); + } + else if (ground) + { + mprf("%s steals some of the food from beneath you!", + atk_name(DESC_CAP_THE).c_str()); + } } break; - + } case AF_CRUSH: mprf("%s %s being crushed%s", def_name(DESC_CAP_THE).c_str(), |