Give better feedback than "<Monster> rummages through something" when hero sees a monster looting a container. Have monster take out up to 4 items at a time instead of always 1. (Hero can take out an arbitrary number in one move.) When deciding what to try to take out, 'count' (now 'nitems') was initialized to 1 instead of 0, giving the monster a 1 out of N+1 chance of not trying to take anything out. It wasn't clear whether that was intentional (there's already a chance for not taking things out when deciding whether to use the container). I kept that result in and made it more explicit now. When deciding whether the chosen item could be moved from container to monster's inventory, the can_carry(item) check was counting the weight of the item twice, once explicitly when considering adding it to minvent but also implicitly as part of the carried container's weight already in minvent.
95 KiB
95 KiB