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

Mana Steal - Vampiric Aura

Status
Not open for further replies.
Level 30
Joined
Jan 31, 2010
Messages
3,551
Hello guys.

I need a twist on a Vampiric Aura for a map I'm working on. Basically, it will make melee units only recover mana with each hit; they will recover mana based on percentage of damage dealt via attacks. The spell should check for level of buff for amount of mana drained (increases with level). I need 20 levels for that skill, but I guess I can input that data myself.

So, a Mana Vampirism skill.

The spell needs to be fully MUI and MPI, and it doesn't matter to me if it's vJass or GUI made - as long as it works and does not leak - it's okay for me.

Credits and reputation award for the creator, as usual :)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
You need a DDS and check if the attacker has buff (Mana Steal Aura)
Then you make an aura (you can base if off from Devotion Aura or something similar to that)
Change the data fields and voila.

I am not sure if you can get the level of the buff via an aura though.
If not then you need my EOT System (signature) but that is not finished yet.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Well... I thought it was pretty simple.

1. Make an ability based of Devotion Aura.
2. Make a buff based of ... any buff.
3. Change the fields in the new ability to make it look nice for your spell.
4. Give the ability to your unit.

5. Download and import a Damage Detection System.
6. Create a trigger.
Events -> A unit takes damage (This is a custom event of the DDS. This is "Game - Value of Real Variable becomes ..."
Conditions -> Attacking unit has (buff) equal to true
Actions ->
Set TempUnit = Attacking unit
Set TempBuff = (buff)
Custom script: set udg_TempInteger = GetUnitAbilityLevel(udg_TempUnit, udg_TempBuff)
Set TempReal = (10 + (5 * TempInteger)
Set Mana of (Attacking unit) to (Mana of (Attacking unit) + TempReal)

This increases the mana of the attacker by 10 + 5*level
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
@Wietlol This is the request section, not the WEHZ or Trigger&Scripts where people ask for help, normally people post here when they pretty much know that they can not do something themselves but really need it.


On topic: Hmm, I may be willing to make it.

Q: Are you using any DDS or Unit Indexing System on your map or can I use one of my choosing ?
Q: Give me some numbers, how much does the mana drain increase per level, how much will be for each level ?
Q: Only melee units ? <-- this one is important...
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Sorry nedio95 :D
I would like to help more but without an editor... well... at least I can tell other people how it can be done.

Q: Only melee units ? <-- this one is important...
That is an interesting question.
Especcially because there is no DDS that can separate melee and ranged attacks.
You are required to rewrite basic attacks yourself.
 
Level 6
Joined
May 20, 2014
Messages
228
Does Vampiric aura not provide a buff to melee units only? You can check if an unit has the buff and then apply the mana steal to it.

Same idea for trueshot aura with ranged units.
 
Level 30
Joined
Jan 31, 2010
Messages
3,551
Yes, the ability will be based upon ladder Vampiric Aura with no stats, meaning only melee units will get the buff and proc the mana "steal'. However, if it's possible, I'd like to get mana steal on ranged units as well.

I'm not using any damage detection system in the map.

And about stats, I really don't know. I have to se it in action in my map to balance it properly, but lets say for now it does 1% od damage to mana recovery per level. 20 levels.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Does Vampiric aura not provide a buff to melee units only? You can check if an unit has the buff and then apply the mana steal to it.

Same idea for trueshot aura with ranged units.

Yes, after conducting a fast test that is how I will be making it, however, it is not quite right... there is no direct way of detecting the level of a buff.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
If the buff is not applied too often, then you can do it through using a damage detection in this manner:
*When damage is done check if the unit has the buff.
*If it does, find all allied units in a range that have the ability and consider only the highest level(This is one procedure).
*Decide manasteal amount based on the level that's now known.

Another way(cheaper):
*Periodically loop through all units that have the aura ability.
*Set an integer variable for each unit to the ability level
*When a unit deals damage, just check the associated variable to find out level.
This way has a cheaper worst-case scenario.
 
Level 30
Joined
Jan 31, 2010
Messages
3,551
@Wietlol, I see no obvious change or a reason valid enough, except for field modifications, which, may I add since you seem to push it, Bash has less modifiable fields you need to do than attribute bonus needs to get.
If you want to chit-chat, join the Chat or send me a VM/PM. I'm here to request a system, not to discuss the things that aren't of any importance to it.

@Daffa the Mage, well I think I'll be doing a single-hero system. Which means, only the Hero which has that ability will gain mana leech. Saves a lot of time and helps me balance it properly too :)
So yes, a single target system. I'd also like it to not be based upon a buff since it's a single-hero and it isn't needed, frees up some space from the status bar.

Now I have a question. Will damage detection system only proc on attacks or will also manaheal on spells? I would like it only on attacks if it's possible.
 
I'm very sorry for the pseudo code, but hope it sorts of help :)

  • Event
    • DamageEvent becomes equal to 1.00
  • Conditions
    • Level of YourAbility
    • DamageType is equal to Physical
  • Actions
    • Unit - Set Mana of (Source) to (Mana of Source + ManaIncrease)
YourAbility => The spell's fake ability for checking
ManaIncrease => Amount of mana gained from the attack
The DDS here is http://www.hiveworkshop.com/forums/...a-231846/?prev=d=list&r=20&u=looking_for_help

Wish I can directly make the map, but time doesn't permits :(
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Umm... did not notice all the chatter around...
The spell is done, but I will hold on it for a while because it is my first attempt at JASS spell and want to ask more experienced users for "anything to be fixed"

You may reffer here but please wait a day or two as someone may say "It is shit..."
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
I have included a link to the DDS in the DDS trigger and I will make a proper documentation in the next few days.

  1. Install DDS
  2. Copy Mana Vamp Aura Buff
  3. Copy Mana Vamp Aura Ability
  4. Copy MVASetUp (So far you must have "Automatically create unknown variables when..." checked as you have already imported the DDS)
  5. Copy MVAActivation
 
Level 30
Joined
Jan 31, 2010
Messages
3,551
Well, I must admit I might have been too sharp with you. But it's a well known fact that the third time I have to repeat myself, it's pretty much as you putting a knife in my hands, I'm not a known giver of fucks for those situations, lol :)

So my apologizes for that.
You're allowed, but I've stated multiple times that I need the system, not help in terms of explanations.
My fuse might be short, but I'm not valued for one of the most known hivers for that.

Anyways. Kill me, but how do I detect amount of damage dealt?
Tried with "PDD_amount" but it seems it's for something else. Haven't found any other real or integer I could use, or I missed one.

Unit - Set mana of PDD_source to ((Mana of PDD_source) + ((PDD_amount / 100.00) x (0.50 x (Real(Level of Soul Vampirism for PDD_source))))))
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Well... because you really want to see a trigger... here ya go:
  • Soul Vampirism
    • Events
      • Game - PDD_damageEventTrigger becomes Equal to 1.00
    • Conditions
      • (Level of Soul Vampirism for PDD_source) Greater than 0
    • Actions
      • Set TempReal = PDD_amount
      • Set TempReal = (TempReal x (0.50 x (Real((Level of Soul Vampirism for PDD_source)))))
      • Unit - Set mana of PDD_source to ((Mana of PDD_source) + TempReal)
I think that your trigger worked but you regenerate only 0.1 - 0.2 mana.
So after 7 attacks you can see that you have regenerated 1 mana... if you at least turned mana regeneration off.

Also try to split the calculations into different phases and end with (current + increase) at all cost... just a hint to be able to change it later on. If you use JASS it is no problem though.
 
Status
Not open for further replies.
Top