#ifndef BLOB_H
#define BLOB_H

#include "delayeddamage.h"
/**
* The Blob
* @version 9-5-2002
* @author Joseph 'Pcjoe' Florencio
*/
class CBlob : public CBaseEntity
{	
public:
	/**
	* Precaches models
	*/
	void Precache( void );

	/**
	 * Applies delayed damage to the blob
	 */
	void ApplyDelayedDamage();

	int Classify(){return CLASS_KIBLOB;}

	/**
	* Spawn the Blob
	*/
	void Spawn();

	/**
	* touch function
	* @param CBaseEntity *pOther: item that touches it
	*/
	void EXPORT BlobTouch( CBaseEntity *pOther );

	/**
	* Blob think
	*/
	void EXPORT BlobThink( void );
	
	/**
	* Creates a blob
	* @param CBasePlayer *pl: Owner of the blob
	* @param Vector vecOrigin: The origin were the blob should be spawned
	* @param int iSize: Size of the blob
	*/
	// Modified by Rick : Changed CBasePlayer *pl to CBaseEntity *pEnt, for buddy support
	static CBlob *CreateBlob(CBaseEntity *pEnt, Vector vecOrigin);

	static CBlob *CreateBlob(CBaseEntity *pEnt, Vector vecOrigin,int dmg,int show,int maxsize,int maxdmg);

	/**
	* Increase the size
	* @param float SizeIncrease: How much to increase the size?
	* @param int dmg: dmg to add
	*/
	void SizeInc( int SizeInc,int dmg );

	/**
	* Create the blob explosion
	*/
	void CreateExplosion( void );

	/**
	* Update the blob explosion
	*/
	void UpdateExplosion( void );

	/**
	* Kill the blob
	*/
	void Remove( void );

	/**
	 * Add delayed damage
	 * @param dDamage, the delayed (renzoku) damage to add
	 */
	void AddDelayedDamage(DelayedDamage *dDamage);

	//void DelayedSizeInc(int SizeInc);

	int m_iSize;
	int m_iDamageCounter;//damage counter
private:
	float m_flLastUpdateTime;
	DelayedDamage *m_pDelayedDamage;
	int m_fShown;
	int m_iMaxSize;
	int m_iMaxDamage;
};
#endif
