An alternate option is to, rather than remove them, make them rarely used.
Code:
stat_pri 6, 4, no, 0, 0, melee, melee_blade, piercing, spear, 25, 0.85
;stat_pri_ex 0, 0, 0
stat_pri_attr spear, long_pike, spear_bonus_8
stat_sec 3, 1, no, 0, 0, melee, melee_blade, piercing, sword, 25, 0.15
;stat_sec_ex 0, 0, 0
stat_sec_attr no
You see how at the ends of the stat_pri lines I replaced the ones with other numbers? Those are preference numbers. The 0.85 at the end of stat_pri compared with the 0.15 at the end of stat_sec mean that the pikemen prefer using pikes over swords.