What you want is not really possible.
First, it does not matter how an upgrade is called - for example Steel Melee Weapons is really just a name so that its easier to understand which units would benefit from it, but the upgrade itself applies the damage bonus to both Attack 1 and Attack 2.
Second, I tried to use trigger actions to modify unit's damage. My thought process was that while upgrade applies to both attacks, it could be possible to lower the damage of just one of the attacks back to its previous value, that way it would seem as if no upgrade was applied to that attack.
The action in question was added in Reforged:
-
Unit - Set Unit: your_unit's Weapon Integer Field: Attack Damage Number Of Dice ('ua1d')at Index:X to Value: Y
However it seems to be buggy. It increased unit's damage, but not by the amount I set. It also worked only for Attack 1. This "set" method seems to use one-based indexes, while its "get" counterpart uses zero-based indexes. Using jass to change the field ID from 'ua1d' to 'ua2d' did not work either :/
Even if the action worked, there would still be one confusing thing - The attack's icon in unit's UI in game has that small number in the corner that shows the level of upgrade that was applied to the attack. While the trigger action would change the damage amount, it would not change the number.
That could be confusing, since both attacks would for example have the number 3, but only one of the would have increased damage.
Third, the only option I found that increases damage of each attack "kind-of" separately is the Damage Upgrade Amount. Each attack in object editor specifies this value and by default those values are 0 (the field is Combat - Attack N - Damage Upgrade Amount).
You can create an upgrade with effect 'Apply Attack Upgrade Bonus'. Once researched, it will increase each attack's damage by the upgrade bonus.
There are few things of note:
- This basically increases the 'Base Damage' of a unit, while standard upgrades increase 'Damage Number of Dice'.
- For comparison, if you had unit with the following damage fields:
- Damage Base: 28
- Number of Dice: 2
- Sides per Die: 5
- then its actual damage would be 30-38
- after increasing Number of Dice by 1 via upgrade like Steel Melee Weapons, its damage would be 31-43
- while increasing its damage via Damage Upgrade Amount = 1 would change it to 31-39 damage
- This upgrade does not display the upgrade level in unit's UI
- You cannot have one such upgrade for attack 1 and another such upgrade for attack 2, since the upgrade itself does not choose which attacks to upgrade - it updates both. The only advantage is that you can set the upgrade amount for each attack in unit's object data