Implemented Units getting slower the more damaged they are

Units now get slower the more damage they take.
Speed calculation is based on DamageState.