• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

A Passive Vampiric Potion

Status
Not open for further replies.
Level 2
Joined
Dec 29, 2004
Messages
20
Aight this is what i have in mind; this is for a Unit I'm making.

Basically Every time the unit attacks there is a chance that the unit attacking will have Vampiric Potion casted on him.

But the thing is, THis can't be done (unless you guys tell me otherwise) in GUI because of the fact that Vampiric Aura is not a castable ability thus, I can't use a dummy unit to cast it. And If I gave the hero Vampric Potion and made him cast it, that whould interrupt his attack and possibly cause him to attack somone else. doing this multiple times can be Extremely annoying.

So now I am looking for somone who knows the basic JASS coding for this type of ability. I have heard that this type of ability is rather easy to do using JASS. another alternative I have is using an item slot but I'd rather not do that.

any help on this will be great :D
 
Level 7
Joined
May 16, 2004
Messages
355
Well I'm not sure what that would do but my suggestion is this, when he attack have your trigger with its chance and all, then just put in a healing function(order attacker to damage attacker for X) with X being your calculation of his damage times the percentage for the level of his ability. To figure out his damage go (base damage + prim atti)+ sides per dice I think thats the proper one, to make it even better make it multiply by a random number in between his max and min damage, it wont abosrb based exactly on the exact damage he deals but its better than nothing for now
 
Level 2
Joined
Dec 29, 2004
Messages
20
you can place an AOE on the ability? I will have to look into this :D

EDIT: I found a rather good solution
a Dummy Unit casting Inner Fire + Giving him Lifesteal

It whould seem to work pretty well, since people whould be able to see how long the thing is gonna last without being a frankenstien of a job.

Now the only thing I need to figure out is what Is the proper trigger I need to make that represents that every time he attacks theres a x% chance to cast the trigger.

I have absolutly no experiance with the random Number generator so its hard for me to figure out :lol:
 
Level 7
Joined
May 16, 2004
Messages
355
Well I don't know about that Inner fire idea, how does that work? But you could use WEU, since it has an event "Any unit takes damage" then just set conditions such as "damage source=(hero guy)" and "Damage type of (damage taken)=Hero" that second is to insure its his attack and not just a spell cast. I haven't tested but I think this should work
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
The only way I can think of is to give the unit a vampiric aura which affects only the caster... In that case, the icon will appear unless you turn off the ability with Player - Turn on/off ability. And even so, I'm not sure it will work. As an ultimate case, you can give the ability to a spellbook, give the spellbook to the hero when needed and turn the spellbook ability off for the (Owner of (Casting Unit))

~Daelin
 
Status
Not open for further replies.
Top