Bug in Mirage Maker? Solved


#1

I built a decoy but all ogres went for the decoy instead of me.
This is my code.

// While your health is full, yell insults at the smaller ogres to provoke them.
// Then retreat back to your base to ambush them.

while(hero.gold < 25) {
    var item = hero.findNearestItem();
    if (item) {
        var pos = item.pos;
        var x = pos.x;
        var y = pos.y;
        hero.moveXY(x, y);
    }
    if (hero.gold == 25) {
        break;
    }

}
hero.moveXY(42, 71);
hero.moveXY(65, 73);
hero.buildXY("decoy", 72, 68);
hero.moveXY(45, 75);
hero.moveXY(31, 68);
hero.moveXY(31, 25);
hero.moveXY(22, 15);

So try it out in the level.


#2

after

hero.buildXY("decoy", 72, 68);

// While your health is full, yell insults at the smaller ogres to provoke them.
// Then retreat back to your base to ambush them.


#4

I did. Thanks for the help!