Index: src/include/action_handler.cpp
===================================================================
--- src/include/action_handler.cpp	(r  vision 451)
+++ src/include/action_handler.cpp	(copie de travail)
@@ -203,7 +203,7 @@
 #endif
 	//if (!network.is_client()) return;
 	teams_list.SetActive (action.GetValue());
- 	ActiveTeam().PrepareTour();
+ 	ActiveTeam().PrepareTurn();
 	assert (!ActiveCharacter().IsDead());
 }
 
Index: src/gui/question.cpp
===================================================================
--- src/gui/question.cpp	(r  vision 451)
+++ src/gui/question.cpp	(copie de travail)
@@ -63,10 +63,10 @@
 
 void Question::Draw()
 {
-  DrawTmpBoxText (global().big_font(), 
-		  app.video.window.GetWidth()/2, app.video.window.GetHeight()/2,
-		  message,
-		  10);
+  DrawTmpBoxTextWithReturns (global().big_font(),
+                             app.video.window.GetWidth()/2, app.video.window.GetHeight()/2,
+                             message,
+                             10);
   app.video.Flip();
 }
 
Index: src/team/character.h
===================================================================
--- src/team/character.h	(r  vision 451)
+++ src/team/character.h	(copie de travail)
@@ -44,17 +44,24 @@
   bool is_walking;
   bool full_walk;
 
-  // energie
+  // energy
   uint energy;
+  int  damage_other_team;
+  int  damage_own_team;
+  int  max_damage;
+  int  current_total_damage;
   BarreProg energy_bar;
 
+  // survived games
+  int survivals;
+
   // name
   Text* name_text;
 
   // chrono
   uint pause_bouge_dg;  // pause pour mouvement droite/gauche
   uint do_nothing_time;
-  int losted_energy;
+  int lost_energy;
 
   Skin *skin;
   CfgSkin_Walking *walk_skin;
@@ -127,7 +134,7 @@
   void HandleShoot(int event_type) ;
 
   // Se prepare a un nouveau tour
-  void PrepareTour ();
+  void PrepareTurn ();
 
   // Show hide the Character
   void StartPlaying();
@@ -153,6 +160,10 @@
   Team& TeamAccess();
   const Team& GetTeam() const;
 
+  // Access to character info
+  const std::string& GetName() const { return m_name; }
+  bool IsSameAs(const Character& other) { return (m_name == other.GetName()); }
+
   // Acc s   l'avatar
   const Skin& GetSkin() const;
   Skin& AccessSkin();
@@ -162,6 +173,13 @@
   void GetHandPosition (int &x, int &y);
   void GetHandPositionf (double &x, double &y);
 
+  // Damage report
+  void HandleMostDamage();
+  void MadeDamage(const int Dmg, const Character &other);
+  int  GetMostDamage() { HandleMostDamage(); return max_damage; }
+  int  GetOwnDamage() { return damage_own_team; }
+  int  GetOtherDamage() { return damage_other_team; }
+
   void EndTurn();
 };
 
Index: src/team/teams_list.cpp
===================================================================
--- src/team/teams_list.cpp	(r  vision 451)
+++ src/team/teams_list.cpp	(copie de travail)
@@ -51,7 +51,7 @@
   if (debut_jeu) return;
 #ifdef CL
   if (network.is_client()) return;
-  ActiveTeam().FinTour();
+  ActiveTeam().FinTurn();
 #endif
    
   // Passe   l' quipe suivante
Index: src/team/team.cpp
===================================================================
--- src/team/team.cpp	(r  vision 451)
+++ src/team/team.cpp	(copie de travail)
@@ -246,7 +246,7 @@
 }
 
 // Prepare le tour d'une equipe
-void Team::PrepareTour()
+void Team::PrepareTurn()
 {
   // Choisi un ver vivant si possible
   if (ActiveCharacter().IsDead())
@@ -266,7 +266,7 @@
 }
 
 // Fin d'un tour : nettoyage avant de partir :-)
-void Team::FinTour()
+void Team::EndTurn()
 {
   // D sactive notre arme
   ActiveCharacter().EndTurn();
@@ -403,3 +403,7 @@
 const Weapon& Team::GetWeapon() const { return *active_weapon; }
 Weapon_type Team::GetWeaponType() const { return GetWeapon().GetType(); }
 
+bool Team::IsSameAs(const Team& other)
+{
+  return (strcmp(m_id.c_str(), other.GetId().c_str()) == 0);
+}
Index: src/team/team.h
===================================================================
--- src/team/team.h	(r  vision 451)
+++ src/team/team.h	(copie de travail)
@@ -74,8 +74,8 @@
   Character& operator[] (uint index);
   const Character& operator[] (uint index) const;
   // ******* TODO: KILL THIS FUNCTIONS !!! ********
+  bool IsSameAs(const Team& other);
 
-
   // Switch to next worm.
 //  void NextCharacter();
   int NextCharacterIndex();
@@ -84,8 +84,8 @@
   void SelectCharacterIndex (uint index);
 
   // Prepate / End turn.
-  void PrepareTour();
-  void FinTour();
+  void PrepareTurn();
+  void EndTurn();
 
   // Access to the worms.
   int ActiveCharacterIndex() const;
Index: src/team/character.cpp
===================================================================
--- src/team/character.cpp	(r  vision 451)
+++ src/team/character.cpp	(copie de travail)
@@ -89,7 +89,7 @@
   previous_strength = 0;
   m_team = NULL;
   energy = 100;
-  losted_energy = 0;
+  lost_energy = 0;
   desactive = false;
   skin = NULL;
   walk_skin = NULL;
@@ -105,6 +105,15 @@
   do_nothing_time = 0;
   m_allow_negative_y = true;
 
+  // Damage count
+  damage_other_team = 0;
+  damage_own_team = 0;
+  max_damage = 0;
+  current_total_damage = 0;
+
+  // Survivals
+  survivals = 0;
+
   name_text = NULL;
 }
 
@@ -160,9 +169,12 @@
 // Si un ver devient un fantome, il meurt ! Signale sa mort
 void Character::SignalGhostState (bool was_dead)
 {
-  // D sactive le ver
+  // Deactivate character
   desactive = true;
 
+  // Report to damage performer this character lost all of its energy
+  ActiveCharacter().MadeDamage(energy, *this);
+
 #ifdef DEBUG_CHG_ETAT
   COUT_DBG << "Fantome." << std::endl;
 #endif
@@ -206,6 +218,9 @@
   // If already dead, do nothing
   if (IsDead()) return;
 
+  // Report damage to damage performer
+  ActiveCharacter().MadeDamage(-delta, *this);
+
   uint sauve_energie = energy;
   uchar R,V,B;
 
@@ -236,18 +251,18 @@
   if (delta < 0)
   {
 
-    losted_energy += (int)energy - (int)sauve_energie;
+    lost_energy += (int)energy - (int)sauve_energie;
 
-    if ( losted_energy < 33 )
+    if ( lost_energy < 33 )
       jukebox.Play (GetTeam().GetSoundProfile(), "injured_light");
-    else if ( losted_energy < 66 )
+    else if ( lost_energy < 66 )
       jukebox.Play (GetTeam().GetSoundProfile(), "injured_medium");
     else 
       jukebox.Play (GetTeam().GetSoundProfile(), "injured_high");
     
   }
   else 
-    losted_energy = 0;
+    lost_energy = 0;
 
   // "Friendly fire !!"
   if ( (&ActiveCharacter() != this) && (&ActiveTeam() == m_team) )
@@ -298,7 +313,7 @@
   // Gone in another world ?
   if (!IsActive()) return;
 
-  bool dessine_perte = (losted_energy != 0);
+  bool dessine_perte = (lost_energy != 0);
   if ((&ActiveCharacter() == this
     && game_loop.ReadState() != gameEND_TURN)
       //&& (game_loop.ReadState() != jeuANIM_FIN_TOUR)
@@ -364,7 +379,7 @@
   if (dessine_perte)
   {
     std::ostringstream ss;
-    ss << losted_energy;
+    ss << lost_energy;
     dy -= HAUT_FONT_MIX;
     global().small_font().WriteCenterTop (GetX() +GetWidth()/2-camera.GetX(), GetY()+dy-camera.GetY(), ss.str(), white_color);    
   }
@@ -599,9 +614,10 @@
 }
 
 // Prepare a new turn
-void Character::PrepareTour ()
+void Character::PrepareTurn ()
 {
-  losted_energy = 0;
+  HandleMostDamage();
+  lost_energy = 0;
   pause_bouge_dg = global_time.Read();
 }
 
@@ -889,7 +905,7 @@
   energy = game_mode.character.init_energy-1;
   energy_bar.InitVal (energy, 0, game_mode.character.init_energy);
   SetEnergyDelta (1);
-  losted_energy = 0;
+  lost_energy = 0;
 
   // Initialise la position
   uint bcl=0;
@@ -996,11 +1012,45 @@
     x = (double)GetX() +GetWidth() -hand.dx;
 }
 
+void Character::HandleMostDamage()
+{
+  if (current_total_damage > max_damage)
+  {
+    max_damage = current_total_damage;
+  }
+#ifdef DEBUG
+  std::cerr << m_name << " most damage: " << max_damage << std::endl;
+#endif
+  current_total_damage = 0;
+}
+
 void Character::EndTurn()
 {
   m_rebounding = true;
   is_walking = false;
+  HandleMostDamage();
 }
 
 void Character::Hide() { hidden = true; }
 void Character::Show() { hidden = false; }
+
+void Character::MadeDamage(const int Dmg, const Character &other)
+{
+  if (m_team->IsSameAs(other.GetTeam()))
+  {
+#ifdef DEBUG
+    std::cerr << m_name << " damaged own team with " << Dmg << std::endl;
+#endif
+    if (Character::IsSameAs(other))
+      damage_own_team += Dmg;
+  }
+  else
+  {
+#ifdef DEBUG
+    std::cerr << m_name << " damaged other team with " << Dmg << std::endl;
+#endif
+    damage_other_team += Dmg;
+  }
+  
+  current_total_damage += Dmg;
+}
Index: src/weapon/uzi.cpp
===================================================================
--- src/weapon/uzi.cpp	(r  vision 451)
+++ src/weapon/uzi.cpp	(copie de travail)
@@ -150,7 +150,10 @@
       Character* ver = balle.LitDernierVerTouche();
       PhysicalObj* obj = balle.LitDernierObjTouche();
       if (ver) obj = ver;
-      if (ver) ver -> SetEnergyDelta (-cfg().damage);
+      if (ver)
+      {
+        ver -> SetEnergyDelta (-cfg().damage);
+      }
       if (obj) 
       {
 	obj -> AddSpeed (SOUFFLE_BALLE, angle);
Index: src/weapon/gun.cpp
===================================================================
--- src/weapon/gun.cpp	(r  vision 451)
+++ src/weapon/gun.cpp	(copie de travail)
@@ -161,11 +161,14 @@
 	  Character* ver = balle.LitDernierVerTouche();
 	  PhysicalObj* obj = balle.LitDernierObjTouche();
 	  if (ver) obj = ver;
-	  if (ver) ver -> SetEnergyDelta (-cfg().damage);
+	  if (ver)
+          {
+            ver -> SetEnergyDelta (-cfg().damage);
+          }
 	  if (obj) 
-	    {
-	      obj -> AddSpeed (BULLET_BLAST, balle.GetSpeedAngle());
-	    }
+          {
+            obj -> AddSpeed (BULLET_BLAST, balle.GetSpeedAngle());
+          }
 	  
 	  // Creuse le monde
 	  if (!obj)
Index: src/game/game_loop.cpp
===================================================================
--- src/game/game_loop.cpp	(r  vision 451)
+++ src/game/game_loop.cpp	(copie de travail)
@@ -542,7 +542,7 @@
      character_already_chosen = false;
 
     // Pr pare un tour pour un ver
-    FOR_ALL_LIVING_CHARACTERS(equipe,ver) ver -> PrepareTour();
+    FOR_ALL_LIVING_CHARACTERS(equipe,ver) ver -> PrepareTurn();
 
     // Changement d' quipe
     assert (!game.IsGameFinished());    
Index: src/game/game.cpp
===================================================================
--- src/game/game.cpp	(r  vision 451)
+++ src/game/game.cpp	(copie de travail)
@@ -76,24 +76,116 @@
 
 void Game::MessageEndOfGame()
 {
-  bool winner_found = false;
+  const char *Nobody                    = _("Nobody");
+  const char *winner_name               = NULL;
+  int         value_all_most_violent    = 0;
+  const char *name_all_most_violent     = Nobody;
+  int         value_all_most_useless    = 0x0FFFFFFF;
+  const char *name_all_most_useless     = Nobody;
+  int         value_all_most_usefull    = 0;
+  const char *name_all_most_usefull     = Nobody;
+  int         value_all_most_traitor    = 0;
+  const char *name_all_most_traitor     = Nobody;
 
-  std::string txt(_("End of the game!"));
-  txt += " - ";
+  std::string txt("");
 
   FOR_EACH_TEAM(equipe)
   {
+    int         value_team_most_violent = 0;
+    const char *name_team_most_violent  = Nobody;
+    int         value_team_most_useless = 0x0FFFFFFF;
+    const char *name_team_most_useless  = Nobody;
+    int         value_team_most_usefull = 0;
+    const char *name_team_most_usefull  = Nobody;
+    int         value_team_most_traitor = 0;
+    const char *name_team_most_traitor  = Nobody;
+
+    // Search best/worst performers
+    FOR_EACH_CHARACTER(*(equipe), ver)
+    {
+      // Most damage in one shot
+      if (ver->GetMostDamage() > value_team_most_violent)
+      {
+        value_team_most_violent = ver->GetMostDamage();
+        name_team_most_violent  = ver->GetName().c_str();
+      }
+      // Most damage overall to other teams
+      if (ver->GetOtherDamage() > value_team_most_usefull)
+      {
+        value_team_most_usefull = ver->GetOtherDamage();
+        name_team_most_usefull  = ver->GetName().c_str();
+      }
+      // Least damage overall to other teams
+      if (ver->GetOtherDamage() < value_team_most_useless)
+      {
+        value_team_most_useless = ver->GetOtherDamage();
+        name_team_most_useless  = ver->GetName().c_str();
+      }
+      // Most damage overall to his own team
+      if (ver->GetOwnDamage() > value_team_most_traitor)
+      {
+        value_team_most_traitor = ver->GetOwnDamage();
+        name_team_most_traitor  = ver->GetName().c_str();
+      }
+    }
+
+    // Print out results
+    txt += Format(_("Team %s results:\n"), (**equipe).GetName().c_str());
+    txt += Format(_("  Most violent  :  %s (%i).\n"), name_team_most_violent, value_team_most_violent);
+    txt += Format(_("  Most usefull  :  %s (%i).\n"), name_team_most_usefull, value_team_most_usefull);
+    txt += Format(_("  Most useless  :  %s (%i).\n"), name_team_most_useless, value_team_most_useless);
+    txt += Format(_("  Most sold-out :  %s (%i).\n"), name_team_most_traitor, value_team_most_traitor);
+
+    // Set all team best
+    if (value_team_most_violent > value_all_most_violent)
+    {
+      value_all_most_violent = value_team_most_violent;
+      name_all_most_violent = name_team_most_violent;
+    }
+    // Most damage overall to other teams
+    if (value_team_most_usefull > value_all_most_usefull)
+    {
+      value_all_most_usefull = value_team_most_usefull;
+      name_all_most_usefull = name_team_most_usefull;
+    }
+    // Least damage overall to other teams
+    if (value_team_most_useless < value_all_most_useless)
+    {
+      value_all_most_useless = value_team_most_useless;
+      name_all_most_useless = name_team_most_useless;
+    }
+    // Most damage overall to his own team
+    if (value_team_most_traitor > value_all_most_traitor)
+    {
+      value_all_most_traitor = value_team_most_traitor;
+      name_all_most_traitor = name_team_most_traitor;
+    }
+
+    // Determine winner
     if (0 < (**equipe).NbAliveCharacter())
     {
-      winner_found = true;
-      txt += Format(_("%s team has won."), (**equipe).GetName().c_str());
+      winner_name = (**equipe).GetName().c_str();
       break;
     }
   }
-  if (winner_found) 
+ 
+  // Print out results
+  txt += _("All-Team results:\n");
+  txt += Format(_("  Most violent  :  %s (%i).\n"), name_all_most_violent, value_all_most_violent);
+  txt += Format(_("  Most usefull  :  %s (%i).\n"), name_all_most_usefull, value_all_most_usefull);
+  txt += Format(_("  Most useless  :  %s (%i).\n"), name_all_most_useless, value_all_most_useless);
+  txt += Format(_("  Most sold-out :  %s (%i).\n"), name_all_most_traitor, value_all_most_traitor);
+
+  txt += _("End of the game!\n");
+  if (winner_name)
+  {
     jukebox.Play("share","victory");
+    txt += Format(_("%s team has won.\n"), winner_name);
+  }
   else
-    txt += _("The game has ended as a draw.");
+  {
+    txt += _("The game has ended as a draw.\n");
+  }
   std::cout << txt << std::endl;
 
   question.Init (txt, true, 0);
Index: src/graphic/text.cpp
===================================================================
--- src/graphic/text.cpp	(r  vision 451)
+++ src/graphic/text.cpp	(copie de travail)
@@ -20,6 +20,7 @@
 #include <SDL_video.h>
 #include <SDL_gfxPrimitives.h>
 #include <string>
+#include <iostream> //cerr
 #include "text.h"
 #include "colors.h"
 #include "font.h"
@@ -102,20 +103,23 @@
   dst_rect.w = surf.GetWidth();
   dst_rect.h = surf.GetHeight();
 
-  if(shadowed){
-	SDL_Rect shad_rect;
-
-	shad_rect.x = dst_rect.x + bg_offset;
+  if(shadowed)
+  {
+    SDL_Rect shad_rect;
+    
+    shad_rect.x = dst_rect.x + bg_offset;
     shad_rect.y = dst_rect.y + bg_offset;
     shad_rect.w = background.GetWidth();
     shad_rect.h = background.GetHeight();
-
-	app.video.window.Blit(background, NULL, &shad_rect);
+    
+    app.video.window.Blit(background, NULL, &shad_rect);
     app.video.window.Blit(surf, NULL, &dst_rect);
 		
     world.ToRedrawOnScreen(Rectanglei(dst_rect.x, dst_rect.y,
                                       shad_rect.w + bg_offset, shad_rect.h + bg_offset));
-  }else{
+  }
+  else
+  {
     app.video.window.Blit(surf, NULL, &dst_rect);
     world.ToRedrawOnScreen(Rectanglei(dst_rect.x, dst_rect.y, dst_rect.w, dst_rect.h));
   }		
@@ -136,7 +140,10 @@
 }
 
 void DrawTmpBoxText(Font &font, int _x, int _y, 
-		    const std::string &txt, uint space){
+		    const std::string &txt, uint space,
+                    int boxR, int boxG, int boxB, int boxA,
+                    int rectR, int rectG, int rectB, int rectA)
+{
   int x, y, w, h;
   
   w = font.GetWidth(txt) + space*2;
@@ -147,12 +154,74 @@
   _y -= font.GetHeight(txt)/2;
 
   app.video.window.BoxRGBA(x, y, x + w, y + h,
-	  80, 80, 159, 206);
+                           boxR, boxG, boxB, boxA);
 
   app.video.window.RectangleRGBA(x, y, x + w, y + h,
-		49, 32, 122, 255);  
+                                 rectR, rectG, rectB, rectA);  
 
   world.ToRedrawOnScreen(Rectanglei(x, y, w, h));
   font.WriteCenterTop (_x, _y, txt, white_color);
 }
 
+void DrawTmpBoxTextWithReturns(Font &font, int _x, int _y, 
+                               const std::string &txt, uint space,
+                               int boxR, int boxG, int boxB, int boxA,
+                               int rectR, int rectG, int rectB, int rectA)
+
+{
+  size_t pos          = 0;
+  size_t last_pos     = 0;
+  size_t max_width    = 0;
+  size_t total_height = 0;
+  int    x, y;
+  char  *lines        = strdup(txt.c_str());
+
+  std::vector< size_t > offsets;
+
+  // Store offsets
+  offsets.push_back(0);
+  while (lines[pos])
+  {
+    if (lines[pos] == '\n')
+    {
+      lines[pos] = 0;
+      if (!lines[pos+1]) break;
+
+      offsets.push_back(pos+1);
+      int w = font.GetWidth(lines+last_pos);
+      if ((int)max_width < w) max_width = w;
+      total_height += font.GetHeight(lines+last_pos);
+#if DEBUG
+      if (last_pos)
+      {
+        std::cerr << "(" << pos << "," << pos-last_pos
+                  << ") >>> " << lines+last_pos << " <<<\n";
+      }
+#endif
+      last_pos = pos+1;
+    }
+    pos++;
+  }
+
+  // Initial position
+  total_height += 5*space;
+  x = _x - max_width / 2;
+  y = _y - total_height / 2;
+  app.video.window.BoxRGBA(x, y, x + max_width, y + total_height,
+                           boxR, boxG, boxB, boxA);
+
+  app.video.window.RectangleRGBA(x, y, x + max_width, y + total_height,
+                                 rectR, rectG, rectB, rectA);
+
+  world.ToRedrawOnScreen(Rectanglei(x, y, max_width, total_height));
+
+  for( std::vector<size_t>::iterator it=offsets.begin();
+       it != offsets.end();
+       ++it)
+  {
+    font.WriteLeft(x+space, y+space, lines+(*it), white_color);
+    y += font.GetHeight(lines+(*it));
+  }
+  offsets.clear();
+  free(lines);
+}
Index: src/graphic/text.h
===================================================================
--- src/graphic/text.h	(r  vision 451)
+++ src/graphic/text.h	(copie de travail)
@@ -59,7 +59,14 @@
 
 void DrawTmpBoxText(Font &font, 
 		    int x, int y, 
-		    const std::string &txt, uint space=3);
+		    const std::string &txt, uint space=3,
+                    int boxR=80, int boxG=80, int boxB=159, int boxA=206,
+                    int rectR=49, int rectG=32, int rectB=122, int rectA=255);
+void DrawTmpBoxTextWithReturns(Font &font,
+                               int _x, int _y, 
+                               const std::string &txt, uint space=3,
+                               int boxR=80, int boxG=80, int boxB=159, int boxA=206,
+                               int rectR=49, int rectG=32, int rectB=122, int rectA=255);
 
 
 #endif
