# Defeat the enemy hero in a duel!
while True:
newPos = hero.pos.y - 10
# Find and attack the enemy inside a loop.
# When you're done, submit to the multiplayer ladder!
enemy = hero.findNearestEnemy()
if enemy:
hero.scattershot(enemy)
if hero.health < 120 and hero.isReady("phase-shift"):
hero.phaseShift()
hero.moveXY(24, 17)
hero.scattershot(enemy)
if hero.isReady("backstab") and hero.isReady("phase-shift"):
hero.phaseShift()
hero.move(enemy.pos)
hero.backstab(enemy)
hero.blink({"x":newPos, "y": newPos})
if pet.isReady("shape-shift"):
pet.shapeShift()
friends = hero.findFriends()
if hero.gold > hero.costOf("soldier"):
hero.summon("soldier")
for friend in friends:
if friend.type == "soldier":
hero.command(friend, "attack", enemy)
Is the Red X under the enemy hero? If so, they have bad code and there is nothing you can do about it. This is a well known problem with the multiplayer levels.
Is this one of the CPU opponents? Try to pick another opponent to fight. Sometimes it will let you, or go to the ladder and select another opponent to fight.
Same situation though. Their code likely used the original “Loop” command before it was changed to the “While True” loop and now it creates a problem with their code. Keep picking new people to fight and eventually you will find some to simulate against. If nothing else, fight against the top players. Their code is obviously proven out and they also have very good code to challenge you to compete against.