codecombat中国游戏网址:
http://www.codecombat.cn/
全部代码为javascript代码分享
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19、恐惧之门
// 攻击大门(Door)
// 须要攻击非常多次,请使用loop循环
loop{
var enemy=this.findNearestEnemy();
if(enemy){
this.attack(enemy);
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20、了解敌人
// 你能够用名称标签作为变量。
var enemy1 = "Kratt";
var enemy2 = "Gert";
var enemy3 = "Ursa";
loop{
if(enemy1||enemy2||enemy3){
this.attack(enemy1);
this.attack(enemy2);
this.attack(enemy3);
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21、Robot Ragnarok
// The robot ragnarok is upon us!
// Dodge the incoming plasma balls for 15 seconds.
// If you can beat it before August 26, you'll earn Wyvernclaw, a legendary wizard-only weapon.
// Wyvernclaw will not be available after August 26.
this.moveUp(2);
this.moveDown(2);
this.moveLeft();
this.moveRight();
this.moveDown(2);
this.moveRight();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22、Kithgard的橱柜
// 首先,移动到橱柜。
this.moveUp();
this.moveRight(2);
this.moveDown();
this.moveDown();
// 然后,使用循环攻击 橱柜
loop {
this.attack("Cupboard");
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23、不祥的征兆
全部代码为javascript代码分享
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19、恐惧之门
// 攻击大门(Door)
// 须要攻击非常多次,请使用loop循环
loop{
var enemy=this.findNearestEnemy();
if(enemy){
this.attack(enemy);
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20、了解敌人
// 你能够用名称标签作为变量。
var enemy1 = "Kratt";
var enemy2 = "Gert";
var enemy3 = "Ursa";
loop{
if(enemy1||enemy2||enemy3){
this.attack(enemy1);
this.attack(enemy2);
this.attack(enemy3);
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21、Robot Ragnarok
// The robot ragnarok is upon us!
// Dodge the incoming plasma balls for 15 seconds.
// If you can beat it before August 26, you'll earn Wyvernclaw, a legendary wizard-only weapon.
// Wyvernclaw will not be available after August 26.
this.moveUp(2);
this.moveDown(2);
this.moveLeft();
this.moveRight();
this.moveDown(2);
this.moveRight();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22、Kithgard的橱柜
// 首先,移动到橱柜。
this.moveUp();
this.moveRight(2);
this.moveDown();
this.moveDown();
// 然后,使用循环攻击 橱柜
loop {
this.attack("Cupboard");
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23、不祥的征兆