#ifndef WEAPON_H
#define WEAPON_H

#include <string>

#include "SDL.h"

class Person;
class List;
class Sprite;

class Weapon
{
public:
	Weapon();
	Weapon(std::string filename, Person *shooter);

	void load(List *info);
	void shoot();
	void update();

	virtual Weapon *copy(Person *shooter);

	void addAmmo(int dAmmo);
	int getAmmo() {return _ammo;}
	SDL_Rect drawAmmo(SDL_Rect);


	std::string id() {return _id;}

protected:
	Person *_shooter;

	Sprite *_icon;

	int _waitShoot;
	int _framesSinceShoot;
	int _bulletSpeed;
	int _damage;

	unsigned int _ammo;
	unsigned int _ammoSize;

	bool _spray;

	int _sprayCount;

	std::string _id;
};

class WeaponPunch: public Weapon
{
public:
	WeaponPunch();
	WeaponPunch(std::string filename, Person *shooter);
	WeaponPunch *copy(Person *shooter);
	void shoot();
};

#endif