Siege of Stonehold/Backwoods Brawl [HELP]

I need some help with the Siege of Stonehold. My code will run on Backwoods Brawl but not on the siege. Can someone please help me? My code is attatch below. I am using Python.

enemy = hero.findNearestEnemy()
while enemy:
    if hero.health < 200:
        hero.moveXY(19, 69)
    if hero.health >= 200:
        if enemy:
            if hero.isReady("power-up"):
                hero.powerUp()
                hero.health
            else:
                hero.attack(enemy)
                hero.health
            if hero.isReady("bash"):
                hero.bash(enemy)
                hero.health
            else:
                hero.shield()
                hero.health
                enemy = hero.findNearestEnemy()

Several problems:

  1. use a while true loop not a while loop

Ex)

while True:
    enemy = hero.findNearestEnemy()
    if enemy:
        hero.attack(enemy)
  1. replace if hero.health >= 200: with else:
  2. delete all of hero.health after if enemy:
  3. change your attacking code into
            if hero.isReady("power-up"):
                hero.powerUp()
            elif hero.isReady("bash"):
                hero.bash(enemy)
            else:
                hero.attack(enemy)

Hope it helps! :slight_smile:

1 Like

Thanks so much!

Elijah Anderson
CAP Member
Rogers High School