搜索
查看: 493|回复: 2
打印 上一主题 下一主题

大家看看霜冰的新代码和骑士的新代码,配合输出效果更佳:) 望收藏!望采纳!

[复制链接]
跳转到指定楼层
楼主
 楼主| 发表于 2019-5-1 10:37:59 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 多帅 于 2019-5-1 10:42 编辑

霜冰:
enemies = findAllEnemies()target = enemies[0]
for enemy in enemies:
    if enemy.unit_move_speed<target.unit_move_speed:
        target=enemy
        break
if enemy.unit_x>self.unit_x and enemy.unit_x<target.unit_x:
    target=enemy
if target:
    moveTo(self.unit_x,target.unit_y)
    skill("Blizzard")
    attack(target)

骑士:
enemies = findAllEnemies()
target = enemies[0]
for enemy in enemies:
    if enemy.unit_move_speed<target.unit_move_speed:
        target=enemy
        break
if enemy.unit_x>self.unit_x and enemy.unit_x<target.unit_x:
    target=enemy
if target:
    moveTo(self.unit_x,target.unit_y)
    skill("Blizzard")
    attack(target)

沙发
 楼主| 发表于 2019-5-1 10:58:54 | 显示全部楼层
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表