After the enemy goes invisible, my hero can’t ever find him/her again. I cut out everything except these lines of code, and nothing happens except he walks towards the enemy. Also, I have not lost but a few matches, but can’t seem to improve my score. I get a lot of Ties that seem linked to the fights not actually happening. Why can’t my hero (ogre side) find the human enemy reliably?
while True: enemy = hero.findNearestEnemy() if enemy: hero.attack(enemy) else: hero.shield()