关卡连接:

https://codecombat.163.com/play/level/hack-and-dash

通过加速药来逃离地牢精灵

简介:

空气中弥漫着危险的气息。你应该从地牢里逃出来。 但是,如何检查之前的 "Chest" 呢?攻击它以打开。 然后使用while 循环逃跑。

默认代码

# 你可以在循环前写代码
hero.moveRight()
# 在使用循环逃离迷宫之前,打开"Chest"!
# 回到主走廊
while True:
    # 移动3次
    hero.moveRight(3)
    # 再走动三次

概览

如果不喝速度药水,你的速度不够快,无法超越小精灵。

在 while 循环之前, 你需要用 moveUp() 并攻击 "Chest" , 然后使用 moveDown() 回到主路线上。

在 while 循环内部,您需要添加 moveDown() 。 写多行代码时,多次使用 moveDown() 参数。

别担心,小精灵是通过踩到 X 才会行动的,所以你有时间去拿到药水!

攻破突袭 解法

# 你可以在循环前写代码。
hero.moveRight()
# 在使用循环逃离迷宫之前,打开"Chest"!
hero.moveUp()
hero.attack("Chest")
# 回到主走廊·
hero.moveDown()
while True:
    # 移动3次
    hero.moveRight(3)
    # 再走动三次
    hero.moveDown(3)

本攻略发于极客战记官方教学栏目,原文地址为:

https://codecombat.163.com/news/jikezhanji-gongpotuji

极客战记——学编程,用玩的!

 

【网易官方】极客战记(codecombat)攻略-地牢-攻破突袭的更多相关文章

  1. [Python] Codecombat 攻略 地牢 Kithgard (1-22关)

    首页:https://cn.codecombat.com/play语言:Python 第一界面:地牢 Kithgard(22关) 时间:1-3小时 内容:语法.方法.参数.字符串.循环.变量等 网页: ...

  2. 网易极客战记官方攻略-地牢-Kithgard 图书管理员

    关卡连接: https://codecombat.163.com/play/level/kithgard-librarian 向友好的图书馆管理员求助! 简介 大多数关卡都有提示,在你卡关时挺有用. ...

  3. 网易极客战记官方攻略-地牢-Kithgard 地牢

    关卡连接: https://codecombat.163.com/play/level/dungeons-of-kithgard 夺取宝石,逃出地牢--注意不要触碰其他东西.在这个关卡里,你会学习编写 ...

  4. 【转载】网易极客战记官方攻略-地牢- 迷一般的 Kithmaze

    关卡连接: https://codecombat.163.com/play/level/riddling-kithmaze 如果你第一次走上歧途,改变你的循环来找到出路. 简介: 敬请期待! 默认代码 ...

  5. 【转载】网易极客战记官方攻略-地牢-Kithgard 橱柜 A

    关卡连接: https://codecombat.163.com/play/level/cupboards-of-kithgard-a 谁知道什么样的恐怖事情潜伏在 Kithgard 的橱柜里? 简介 ...

  6. 【转载】网易极客战记官方攻略-地牢-严酷考验 B

    关卡连接:https://codecombat.163.com/play/level/the-gauntlet-b 免费试玩:https://codecombat.163.com/play 使用你的所 ...

  7. 【网易官方】极客战记(codecombat)攻略-地牢-橱柜里的骷髅

    关卡连接: https://codecombat.163.com/play/level/cupboards-of-kithgard 谁知道什么样的恐怖事情潜伏在 Kithgard 的橱柜里? 简介: ...

  8. 【网易官方】极客战记(codecombat)攻略-地牢-逃脱

    关卡连接: https://codecombat.163.com/play/level/breakout 矮人正在追你,前方道路已被堵死. 简介: 通过攻击 "弱门" 释放盟友,这 ...

  9. 【网易官方】极客战记(codecombat)攻略-地牢-恐惧之门

    关卡连接: https://codecombat.163.com/play/level/dread-door 恐惧之门后藏满宝藏 简介: while-true 循环可以使用任何方法,如: while ...

随机推荐

  1. contos7 用户管理相关操作命令

    # 查看用户列表 cut -d : -f 1 /etc/passwd # 查看可以登录系统的用户 cat /etc/passwd | grep -v /sbin/nologin | cut -d : ...

  2. 牛客练习赛53-E 老瞎眼 pk 小鲜肉

    Problem 这题的题意大概是 给出一段长度为\(n\) 的区间 \(q\)次询问求 \(L\)~ \(R\) 这个区间内 最短的一段区间 \(l\)~\(r\) 使得 \(\oplus_{i=l} ...

  3. asp.net web core 开发问题汇总(1)

    1   ASP.NET Core 设置默认静态起始页 转载地址:ASP.NET Core 设置默认起始页(如default.html) 注:1  默认情况下ASP.NET Core应用程序时不支持静态 ...

  4. Flask知识总结

    1.-----------------路由设置的2种方式----------------- 查看源码,route方法里,本质是执行app.add_url_rule() 因此可以这么写(主流方式): @ ...

  5. numpy学习(三)

    练习篇(Part 3) 31. 略 32. Is the following expressions true? (★☆☆) np.sqrt(-1) == np.emath.sqrt(-1) prin ...

  6. SpringBoot整合RabbitMQ出现org.springframework.amqp.AmqpException: No method found for class

    @Component @RabbitListener(queues="my_fanout") public class Consumer {     @RabbitHandler  ...

  7. robotframework常见报错记录

    1.'Response' object has no attribute '__getitem__':'Response'对象没有属性' getitem__' response对象的属性r.statu ...

  8. 使用API进行文件读写——CreateFile,ReadFile,WriteFile等

    看了这个帖子:  http://www.vbgood.com/thread-99249-1-1.html  就写了一个使用API读写文件的简单类,苦力活.  演示代码在附件里.  '********* ...

  9. Codeforces Round #600 (Div. 2) C - Sweets Eating

    #include<iostream> #include<algorithm> #include<cstring> using namespace std ; typ ...

  10. [JSOI2016]最佳团体 DFS序/树形DP

    题目 洛谷 P4322 [JSOI2016]最佳团体 Description 茜茜的舞蹈团队一共有\(N\)名候选人,这些候选人从\(1\)到\(N\)编号.方便起见,茜茜的编号是\(0\)号.每个候 ...