BlzSetUnitWeaponIntegerField UNIT_WEAPON_IF_ATTACK_DAMAGE_BASE [reforged]

Status
Not open for further replies.
Level 11
Joined
Jul 28, 2024
Messages
340
Do you think this should work?..
It does not seem to work. Attack does not change.

Code:
call BlzSetUnitWeaponIntegerField(u, UNIT_WEAPON_IF_ATTACK_DAMAGE_BASE, 0, BlzGetUnitWeaponIntegerField(u, UNIT_WEAPON_IF_ATTACK_DAMAGE_BASE, 0) + 1)
call BlzSetUnitWeaponIntegerField(u, UNIT_WEAPON_IF_ATTACK_DAMAGE_SIDES_PER_DIE, 0, BlzGetUnitWeaponIntegerField(u, UNIT_WEAPON_IF_ATTACK_DAMAGE_SIDES_PER_DIE, 0) - 1)
 
Blizzard is inconsistent with their indexing. In this case, you need to specify index 1 for Attack1, not index 0.
Also, these actions for some reason work in additive manner.
So for example having Footman with 11 base damage, 1 number of dice and 2 sides per die, and using these actions:
  • Unit - Set Unit: Footman's Weapon Integer Field: Attack Damage Base ('ua1b')at Index:1 to Value: 50
  • Unit - Set Unit: Footman's Weapon Integer Field: Attack Damage Sides Per Die ('ua1s')at Index:1 to Value: 5
will result in 61 base damage, 1 number of dice and 7 sides per die...
 
Status
Not open for further replies.
Back
Top