Swapping & Shopping fix for 320

There is an interesting error which can be seen when the borg goes to swap rings (moving the right to left and left to right). The game fails to update the p_ptr->inventory[] promptly and the borg is not able to correctly determine is actual inventory. I have worked about the problem by breaking the swap_ring() up into different objects. This allows the game to catchup and the inventory is updated correctly.

There was also a couple of buy-sell loops induced from the same type of failed inventory update. Essentially, the borg wanted to sell an item which he believed was at a particular inventory slot, but it was actually at a different slot. So he would sell the wrong item to the house, then have to re-buy the item.

I was able to break up a routine and help the borg avoid looping. The changes may induce some strange shopping so keep an eye out. I have closely monitored the shopping of mid-level borgs and I have not seen anything odd.

Borg was cheating the magical properties of some pseudo-id items.

Still no word yet on 330.

This entry was posted in Angband (Vanillia) and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *