Lurkers help Lurkers Lurkers Lurkers!!!


#1
# findEnemies returns a list of all your enemies.
# Only attack shamans. Don't attack yaks!

enemies = self.findEnemies()
enemyIndex = 0

# Wrap this section in a while loop to iterate over all enemies.
enemy = enemies[enemyIndex]
if enemy.type == 'shaman':
    while enemy.health > 0:
        self.attack(enemy)

#2

Need more information, what is your question? I’m not sure if this is the default code, or your attempt. You have previously done quests that require you to iterate over all enemies using enemyIndex, check a previous level to see if it can help you.


#3

Someone gave it to me.
You need to put a while loop around lines 8-11, and increment enemyIndex when the enemy is dead


#4

Is default code
You need to put a while loop around lines 8-11, and increment enemyIndex when the enemy is dead


#5

What exactly is your problem here?

It clearly states: "Wrap this section in a while-loop"
You have to put the block in a while-loop and increment enemyIndex until you checked (and possible slaid) all enemies.


#6

@aaawzh 若果你等一会人,一个 Diplomat 可能会吧 sample code comments 翻译到中文,让你更容易地看懂。