I told hero to tell me every name of those skeletons but everybody’s name popped up except king’s
The skeleton king cannot be attacked until the majority of his minions are defeated. He has no enemy type, but rather just the name “Skeleton King”. Instead of listing the enemies that you want to attack, try listing the enemies that you DON’T want to attack, as such:
if(enemy && enemy.type != "sand-yak")
which basically says “if there is an enemy and it’s not a sand-yak”.
My bad, it should be “sand-yak” not “sand yak”. Edited my original post
YAY I did it yay, thanks.