Index: code/branches/presentation3/src/modules/pickup/PickupPrereqs.h
===================================================================
--- code/branches/presentation3/src/modules/pickup/PickupPrereqs.h	(revision 6996)
+++ code/branches/presentation3/src/modules/pickup/PickupPrereqs.h	(revision 6998)
@@ -79,4 +79,5 @@
     class MetaPickup;
     class SpeedPickup;
+    class ShieldPickup;
 
 }
Index: code/branches/presentation3/src/modules/pickup/items/CMakeLists.txt
===================================================================
--- code/branches/presentation3/src/modules/pickup/items/CMakeLists.txt	(revision 6996)
+++ code/branches/presentation3/src/modules/pickup/items/CMakeLists.txt	(revision 6998)
@@ -4,3 +4,4 @@
   MetaPickup.cc
   SpeedPickup.cc
+  ShieldPickup.cc
 )
Index: code/branches/presentation3/src/modules/pickup/items/ShieldPickup.cc
===================================================================
--- code/branches/presentation3/src/modules/pickup/items/ShieldPickup.cc	(revision 6998)
+++ code/branches/presentation3/src/modules/pickup/items/ShieldPickup.cc	(revision 6998)
@@ -0,0 +1,274 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Eric Beier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file ShieldPickup.cc
+    @brief Implementation of the ShieldPickup class.
+*/
+
+#include "ShieldPickup.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/StringUtils.h"
+
+#include "worldentities/pawns/SpaceShip.h"
+#include "items/Engine.h"
+#include "pickup/PickupIdentifier.h"
+
+#include <sstream>
+
+
+namespace orxonox
+{
+    CreateFactory(ShieldPickup);
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes the member variables.
+    */
+    ShieldPickup::ShieldPickup(BaseObject* creator) : Pickup(creator)
+    {
+        RegisterObject(ShieldPickup);
+
+        this->initialize();
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    ShieldPickup::~ShieldPickup()
+    {
+
+    }
+
+    /**
+    @brief
+    Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+    @return
+    A pointer to the Pawn, or NULL if the conversion failed.
+    */
+    Pawn* ShieldPickup::carrierToPawnHelper(void)
+    {
+        PickupCarrier* carrier = this->getCarrier();
+        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
+        
+        if(pawn == NULL)
+        {
+            COUT(1) << "Invalid PickupCarrier in ShieldPickup." << std::endl;
+        }
+        return pawn;
+    }
+    
+    /**
+    @brief
+        Initializes the member variables.
+    */
+    void ShieldPickup::initialize(void)
+    {
+        this->duration_ = 0.0f;
+        this->shieldAbsorption_ = 0.0f;
+        this->shieldHealth_ = 0.0f;
+
+        this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
+    }
+
+    /**
+    @brief
+        Initializes the PickupIdentifier of this pickup.
+    */
+    void ShieldPickup::initializeIdentifier(void)
+    {
+        std::stringstream stream;
+        stream << this->getDuration();
+        std::string type1 = "duration";
+        std::string val1 = stream.str();
+        this->pickupIdentifier_->addParameter(type1, val1);
+
+        stream.clear();
+        stream << this->getShieldHealth();
+        std::string type2 = "ShieldHealth";
+        std::string val2 = stream.str();
+        this->pickupIdentifier_->addParameter(type2, val2);
+        
+        stream.clear();
+        stream << this->getShieldAbsorption();
+        std::string type3 = "ShieldAbsorption";
+        std::string val3 = stream.str();
+        this->pickupIdentifier_->addParameter(type3, val3);
+
+    }
+
+    /**
+    @brief
+        Method for creating a ShieldPickup object through XML.
+    */
+    void ShieldPickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
+    {
+        SUPER(ShieldPickup, XMLPort, xmlelement, mode);
+
+        XMLPortParam(ShieldPickup, "duration", setDuration, getDuration, xmlelement, mode);
+        XMLPortParam(ShieldPickup, "shieldhealth", setShieldHealth, getShieldHealth, xmlelement, mode);
+        XMLPortParam(ShieldPickup, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode);
+
+        this->initializeIdentifier();
+    }
+
+    /**
+    @brief
+        Is called when the pickup has transited from used to unused or the other way around.
+    */
+    void ShieldPickup::changedUsed(void)
+    {
+        SUPER(ShieldPickup, changedUsed);
+
+        //! If the pickup is not picked up nothing must be done.
+        if(!this->isPickedUp())
+            return;
+
+        Pawn* pawn = this->carrierToPawnHelper();
+        if(pawn == NULL)
+            this->destroy();
+
+        //! If the pickup has transited to used.
+        if(this->isUsed())
+        {
+            if(!this->getTimer()->isActive() && this->getTimer()->getRemainingTime() > 0.0f)
+            {
+                this->getTimer()->unpauseTimer();
+            }
+            else
+            {
+                this->startPickupTimer(this->getDuration());
+            }
+            pawn->setShieldAbsorption(this->getShieldAbsorption());
+            pawn->setShieldHealth(this->getShieldHealth());
+        }
+        else
+        {
+            pawn->setShieldAbsorption(0.0f);
+            this->setShieldHealth(pawn->getShieldHealth());
+            pawn->setShieldHealth(0.0f);
+
+            if(this->isOnce())
+            {
+                if(!this->getTimer()->isActive() && this->getTimer()->getRemainingTime() == this->getDuration())
+                {
+                    this->destroy();
+                }
+                else
+                {
+                    this->getTimer()->pauseTimer();
+                }
+            }
+        }
+    }
+
+    /**
+    @brief
+        Creates a duplicate of the input OrxonoxClass.
+    @param item
+        A pointer to the Orxonox class.
+    */
+    void ShieldPickup::clone(OrxonoxClass*& item)
+    {
+        if(item == NULL)
+            item = new ShieldPickup(this);
+
+        SUPER(ShieldPickup, clone, item);
+
+        ShieldPickup* pickup = dynamic_cast<ShieldPickup*>(item);
+        pickup->setDuration(this->getDuration());
+        pickup->setShieldAbsorption(this->getShieldAbsorption());
+        pickup->setShieldHealth(this->getShieldHealth());
+        pickup->initializeIdentifier();
+    }
+
+    /**
+    @brief
+    Sets the percentage the shield absorbs of the dealt damage.
+    @param shieldAbsorption
+    The shieldAbsorption. Has to be between 0 and 1
+    */
+    void ShieldPickup::setShieldAbsorption(float shieldAbsorption)
+    {
+        if (shieldAbsorption>=0 && shieldAbsorption<=1)
+        {
+            this->shieldAbsorption_=shieldAbsorption;
+        }
+        else
+        {
+            COUT(1) << "Invalid Absorption in ShieldPickup." << std::endl;
+            this->shieldAbsorption_=0;
+        }
+    }
+
+    /**
+    @brief
+    Sets the health of the shield.
+    @param shieldHealth
+    The shieldHealth
+    */
+    void ShieldPickup::setShieldHealth(float shieldHealth)
+    {
+        if (shieldHealth>=0)
+        {
+            this->shieldHealth_=shieldHealth;
+        }
+        else
+        {
+            COUT(1) << "Invalid Shieldhealth in ShieldPickup." << std::endl;
+            this->shieldHealth_=0;
+        }
+    }
+
+    /**
+    @brief
+        Sets the duration.
+    @param duration
+        The duration
+    */
+    void ShieldPickup::setDuration(float duration)
+    {
+        if(duration >= 0.0f)
+        {
+            this->duration_ = duration;
+        }
+        else
+        {
+            COUT(1) << "Invalid duration in ShieldPickup." << std::endl;
+            this->duration_ = 0.0f;
+        }
+    }
+
+    void ShieldPickup::pickupTimerCallback(void)
+    {       
+        this->setUsed(false);
+    }
+}
Index: code/branches/presentation3/src/modules/pickup/items/ShieldPickup.h
===================================================================
--- code/branches/presentation3/src/modules/pickup/items/ShieldPickup.h	(revision 6998)
+++ code/branches/presentation3/src/modules/pickup/items/ShieldPickup.h	(revision 6998)
@@ -0,0 +1,99 @@
+
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Eric Beier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file ShieldPickup.h
+    @brief Declaration of the ShieldPickup class.
+*/
+
+#ifndef _ShieldPickup_H__
+#define _ShieldPickup_H__
+
+#include "pickup/PickupPrereqs.h"
+
+#include <string>
+#include "worldentities/pawns/Pawn.h"
+#include "worldentities/StaticEntity.h"
+
+#include "pickup/Pickup.h"
+
+namespace orxonox {
+
+    /**
+    @brief
+        A Pickup which can add a Shield to the Pawn.
+
+	1) The percentage: The percentage the shield takes from the damage dealt to a Pawn
+	2) The hit points: The amount of damage points a shield can teake before collapsing
+        3) The activation type: 'immediate' or 'onUse'. defines if the item is used when it's picked up or only after the player chooses to use it.
+        4) The duration: the activation time of the pickup.
+
+    @author
+        Eric Beier
+    */
+    class _PickupExport ShieldPickup : public Pickup
+    {
+        public:
+
+            ShieldPickup(BaseObject* creator); //!< Constructor.
+            virtual ~ShieldPickup(); //!< Destructor.
+
+            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a HealthPickup object through XML.
+
+            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
+            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
+
+            inline float getDuration(void)
+                { return this->duration_; }
+            inline float getShieldHealth()
+                { return this->shieldHealth_; }
+            inline float getShieldAbsorption()
+                { return this->shieldAbsorption_; }
+
+        protected:
+            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
+
+            virtual void pickupTimerCallback(void); //!< Function that gets called when timer ends.
+
+            void setDuration(float duration);
+            void setShieldHealth(float shieldHealth);
+            void setShieldAbsorption(float shieldAbsorption);
+
+        private:
+            void initialize(void); //!< Initializes the member variables.
+            Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+
+            float duration_; //!< The health that is transferred to the Pawn.
+            float shieldHealth_;
+            float shieldAbsorption_; // Has to be between 0 and 1
+
+    };
+}
+
+#endif // _ShieldPickup_H__
Index: code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.cc	(revision 6996)
+++ code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.cc	(revision 6998)
@@ -66,4 +66,6 @@
         this->maxHealth_ = 0;
         this->initialHealth_ = 0;
+        this->shieldHealth_ = 0;
+        this->shieldAbsorption_ = 0.5;
 
         this->lastHitOriginator_ = 0;
@@ -80,5 +82,5 @@
         else
             this->weaponSystem_ = 0;
-        
+
         this->setCarrierName("Pawn");
 
@@ -107,4 +109,8 @@
         XMLPortParam(Pawn, "maxhealth", setMaxHealth, getMaxHealth, xmlelement, mode).defaultValues(200);
         XMLPortParam(Pawn, "initialhealth", setInitialHealth, getInitialHealth, xmlelement, mode).defaultValues(100);
+
+        XMLPortParam(Pawn, "shieldhealth", setShieldHealth, getShieldHealth, xmlelement, mode).defaultValues(0);
+        XMLPortParam(Pawn, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode).defaultValues(0);
+
         XMLPortParam(Pawn, "spawnparticlesource", setSpawnParticleSource, getSpawnParticleSource, xmlelement, mode);
         XMLPortParam(Pawn, "spawnparticleduration", setSpawnParticleDuration, getSpawnParticleDuration, xmlelement, mode).defaultValues(3.0f);
@@ -118,9 +124,11 @@
     void Pawn::registerVariables()
     {
-        registerVariable(this->bAlive_,        VariableDirection::ToClient);
-        registerVariable(this->health_,        VariableDirection::ToClient);
-        registerVariable(this->initialHealth_, VariableDirection::ToClient);
-        registerVariable(this->bReload_,       VariableDirection::ToServer);
-        registerVariable(this->aimPosition_,   Bidirectionality::ServerMaster, 0, true);
+        registerVariable(this->bAlive_,           VariableDirection::ToClient);
+        registerVariable(this->health_,           VariableDirection::ToClient);
+        registerVariable(this->initialHealth_,    VariableDirection::ToClient);
+        registerVariable(this->shieldHealth_,     VariableDirection::ToClient);
+        registerVariable(this->shieldAbsorption_, VariableDirection::ToClient);
+        registerVariable(this->bReload_,          VariableDirection::ToServer);
+        registerVariable(this->aimPosition_,      Bidirectionality::ServerMaster, 0, true);
     }
 
@@ -164,5 +172,22 @@
         if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
         {
-            this->setHealth(this->health_ - damage);
+            //share the dealt damage to the shield and the Pawn.
+            float shielddamage = damage*this->shieldAbsorption_;
+            float healthdamage = damage*(1-this->shieldAbsorption_);
+
+            // In case the shield can not take all the shield damage.
+            if (shielddamage > this->getShieldHealth())
+            {
+                healthdamage += shielddamage-this->getShieldHealth();
+                this->setShieldHealth(0);
+            }
+
+            this->setHealth(this->health_ - healthdamage);
+
+            if (this->getShieldHealth() > 0)
+            {
+                this->setShieldHealth(this->shieldHealth_ - shielddamage);
+            }
+
             this->lastHitOriginator_ = originator;
 
Index: code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.h	(revision 6996)
+++ code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.h	(revision 6998)
@@ -73,4 +73,14 @@
                 { return this->initialHealth_; }
 
+            inline void setShieldHealth(float shieldHealth)
+            { this->shieldHealth_ = shieldHealth; }
+            inline float getShieldHealth()
+            { return this->shieldHealth_; }
+            
+            inline void setShieldAbsorption(float shieldAbsorption)
+            { this->shieldAbsorption_ = shieldAbsorption; }
+            inline float getShieldAbsorption()
+            { return this->shieldAbsorption_; }
+
             inline ControllableEntity* getLastHitOriginator() const
                 { return this->lastHitOriginator_; }
@@ -141,4 +151,6 @@
             float maxHealth_;
             float initialHealth_;
+            float shieldHealth_;
+            float shieldAbsorption_; // Has to be between 0 and 1
 
             Pawn* lastHitOriginator_;
