Re: increase stats (temporally) when wearing complete armor
Posted: Sun Oct 06, 2013 11:29 pm
So I've just finished working on a big implementation of this concept, and man that was a lot of work! There are always interesting unforeseen issues that crop up when doing something this complex.
For example, one of the armor sets bestows a continuous "Rage" bonus, but if you then drink a rage potion the timer gets reset and it thus expires pretty soon. So I had to adjust the potion code to check beforehand whether the champion already has a rage bonus from the armor set.
When working with different champions and different flags to keep track of things, it is ESSENTIAL to always use champion:getOrdinal() rather than just the getChampion(1), champion(2) etc (to avoid problems if the player moves party members around), and this complicates the code in many places.
Anyway, after I do a full playthrough of the mod again (with all my other updates in place) I'll see if there are any remaining bugs before I show the armor set code.
For example, one of the armor sets bestows a continuous "Rage" bonus, but if you then drink a rage potion the timer gets reset and it thus expires pretty soon. So I had to adjust the potion code to check beforehand whether the champion already has a rage bonus from the armor set.
When working with different champions and different flags to keep track of things, it is ESSENTIAL to always use champion:getOrdinal() rather than just the getChampion(1), champion(2) etc (to avoid problems if the player moves party members around), and this complicates the code in many places.
Anyway, after I do a full playthrough of the mod again (with all my other updates in place) I'll see if there are any remaining bugs before I show the armor set code.