Catapults are great at attacking buildings at long range, but are especially vulnerable against melee units and can not attack them if they are too close.