if not srb2p return end

freeslot ("SPR_PSNC", "sfx_whgatk", "sfx_whgow", "sfx_whgax1", "sfx_whgax2", "sfx_whgdie", "sfx_whg1ma", "sfx_whg1mb", "sfx_whgdie", "sfx_whgask", "sfx_whgdo","sfx_whgno", "sfx_whgmss", "sfx_whgdge", "sfx_whgwin", "sfx_whglvl", "sfx_whgmd2", "sfx_whghl", "sfx_werej")

-- Define our base character's stats!
charStats["werehog"] = {

		-- GENERAL

		name = "Werehog",		-- This is only for bots / enemies
		basehp = 75,			-- base HP for level 1 (Cannot be <= 0)
		basesp = 25,			-- base SP for level 1 (Can be 0, but not < 0!)
		persona = "Cerberus",		-- Persona to use
		melee_natk = "knuckles_atk1",	-- normal melee attack

		-- Normal attack attributes
		-- Scales with game difficulty
		atk = 32,	-- power (generally < 50)
		acc = 90,	-- accuracy (%)
		crit = 7,	-- crit rate (%)

		

		-- Note: As of Beta 1.0.0, not all animations are implemented
		-- (* = unimplemented)

		anim_stand = 		{SPR_PLAY, A, 8, "SPR2_STND"},					-- standing
		anim_stand_hurt =	{SPR_PLAY, A, 1, "SPR2_STND"},					-- standing (low HP) *
		anim_stand_bored =	{SPR_PLAY, A, B, C, D, E, 8, "SPR2_WAIT"},					-- standing (occasionally plays after anim_stand has played several times)
		anim_guard = 		{SPR_PLAY, A, 1, "SPR2_WALK"},					-- guarding
		anim_move =			{SPR_PLAY, A, B, C, D, E, F, 2, "SPR2_WALK"},	-- moving
		anim_run =			{SPR_PLAY, A, B, C, D, E, F, 2, "SPR2_WALK"},	-- guess what
		anim_atk =			{SPR_PLAY, A, B, 2, "SPR2_FALL"},			-- attacking
		anim_aoa_end =		{SPR_PLAY, D, C, B, A, 2, "SPR2_ROLL"},			-- jumping out of all-out attack
		anim_hurt =			{SPR_PLAY, A, 35, "SPR2_PAIN"},					-- taking damage
		anim_getdown =		{SPR_PLAY, A, 1, "SPR2_CNT1"},					-- knocked down from weakness / crit *
		anim_downloop =		{SPR_PLAY, A, 1, "SPR2_CNT1"},					-- is down
		anim_getup =		{SPR_PLAY, A, B, C, D, 1, "SPR2_ROLL"},			-- gets up from down
		anim_death =		{SPR_PLAY, A, 30, "SPR2_PAIN"},					-- dies
		anim_revive =		{SPR_PLAY, A, B, C, D, 1, "SPR2_ROLL"},			-- gets revived

		-- anim_special1 through anim_special32 may also be used for various purposes (ie: attack animations)
		anim_special1 =		{SPR_PLAY, A, TICRATE, "SPR2_MLEE"},
		anim_special4 = 	{SPR_PLAY, A, TICRATE, "SPR2_GARD"},			-- guard
		anim_sepcial5 =		{SPR_PLAY, A, TICRATE, "SPR2_HWLP"},			-- howling prep
		anim_special6 =		{SPR_PLAY, A, B, 2, "SPR2_HOWL"},				-- howling

		-- HAS SOME VOICES FOR NOW......

		vfx_summon = {"sfx_whgatk"},	-- Summoning Persona to use a Skill
        vfx_skill = {"sfx_attk1", "sfx_attk2", "sfx_attk3", "sfx_attk4", "sfx_attk5",},		-- Used a Skill
        vfx_item = {},		-- Used an item
        vfx_hurt = {"sfx_whgow", "sfx_whurt1", "sfx_whurt2", "sfx_whurt3", "sfx_whurt4",},		-- Sustained damage
        vfx_hurtx = {"sfx_whgax1", "sfx_whgax2"},		-- Sustained heavy damage / Critical hit / Weakness
        vfx_die = {"sfx_whgdie"},		-- Death
        vfx_heal = {"sfx_whg1mb"},		-- Healed by teammate
        vfx_healself = {"sfx_whghl"},	-- Healed self
        vfx_kill = {"sfx_whgcr2"},		-- Killed an enemy
        vfx_1more = {"sfx_whg1ma", "sfx_whg1mb"},	-- Performed 1more
        vfx_crit = {"sfx_whgmd2"},		-- Cut-in for Weakness/Critical Hit
        vfx_aoaask = {"sfx_whgask"},	-- Ask to All-Out Attack
        vfx_aoado = {"sfx_whgdo"},		-- Performing All-Out Attack
        vfx_aoarelent = {"sfx_whgno"},	-- Relenting from All-Out Attack
        vfx_miss = {"sfx_whgmss"},		-- Missed attack
        vfx_dodge = {"sfx_whgdge"},		-- Dodged enemy attack
        vfx_win = {"sfx_whgwin"},		-- Battle won
        vfx_levelup = {"sfx_whglvl"},	-- Level Up!}

		-- HUD DEFINTIIONS

		icon = "ICO_WHG",			
		hudbust = "WHG_H",			
		hudaoa = "H_WHGAOA",		
		aoa_quote = "How do ya like \nTHAT, huh?!",
		hudcutin = "WHG_A",		
		hudspr = "WHG",	

	
		tip = "Learns powerful slash, strike and curse \nskills. Has strong attack and defense,\n but weak Magic power. He's the tank \nof the team and is capable dealing \ncolossal damage. \nBe sure to buff him!"
}


personaList["Cerberus"] = {
		-- GENERAL
		name = "Cerberus",	
		arcana = ARCANA_STRENGTH,			

		sprite = SPR_PSNC,		
		startframe = 0,			

		anim_idle = 	{SPR_PSNC, A, 8},	-- Idle animation when summoned in the menu
		anim_atk = 		{SPR_PSNC, A, 8},	-- Animation when attacking

		-- Stats (at level 10)
		-- Remember that stats naturally cap at 99.
		strength = 12,
		magic = 5,
		endurance = 12,
		luck = 4,
		agility = 7,

		-- Affinities (weak, resist, block, drain)
		weak = ATK_BLESS,
		resist = ATK_STRIKE,
		drain = ATK_CURSE,

		skills = {
					{"cleave", 1}, {"sonic punch", 3},
					{"eiha", 6}, {"mudo", 12}, {"twin slash", 16},
					{"maeiha", 18},	{"kill rush", 19}, {"eiga", 24},
					
					{"mamudo", 28, "cleave"}, {"cruel attack", 30, "sonic punch"}, 
					{"giant slice", 31, "twin slash"},	
					{"maeiga", 35, "eiha"}, {"swift strike", 36, "kill rush"},
					{"blade of fury", 38, "giant slice"},
					
					{"megido", 40, "maeiha"}, {"gigantic fist", 42, "cruel attack"}, {"power charge", 45},
					{"eigaon", 48, "eiga"}, {"high counter", 52}, {"maeigaon", 55, "eiga"}, 
					{"mudoon", 56, "mudo"}, {"deathbound", 60, "blade of fury"},  {"mamudoon", 64, "mamudo"},
					{"megidola", 70, "megido"}, {"megidolaon", 80, "megidola"}
					
				},
}

addHook("AbilitySpecial", function(p)
	if p.mo and p.mo.valid and p.mo.skin == "werehog"
		if not (p.pflags & PF_THOKKED) 
			P_SetObjectMomZ(p.mo, 10*FRACUNIT, false) 
			p.mo.state = S_PLAY_ROLL
			S_StartSound(p.mo, sfx_werej)
			p.pflags = $ | PF_THOKKED
			return true
		end
	end
end)