From 21bbd0b71258395c9f2b6cbecfad426afe72a510 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Fri, 8 Jan 2010 17:01:00 +0100 Subject: 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. --- crawl-ref/source/fight.cc | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/fight.cc') 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(), -- cgit v1.2.3-54-g00ecf