#ifndef ITEM_H
#define ITEM_H


#include "unit.h"

class Item:public Unit
{

private:


public:
	int slotsneeded;
	bool stackable;
	int sid;
	int type;
	int quantaty;
	int numberofuses;
	int spacetype;
	void drawicon();
//	void runStatScript();
	void runScript(Unit *,DATAFILE *);
	void Use(Statss*);
	int value();
	Item();
	~Item(){
	//delete attributess;
	
	};
};

Item::Item()
{
attributess = new Statss();
Set_name("potoin");//rig
	spacetype=0 ;///1= 1by1  2= 2by2 down -2= 2by2 right  3 = 3by3 down -3=3by3 right
	type=0;
	slotsneeded=1;
	 stackable=false;
	sid=0;
	quantaty=1;
	numberofuses=0;
}

int Item::value()
{

return attributess->Getgold();
}


void Item::Use(Statss* pls)
{
	
	pls->Sethp(pls->Gethp()+attributess->Gethp());
	pls->Setmp(pls->Getmp()+attributess->Getmp());
/*
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());


pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());

pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());
pls.Sethp(pls.Gethp()+attributess->Gethp());




*/







}



#endif