How does one prevent a soldier from halting?

I had recently encountered a problem when I tried to give specific units special abilities (warcry in this instance). I give them commands to attack an enemy unit. Then, while they are moving in to attack, their ability to warcry becomes available, and they halt. I do not encounter this problem with paladins.

I know that the arena called the battle for the sky span has units with abnormal abilities.
Have any in the CodeCombat team encountered this problem?

Can you send your whole code please? I think I know what the problem is

What do you mean? Do you want the warcry components?

No I mean what you’re using to test

while (true) {
    var friends = hero.findFriends();

    if( hero.gold >= hero.costOf("soldier")){
        hero.summon("soldier"); 
    }
     if( hero.gold >= hero.costOf("soldier")){
        hero.summon("soldier"); 
    }
     if( hero.gold >= hero.costOf("soldier")){
        hero.summon("soldier"); 
    }
    if( hero.gold >= hero.costOf("knight")){
        hero.summon("knight"); 
    }

    for (var i = 0; i < friends.length; i++) {
        var friend = friends[i];
       var enemy = friend.findNearestEnemy();
       if(friend.type == "knight" && friend.isReady("warcry")){
           hero.command(friend, "warcry");
       }else if (enemy) {
            hero.command(friend, "attack", enemy);
        }
    }
}

You could definitely improve your formatting and the way you define variables, but I see nothing that could cause the soldier to freeze…