Hmm don't ignoring Armor Type that is not so Easy cause there is no get Attack-/ArmorType, You'll need to save/load Armor and attack Type of each Unit-Type, write its specific value in some kind of table form:
This Trigger does not work cause of wrong Hashtable access:
-
Init Armor Attack Type
-

Ereignisse
-

Bedingungen
-

Aktionen
-


Hashtabelle - Create a hashtable
-


-------- Use AttackType as 0/1/2/3/4/5/6 --------
-


-------- ArmorType as 0/10/20/30/40/50.... --------
-


-------- The Index is later ArmorType + AttackType --------
-


-------- Hero Attack Damage = 0 --------
-


Set AttackArmorType_Multiplier[0] = 1.00
-


Set AttackArmorType_Multiplier[10] = 1.00
-


Set AttackArmorType_Multiplier[20] = 1.00
-


Set AttackArmorType_Multiplier[30] = 0.50
-


Set AttackArmorType_Multiplier[40] = 1.00
-


Set AttackArmorType_Multiplier[50] = 0.05
-


Set AttackArmorType_Multiplier[60] = 1.00
-


-------- Next AttackType --------
-


Set AttackArmorType_Multiplier[1] = 1.00
-


Set AttackArmorType_Multiplier[11] = 1.00
-


Set AttackArmorType_Multiplier[21] = 1.00
-


Set AttackArmorType_Multiplier[31] = 1.00
-


-------- Save Attack Type Hero for Mountain King Type. --------
-


Custom script: call SaveIntegerBJ( 0, 0, 'Hmkg', GetLastCreatedHashtableBJ() )
-


-------- Save Armor Type Improved for Townhall. --------
-


Custom script: call SaveIntegerBJ( 30, 1, 'htow', GetLastCreatedHashtableBJ() )
If you don't use harden skin (dat moutain Giant Skill, blocking fix damage) & dat % Protection from Nerbuian Hero you could damage a Unit with 10 Chaos damage calculate the taken damage and heal it again.
Convert this Taken damage into a % of the full damage.
Use this % value its the dmg reduction:
To make your Attack deal full damage we use following formular:
Taken damage = Attack-Damage * Damage Reduction
wanted Taken Damage = Attack Damage
Therefore we do Taken Damage = Attack Damage * Damage Reduction / Damage Reduction
Example using Bribes Damage Engine:
-
Ignore Armor
-

Events
-


Game - DamageModifierEvent becomes Equal 2.00
-

Conditions
-


IsDamageSpell Equal False
-


Bergkönig 0020 <gen> Equal DamageEventSource
-

Actions
-


-------- Avoid Endless Loop --------
-


Trigger - Turn off DamageEventTrigger
-


-------- Save Old Life --------
-


Set My_OldLife = (Life of DamageEventTarget)
-


-------- Avoid Killing --------
-


Unit - Set life of DamageEventTarget to 100.00%
-


-------- Calc % dmg taken --------
-


Unit - Cause DamageEventTarget to damage DamageEventTarget, dealing 10.00 damage of attack type Chaos and damage type Normal
-


Set MY_DamageTaken = ((Max. Life of DamageEventTarget) - (Life of DamageEventTarget))
-


Set MY_DamageTaken = (MY_DamageTaken / 10.00)
-


-------- Restore Life --------
-


Unit - Set life of DamageEventTarget to My_OldLife
-


Trigger - Turn on DamageEventTrigger
-


-------- Damage * DamageReduction / ArmorValue Reduction = Damage * ArmorType Reduction --------
-


Set DamageEventAmount = (DamageEventAmount / MY_DamageTaken)
Math stuff not needed here but good to know:
Only +Armor:
DamageReduction (x) = x / (x + 1 / ArmorMultiplier)
often this formular is shown in this form y = x * ArmorMultiplier / ( x * ArmorMultiplier + 1)
Only With X [0 -> 1[
Armor (x) = (1 / Armor Multiplier) / ( 1/x - 1)
If you use Armor Multiplier of 0.06:
1/0.06 = 16,66666666667 or 16 + 2/3 or 50/3
If you use Armor Multiplier of 0.01:
1/0.01 = 100