Hi, i am fiddling around with an old abandoned game project I wrote. I want to add modifiers on my weapons such as +10 to +20 damage or +4 to strength. I am already using an enum for attributes such as the players strength and dexterity or weapon requirements. Another enum for magic alignment such as fire and ice for spells and resistance. The weapon damage itself, gold cost, speed, etc are just fields within the weapon class.
I am looking for a clean way to add modifiers to my items. I was thinking of creating a new enum with all the attributes, magical alignments, players stats, damage, etc and use that enum in a struct with a value field to modify the corresponding thing to modify. However, I don't see this as a very clean way. Can anyone suggest a nice and elegant way to create such a modifier that has the ability to change all kind of different character stats?
Thank you,