[SOLVED] Trouble with Reaping Fire

Hi there,

First off thanks for the great level. So great, I got seriously stuck on it. I feel like I’m doing everything right but still missing out on smth. My griffin-riders won’t attack anyone else after attacking one enemy, even after he died they keep having him as their “target”.

Thanks in adavnce to everyone trying to help me.

Here’s my code:

function chooseStrategy() {
    var enemies = hero.findEnemies();
    var fangrider = hero.findNearest(hero.findByType("fangrider"));
    // If you can summon a griffin-rider, return "griffin-rider"
    if (hero.gold >= hero.costOf("griffin-rider")) {
        return "griffin-rider";
    }    // If there is a fangrider on your side of the mines, return "attackFangrider"
    else if (fangrider && fangrider.pos.x < 38) {
        return "attackFangrider";
    } else {
        // Otherwise, return "collect-coins"
        return "collect-coins";
function commandAttack() {
    hero.say("the func commandAttack starts");
    // Command your griffin riders to attack ogres.
    var friends = hero.findFriends();
    for (var g = 0; g < friends.length; g++) {
        var griffin = friends[g];
        var enemy = griffin.findNearestEnemy();
        if (enemy) {
            hero.command(griffin, "attack", enemy);
        } else {
            hero.say("we'll wait.");
function pickUpCoin() {
        var coin = hero.findNearestItem();
        if (coin) {
        hero.moveXY(coin.pos.x, coin.pos.y);
function heroAttack() {
    // Your hero should attack fang riders that cross the minefield
    var enemy = hero.findNearestEnemy();
    if (enemy && enemy.type == "fangrider") {
        if (hero.isReady("bash")) {
        } else if (hero.isReady("cleave")) {
        } else {
while (true) {
    var strategy = chooseStrategy();
    // Call a function, depending on what the current strategy is.
    if (strategy == "griffin-rider") {
    } else if (strategy == "attackFangrider") {
    } else if (strategy == "collect-coins") {

Please give additional information about your issue. Could you send a screenshot of the error it gives?

Sure. Now i ran it again and the griffin rider doesn’t do anything until the hero runs his function. By that time the ogres had advanced to the mines. I don’t understand why my hero waits so long to command.

In the commandAttack function you have to check if you have enought gold before summoning it

I checked it in the chooseStrategy() function. Looks like I should have summoned the griffin-rider in the chooseStrategy(). I passed the level with only this change in my code.