I would like to make a Cleansing Potion that remove 1 negative buff (debuff) from the hero. Any idea how to make this? I prefer using data editor only but if there is a simple method with trigger I will consider too.
1 specific one or a random one? I guess a specific one should be very easy :p but removing a random one should be almost impossible using only data (at least I have no idea how to make this)
However the only way for triggers I can think of would be making a kind of database for all possible buffs, check, which one the unit has and remove one of them.
Wasn't there a limit for set effects? Thats why I did not suggest this way. Not to mention that it will remove 1 random buff, but does not check, if the unit has that buff, so in like 90% of the uses, it will do nothing.
If you want to pick a random buff, check if the unit has the buff, if it has then remove, if not then repeat with another buff, then that's probably more trouble than it's worth. Certainly possible using loops and validators, but far too much effort.
Make a trigger with a local variable. The local variable is the behaviour count on whatever unit uses the item. Make an action that removes a behaviour at random index 1-x where x is your local variable.
Give your item a dummy effect and have the trigger run when that dummy effect occurs. Not elegant but should work.
I would like to make a Cleansing Potion that remove 1 negative buff (debuff) from the hero. Any idea how to make this? I prefer using data editor only but if there is a simple method with trigger I will consider too.
Thanks in advance!
1 specific one or a random one? I guess a specific one should be very easy :p but removing a random one should be almost impossible using only data (at least I have no idea how to make this)
However the only way for triggers I can think of would be making a kind of database for all possible buffs, check, which one the unit has and remove one of them.
Make a "Set" effect. Make a "Remove Behaviour" effect that removes each of the debuffs in your game. Yes, I know this can be time consuming.
Now go back to your set effect. Go to "Effect - Random" and enable it. Now set Effect - Minimum Count and Effect - Maximum Count both to 1.
Now go to your item. I'm assuming you already know how to make items. Make it Effect - Instant. Under effects, give it your set.
There. Simple.
@Eiviyn: Go
Wasn't there a limit for set effects? Thats why I did not suggest this way. Not to mention that it will remove 1 random buff, but does not check, if the unit has that buff, so in like 90% of the uses, it will do nothing.
Well you said "random buff" in your post above!
If you want to pick a random buff, check if the unit has the buff, if it has then remove, if not then repeat with another buff, then that's probably more trouble than it's worth. Certainly possible using loops and validators, but far too much effort.
Make a trigger with a local variable. The local variable is the behaviour count on whatever unit uses the item. Make an action that removes a behaviour at random index 1-x where x is your local variable.
Give your item a dummy effect and have the trigger run when that dummy effect occurs. Not elegant but should work.
Thanks for the suggestion! I'll test each method and see which works better!