Feature Discussion -- Death and keys
Re: Death and keys
Handle them with a higher priority than artifacts. That should do the trick.
By appreciation, we make excellence in others our own property. (Voltaire)
Re: Death and keys
I think I've got a better idea... Use the num_keys variable to place them in specific slots. The first key found would go to slot 0, the second to slot 1, etc. This could be done as they are found while walking through the list of items, since the first item dropped would free slot 0 up and so on. After copying the key to the proper slot, you just destroy the old one. Referring back to my post that started this thread:
Changes to something like:
If someone could verify my logic, and that I have handled the removal of the old key correctly, I'd really appreciate it.
Code: Select all
if (p_ptr->inventory[i].tval == TV_KEY)
{
num_keys++;
continue;
}
Code: Select all
if (p_ptr->inventory[i].tval == TV_KEY)
{
p_ptr->inventory[num_keys] = p_ptr->inventory[i];
p_ptr->inventory[i].iy = p_ptr->inventory[i].ix = p_ptr->inventory[i].dun_depth = 0;
num_keys++;
continue;
}
Mangband Project Team Member