treasure drop drop (trunk only)

From the newsgroup:  objects created when killing a monster over
water weren't being affected by falling into the water.  The objects were
being created directly on the floor instead of being dropped as if they'd
been in the monster's inventory.  This fixes the random "treasure drop"
item, but special items--like dragon scales and the miscellaneous golem
remains--produced by make_corpse() are still put directly onto the floor.

     The check to prevent small monsters from dropping big objects was
overly complex, possibly due to the 3.1.x weight threshold bug which was
just recently fixed.  Food rations and leashes pass the weight test so
don't need to be special cased; spears, polearms, and morning stars fail
the weight test.  (Javelins are an exception; they pass the weight test
so are allowed to be dropped by small monsters now since spears aren't
special cased any more.)
This commit is contained in:
nethack.rankin
2007-07-19 07:02:46 +00:00
parent 83bb85c8af
commit 16ad2bd0b8
2 changed files with 9 additions and 7 deletions

View File

@@ -259,6 +259,7 @@ can't move diagonally through a long worm's body (can still fight that way)
require confirmation to read a scroll of mail if doing so will be the first
violation of illiteracy conduct
using F to force an attack towards a boulder gave "you attack thin air"
random "treasure drop" upon monster's death bypassed dropping side-effects
Platform- and/or Interface-Specific Fixes

View File

@@ -2027,16 +2027,17 @@ int dest;
#endif
/* reduced chance of item from cloned monster */
(!mtmp->mcloned || !rn2(mvitals[mndx].died / 5 + 1))) {
otmp = mkobj_at(RANDOM_CLASS, x, y, TRUE);
otmp = mkobj(RANDOM_CLASS, TRUE);
/* don't create large objects from small monsters */
otyp = otmp->otyp;
if (mdat->msize < MZ_HUMAN && otyp != FOOD_RATION &&
otyp != LEASH && otyp != FIGURINE &&
(otmp->owt > 30 ||
objects[otyp].oc_big /*oc_bimanual/oc_bulky*/ ||
is_spear(otmp) || is_pole(otmp) ||
otyp == MORNING_STAR)) {
if (mdat->msize < MZ_HUMAN && otyp != FIGURINE &&
/* oc_big is also oc_bimanual and oc_bulky */
(otmp->owt > 30 || objects[otyp].oc_big)) {
delobj(otmp);
} else if (!flooreffects(otmp, x, y,
(dest & 1) ? "fall" : "")) {
place_object(otmp, x, y);
stackobj(otmp);
}
}
/* corpse--none if hero was inside the monster */