• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Magic Resistance Ability using Items

Status
Not open for further replies.
Level 4
Joined
Feb 10, 2019
Messages
29
So I wanted to test out ghouls with a magic resistance ability they get a tier 2. Here's what I did tell me wht went wrong.

What I did was use "Magic Defense" (Human Ability) and edit its value and tech tree requirements and placed it into the ghoul yet it doesn't apply in the game? (Option 1)

I gave up on that and then I used the item "Runed Bracer" turned off (item Ability) and made it (Hero Ability). I then put that as the default active ability for ghouls. (Option 2)

Test Results:

First of all the icon is not showing in game so I cant confirm if its working when I tried option 2.

But with Magic Defense they become spell immune even though I set it to 40% resistance.... Though this one can confirmed is in the game.(option 1)


Also how do I make it cost gold and lumber instead of instantly leveling with tech tree advancement?

Can someone enlighten this noob.
 
You should use damage engine for best results, and then do a "level of ability X for unit equal to" condition check.


  • Spell Damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to True
      • DamageEventSource Equal to YourUnit
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of YourAbility for (YourUnit)) Equal to 1
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount x 2.00)
        • Else - Actions

The above trigger is just an increase in spell damage done by a certain unit.


Here is a spell resistance trigger:

  • Spell Resistance
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to True
      • DamageEventTarget Equal to YourUnit
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of YourAbility for (YourUnit)) Equal to 1
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount x 0.50)
        • Else - Actions



Make sure the ability you are giving to the unit doesn't actually do anything. It's just there for the condition check in the trigger.
 
Last edited:
But with Magic Defense they become spell immune even though I set it to 40% resistance.... Though this one can confirmed is in the game.(option 1)
Use a clone of Defence the ability of footman. Magic Defense has hardcoded spell immunity.

Also how do I make it cost gold and lumber instead of instantly leveling with tech tree advancement?
To add Gold/Lumber Costs add a Tech requirment for the ability instead of the townhall.
Create a Tech inside object Editors Tech section. Your Tech has no effect. It is only the requirement of the ability. Basicly clone that corpse tech
While the techs requirement is the Tier 2 hall.
It might also be needed to add the tech to ghouls used techs.
 
Level 4
Joined
Feb 10, 2019
Messages
29
Use a clone of Defence the ability of footman. Magic Defense has hardcoded spell immunity.


To add Gold/Lumber Costs add a Tech requirment for the ability instead of the townhall.
Create a Tech inside object Editors Tech section. Your Tech has no effect. It is only the requirement of the ability. Basicly clone that corpse tech
While the techs requirement is the Tier 2 hall.
It might also be needed to add the tech to ghouls used techs.


Thank it worked. Didn't know Magic Defense was hardcoded spell immunity btw.

Interestingly in Defend.

When adding Magic Resistance its best to go low like 0.2 or -1 while increasing it makes you take more dmg.

At 0.2 its roughly 82-83% magic resistance *(tested with blood mage flame pillar and 350hp ghoul).

And at 0.6 is roughly around 42-45%
 
Status
Not open for further replies.
Top