anchor.diff:  
   procedure TKMUnit.RemoveUntrainedFromSchool();
   begin
  -  //if Assigned(fPlayers) and Assigned(fPlayers.Player[byte(fOwner)]) then
  -  //  fPlayers.Player[byte(fOwner)].DestroyedUnit(fUnitType); //Unused
     CloseUnit;
   end;
   
   function TKMUnit.CanGoEat:boolean;
   begin
     Result := fPlayers.Player[byte(fOwner)].FindInn(GetPosition) <> nil;
  +end;
  +
  +
  +procedure TKMUnit.UpdateHunger;
  +begin
  +  if fCondition>0 then //Make unit hungry as long as they are not currently eating in the inn
  +    if not((fUnitTask is TTaskGoEat) and (TTaskGoEat(fUnitTask).PlaceID<>0)) then
  +      dec(fCondition);
  +
  +  //Feed the unit automatically. Don't align it with dec(fCondition) cos FOW uses it as a timer 
  +  if (not DO_UNIT_HUNGER)and(fCondition<UNIT_MIN_CONDITION+100) then fCondition := UNIT_MAX_CONDITION;
  +
  +  if fCondition = 0 then
  +    KillUnit;
  +end;
  +
  +
  +procedure TKMUnit.UpdateFOW;
  +begin
  +  //Can use fCondition as a sort of counter to reveal terrain X times a sec
  +  if fCondition mod 10 = 0 then fTerrain.RevealCircle(GetPosition, UnitStat[byte(fUnitType)].Sight, 20, fOwner);
  +end;
  +
  +
  +procedure TKMUnit.UpdateThoughts;
  +begin
  +  if (fThought <> th_Death) and (fCondition <= UNIT_MIN_CONDITION div 3) then
  +    fThought := th_Death;
  +
  +  if (fThought in [th_Death, th_Eat]) and (fCondition > UNIT_MIN_CONDITION) then
  +    fThought := th_None;
  +
  +  if (fUnitTask is TTaskDie) then //Clear thought if we are in the process of dying
  +    fThought := th_None;
  +end;
  +
  +
  +procedure TKMUnit.UpdateVisibility;
  +begin
  +  if fHome <> nil then //If unit is at home and home was destroyed then make it visible
  +    if fHome.IsDestroyed and KMSamePoint(GetPosition, fHome.GetEntrance) then
  +      SetVisibility := true;
   end;
   
   {Here are common Unit.UpdateState routines}
  
positive.code: procedure TKMUnit.AbandonWalk;
  begin
    if GetUnitAction is TUnitActionWalkTo then
      SetActionAbandonWalk(Self, TUnitActionWalkTo(GetUnitAction).GetNextPosition, ua_Walk)
    else SetActionStay(0, ua_Walk); //Error
  end;
  
  
  function TKMUnit.GetDesiredPassability():TPassability;
  begin
    case fUnitType of //Select desired passability depending on unit type
      ut_Serf..ut_Fisher,ut_StoneCutter..ut_Recruit: Result:=canWalkRoad; //Citizens except Worker
      ut_Wolf..ut_Duck: Result:=AnimalTerrain[byte(fUnitType)] //Animals
      else Result := canWalk; //Worker, Warriors
    end;
  
    if not DO_SERFS_WALK_ROADS then Result := canWalk; //Reset everyone to canWalk for debug
  
negative.code:   if Assigned(fPlayers) and Assigned(fPlayers.Player[byte(fOwner)]) then
      fPlayers.Player[byte(fOwner)].DestroyedUnit(fUnitType);
  
    fThought := th_None; //Reset thought
    SetAction(nil,0); //Dispose of current action
    FreeAndNil(fUnitTask); //Should be overriden to dispose of Task-specific items
    fUnitTask:=TTaskDie.Create(Self);
  