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. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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.

Blocking ranged damage by %

Discussion in 'World Editor Help Zone' started by Saishy, Feb 9, 2009.

  1. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    I did a spell based in defend that makes my unit slower (both MS and AS) and enable him to only take 20% of ranged attacks, but I found that defend only works with piercing attacks. I need to work with all kinds of ranged attacks (at least, unit ranged attacks).

    I also found that hardened skin don't accept % values :(
    Any ideas?
     
  2. Mechanical Man

    Mechanical Man

    Joined:
    Jan 18, 2005
    Messages:
    5,382
    Resources:
    39
    Models:
    30
    Icons:
    3
    Packs:
    1
    Maps:
    4
    Tutorials:
    1
    Resources:
    39
    It blocks also magic damage if that helps you.
     
  3. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    Its a hero map, so nope, it don't help.
     
  4. Child_0f_Bodom

    Child_0f_Bodom

    Joined:
    Jul 21, 2008
    Messages:
    1,113
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    I would suggest you making a trigger based on shield system which will absorb 80% damage if damage source is ranged. This is pretty hard although.
     
  5. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    Lol, impractical.
     
  6. Child_0f_Bodom

    Child_0f_Bodom

    Joined:
    Jul 21, 2008
    Messages:
    1,113
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    Any other suggestions?
     
  7. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    Some ability with ranged damage reduction?
    Or just use hardened skin with plain block.
     
  8. DarkLordX

    DarkLordX

    Joined:
    Dec 3, 2008
    Messages:
    189
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Hmm.
    I think the way Bodom explained is the one possible. Maybe there are others but I dunno them...
     
  9. SkriK

    SkriK

    Joined:
    Mar 26, 2004
    Messages:
    546
    Resources:
    34
    Icons:
    33
    Tutorials:
    1
    Resources:
    34
    Isn't elune's grace anti-ranged?

    EDIT: Sorry, only piercing there aswell.
     
  10. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    Ranged need some love :(

    Blizzard is strange, ranged have weird property, and when combined with orb effects its such a mess!
     
  11. wolfman

    wolfman

    Joined:
    May 31, 2008
    Messages:
    696
    Resources:
    0
    Resources:
    0
    • Untitled Trigger 003
      • Events
        • Unit - A unit Is attacked
      • Conditions
        • ((Attacking unit) is A ranged attacker) Equal to True
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Random integer number between 1 and 100) Less than or equal to 25 <--- 25% chance to use
          • Then - Actions
            • Set Health = (Life of (Triggering unit))
            • Wait until (Health Greater than (Life of (Triggering unit))), checking every 0.10 seconds
            • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Health - (Life of (Triggering unit))) x 0.80 <-- Reduces atk by 80%))
          • Else - Actions


    This should work. I tested it, there were some bugs but only when there were multiple units attacking. This shouldnt be a problem especially if there is only one unit on the map that has this ability, but if there are multiple just use variables. Also note that the attacked units hp does go down, but then back up quickly, so it actually gains back the hp, prolly a .1 second delay for it to regain the hp
     
  12. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    Uhm, Sry but I don't think that will work for me...
    I'm using a plain damage reduction til find a way to block % damage...
     
  13. wolfman

    wolfman

    Joined:
    May 31, 2008
    Messages:
    696
    Resources:
    0
    Resources:
    0
    Maybe im not understanding you or your not understanding me. Do you want a chance to block ALL damage? Or just something that always takes away a % of damage like it would take 80 damage instead of 100 if it blocked 20%
     
  14. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    I'm using hardened skin with only ranged blocking.

    So, I want a spell that all ranged attacks done to my hero are reduced by: 20/35/50/65/80 %
    If someone hits you for 100 damage, you will only take 20 with 80% reduction.

    But your trigger is not perfect, and will probably lead to lots of errors in my map, like a unit get attacked by a ranged attack and get hit by a nuke spell and the nuke is annulled...
    Also wait checking for conditions leaks and is not accuracy.
     
  15. toofless

    toofless

    Joined:
    Nov 9, 2008
    Messages:
    496
    Resources:
    0
    Resources:
    0
    It really leaks? I use these often, is it that bad?
     
  16. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    Its not a big issue at all. For me the main problem is accuracy.

    But, even if its not a big issue, it might be a problem if you call it every 0.05s for too much time...
     
  17. Thunder_eye

    Thunder_eye

    Joined:
    May 19, 2004
    Messages:
    265
    Resources:
    0
    Resources:
    0
    Perhaps a negative Trueshot Aura?
     
  18. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    lol, will affect enemies even if they aren't attacking the hero.
     
  19. Vegavak

    Vegavak

    Joined:
    Mar 16, 2006
    Messages:
    1,010
    Resources:
    0
    Resources:
    0
    I would just swap the icons and descriptions. Make piercing, ranged; and make ranged, piercing.

    In fact, I'm going to do that now seeing how I plan on using Defend in the future too.
     
  20. wolfman

    wolfman

    Joined:
    May 31, 2008
    Messages:
    696
    Resources:
    0
    Resources:
    0
    well it worked when i used it and this trigger does block percentage of damage
    Thats what it would do. But if it leaks and you think it would mess up your map then i guess you shouldnt use it. And i guess ur right about the nuke thing