Traceback (most recent call last):
File "/home/eugene/rogueboxadventures/main.py", line 13334, in <module>
File "/home/eugene/rogueboxadventures/main.py", line 13318, in main
test = player.user_input()
File "/home/eugene/rogueboxadventures/main.py", line 9709, in user_input
File "/home/eugene/rogueboxadventures/main.py", line 13019, in tick
File "/home/eugene/rogueboxadventures/main.py", line 4502, in AI_move
if len(self.containers[parent_pos][parent_pos].items) < 7:
AttributeError: 'int' object has no attribute 'items'
I'm not exactly sure what happened but it seems to have something to do with demonic chest.
I saw several times Crows flying around without actually demonic chest around (meaning it was already killed at the moment). So if a Crow would try to steal something it'd have nowhere to place the item.
This specific CTD was prequeled by the following. A crow stole ranged weapon and as the character didn't have a back-up weapon, it ended up in #65
So I tried to use a bomb to blow the Demonic chest up (I had some issues with bomb placement before, but I couldn't find any dependency. It just wouldn't drop into any place around, but this time it was not the issue - the bomb was placed correctly).
The bomb blew up, but the Demonic chest still remained in place. As the character was very low on health, I was forced to retreat. The Demonic chest spawned a crow that followed the player.
I got to the healing fountain (as the character was hexed and didn't regenerate over time) and tried another attack on the Demonic chest, first dispatching the Crow. When the player and the crow touched in, the CTD happened.
So my assumption is that the reason behind it was that the Crow tried to steal another item and place it inside the chest, but the chest was "destroyed" by explosion (maybe the underlying chest below the Demonic chest? Or was some part of the Demonic chest itself was destroyed?), so it tried to place the item into an inexistent container.
Seems like your theory is right.
I didn't think about the possibility to use bombs against chests. I'll add a rule that demonic chests always die by explosions or fire. This seems to be most logical to me.
BTW I think I know what the problem with placing bombs could have been. Did this happen inside a dungeon?
Yes, more exactly - inside a Tomb. Near the entrance. However, there were other situations when the bomb could not be placed at some free space (but actually was placable elsewhere).
Bombs kill demonic chests everytime. This should fix the main issue. I still have to fix the placement bug.
Now everything should be fixed.