Well, yeah, spears are weak.
The only way medieval army can put up a fight is if their magic is so powerful as to be on the level of modern weapons, in that case it is not going to be a medieval army, but rather an army from an advanced magic based civilization, say, there's one mentioned right...