Of course this is possible. You will have to use a three levels skill based on the item skill which increases maximum hit points (search for it). First level will have level 1 bonus, second level bonus for level 2 and so on... I'll call this ability "Vitality (dummy)"
To spell cast by the caster will obviously be a dummy ability, maybe base it off berserk with no effects. I'll name it Vitality. And now there are two ways: Make the spell dispellable, or of course not.
1) Dispellable
Give the duration of the berserk dummy ability to the real duration of the spell (ex: 20/25/30 seconds). It must have an unique buff of course (I'll call it Vitality (buff)). And now let's go to the trigger:
Event - An Unit Starts the effect of an ability
Conditions - Ability being cast equal to Vitality
Actions - Unit - Add Vitality (dummy) to (Triggering Unit)
- Set Level of Vitality (dummy) for (Triggering Unit) to (Level of Vitality for (Triggering Unit))
- Wait 0.10 seconds
- Wait for Condition (Triggering Unit) has Vitality (buff) equal to false checking every 0.10 seconds
- Remove Vitality (dummy) from (Triggering Unit)
2) Undispellable
This is very simple. Just give a 0.01 seconds duration to the Vitality ability, no buff necessary. And now let's go to the trigger:
Event - An Unit Starts the effect of an Ability
Conditions - Ability Being Cast equal to Vitality
Actions - Add Vitality (dummy) to (Triggering Unit)
- Set Level of Vitality (dummy) for (Triggering Unit) to (Level of Vitality for (Triggering Unit))
- Wait (20+(5*((Level of Vitality (dummy) for (Triggering Unit))-1))) seconds
- Remove Vitality (dummy) from (Triggering Unit)
*******
That's all!
~Daelin