请教宠物抓箭的python代码,谢谢。
codecombat吧
全部回复
仅看楼主
level 1
king_KK55 楼主
arrow = hero.findNearest( hero.findEnemyMissiles())
pet.catch(arrow)
报错:目标不明确。小小白请教了.
2017年12月20日 07点12分 1
level 1
是不是收15个蘑菇那个图,我也卡住了,老是被射死
2017年12月26日 10点12分 2
level 1
不知楼上的朋友解决了没有,按照提示,必须要用到pos这个属性,不得不吐槽中文版翻译的问题,下面是我的通过此关的代码,供您参考下:
# 收集蘑菇。
# 首先,来到狼宠物身边并让它醒来(说)。
hero.moveXY(12, 34)
hero.say("wake up")
# 接下来收集蘑菇只是平常的项目。
while True:
item=hero.findNearestItem()
if item:
hero.moveXY(item.pos.x,item.pos.y)
2018年07月11日 12点07分 3
优秀![吐舌]
2019年01月23日 17点01分
1