So I've been trying to spice up the otherwise lacklustre supply of items, particularly weapons in the game. i was surprised to see so few event hooks for melee in the available XML (although maybe I shouldn't be, since really there aren't that many in the game)
For example, the Tear of Cyndrum has this hook:
Code: xml
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_HPFromKills</StrVal>
I expected it to be a little more robust. For example, I would have expected something like
Code: xml
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>OnKill</StrVal>
- <Stat>HP</Stat>
- <Value>3</Value>
This would allow for hooking into all kinds of on kill effects. But apparently, you can only either get mana or hp from kills, since these are the only hooks I see on kills.
For Melee, there is at least a way to specifiy an on hit event. The vial of poison for example has:
Code: xml
- <Attribute>MeleeAppliesSpell</Attribute>
- <StrVal>Poisoned1</StrVal>
This is good - it means that if you can make a spell do something, you can hook it into a Melee event. But you can't specify a target as near as I can tell. The melee always has to target whatever object is getting hit.
So let's say I want to make a sword that when it hits (not kills), gives the wielder 1 life (Vampiric sword) I'm pretty sure using the given hooks, from what I can see this is not possible.