关卡连接:https://codecombat.163.com/play/level/give-and-take
免费试玩:https://codecombat.163.com/play
火焰陷阱和生命药水能让游戏具有爆炸性!
简介
为了让游戏更有趣,尝试添加一些 "fire-trap" 和 "potion-small" !
game.spawnXY("fire-trap", 40, 20)
game.spawnXY("potion-small", 25, 20)
默认代码
# 移动到所有的X标记。
# 那些火焰陷阱会伤人!
game.spawnPlayerXY("samurai", 40, 50)
game.addSurviveGoal()
game.addMoveGoalXY(25,40)
game.spawnXY("fire-trap", 25, 40)
game.addMoveGoalXY(55,40)
game.spawnXY("fire-trap", 55, 40)
game.addMoveGoalXY(40,20)
game.spawnXY("fire-trap", 40, 20)
# 生成一些"potion-small"对象,来治愈玩家!
概览
Coming soon!
取舍 解法
# 移动到所有的X标记。
# 那些火焰陷阱会伤人!
game.spawnPlayerXY("samurai", 40, 50)
game.addSurviveGoal()
game.addMoveGoalXY(25,40)
game.spawnXY("fire-trap", 25, 40)
game.addMoveGoalXY(55,40)
game.spawnXY("fire-trap", 55, 40)
game.addMoveGoalXY(40,20)
game.spawnXY("fire-trap", 40, 20)
# 生成一些"potion-small"对象,来治愈玩家!
game.spawnXY("potion-small", 30, 39)
game.spawnXY("potion-small", 40, 25)