Type of Bug: Gamebreaking
Rate of reproduction: 100%
Steps to reproduce: Play any game with my code. I get an error:
Line 176, time = 6.5: Target a unit.
This is the first instance of the attack method in my code. Specifically, the line of code is:
Where this.enemies is defined as:
this.enemies = this.getEnemies();
Because I wanted to make sure this was a problem with the Dungeon Arena code and not mine, I tested out some stuff:
this.say(this.enemies.length); // number is > 0 always this.say(this.enemies.id); // says Ogre Base this.attack(this.getNearest(this.getEnemies())); // fails as well
This is the first time this has ever happened in my code. It happens no matter whom I play against, and completely prevents me from playing the game. My hero is unable to attack or move as a result.
I had not changed my code between it working and getting ranked and this error occurring in my code. Regardless of what my code was, I reverted it to a known working code that I got off my repo, and it is showing the same issue. It appears to be losing me ladder games having submitted it. Again, I am 100% certain that the code I am currently simulating with is known to be working, as I have submitted this exact code more than once and not run into any issues like this (I know it is this exact code because it’s labeled as the master and has not changed since I submitted to my repo, and I have copied and submitted directly from my repo at least once).