Hello Helpers,
Little Checklist:
-
My Hero is (the only possible): Ritic, my equipment is in the picture to see.
-
The Problem: So I am pretty sure that it is a bug, but who am I to tell that. In the Level you need to build a wall out of magic against projectiles and yetis but for some reason no matter which equipment I use or what code I am writing they just go through the “WaLl oF DaRkNeSs.” The Goal is to survive 70 secs. Here are two pictures where I tried to capture the bug:
-
My Code: It is nothing fancy, just like the level and hints wanted it to look like. I added flags to get the 70 sec survival counter, but I am dying to fast because of the yetis.
function waitForAndAttack(abilityName) {
while (true) {
var greenFlag = hero.findFlag("green");
if (greenFlag) {
hero.pickUpFlag(greenFlag);
}
if (hero.isReady(abilityName)) {
break;
}
var enemy = hero.findNearestEnemy();
if (enemy && enemy.type !== "yeti" && hero.distanceTo(enemy) < 15) {
hero.attack(enemy);
}
}
}
var SE = {"x": 52, "y": 20};
var NE = {"x": 52, "y": 48};
var NW = {"x": 28, "y": 48};
var SW = {"x": 28, "y": 20};
while (true) {
var greenFlag = hero.findFlag("green");
if (greenFlag) {
hero.pickUpFlag(greenFlag);
}
hero.wallOfDarkness([SW, NW, NE, SE]);
waitForAndAttack("wall-of-darkness");
greenFlag = hero.findFlag("green");
if (greenFlag) {
hero.pickUpFlag(greenFlag);
}
hero.wallOfDarkness([NE, SE, SW]);
waitForAndAttack("wall-of-darkness");
greenFlag = hero.findFlag("green");
if (greenFlag) {
hero.pickUpFlag(greenFlag);
}
hero.wallOfDarkness([NE, NW, SW]);
waitForAndAttack("wall-of-darkness");
}
-Lama


