Base Damage - 20%. This occurs when the attacking unit's primary Attack skill is equal to or greater than the primary Defense skill possessed by the Efreet during combat (taking into account the stats of the heroes controlling these units).
If the attacker is not strong enough, and their Attack skill is lower than the Efreet's Defense level, the retaliation from the Efreet's Shield will increase proportionally to the difference. The maximum retaliation occurs when the "Defense - Attack" difference is 28 units, and it amounts to 66.6(6)% of the attacker's actual damage, i.e., exactly 2/3. Further increase in damage from the Efreet's Shield is not observed. The only exception found is for ranged units, which have a melee penalty (and deal half damage). They receive double damage from the Efreet's Shield. That is, up to 4/3 of the actually inflicted damage - the Efreet will be most effective in blocking such ranged units.
An empirical formula has been found:
D(efreet) = D*8/(40-R),
where
D = the actual damage of the attacker, which they inflicted on the Efreet Sultan (WITHOUT taking into account rounding).
Notes:
1. It should be noted that if the stack of Efreet is destroyed in the process, the actually inflicted damage will not exceed the total health reserve of all units in this stack (i.e., even a legion of Azure Dragons will not be able to inflict damage on a single Efreet Sultan that is greater than its health reserve).
2. Artifacts that increase the unit's health are taken into account, as the unit will actually take more damage due to the larger health reserve.
R = (Def-Att) - the difference between the Efreet's Defense and the Attack of the unit that receives retaliatory damage from the Fire Shield (taking into account the primary skills of the heroes).
When calculating, the attacker's damage is not rounded to the nearest whole number, but the final value of the retaliation is rounded down to the nearest whole number.
All values of the retaliation range are within [8/40; 8/12].
P.s. The basic formula is likely influenced by the balance of power between the attacking stack and the stack of Efreet Sultans.
The formula above is specific - the calculation was performed with relatively equal forces of both stacks. In the case when the total power (or number) of Efreet is significantly less than the attacker, the retaliatory damage decreases. This needs to be clarified.
