#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "monsters.h"
#include "weapons.h"
#include "nodes.h"
#include "player.h"
#include "soundent.h"
#include "gamerules.h"
#include "effects.h"

#include "ww_satchels.h"


class ArchMageSatchel : public WWSatchel
{
public:
	virtual void	Spawn			( void );
	virtual void	SatchelExplode	( void );
};


LINK_ENTITY_TO_CLASS( ww_satchel_archmage, ArchMageSatchel );


void ArchMageSatchel::Spawn( void )
{
	WWSatchel::Spawn();
	m_iExplodeCount = 1;
}


void ArchMageSatchel::SatchelExplode( void )
{
	if( !pev->owner )
		return;

	entvars_t * pown = VARS( pev->owner );

	if( !pown )
		return;

	pown->health += 30;
	if( pown->health > pown->max_health )
		pown->health = pown->max_health;

	pown->armorvalue += 30;
	if( pown->armorvalue > pown->armortype )
		pown->armorvalue = pown->armortype;
}
