• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to modify the base damage of a unit?

Status
Not open for further replies.
Level 3
Joined
Oct 20, 2017
Messages
52
Hi, I'm having trouble trying to create a hero's ability that permanently increases his base damage, but I can't find a trigger function that modifies a unit's base damage. Is it possible to do that?
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
upload_2020-8-10_11-37-47.png
 
Level 3
Joined
Oct 20, 2017
Messages
52
I realized that it does not have this function in the WE of the W3 TFT. It seems that I will have to update my map to the version of WE W3 Reforged if I want to have this function ; -;
 
Level 19
Joined
Feb 27, 2019
Messages
590
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit - Set Unit: (Triggering unit)'s Weapon Integer Field: Attack Damage Base ('ua1b')at Index:0 to Value: 1
      • Unit - Set Unit: (Triggering unit)'s Integer Field: Defense Type ('udty') to Value: 1
Perheaps its more hidden and hides somewhere inside these?

Otherwise you could try to add an upgrade to the Hero and increase the level of the upgrade.

Oh, isnt there an item that permanently increases attack damage? Just give the item to the hero whenever a damage increase is needed.
 
Last edited:
Level 3
Joined
Oct 20, 2017
Messages
52
Problem that is an accumulation skill. Example Q of Nasus from League of Legends,that is, it is an infinite accumulation skill.
 
Last edited:
Level 19
Joined
Feb 27, 2019
Messages
590
To add a value to a value you can choose Arithmetic in the value field which will allow you to set the value to 1+1 or in this case
  • Unit - Set Unit: (Triggering unit)'s Weapon Integer Field: Attack Damage Base ('ua1b')at Index:0 to Value: ((Unit: (Triggering unit)'s Weapon Integer Field: Attack Damage Base ('ua1b') at Index:0) + 1)
You could also get the desired effect in another way

Create a custom ability from Item Permanent Damage Gain
Create a custom item with said ability and choose Actively used = True, Number of Charges = 1, Perishable = True

then simply

  • Hero - Create Permanent Damage Gain and give it to (Triggering unit)
Each time the hero recieves the item the attack damage will increase by the value selected in the ability
 
Level 3
Joined
Oct 20, 2017
Messages
52
The first method I did not find this function in the triggers (remembering that I am using WE 1.26) and the second method did not work, because every time I activate the trigger it gives a new item that is filling the space in the inventory until it is full, after 6 items it starts to drop.
 
Level 19
Joined
Feb 27, 2019
Messages
590
The first method I did not find this function in the triggers (remembering that I am using WE 1.26) and the second method did not work, because every time I activate the trigger it gives a new item that is filling the space in the inventory until it is full, after 6 items it starts to drop.
I seem to have forgotten a most important option on the item for the second method being: Use automatically when aquired = True
It is possible to do this in jass?
You could try this but it might not be compatible with your editor version

  • Custom script: call BlzSetUnitBaseDamage( GetTriggerUnit(), ( BlzGetUnitBaseDamage(GetTriggerUnit(), 0) + 1 ), 0 )
call BlzSetUnitBaseDamage( GetTriggerUnit(), ( BlzGetUnitBaseDamage(GetTriggerUnit(), 0) + 1 ), 0

I got the text from creating a new trigger, adding desired action which has the function I want for the custom script, highlight/select the trigger >edit >convert to custom text
 
Last edited:
Status
Not open for further replies.
Top