Added spells to game. Resolved crash when attacking. Only use ranged when at a distance.