• 🏆 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!

[Spell] MultiShot - Hero Damage %

Status
Not open for further replies.
Level 7
Joined
Nov 6, 2019
Messages
186
ok simple and quick question, first, Yes i know how to set up multishot with barrage, but its not how i would like it

Basically, is it possible to set up Multi Shot, to hit, for example 2 enemy, but the damage it does, depends on the heros damage

so if hero has 20 damage and 80 bonus damage, how to i set the multishot to do 50% of that damage when hitting others

Basically cleave, where u set hero cleaves dealing 50% of original damage, but a multishot one

i can set up multishot to do 50 damage, but when ur higher level and have for example 500 damage, the multishot with barrage, will only deal 50 damage still, but at that point want it to be 250%, depending on the damage the hero has with weapons.

EDIT: Simpler to say, i want the Multishot to deal 50% of the heros current total damage including bonus, not a flat set damage for 10 for example
 
Level 39
Joined
Feb 27, 2007
Messages
5,028
You can update the damage of the barrage dynamically now, so you could run something like the following periodically:

  • Ability - Set Ability: (Unit: <THE UNIT>'s Ability with Ability Code: <THE ABILITY>)'s Real Level Field: Damage Per Target ('Efk1') of Level: 0 to <proper amount>
While it's possible to get a unit's base damage and range now (white damage) I'm unsure if it's possible to also get bonus damage (green damage) with a trigger. I've posted a thread about this here: Get bonus damage via trigger
 
Level 8
Joined
May 21, 2019
Messages
435
You can update the damage of the barrage dynamically now, so you could run something like the following periodically:

  • Ability - Set Ability: (Unit: <THE UNIT>'s Ability with Ability Code: <THE ABILITY>)'s Real Level Field: Damage Per Target ('Efk1') of Level: 0 to <proper amount>
While it's possible to get a unit's base damage and range now (white damage) I'm unsure if it's possible to also get bonus damage (green damage) with a trigger. I've posted a thread about this here: Get bonus damage via trigger
I get that it's a pretty low-brow solution, but couldn't you find this damage by running through or keeping track of the inventory?
i.e. Unit acquires Claw of attack +12... units attack bonus += 12.
Combine that with reading buffs like trueshot aura or inner fire.
 
Level 39
Joined
Feb 27, 2007
Messages
5,028
For items yes you can detect pick up and drop events and as long as you have a database that stores how much damage each item adds then yes it will work. You also have to consider that if it grants str/agi/int it may or may not increase a hero's damage depending on what its primary attribute is.

As for abilities I would say it's not practical. You can't ask the game "what buffs does this unit have", you have to ask it "does the unit have this buff"... so you have to actually loop over all possible buffs the unit could have that affect damage. Then you have to know what level the spell affecting it is if different levels add different amounts of damage, but buffs cannot have levels so actually every different level of every ability that adds damage must have a different buff. Then you have to store this information about each buff and the damage it adds in a database somewhere and be able to draw from it when necessary (hashtable). God forbid you have any triggered spells that increase damage/add abilities that increase damage without adding a buff because you'd never know about those (though you could additionally check for each ability). Even though a lot of this OE data is available for query now, I'm not about to do that shit for a map, no way.
 
Level 8
Joined
May 21, 2019
Messages
435
For items yes you can detect pick up and drop events and as long as you have a database that stores how much damage each item adds then yes it will work. You also have to consider that if it grants str/agi/int it may or may not increase a hero's damage depending on what its primary attribute is.

As for abilities I would say it's not practical. You can't ask the game "what buffs does this unit have", you have to ask it "does the unit have this buff"... so you have to actually loop over all possible buffs the unit could have that affect damage. Then you have to know what level the spell affecting it is if different levels add different amounts of damage, but buffs cannot have levels so actually every different level of every ability that adds damage must have a different buff. Then you have to store this information about each buff and the damage it adds in a database somewhere and be able to draw from it when necessary (hashtable). God forbid you have any triggered spells that increase damage/add abilities that increase damage without adding a buff because you'd never know about those (though you could additionally check for each ability). Even though a lot of this OE data is available for query now, I'm not about to do that shit for a map, no way.

Yeah, that sounds pretty damn bad I'll have to admit.
Maybe it would be easier to just push for Blizzard to add this functionality?
 
Level 4
Joined
Apr 11, 2018
Messages
24
You can use "Elune's Grace" ability to change attack damage by some multiplier value. You need its "Data - Damage Dealt" field where 1.0 means 100% attack damage, 0.5 - 50% attack damage, 1.5 - 150% attack damage e.t.c.

In new patches you can get attack type, damage type, and weapon type via triggers and change damage value to what you need. Abilities always use "Normal" attack type and damage type that's never "Normal". There's two exceptions:
- Cleaving ability uses its owner's attack type, but damage type is always "Enhanced"
- "Barrage" ability, for secondary targets, uses its owner's attack type AND "Normal" damage type as units' attacks do. Also "Barrage" ability uses "Whoknows" weapon type (despite the name "weapon type" in units' fields is actually "weapon sound").
You can catch dealt damage via triggers. If the damage type is "Normal" and the damage dealer has "Barrage" ability, you can be sure that the damage is coming from an attack and then reduce it.
 
Status
Not open for further replies.
Top