求救大神,这关咋过,没订阅没花钱
codecombat吧
全部回复
仅看楼主
level 1
shuidenailao 楼主
2016年02月14日 15点02分 1
level 1
shuidenailao 楼主
我的装备
2016年02月14日 15点02分 2
level 1
shuidenailao 楼主
那个jump to 命令怎么用啊
我的代码
# 优先杀掉最远的敌人。
loop:
farthest = None
maxDistance = 0
enemyIndex = 0
enemies = self.findEnemies()
# 查看全部敌人,找出最远的那个。
while enemyIndex < len(enemies):
target = enemies[enemyIndex]
enemyIndex += 1
if self.isReady("cleave")and self.distanceTo(target)<5:
self.cleave(farthest)
# 是不是有敌人比我们能看到的最远的敌人还要远?
distance = self.distanceTo(target)
if distance > maxDistance:
maxDistance = distance
farthest = target
if farthest:
# 干掉最远的敌人!
# 如果敌人血量大于0就保持攻击。
pass
while farthest.health >0:
self.attack(farthest)
if self.distanceTo(farthest) < 10:
self.attack(farthest)
2016年02月14日 15点02分 3
level 1
shuidenailao 楼主
就算改成大剑
2016年02月14日 15点02分 4
level 1
shuidenailao 楼主
# 优先杀掉最远的敌人。
loop:
farthest = None
maxDistance = 0
enemyIndex = 0
enemies = self.findEnemies()
# 查看全部敌人,找出最远的那个。
while enemyIndex < len(enemies):
enemies = self.findEnemies()
target = enemies[enemyIndex]
enemyIndex += 1
# 是不是有敌人比我们能看到的最远的敌人还要远?
distance = self.distanceTo(target)
if distance > maxDistance:
maxDistance = distance
farthest = target
if farthest and self.distanceTo(farthest)>10 :
self.moveXY(farthest.pos.x, farthest.pos.y)
# 干掉最远的敌人!
# 如果敌人血量大于0就保持攻击。
pass
while farthest.health > 0 and farthest.type != "decoy":
self.attack(farthest)
2016年02月14日 16点02分 5
level 1
shuidenailao 楼主
还是不行啊跪求大神,难道一定要充钱这关才能过的去么?
2016年02月15日 13点02分 6
你的代码有问题,遇到最远的敌人直接就打,不要挪过去,还有就是用长剑,这样你就可以使用收割技能
2016年08月02日 05点08分
如果这些要是还不行的话,就说明你需要买更好的盔甲而不是武器
2016年08月02日 05点08分
level 1
楼主最后过了么?
2016年03月09日 02点03分 8
no ~~~~
2016年03月09日 14点03分
@mqf沉默学习 那些关卡是额外的,免费关另外点选
2016年03月10日 03点03分
到第五关就让订阅,有没有其它关卡可以免费玩学的,请楼主指教
2016年04月03日 06点04分
@修心修仙术 同问!!!
2016年05月10日 14点05分
level 1
请问如何绕过订阅玩其他关卡
2016年08月02日 01点08分 9
官服?只能订阅
2016年11月10日 05点11分
1