• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

HP instead of Mana

Status
Not open for further replies.
Level 7
Joined
Aug 29, 2007
Messages
336
Right now I'm making a hero for the map Combowhore and I got the idea that the hero should use his HP instead of his Mana.
I thought I would be able to make it easily but(!) it wasn't as easy as it seemed.
In the start I thought of making a dummy cast a spell that damaged the hero, but then I remembered Spell Resistance.
Then I thought of just making the dummy attack the hero, but even with Chaos damage it will be reduced by the armor.
So my question is; How do I make the damage pure (not affected by anything)?
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Events
    • Unit - A unit begins casting an ability
  • Conditions
    • (ability being cast) Equal to ~your ability~
  • Actions
    • Unit - Set life of (Casting unit) to ((life of (Casting unit)) - x)
Whereas x is the variable defining the amount of hp being needed for using the ability.
This way you can upper/lower the hp for each level of the ability (if it has) by adjusting the variable.

Another way to do this should be following:
  • Events
    • Unit - A unit begins casting an ability
  • Conditions
    • (ability being cast) Equal to ~your ability~
  • Actions
    • Unit - Cause (casting unit) to damage (casting unit), dealing x damage of attack type Chaos and attack type General
If you want the hero/unit not to use his/her ability if his/her hp are at a certain level, use the condition
  • Conditions
    • (Life of (casting unit)) is greater or equal to y
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
damage type of Unknown (or spirit link) and attack type of something will do %100 damage to everything like chaos
 
Status
Not open for further replies.
Top