1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Spell] MultiShot - Hero Damage %

Discussion in 'World Editor Help Zone' started by C.B.King, Dec 6, 2019.

  1. C.B.King

    C.B.King

    Joined:
    Nov 6, 2019
    Messages:
    86
    Resources:
    0
    Resources:
    0
    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
     
  2. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    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
     
  3. Cespie

    Cespie

    Joined:
    May 21, 2019
    Messages:
    435
    Resources:
    0
    Resources:
    0
    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.
     
  4. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    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.
     
  5. Cespie

    Cespie

    Joined:
    May 21, 2019
    Messages:
    435
    Resources:
    0
    Resources:
    0
    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?
     
  6. GetLocalPlayer

    GetLocalPlayer

    Joined:
    Apr 11, 2018
    Messages:
    20
    Resources:
    0
    Resources:
    0
    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.