[SOLVED] - Long range division 求助-是装备问题


#1

卡在这里,看了很多攻略,也显示运行超时,敌人只干掉一个。求助!谢谢!

# Destroy the mines!
# Use say to call out the range to the mines.
# Use division to calculate the range.

enemy = hero.findNearestEnemy()
distanceToEnemy = hero.distanceTo(enemy)

# Say first Range: distanceToEnemy divided by 3
hero.say(distanceToEnemy / 3)
hero.say("Fire!")
# Say second range: distanceToEnemy divided by 1.5
hero.say(distanceToEnemy / 1.5)
hero.say("Fire!")

# Say these things for motivation. Really. Trust us.
hero.say("Woo hoo!")
hero.say("Here we go!")
hero.say("Charge!!")

# Now, use a while-true loop to attack the enemies.
while True:
    enemy = hero.findNearestEnemy()
    if enemy :
        hero.attack(enemy)

#2

也许这是你英雄装备的问题。发送您的广告资源的屏幕截图,我会看看是否有问题。
(对不起,我正在使用谷歌翻译。)
可能是因为你的剑,魔杖或弓,不足以及时杀死食人魔。:crossed_swords:

希望这可以帮助!

english:

Maybe this is an equipment problem. Send a screenshot of your inventory and I’ll see if there is a problem.
It may be because your sword, wand or bow is not good enough to kill the ogres. :crossed_swords:

Hope this helps!


#3

Sloved. Yes it’s because I used the wrong hero. Thank you~