/***************************************************************************
 *   Copyright (C) 2004 by ian reinhart geiser                             *
 *   ian@geiseri.com                                                       *
 *                                                                         *
 *   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.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef ITEM_H
#define ITEM_H

#include <qstring.h>
#include <qmap.h>
#include <QPixmap>
#include <QMetaType>

/**
This is the baseclass for items that can be handled by monsters and charicters.

@author ian reinhart geiser
*/
class Item{
public:
	Item();
	Item(const QString &name);

	virtual ~Item();
	virtual int weight() const { return m_weight; }
	virtual int bonus() const { return m_bonus; }
	virtual void setWeight( int weight ) { m_weight = weight; }
	virtual void setBonus( int bonus ) { m_bonus = bonus; }
	virtual int saveVersus( const QString &vs ) const { return m_saves[vs]; }

	virtual void setSprite ( const QPixmap& theValue );
	virtual QPixmap sprite() const;

protected:
	int m_weight;
	int m_bonus;
	QString m_name;
	QMap<QString,int> m_saves;
	QPixmap m_sprite;
};
Q_DECLARE_METATYPE(Item)
#endif

