anchor.diff:    H: THouseType;
     UT: TUnitType;
     Schools: array of TKMHouseSchool;
  +  HS: TKMHouseSchool;
  +  serfCount: Integer;
   begin
     //todo: When training new units make sure we have enough gold left to train
     //stonemason-woodcutter-carpenter-2miners-metallurgist. In other words -
  
positive.code:           Break; //Don't need more UnitTypes yet
          end;
  
        //If we are here then a citizen to train wasn't found, so try other unit types (citizens get top priority)
        //Serf factor is like this: Serfs = (10/FACTOR)*Total_Building_Count) (from: http://atfreeforum.com/knights/viewtopic.php?t=465)
        while (HS.QueueCount < 2) //Still haven't found a match...
        and HasEnoughGold do  //If we are low on Gold don't hire more ppl
          if not TryAddToQueue(ut_Serf, Round(fSetup.SerfsPerHouse * (P.Stats.GetHouseQty(ht_Any) + P.Stats.GetUnitQty(ut_Worker)/2))) then
            if not TryAddToQueue(ut_Worker, fSetup.WorkerCount) then
              if not gGame.CheckTime(fSetup.RecruitDelay) then //Recruits can only be trained after this time
                Break
              else
                if not TryAddToQueue(ut_Recruit, RecruitsNeeded) then
                  Break; //There's no unit demand at all
      end;
    end;
  end;
  
negative.code:     begin
        //Order citizen training
        for UT := Low(UnitReq) to High(UnitReq) do
          if (UnitReq[UT] > 0) //Skip units that houses dont need (Serfs/Workers)
          and (UnitReq[UT] > P.Stats.GetUnitQty(UT)) then
          begin
            Dec(UnitReq[UT]); //So other schools don't order same unit
  