better lifesteal for wraiths

Is it possible to change the wraith heal on kill, from either squad kill to individual unit kill, or to completely change it to health from a fraction of the damage dealt? The current method just feels awful to see a champion hit a full group of footmen for 99% of their health, and not heal.

The same applies to the mana gain, which, in addition to feeling awful, is a complete waste of a unit slot.

6,476 views 11 replies
Reply #1 Top

Unfortunately this is one of those things that is poorly hardcoded. The only thing you can really do is have the amount of life gained go up with the unit's level, like "gain 4 (+1 per level) hitpoint for each killed unit".

Reply #2 Top

Hmmm... while the existing mechanics are indeed subpar for that purpose, I don't think it would be that hard to use MeleeAppliesSpell to do a self heal?

Reply #3 Top

Yeah that's no problem, but you can't have it trigger from killing something.

 

Reply #4 Top

Well I kind of meant using both. That way, you heal some when you hit, and some when you kill (at least I think that's what the OP wants).

Reply #5 Top


Well, if there is a spell on hit modifier, I can do it.

I can easily make a new spell for it to proc, and I could even make it scale off of attack, if spells can do that, or just off level if they can't. Thank you for the help, this is precisely what I needed to know.

Reply #6 Top


Well, I succeeded in making my sovereign unkillable, as the effect procs when my units are hit, rather than when they hit enemies. I used the shrink mace as an outline, and made a level scaling self buff. I don't know what I'm doing wrong at this point.

Reply #7 Top

Post your XML.

Reply #8 Top


I tinkered around more, and cannot make one bit of sense of this effect. I've tried heal, debuff, buff, other types, and self, enemy, and friendly targets, and now all it does is instantly heal every target to full health, even though it would be mathmatically impossible for them to heal more than 1 health per hit.

 

Code: xml
  1.         <SpellType>Tactical</SpellType>        
  2. <SpellClass>Defensive</SpellClass>        
  3. <SpellSubClass>heal</SpellSubClass>        
  4. <SpellTargetType>self</SpellTargetType>
  5.         <GameModifier>            
  6. <ModType>Unit</ModType>            
  7. <Attribute>CurHealth</Attribute>            
  8. <Calculate InternalName="Calc1" ValueOwner="CastingUnit">                
  9. <Expression><![CDATA[[Unit_GetLevel]]]></Expression>             </Calculate>            
  10. <Calculate InternalName="Calc2" ValueOwner="CastingUnit">                
  11. <Expression><![CDATA[[UnitStat_CombinedAttack]]]></Expression>             </Calculate>            
  12. <Calculate InternalName="Value">                
  13. <Expression><![CDATA[[Calc1] * 0 + [Calc2] * 0 + 1]]></Expression>            
  14. </Calculate>         </GameModifier>

 

Code: xml
  1.             <GameModifier>                
  2. <ModType>Unit</ModType>                
  3. <Attribute>MeleeAppliesSpell</Attribute>                
  4. <StrVal>Vamp</StrVal>                
  5. <Provides>A sucessful strike heals based on attack</Provides>            
  6. </GameModifier>

 

It's probably some wierd thing where the caster is actually the target or some such wierdness.

Nope. I cannot fathom the depth of how wrong this is going. I turned all the values to 0, and everything still heals to full every time I hit anything.

Not only have I started a new game for each of these tests, but I don't have any saved games at all. I'm so confused.

Reply #9 Top

This is probably due to the way these spells are casted, the "CastingUnit" is no longer the attacking unit (it's simply applying an effect and doesn't have a proper reference back to that unit). So you're getting some numbers that don't exist. Try something more simple, like <Value>3</Value> instead of using Calc.

Reply #10 Top

To have it apply to your own unit you must put <ApplyToCaster>1</ApplyToCaster> inside the modifier. MeleeAppiesSpell is by its nature an offensive spell, so giving it "Self" will do nothing.

Your Value calculation is too long. Each line of calculation can only hold 2 numbers (x +-*/ y). Use multiple calculation lines, but you have to break it up.

Reply #11 Top


Yeah, that fixed it once I put everything in the right place. Now I just have to make it not completely overpowered.