• 🏆 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!

Spell that can damage and heal?

Status
Not open for further replies.
Level 7
Joined
May 15, 2009
Messages
169
I am about to start work on a system/set of triggers that will allow units to have increased spell damage or healing and well, thinking it through, I am already hitting some annoying walls.

My plan:
Simple enough, I will set a variable for each unit to represent their spell power. As annoying as it will be, I will set this.. manually... With the "unit acquires/loses an item" event; then check if item is equal to "blah" and add "X" to the spellpower variable. This seems like the easiest way to do it, assuming there will be multiple ways to get increased damage/healing.

My Problem:
Would that mean that every single skill in the game that uses healing or spell damage have to be a custom made skill? Something like chain light; or a large AoE skill, or a DoT skill, wouldnt be possible to base off a Blizzard-made skill, would it?

I am just really hoping that I am over looking something and someone might have a better idea that doesnt involve me triggering 40 abilities. Anything? Anything?
 
Instead of making a ton of custom abilities, you can actually just register the effects of all abilities that heal. For example:
  • HealTrigger
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • Or (Any Conditions are true) -
        • (Ability being cast) Equal to Holy Light
        • (Ability being cast) Equal to Heal
        • //etc... for whatever healing spells are in your map
    • Actions
      • Unit - Set (Target unit of ability being cast)'s life to (Unit life + <Spell power of Triggering Unit>)
Sorry, that is just psuedo code because I don't have the editor open. But overall, it would be something like that. However, AoE healing spells and HoT (Healing-over-time) will need to be custom triggered. :( However, the function above should work for all target cast instant healing abilities, so at least that will be good.

EDIT: Thanks Adiktuz. I forgot to add that. :p
 
Last edited:
Level 7
Joined
May 15, 2009
Messages
169
the above will work on basic AoE spells also; but then we get into things like cone shaped abilities, things like rain of fire, DoT AoE abilities (triggering the damage on that would be like making a skill anyways) and abilities like... burning ground, ect.

There are a handful of Blizzard-based abilities I can enhance with triggers I guess. Hopefully I can find a solid list that isnt boring.
 
Rain of Fire is a normal AoE spell, you can use the GetSpellTargetX and GetSpellTArgetY to obtain the center of the RoF aoe (or any other targeted circular AoE)...

as for the cone-shaped, you should trigger the missile yourself

Actually, I dont prefer enhancing the current Blizz abilities for this, I suggest making a custom ability based on the ability Channel (which is made specifically for triggering abilities), and just customize EVERYTHING... (that is if you want FULL CONTROL over your spells)
 
Level 7
Joined
May 15, 2009
Messages
169
Alright; so, custom abilities is the best way to go. My biggest downfall there is:

How do I trigger it so damage isn't done until the missle actually hits the target? Lets say I make a simple fireball spell. would I make the missile a dummy unit with a fireball animation, and move it every .03 seconds, then check when it came within X range of a target, and deal X damage?

would that be the "easiest" way to do it? Assuming I add a limiting factor to the cast range and all that fun stuff?
 
Status
Not open for further replies.
Top