Steps to reproduce Core Under Attack message

This is a bug that’s been around for a long, long time, you’ve probably seen it once. Sometimes when an enemy gets near your core, and you drive them off, the game keeps on saying “Your Core is under attack!”, and it does this every 30 seconds.

The cause of this is pretty simple - Once every second, the game checks for enemies within 20 range of each teams Core, and if it finds a Hero, Mercenary, or Catapult, it’ll trigger the announcement, and it’ll start a 30 seconds timer, which when that timer expires, it’ll do it again, and start that same 30 second timer again.

If on one of these checks every second, it finds that there are no Heroes, Mercenaries, or Catapults within 20 range, and last time it checked there were, then it’ll stop that 30 second timer.

The issue comes up is if in the second before that 30 second timer expires, all Heroes, Mercenaries and Catapults leave\are killed, then the next time it checks, it won’t find anything, so it’ll stop that 30 second timer, but due to the way the game system works, that timer is already marked as expired, so after it has set that timer to stop, it’ll start itself back up again, and announce the core is under attack.

This will then continue to announce the core as being under attack until a Hero, Mercenary or Catapult gets in range of the core, and leaves it at least 1 second before that 30 second timer expires, as if they leave it within that 1 second, it’ll just have the same issue happen again.

The fix to this would be to have that 30 second timer check that there actually is a Hero, Mercenary or Catapult near the core, and if there isn’t, don’t activate.

1 Like