#ifndef MAGICATTACK_H
#define MAGICATTACK_H

#define RADIUS_UPPERLIMIT			750//was 3000
#define RADIUS_LOWERLIMIT			15//was 10
#define DAMAGE_LIMIT			9999

/**
 * Class wich handles magic attacks
 * @version 13-4-2001
 * @author Herwin 'harSens' van Welbergen
 */
class CMagicAttack : public CBaseMonster
{
public:
	/**
	 * MagicAttack init
	 */
	void Spawn( void );
	
	/**
	 * Precache stuff
	 */
	void Precache( void );

	/**
	 * checks if the player blocks the current attack
	 * @param CBasePlayer *pPlayer: the player to check for
	 * @return BOOL: wether the player blocks it or not
	 */
	BOOL BlocksAttack(CBasePlayer *pPlayer);

	/**
	 * swats the attack away
	 * @param CBasePlayer *pPlayer: the player swap away from
	 * @param int fRandomDir: true: swat away in random dir, false: swat away in players dir
	 */	
	virtual void SwatAway(CBasePlayer *pPlayer, int fRandomDir);

	/**
	 * Removes magicattack
	 */
	virtual void Remove(void);

	/**
	 * Called when magic is in air. 
	 * Removes magic when off-map and emits magic sound.
	 */
	void EXPORT NormalThink( void );

	/**
	 * Magics don't bleed
	 */
	virtual int	BloodColor( void ) { return DONT_BLEED; }

	/**
	 * Animate attacks sprite
	 */	
	void AnimateSprite();
	
	/**
	 * Draws underwater bubbles
	 */
	void DrawBubbles();

	void SetDamage(int damage){pev->dmg=(damage<DAMAGE_LIMIT?damage:DAMAGE_LIMIT);}
	float m_flSpeed;			//speed of the magic		
protected:
};
#endif
