Magic, I believe, would be a great idea. As above said, I agree it should be rare or limited in some way. However it needs to be diverse. Not just fireballs, potions, etc. One idea could be a barrier system: walls that could damage/kill mobs to keep them away from buildings, force fields to protect ...