anchor.diff:  begin
     assert(aHouse <> nil);
     for I := 1 to fDemandCount do
  -    if fDemand[I].Loc_House=aHouse then
  +    if fDemand[I].Loc_House = aHouse then
       begin
         if fDemand[I].BeingPerformed > 0 then
           //Can't free it yet, some serf is using it
  
positive.code:     function ValidDelivery(iO, iD: Integer; aIgnoreOffer: Boolean = False): Boolean;
      function SerfCanDoDelivery(iO, iD: Integer; aSerf: TKMUnitSerf): Boolean;
      function PermitDelivery(iO, iD: Integer; aSerf: TKMUnitSerf): Boolean;
      function CalculateBid(iO, iD: Integer; aSerf: TKMUnitSerf = nil): Single;
      function CalculateBidBasic(iO, iD: Integer; aSerf: TKMUnitSerf = nil): Single; overload;
      function CalculateBidBasic(aOfferUID: Integer; aOfferPos: TKMPoint; aOfferCnt: Cardinal; aOfferHouseType: THouseType; aOwner: TKMHandIndex;
                                 iD: Integer; aSerf: TKMUnitSerf = nil): Single; overload;
      function CalcSerfBidValue(aSerf: TKMUnitSerf; aOfferPos: TKMPoint; aToUID: Integer): Single;
      function GetRouteCost(aFromPos, aToPos: TKMPoint; aPass: TKMTerrainPassability): Single;
      function GetUnitsCntOnPath(aNodeList: TKMPointList): Integer;
    public
      constructor Create;
  
negative.code:     and (fDemand[iD].Loc_House.HouseType = ht_Barracks)
      and (fOffer[iO].Loc_House.HouseType = ht_Store)
      and (fDemand[iD].Loc_House.CheckResIn(fOffer[iO].Ware) > 50) then
      aBidValue := aBidValue + 10000;
  
    //When delivering food to warriors, add a random amount to bid to ensure that a variety of food is taken. Also prefer food which is more abundant.
    if (fDemand[iD].Loc_Unit <> nil)
      and (fDemand[iD].Ware = wt_Food) then
      aBidValue := aBidValue + KaMRandom(5+(100 div fOffer[iO].Count)); //The more resource there is, the smaller Random can be. >100 we no longer care, it's just random 5.
  end;
  
  
  