After 4.14 Better AI, if a player kills an enemy and immediately tries to move into the tile, it is still blocked
Have been able to reproduce this in your web assembly version as well, bug is not present in section before Better AI and appears in the Better AI chapter. Kill an enemy and then move into that enemy's spot without letting a turn pass and the game ignores it, like the tile is blocked.
The map indexing system never reruns after damage, as such an enemy can have been killed, and then the player gets his turn, without the map indexing system running in between. A simple fix for this would be to have delete_the_dead unblock the tile, although there might be a better way where delete_the_dead doesn't have to handle it.
Thanks! This has been on my "to fix" list internally for a bit, I'm pondering how to redo the indexing system to be a bit better about this (and catching mid-turn updates in general).
Any news? What is the design rationale behind the indexing system at all instead of simply grabbing entities' position components when it's necessary? It's fast enough in Python (!) so speed is not a concern!
What is the design rationale behind the indexing system at all instead of simply grabbing entities' position components when it's necessary?
1.6. Dealing Damage > Indexing what is where
One way to do it would be to iterate the Position components and see if we hit anything; for low numbers of entities that would be plenty fast. We'll take a different approach, and make the map_indexing_system help us.
Sorry about the slowdown, I've been working ridiculous hours. The indexing system mostly exists to prevent everything from needing to be able to reach into the ECS world and iterate positions, over and over again. I'm replacing it with an API-based system that is significantly more robust and easy to fix. The new chapter 57A starts this, and I'm gradually applying it to new chapters.