diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-17 07:34:30 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-17 07:34:30 +0000 |
commit | d05ad02e6ca609c768a843eb62beda9f602e821a (patch) | |
tree | dcbe30e255651b4502aee6a2e62779b5d68d7635 /crawl-ref/source/ouch.cc | |
parent | e14b5260df1fa0e9400a1d0c3472f5d8dcc97e89 (diff) | |
download | crawl-ref-d05ad02e6ca609c768a843eb62beda9f602e821a.tar.gz crawl-ref-d05ad02e6ca609c768a843eb62beda9f602e821a.zip |
Fix 2018458: Portal projectile not handling branded ammo or nets.
Fix 2019803: cold/fire destroying all susceptible items on the floor
Change "You don't eat raw eat!" to "Blech - you need greens!"
Also:
Experimentally change sacrifices to take only 1 turn again, no matter
how many corpses are actually sacrificed during this turn. Allow
chained 'yes' and 'no' answers during the butchering prompt, so that
'cccccc' is now really functionally identical to 'ca'.
In another return to previous handling, always get in that first turn of
butchering for a single corpse (or the first corpse in butcher chains),
so it takes a maximum of 3 turns rather than 4. Same for draining corpses
as a Vampire: when draining corpses you get at least a little bit of
nutrition out of it before you are interrupted.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6579 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r-- | crawl-ref/source/ouch.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index e87b2499ab..97e51b76a6 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -538,7 +538,7 @@ static void _expose_invent_to_element(beam_type flavour, int strength) } } -void expose_items_to_element(beam_type flavour, int x, int y) +void expose_items_to_element(beam_type flavour, int x, int y, int strength) { int num_dest = 0; @@ -551,16 +551,18 @@ void expose_items_to_element(beam_type flavour, int x, int y) if (!is_valid_item(*si)) continue; - if ( si->base_type == target_class - || (target_class == OBJ_FOOD && si->base_type == OBJ_CORPSES)) + if (si->base_type == target_class + || target_class == OBJ_FOOD && si->base_type == OBJ_CORPSES) { - num_dest += si->quantity; - item_was_destroyed(*si); - destroy_item(si->index()); + if (x_chance_in_y(strength, 100)) + { + num_dest++; + dec_mitm_item_quantity(si->index(), 1); + } } } - if (num_dest > 0) + if (num_dest) { if (see_grid(x, y)) { @@ -602,7 +604,7 @@ void expose_items_to_element(beam_type flavour, int x, int y) // // This function now calls _expose_invent_to_element() if strength > 0. // -// XXX: this function is far from perfect and a work in progress. +// XXX: This function is far from perfect and a work in progress. void expose_player_to_element(beam_type flavour, int strength) { // Note that BEAM_TELEPORT is sent here when the player |