blue = Color.new(56,172,236)
a = 0
file = io.open("./pokemon/starly/starly.txt", "r")
if enemy[1].lv < 5 then
enemy[1].name = file:read(6) 
blank = file:read()
enemy[1].exp = 1
enemy[1].MAX_HP = file:read("*n") - (1.5 * (5 - enemy[1].lv))
blank = file:read()
enemy[1].STR = file:read("*n") - (1 * (5 - enemy[1].lv))
blank = file:read()
enemy[1].DEF = file:read("*n") - (.5 * (5 - enemy[1].lv))
blank = file:read()
enemy[1].AGI = file:read("*n") - (1 * (5 - enemy[1].lv))
blank = file:read()
enemy[1].SPA = file:read("*n") - ( .5 * (5 - enemy[1].lv))
blank = file:read()
enemy[1].SPD = file:read("*n")- ( .5 * (5 - enemy[1].lv))

else
enemy[1].name = file:read(6)
blank = file:read()
enemy[1].exp = 1
enemy[1].MAX_HP = file:read("*n")
blank = file:read()
enemy[1].STR = file:read("*n")
blank = file:read()
enemy[1].DEF = file:read("*n")
blank = file:read()
enemy[1].AGI = file:read("*n")
blank = file:read()
enemy[1].SPA = file:read("*n")
blank = file:read()
enemy[1].SPD = file:read("*n")

file:close()
end
enemy[1].C_HP = enemy[1].MAX_HP
enemy[1].pic = Image.load("./pokemon/starly/starly_battle.png")
enemy[1].picB = Image.load("./pokemon/starly/starly_back.png")



p = 0
e = 0
attackn = 1
line = 0
file = io.open("./pokemon/starly/starly_attacks.txt", "r")
if e == 0 then
	level = file:read("*n")
	if attackn == 1 and pokemon[1].lv >= level then
		e1_attacks[1].name = file:read(12)
		e1_attacks[1].attribute = file:read(7)
		e1_attacks[1].power = file:read("*n")
		e1_attacks[1].accuracy = file:read("*n")
		blank = file:read()
		attackn = attackn +1

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

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