I need help making a spell that will on each cast reduce armor of an enemy. It also has a bleeding effect but thats taken care off since its just a normal dot spell. But i'm having issues making the -armor thingy. So far I've made a spellbook that has 5 levels and each level has an Item bonus armor ability that reduces its armor from -2 to -10 shifting by 2 each level. This is the trigger for it
It basically works but the problem is duration. I have no idea how to limit its duration and refresh it on each cast.
Code:
Stab
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Stab
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Stab minus armor general for (Target unit of ability being cast)) Equal to 0
Then - Actions
Game - Display to Players the text: Stab Level 0 added ...
Unit - Add Stab minus armor general to (Target unit of ability being cast)
Else - Actions
Unit - Set level of Stab minus armor general for (Target unit of ability being cast) to ((Level of Stab minus armor general for (Target unit of ability being cast)) + 1)
Game - Display to Players the text: Stab Level +1 added...
It basically works but the problem is duration. I have no idea how to limit its duration and refresh it on each cast.