Hello dean, Can you format your code properly as in FAQ.
Thank you.
What are the problems I can only see one in else: yet I don’t know how to fix it yet but you can try to get around codes without or find out what is messing with else okay.
Hello, lazerA, and welcome. Please read the FAQ before you post again. It is essential that you learn how to properly format your code. I’ve done it for you this time, but do so yourself in the future.
As this is Kithgard Brawl, there is no “official” solution to it. Unfortunately, all I can suggest is to progress further in the game before returning to this level.
Hi @akihiko_kahyaba, unfortunately ChronistGilver is no longer active so he won’t be able to answer you. I can however!
For a brawl it’s essential to make a good attacking loop. That means that you have a while True loop which will constantly loop for the whole level and refresh variables like enemy. That means that if a new enemy appears right next to you, you attack the new enemy rather than the enemy that was nearest to you the first time you defined enemy.
Also, if you put your code in a loop, you don’t need to repeat the hero.attack(enemy), it will automatically repeat as long as the enemy exists.
Make sure you also put if enemy: in your loop to check if an enemy exists. These concepts may be a bit confusing at first, but they will become more clear as you continue in the forest.
Also put on your best armour and best rings etc…
Danny
@Deadpool198 thank you here is my code belowwhile True: <enemy = hero.findNearestEnemy() if enemy: hero.shield("hero") hero.attack(enemy) else: hero.moveXY(40, 34)>