Worst valuable item dropped on death

Issues, news, and discussion specific to the PWMangband variant.
Post Reply
PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Worst valuable item dropped on death

Post by PowerWyrm » Tue 03.06.2008, 11:26

This needs some more intense investigation.
After adding a message giving the description of all items dropped when a character died, I've experienced the following:
- death spot: corridor near an empty pit (tight spot with low number of dropped items upon death)
- inventory (sorted by value - most valuable first - which is the normal behavior): a broad sword, a cypress staff, an ashen staff, an aquamarine ring, a malachite ring, a set of gauntlets, a main gauche, a purple potion, a clear potion, a dark blue potion, a scroll, gold, an orc skeleton
- items actually dropped on the floor: a broad sword, a cypress staff, an ashen staff, an aquamarine ring, a malachite ring, a set of gauntlets, an orc skeleton
Seems that 7 items could be dropped at this death site, however the 7th item should have been the main gauche and not the skeleton... which is the last item that is dropped. A bug... but where?

grisu
Giant Long-Eared Bat
Posts: 36
Joined: Thu 21.12.2006, 13:33

Re: Worst valuable item dropped on death

Post by grisu » Tue 03.06.2008, 12:43

I think it is equal to the house dropping problem. The main gauche tested random spots,
but hasnt found the free one. The random testing for the skeleton found it.

Ace
Crystal Ooze
Posts: 368
Joined: Fri 15.02.2008, 12:50

Re: Worst valuable item dropped on death

Post by Ace » Tue 03.06.2008, 13:28

I think it's "good" that not always the best items fall. Always be scared of death

Billsey
King Vampire
Posts: 272
Joined: Sun 12.02.2006, 14:36
Location: Oregon, USA
Contact:

Re: Worst valuable item dropped on death

Post by Billsey » Wed 04.06.2008, 02:56

I agree with grisu on this one... The more object you have dropped, the better the chances are that the next one will fail.

Though if you experiment and find that you consistently see the last one succeeding and the previous ones failing, it's worth more investigation.
Mangband Project Team Member

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: Worst valuable item dropped on death

Post by PowerWyrm » Wed 04.06.2008, 14:34

Forget about this post... I found the problem and it's not in the current MAngband code. When I coded the Angband 3.0.x behavior for drop_near() in PWMAngband, I totally forgot that Angband 3.0.x can have multiple objects dropped in the same spot, so every item dropped upon death was crushing the previous one if there was no space available. Note that the Angband 3.0.x feature (linked list of o_ptr for each c_ptr instead of a single object) is really neat... and would fix the problem of losing items when dying ;)

serina
Crystal Ooze
Posts: 373
Joined: Sat 15.09.2007, 18:42

Re: Worst valuable item dropped on death

Post by serina » Wed 04.06.2008, 23:46

But it also takes forever going through all the useless items, hehe. And you deserve to risk loosing gear when you die, don't you?

ZAL

Post Reply