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

help me with an spell idea

Status
Not open for further replies.
Level 29
Joined
Mar 9, 2012
Messages
1,557
I have such an ultimate in mind for an chaos orc caster hero.
Fel Infusion: Infuses a friendly unit with chaotic energies, allowing it to deal chaos damage and regenerate 20% of its health for duration.
Lasts for 60sec.

Cant be cast on units that already have chaos dmg, heroes or mechanical.

Figured could be done through morphing the chaos orc unit into version with chaos dmg and back when the buff wears off.
But rather would like it to function on any friendly unit(fe. hired mercs) aslong as its not having already chaos dmg, and its too much work to create an fel dmg version of everything.

Is there another method to modify dmg type and how should this be structured ? also it will be used in an altered melee setting so the whole has to be MUI.
 
Level 10
Joined
Apr 4, 2010
Messages
509
Damage Detection System can modify the damage type and the healing part is pretty easy if you know dynamic indexing.

Set HP Heal = 20% of Target's Maximum Hp.
Set Duration = 60.00
Set Heal Per Second = HP Heal / Duration

Event Periodic Timer every 1 second
Set Hp Of Target = Hp Of Target + Heal Per Second
Set Duration = Duration - 1.00

Turn off Trigger if Duration is 0.00 or Healing Target is dead or Healing target doesn't have healing buff anymore, etc.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Regenerating the health is easy.
For the chaos damage though, you could try to use a damage engine to change the attacktype to chaos when that unit applies basic attack damage.

I hear Bribe talking a lot about his DDS where you can do that... or at least that is what I understand from it...
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,467
No damage system that works with natural WC3 damage can get the original damage before armor and which type of damage it was, so retroactively converting a unit's attack type to chaos is impossible without knowing how much min/max damage a unit has in the first place so that it can be re-applied without reduction. Even then, the attack type in the UI will remain unchanged.

Morphing is possible, but you have to make a copy of all units and have the right ability for each. Not a fun challenge.
 
Level 29
Joined
Mar 9, 2012
Messages
1,557
No damage system that works with natural WC3 damage can get the original damage before armor and which type of damage it was, so retroactively converting a unit's attack type to chaos is impossible without knowing how much min/max damage a unit has in the first place so that it can be re-applied without reduction. Even then, the attack type in the UI will remain unchanged.

Morphing is possible, but you have to make a copy of all units and have the right ability for each. Not a fun challenge.

So you are basically saying "its not possible, it would have been done longst ago if it was doable", ok.
In that case then will have to stay limited for chaos orc units only. Suppose i should able to do that through the morphing.

I have an additional question:
And what about an arrow type spell that reduces armor per hit ? Think about atc Incinerate but instead stacking the damage up per hit would reduce the armor by -1 per hit (but goes no lower than 0).
Is that one technically impossible too ? there is an orb ability doing the armor reduction but its passive, and then also faerie fire.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,467
So you are basically saying "its not possible, it would have been done longst ago if it was doable", ok.
In that case then will have to stay limited for chaos orc units only. Suppose i should able to do that through the morphing.

I have an additional question:
And what about an arrow type spell that reduces armor per hit ? Think about atc Incinerate but instead stacking the damage up per hit would reduce the armor by -1 per hit (but goes no lower than 0).
Is that one technically impossible too ? there is an orb ability doing the armor reduction but its passive, and then also faerie fire.

An easier way to reduce a unit's armor is to use stat modifier tricks, but you have to know in advance how much armor the unit currently has or else you're going to go below 0 if you remove too much (no way of knowing when the armor is 0 and armor is not an integer so you may end up with something like 0.9 armor even then). WC3 has a lot of accidental awesomeness but what the devs did not spend the right amount of time making possible for users is simply not possible without discovering useful bugs or using workarounds.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Natural damage no?
That is interesting.

Because I actually have one that reverts damage using an inverse of the armortype reduction factor and armor value reduction factor.
It isn't that hard, but it is quite heavy and should not be used for maps larger than normal melee maps.

You can really change the attack type in the onDamage event and it will apply newly calculated damage.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Well, I can get the attack type and damage type.
Which basically means that I can simulate damage by damaging the target again but now also checking its HP before and compare it to after to get the total damage value.
Then I divide that one by the amount of damage that I inserted into the simulation and I have the damage factor.

When using ridiculous numbers, you get a serious accurate armor value.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Well, because this is the action done for this check:
Disable trigger.
Give unit massive hp boost
Increase unit current hp to X
Apply Y damage
Calculate reduction factor
Remove massive hp boost
Reset hp to normal
Enable trigger.

And that is done twice because I also have to check if the damage would kill the unit before the damage will be applied.
Next to all other stuff, it is quite heavy.
It will still work on 8 player maps but 12 player maps or maps that would have more combat than melee maps, it is recommended to just abandon standard damage.
 
Status
Not open for further replies.
Top