anchor.diff:  begin
     //Verify we still have foes
     for I := fOffenders.Count - 1 downto 0 do
  -  if TKMUnitWarrior(fOffenders[I]).IsDeadOrDying then
  -  begin
  -    U := fOffenders[I]; //Need to pass var
  -    gHands.CleanUpUnitPointer(U);
  -    fOffenders.Delete(I);
  -    if fOffenders.Count = 0 then
  -      OrderRepeat;
  -  end;
  +    if TKMUnitWarrior(fOffenders[I]).IsDeadOrDying
  +      or IsAllyTo(TKMUnitWarrior(fOffenders[I])) then //Offender could become an ally from script
  +    begin
  +      U := fOffenders[I]; //Need to pass var
  +      gHands.CleanUpUnitPointer(U);
  +      fOffenders.Delete(I);
  +      if fOffenders.Count = 0 then
  +        OrderRepeat;
  +    end;
   
     //Fight is over
     if fOffenders.Count = 0 then Exit;
  
positive.code: 
  
                          //If Enemy was killed, but target Group still exists
                          if (OrderTargetUnit = nil) and (OrderTargetGroup <> nil) then
                          begin
                            //Old enemy has died, change target to his comrades
                            U := OrderTargetGroup.GetNearestMember(Members[0].CurrPosition);
  
negative.code:                     end;
      goAttackHouse:  begin
                        //It is TaskAttackHouse responsibility to execute it
                        OrderExecuted := (OrderTargetHouse = nil) or IsAllyTo(OrderTargetHouse); //Target could become ally from script
                      end;
      goAttackUnit:   begin
                        if IsRanged then
                        begin
                          //Ranged units must kill target unit only
                          //Then they will attack anything within their reach by themselves
                          OrderExecuted := (OrderTargetUnit = nil) or IsAllyTo(OrderTargetUnit); //Target could become ally from script
  
                          if not OrderExecuted then
                            //If our leader is out of range (enemy has walked away) we need to walk closer
  