1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  4. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  5. The Secrets of Warcraft 3 have revealed interesting works. The RESULTS for Abelhawk's Mini-Mapping Contest #15 have come out!
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Night Rider gained several songs for his journey. The poll for the 12th Music Contest has started. Check it out!
    Dismiss Notice
  9. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Whats the best way to block an attack ?

Discussion in 'World Editor Help Zone' started by [E]clipse, Jul 27, 2015.

  1. [E]clipse

    [E]clipse

    Joined:
    Jan 6, 2015
    Messages:
    559
    Resources:
    0
    Resources:
    0
    So... I was thinking my block/evasion system of my campaign...

    How do I make a unit block attacks ? Whats the best way? Is it healing the unit as soon as it gets damaged ? Or is there a better way?

    I want the block chance to be defined by items carried by a hero. Do blizzard spells are not an option here. Any help ?
     
  2. SAUS

    SAUS

    Joined:
    May 22, 2015
    Messages:
    1,050
    Resources:
    0
    Resources:
    0
    There is an ability called "Hardened Skin" (I think... it's the ability on the mountain giant, anyway, or whatever the night elf rock giant is called).

    You can specify how much damage it blocks and the % chance. You can put this ability on items and it works.
     
  3. LordDz

    LordDz

    Joined:
    May 11, 2007
    Messages:
    4,308
    Resources:
    0
    Resources:
    0
    Well, the Night Elf hero Demon Hunter has a spell called "Evasion", there is also an item version of it.
     
  4. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,791
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    Using a damage detection system to block the damage event. This won't stop additional side-effects like the hit sound, though.
     
  5. EdgeOfChaos

    EdgeOfChaos

    Joined:
    Jan 8, 2014
    Messages:
    639
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Damage detection is definitely not necessary. Use the ability "Hardened Skin" which gives a chance to block # damage. Configure this and put it on your items.
     
  6. [E]clipse

    [E]clipse

    Joined:
    Jan 6, 2015
    Messages:
    559
    Resources:
    0
    Resources:
    0
    Okay... So I put the hardened skin or evasion ability on the item as some of you are saying. But then does it stack ? If not Ill have to use a bonusmod (importing errors and stuff) as said above by Zweliebchen.
     
  7. SAUS

    SAUS

    Joined:
    May 22, 2015
    Messages:
    1,050
    Resources:
    0
    Resources:
    0
    It does not stack. I think it checks if one will block damage and, if it doesn't, checks the next one.

    Evasion does stack, I think in the same way, except it blocks all damage and effects, so it doesn't need to add the damage reduction together.
     
  8. Arad MNK

    Arad MNK

    Joined:
    Dec 11, 2014
    Messages:
    1,889
    Resources:
    3
    Maps:
    2
    Spells:
    1
    Resources:
    3
    DDS (As Zwiel said) Is the best option, yet the Hardest one for Campaigns.
     
  9. [E]clipse

    [E]clipse

    Joined:
    Jan 6, 2015
    Messages:
    559
    Resources:
    0
    Resources:
    0
    Are you 100 % sure that evasion stacks ??
     
  10. SAUS

    SAUS

    Joined:
    May 22, 2015
    Messages:
    1,050
    Resources:
    0
    Resources:
    0
    I haven't used evasion in forever. I remember it stacking, but now I'm doubting myself lol. I am not 100% sure, so I would test it first. It would be hard to calculate how it stacks. I guess you could just hit the unit a bunch and calculate the % dodged attacks.
     
  11. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,624
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    Test evasions accumulated a total of 100%, see if it stacks.
    Much easier.
     
  12. [E]clipse

    [E]clipse

    Joined:
    Jan 6, 2015
    Messages:
    559
    Resources:
    0
    Resources:
    0
    Ok... Lemme check...
     
  13. Kakerate

    Kakerate

    Joined:
    Oct 18, 2013
    Messages:
    471
    Resources:
    0
    Resources:
    0
    Text from the Talisman of Evasion reads, "Does not stack with Evasion or Drunken Brawler."

    I would draw from this that Evasion doesn't stack. Probably for good reason. A Demon Hunter with 5 of these in his inventory could not be damage by attacks. Of course, the chance that he would get that many is minute, but still. The only way I could imagine Evasion stacking is if it somehow had some method of having diminishing returns or something. Perhaps if you have 30% evasion then pick up 10% more, the effectiveness of the 10% would be decreased by 30%? I don't know, seems overly complicated.
     
  14. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,936
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    I checked it with Daffa's method. It does not stack.
     
  15. SAUS

    SAUS

    Joined:
    May 22, 2015
    Messages:
    1,050
    Resources:
    0
    Resources:
    0
    From a coding standpoint, it actually isn't that complicated. All you have to do is run each chance separately. Check 30% chance. If it fails, check 10% chance. It will never be 100% chance unless one evasion chance is 100% on its own.

    I agree, though. Stacked evasion would be silly.
     
  16. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,791
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    You can just have one evasion ability and set its level dynamically. 1% evasion per level.
     
  17. [E]clipse

    [E]clipse

    Joined:
    Jan 6, 2015
    Messages:
    559
    Resources:
    0
    Resources:
    0
    @Zwiebelchen, Aahh......Is it possible via a DDS or a DMS ?
     
  18. Arad MNK

    Arad MNK

    Joined:
    Dec 11, 2014
    Messages:
    1,889
    Resources:
    3
    Maps:
    2
    Spells:
    1
    Resources:
    3
    None is needed. Just setting levels of evasion. (How did we all miss it??)
     
  19. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Ability types do not stack.
    Drunken Brawler, Evasion (including the talisman) are the same ability type so they do not stack.

    Evasion itself does stack.
    However, this has the same stacking algorithm as critical strikes in WC3.
    When hit, there is a separate check if the evasion succeeded and if one of them did, then you evaded the attack.

    The exact calculation (if I am not mistaken, rounded to factors between 0 and 1) is this:
    1 - (combined succession factor)
    succession factor is the chance that an attack did hit you.
    So when you have 70% chance to dodge, you have 0.3 succession factor.
    combined succession factor is all those succession factors combined, 0.3 X 0.5 X 0.5, etc, etc, etc.

    If the first one evades, the second check is still done, equal as all other checks, that is the whole point of running things separately.

    However, to solve your problem, you can just use the item version of evasion.
    Or if you have a proper coded map, your DDS should be able to block all additional effects because the additional effects are made on the DDS event that would be fired when the damage was successful, aka the afterDamage event... which people just refuse to implement.