if slot ~= 0 then
pokemon[slot].lv = pokemon[slot].lv +1
pokemon[slot].MAX_HP = pokemon[slot].MAX_HP +2.5
pokemon[slot].MAX_HP = pokemon[slot].MAX_HP - (pokemon[1].MAX_HP %1)
pokemon[slot].ATK = pokemon[slot].STR +2
pokemon[slot].DEF = pokemon[slot].DEF +1.5
pokemon[slot].AGI = pokemon[slot].AGI +1.5
pokemon[slot].SPD = pokemon[slot].SPD +1
pokemon[slot].SPA = pokemon[slot].SPA +1
level = 0
e = 0
attackn = 1
file = io.open("./pokemon/poochyena/poochyena_attacks.txt", "r")
if e == 0 then
	level = file:read("*n")
	if attackn == 1 and pokemon[slot].lv >= level then
		p_attacks[(slot * 100) +1].name = file:read(12)
		p_attacks[(slot * 100) +1].attribute = file:read(7)
		p_attacks[(slot * 100) +1].power = file:read("*n")
		p_attacks[(slot * 100) +1].accuracy = file:read("*n")
		blank = file:read()
		attackn = attackn +1

	end
	level = file:read("*n")
	if attackn == 2 and pokemon[slot].lv >= level then
		p_attacks[(slot * 100) +2].name = file:read(12)
		p_attacks[(slot * 100) +2].attribute = file:read(7)
		p_attacks[(slot * 100) +2].power = file:read("*n")
		p_attacks[(slot * 100) +2].accuracy = file:read("*n")
		blank = file:read()
	attackn = attackn +1	

	end
	level = file:read("*n")
	if attackn == 3 and pokemon[slot].lv >= level then
		p_attacks[(slot * 100) +3].name = file:read(12)
		p_attacks[(slot * 100) +3].attribute = file:read(7)
		p_attacks[(slot * 100) +3].power = file:read("*n")
		p_attacks[(slot * 100) +3].accuracy = file:read("*n")
		blank = file:read()
	attackn = attackn +1
	end
	level = file:read("*n")
	if attackn == 4 and pokemon[slot].lv >= level then
		p_attacks[(slot * 100) +4].name = file:read(12)
		p_attacks[(slot * 100) +4].attribute = file:read(7)
		p_attacks[(slot * 100) +4].power = file:read("*n")
		p_attacks[(slot * 100) +4].accuracy = file:read("*n")
		blank = file:read()
	attackn = attackn +1
	end
	if attackn == 5 then
		e = 1
	end
end
file:close()

else
pokemon[current].lv = pokemon[current].lv +1
pokemon[current].MAX_HP = pokemon[current].MAX_HP +2.5
pokemon[current].MAX_HP = pokemon[current].MAX_HP - (pokemon[1].MAX_HP %1)
pokemon[current].ATK = pokemon[current].STR +2
pokemon[current].DEF = pokemon[current].DEF +1.5
pokemon[current].AGI = pokemon[current].AGI +1.5
pokemon[current].SPD = pokemon[current].SPD +1
pokemon[current].SPA = pokemon[current].SPA +1
level = 0
e = 0
attackn = 1
file = io.open("./pokemon/poochyena/poochyena_attacks.txt", "r")
if e == 0 then
	level = file:read("*n")
	if attackn == 1 and pokemon[current].lv >= level then
		p_attacks[(current * 100) +1].name = file:read(12)
		p_attacks[(current * 100) +1].attribute = file:read(7)
		p_attacks[(current * 100) +1].power = file:read("*n")
		p_attacks[(current * 100) +1].accuracy = file:read("*n")
		blank = file:read()
		attackn = attackn +1

	end
	level = file:read("*n")
	if attackn == 2 and pokemon[current].lv >= level then
		p_attacks[(current * 100) +2].name = file:read(12)
		p_attacks[(current * 100) +2].attribute = file:read(7)
		p_attacks[(current * 100) +2].power = file:read("*n")
		p_attacks[(current * 100) +2].accuracy = file:read("*n")
		blank = file:read()
	attackn = attackn +1	

	end
	level = file:read("*n")
	if attackn == 3 and pokemon[current].lv >= level then
		p_attacks[(current * 100) +3].name = file:read(12)
		p_attacks[(current * 100) +3].attribute = file:read(7)
		p_attacks[(current * 100) +3].power = file:read("*n")
		p_attacks[(current * 100) +3].accuracy = file:read("*n")
		blank = file:read()
	attackn = attackn +1
	end
	level = file:read("*n")
	if attackn == 4 and pokemon[current].lv >= level then
		p_attacks[(current * 100) +4].name = file:read(12)
		p_attacks[(current * 100) +4].attribute = file:read(7)
		p_attacks[(current * 100) +4].power = file:read("*n")
		p_attacks[(current * 100) +4].accuracy = file:read("*n")
		blank = file:read()
	attackn = attackn +1
	end
	if attackn == 5 then
		e = 1
	end
end
file:close()