I have no experience with LUA, however I read a little up on it and this is what I came up with.
Give it a try:
The problem you are having is you only check the enemy at index 1. Thus any other enemy is ignored. Without a loop, you either never update your list or iterate over it. I removed the index because I think it is un-needed, but I may be wrong. The while loop should iterate through the list one at a time.
-- findEnemies returns a list of all your enemies.
local enemies = self:findEnemies()
-- Wrap this section in a while loop to iterate over all enemies.
-- Only attack shamans. Don't attack yaks!
-- Something is missing here, fill it in (Hint: Declare variables)
-- Something is missing here, fill it in (Hint: Assign variables)
while enemies[i] do
if enemy.type == 'shaman' then
-- Something is missing here, fill it in (Hint: must iterate)