【CodeCombat-Python】地牢-kithgard 斗殴

来源:互联网 发布:淘宝耳环 编辑:程序博客网 时间:2024/04/26 17:40
# 在一波波的食人魔攻击中活下来。# 如果你赢了,本关会变得更难,但给更多的奖励。# 如果你输了,你必须等一天之后才能重新提交。# 每次提交都会获得新的随机种子。while True:    #搜索物品    item = hero.findNearestItem()    enemy = hero.findNearestEnemy()    if item:        pos = item.pos        x = pos.x        y = pos.y        hero.moveXY(x,y)    #发现敌人并攻击    elif enemy:        hero.attack(enemy)        #检测cleave是否就绪,就绪时使用        if hero.isReady("cleave"):              hero.cleave(enemy)    


原始装备,第二天的过不去

阅读全文
0 0
原创粉丝点击