Heroes II siege.
Siege combat is a gamplay concept from the Heroes of Might and Magic series. Siege combat begins when a hero attacks a hostile or neutral city that has forces in it. The city must have a castle (in Heroes I and Heroes II) or a fort (in Heroes III onwards) for a siege to take place, otherwise it's just a regular combat.
The attacking creatures will begin outside the city walls, and the defending creatures inside them. The attackers have a catapult that will attack the walls every turn. Sieges are the only time catapults appear, except in Heroes IV, where the catapult is a regular creature.
In most games, the defenders have access to towers that will fire on the enemy creatures every turn as well as a moat that will damage enemies and halt their movement to cross, giving the defenders a useful advantage. Defenders can also raise and lower their drawbridge on command, allowing creatures to leave the walls if needed. In Heroes II, these defenses can be built as structures independently. In most later games, defenses are instead built alongside the town's citadel and castle.
Sieges in Heroes IV are significantly different than the rest of the series. Since there are no war machines, walls cannot be destroyed and the gate can be attacked by regular creatures, but only in melee. The gate has 50 health, upgraded to 100 and 150 if the town has a citadel and castle, and it can only take a maximum of 50 damage from one attack. Creatures behind walls cannot be targeted by or perform ranged attacks unless they are adjacent to the wall. Instead of automated turrets, creatures can be placed on top of three turrets (assuming the city has a castle), where they will do increased ranged and melee damage and have greatly increased ranged defense.
In Heroes VI and VII, creatures can attack walls and the gate directly in melee, dealing one damage per attack. Catapults/siege warfare machines deal three damage.