class WOCScriptHandler : EventHandler
{
	// spawn bar for monsters
	override void WorldThingSpawned(WorldEvent e)
	{
		if (e.Thing.bIsMonster && !e.Thing.bNoInteraction && e.Thing.GetSpecies() != "Player" && !e.Thing.CheckClass("MorphedMonster", AAPTR_DEFAULT, true))
		{	
			if(!e.Thing.CheckInventory("MonsterStatItem",1))
			{
				e.Thing.ACS_NamedExecuteAlways("WOC MONSTER INIT");
				e.Thing.A_GiveInventory("MonsterStatItem", 1);
			}
		}
	}
	override void WorldThingRevived(WorldEvent e)
	{
		if (e.Thing.bIsMonster && !e.Thing.bNoInteraction && !e.Thing.CheckClass("MorphedMonster", AAPTR_DEFAULT, true))
		{	
			if(!e.Thing.CheckInventory("MonsterStatItem",1))
			{
				e.Thing.ACS_NamedExecuteAlways("WOC MONSTER INIT");
				e.Thing.A_GiveInventory("MonsterStatItem", 1);
			}
		}
	}
}