The first Elephant unit of this type, the War Elephant, can only attack in melee, while its upgrade the Mahout, and the other two subsequent Elephant upgrades switch to a ranged attack, and can fire while moving (note that the Mahout and its upgrades still appear to have a dedicated melee attack in addition to their ranged attack, but this melee attack is not functional and deals no damage). Besides the obvious strategic flexibility implied by this ability, it also brings some differences in damage bonuses and penalties between War Elephants and Mahouts, which are the following:
War Elephants have a 50% damage penalty against Citizens, and Light Infantry has a 50% damage bonus against them.
Mahouts are closer to Ranged Cavalry in terms of stats and bonuses (they share the OBJ_MASK flags OMR and OMG and the damage bonuses of Ranged Cavalry, as well as being able to fire while moving), and all damage bonuses that other units have against Ranged Cavalry will also work on Mahouts.
Elephants' production cost increases progressively with every Stable unit on the field or currently in production. The default increase is 3 Food and 3 Wealth for the second unit created, increasing further with every new unit until the cost cap is reached, which for military units is +125% of their original base value.
The IndianPower of Majesty: Elephants are 15% cheaper and upgraded for free.
Elephants are the only unit type comprised entirely of unique units, and also the only unique unit line to be shared by two nations.
The usage of war elephants by the Persians has been widely popularized by the Age of Empires series, specially in the ambit of strategy games.
Although true, their role in Persian armies tended from small to null. Only in the Sasanian period were elephants deployed in any significant capacity, acquired from the Indians, and in a supportive role at that; used mostly as firing platforms for archers and for the intimidation factor that their presence inspired.
In contrast, war elephants were a fundamental part of Indian armies for centuries, and were commonly deployed by the hundreds, and even thousands.