1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. 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.

Doubts

Discussion in 'Triggers & Scripts' started by Narg666, Mar 17, 2011.

  1. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Hello everyone, I want to know how to create spells like the Glaives of Wisdom from the Silencer (DotA) or the Burning Spear from Huskar (DotA). These spells are auto-casting spells that changes their attack. The Glaives of Wisdom add some pure damage based on your intelligence, and a floating text is shown over the target's head. But I know they don't use "Event - Unit Attacked" or "Event - Unit Damaged" because the first one will cause the floating text to be shown before the damage is dealt by the attack and the Unit Damaged would cause the floating text to be shown whenever the unit take any damage from the caster. I tryed with buffs, something like it:

    EXAMPLE ONLY

    Event - Unit Attacked
    Code (vJASS):

    local unit U = GetAttacker()
    local unit T = GetTriggerUnit()
    loop
          exitwhen UnitHasBuffBJ('BUFF', T) or (IsUnitAliveBJ(T) == false)
          call TriggerSleepAction(0.10)
    endloop
    call UnitDamageTargetBJ(U, T, 90.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL)
    set U = null
    set T = null
     

    This way, the spell is almost perfect, BUT, there is a problem, If I use an auto-cast spell, when you order your hero to cast the spell, it doesn't work.
    And the Silencer spell from DotA don't leave any buff.

    Anyone knows how exactly to do it?

    ----------------------

    Useless doubt, I wanna know wich magic resistance I can use to stack. Example: The Spell Damage Reduction don't stack with each other, I need another Magic Resistance spell to stack with it, can someone tell me?
     
  2. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    26,100
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Look at how they are implimented in DotA. Any MPQ editor should let you do this.
     
  3. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Credits to Weep for Damage Detection System
    Original trigger by me
    Unfortunately, I can only do Auto-cast mechanics
    Not "spell cast"
    Like in DotA, we can "orb-walk", right ?
    Activating the spell by pressing the hotkey and launch to the targeted unit
    I can only do auto-attack, sorry :D
    However, I left out my left-over work on "manually cast spell" trigger
    Others can check it to repair it if you want to
     

    Attached Files:

  4. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Can anyone tell me wich kind of magic resistance I can use to stack. Example: The Spell Damage Reduction don't stack with each other, I need another Magic Resistance spell to stack with it.

    Example: Unit have a skill that gives 35% spell damage reduction

    and if he wants to have a item that gives another 35% spell damage reduction

    he will have 70% spell damage reduction, how to do it?
     
  5. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Use Elune's Grace as base ability
    Set the "Data - Magic Damage Reduction" to your own needs
    By the way, spell damage reduction DOES NOT STACK DIRECTLY
    Like 35 + 35 = 70%, WRONG
    It has its own advanced calculation which will approximately ends up as 55% instead
     
  6. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    for a good spell reduction stack up, its best to customize everything... from the reduction value up to every damage dealt...
     
  7. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
    So which spell resistance you think they use in DotA, like spells from Pudge, Magina or Viper.
     
  8. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    All heroes have natural magic damage reduction for up to 25%
    Other items/abilities help this magic damage reduction such as:
    Flesh Heap
    Corrosive Skin
    Spell Shield
    Hood of Defiance
    etc
    It uses 3 basic magic damage reduction which is the: Natural Resistance + Ability Resistance + Item Resistance = Total Magic Damage Reduction (in % and does not stack directly)
    1. Natural Resistance (All heroes have this)
    2. Runed Bracers (May used for Items or Abilities)
    3. Elune's Grace (May used for Items or Abilities)
    These 3 are used in DotA Game
     
  9. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
    defskull

    Can u tell me how do I create a spell like: Natural Order from Tauren Chieftain (DotA)

    http://www.playdota.com/heroes/tauren-chieftain#skill485

    And can you see this topic and awnser it

    https://www.hiveworkshop.com/posts/1869937/

    Thank You.

    In my map, Natural Resistance is 0%, so I want the new "Natural Order" spell to reduce magic resistance, or reduce it from items/skills. (If the enemy have an skill that gives him 50% magic resistance, with the 5 levels of the natural order, it will be reduced to 0%)
     
  10. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    It affects both Magic and Physical damage reduction, is it ?
    Both Armor and Magic reduction is reduced to 80% from Natural Order
    I think it's pretty deep usage of vJASS, don't know it though
     
  11. Gekigengar

    Gekigengar

    Joined:
    Aug 20, 2009
    Messages:
    1,490
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    why not add a negative magic resistance abilities on the unit, and remove it later? :D (enemy unit effected by natural order)

    i use that a lot on my map. using some passives such as negative sight bonus (Goblin telescope) to reduce enemy's sight range when the spell is cast, it works just fine. (GUI MUI)

    you can use disabled spell book for passives that show icon, to remove the icons.
     
  12. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Not sure if it works but...
    If you have an ability based from a same benefit (+Magic Damage Reduction), I think the game will take ONLY the highest amount of value
    Like Level 1 Endurance Aura and Level 2 Endurance Aura (it will take Level 2 instead)
    If you have a positive magic damage reduction, and you add the negatified ones, will it work ?
    (Non-tested yet)
     
  13. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Yeah, I don't know if it works too... and Defskull, I think that two items with Elune's Grace stacks, but I don't know how, let me explain, I made a test-map where every damage taken by my hero will be shown as a number overhim, and then I made the Pudge from DotA, with all the same spells. I made two items of Magic Resistance based at Elune's Grace and the Magic Resistance of Pudge I made based at Spell Damage Reduction, when I test it, everything was fine, but when he have both items + his spell, it all stacks, example:

    (Natural Resistance used = 0%)
    Normal 100 Damage
    Skill 16% = 84 Damage
    Skill 16% + Item 35% = +-50 damage (I don't remember exactly, I made it yesterday)
    Skill 16% + Item 35% + Another Item 30% = +-30 Damage

    The items were based at ELUNE's Grace and the Skill at Spell Damage Reduction.

    Can you tell me how to make the item doesn't stack with another item but stacks with the skill?

    Thank you for your help and attention.
     
  14. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Well, I don't know that 2 same base ability (Elune's Grace + Elune's Grace = Stackable)
    If it does, well, it is MEANT to be that way, to be stacked with each other
    It's a hard-coded engine, we can't deny it
     
  15. Gekigengar

    Gekigengar

    Joined:
    Aug 20, 2009
    Messages:
    1,490
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    i beleive adding a negative magic resistance ability while having a positive one works, just like how it stack (but this one amplifies).

    so, damage x (%(Magic resistance + Natural Magic resistance) - Negative Magic Resistance (Amplifier)) which means it actually works as a reducer for the magic resistance.

    ----dont give up so fast lol, its not that complex def------------------
    anyways, i made one map for you,

    The unit with the elune's grace's magic resist will not stack with "Non-Stacking Runed Bracer" (another non-stacking runed bracer does nothing)
    Stacking runed bracer item can be stacked with elune's grace unit and another runed bracer,
    damage amplifier amplifies damage, works within stacking formula,

    for more information, use my test map. (**********READ******** ITEM DESCREPTION)

    http://www.hiveworkshop.com/forums/pastebin.php?id=oi0lxy

    Using this map
    you will be able to
    *Create a unit that with Magic resistance, that will not stack with Item's Magic Resistance
    *Create a unit with magic resistance, that can be stacked with item's Magic Resistance
    *Create an item that will not stack its Magic resistance however you accumulate the same item
    *Create an item that will stack its magic resistance with each other
    *Create Dota's Natural Order Spell with Damage Amplifier Ability that i made.
    if you read my item description carefully
     
    Last edited: Mar 31, 2011
  16. Narg666

    Narg666

    Joined:
    Aug 30, 2009
    Messages:
    112
    Resources:
    0
    Resources:
    0
    Almost perfect, just tell me how do I create a unit with Elune's Grace and stack it with only ONE item, like: I want the unit to have a normal magic resistance of 35% (Elune's Grace) and then it takes an item that gives more 35% (Spell Damage Reduction)
     
  17. Gekigengar

    Gekigengar

    Joined:
    Aug 20, 2009
    Messages:
    1,490
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    o.o ... trigger it maybe?
    lol, at least dota's hood of defiance is the stacking thing.

    i have a way, just give the item tinker upgrade ability (i dont know what its called, but it upgrades ability), like aganim. (dota reference)
    to upgrade the spell resistance. xD (That way it only stack once right?)

    hope that works, wish you all the luck xD
     
    Last edited: Apr 2, 2011