Need help in KinthGard Dungeon 39/45

Hello, I am having trouble in KinthGard Dungeon 39/45. It is just so confusing. I’ll paste the code.

Change the names of variables to make gems appear!

Change the name of variable “enemy1” to “gemDude1”.

enemy1 = hero.findNearestEnemy()
hero.attack(enemy1)
hero.attack(enemy1)

Change the name of variable “enemy2” to “gemDude2”.

enemy2 = hero.findNearestEnemy()
hero.attack(enemy2)
hero.attack(enemy2)

Collect the gems after changing the variables.

hero.moveUp()
pet.fetch(“gemDude1”)

Here is the code.
Thank you!

just change name of enemy1 to gemDude1 and for other one as well.

also you only need to attack each enemy once

First of all @brotherofall you need to format your code correctly

Thanks so much, i sorted it out . Now i got how to do it .Thank you!

1 Like