Hello everyone! Im currently making buff system and occured a problem.
Simple example.
I have stat Damage.
int current = 10;
int max = 15;
int min = 5;
I have Buff,that increases/descreases damage by 6;
1)current(10) + 6 = 15(bigger than max(15), so current equals max)
Buff changed stat by 5,not by 6, so the question is, how can i know what value to return?
What is the best way to save info about actual value that was changed,because everytime making variable isnt great idea, when you change variable above/below max/min, and than need to return that value.
First idea i had, to create a method ChangeValue(string ChangeName,int value) that stores in a list
an object, with name and actual value, so i can access it later, but i dont think its a great way to do that.
Any help is appriaciated. If you are confused, ask, i will try to do my best to explain.