Thanks again Foamy.
wjb: I think if you look at the state files, you’ll see the behaviour you describe, but the difference is when you actually try to shoot at the shield. The difference between the state and what actually happens is partly why I think this is still a bug.
Here’s what happens with my two test bots, one which places a shield in Round 22 (as soon as charge and radius reach 3) and another which shoots at a point under the shield, starting in Round 22, until it registers a hit or a miss (not a shield hit):
Round 22: A places shield, B shoots at square in shield range. Result: SHIELD HIT
Round 23: B shoots at square again. Result: SHIELD HIT
Round 24: B shoots at square again. Result: SHIELD HIT
Round 25: B shoots at square again. Result: SHIELD HIT
Round 26: The @ symbol disappears from the map. B shoots at square again. Result: HIT
The behaviour at the end is what you’d expect: when the @ symbol disappears, you can target where it was, and the shield will be gone. But the shield is still lasting four rounds, rather than three, and it takes five times shooting at the same square to hit it, rather than four.
As we know, there are only two hard problems in Computer Science: cache invalidation, naming things, and off-by-one errors!
The only simple solution I can think of to this is to change the order of the previous fix, so that shields are applied after shots land. That way, my test bot would score a hit in round 22, or if it waited till round 23 to target that square, would hit the shield three times before hitting the ship underneath it.