極客戰記-保衛要塞

若是你卡在這里了,那么看看這個攻略吧

極客戰記-保衛要塞


思緒1,簡單粗暴,不要慫,就是懟,裝備好就是可覺得所欲為1選擇英雄和編程說話

極客戰記-保衛要塞



2選擇裝備

極客戰記-保衛要塞



3寫代碼
while True:
    enemy = hero.findNearestEnemy()
    if enemy:
        hero.attack(enemy)

極客戰記-保衛要塞



4運行

極客戰記-保衛要塞



思緒2,團隊合作,沉著闡發1選擇英雄和編程說話

極客戰記-保衛要塞



2【極客戰記-保衛要塞】選擇裝備

極客戰記-保衛要塞



3寫代碼
# 殺失落所有進攻的食人魔
# 利用旗子遠離那些危險的食人魔
def xx():
    while True:
        enemy = hero.findNearestEnemy()
        if enemy:
            while True:
                hero.attack(enemy)
                if enemy.health<0:
                    break
        else:
            break
while True:
    enemy = hero.findNearestEnemy()
    if enemy:
        #if enemy.type!="munchkin" and enemy.type!="ogre" and enemy.type!="scout" and enemy.type!="shaman":
            #hero.say(enemy.type)
        if hero.time>30 and (enemy.type=="shaman" or enemy.type=="thrower"):
            hero.say("我得跑曩昔打長途了")
            xx()
        elif hero.pos.x<48:
            hero.moveXY(48,26)
        hero.shield()

極客戰記-保衛要塞

猜你喜歡