# An ally has been trapped in a cage set up by ogres! Fend off munchkins and help the ally escape!
while True:
enemy = hero.findNearestEnemy()
# Check if there's an enemy and the enemy isn't a type "brawler", then attack.
if enemy and enemy.type == "munchkin":
# Then attack that enemy using cleave() and other moves!
hero.attack(enemy)
if hero.isReady("cleave"):
hero.cleave(enemy)
pass
# Else, move to the red X.
else:
hero.moveXY(40,20);
I got stuck on this one to
So you’re supposed to check if there is an enemy (which you did) and if the enemy type isn’t a “brawler”
The way you can check if it isn’t a brawler, is by using !=
not ==
Also, welcome to the Discourse!
@Aurora_Pfiffner @James_Pfiffner, the level should now be completable for early-forest players(As intended)