Ah!
I was planning to implement status-objects (buffs, debuffs, etc.) but I didn't think of following this same route with base-stats (str., def., etc.)
The way it works now is:
- There are "attack" objects, which all inherit from a base attack class (and may be composed of some other things in the future)—they do all the calculations given a character's stats and some damage multiplier. This will make it easier to give specific characters specific abilities. When performing an attack, one of these objects is created, passed to an attack-event, and an attack-handler applies all the appropriate damage.
- Items have the same attribute-map as characters. When items are equipped, an iterator just adds the appropriate item stats to the character stats by key (equipping, picking up items, etc. is actually handled by a handler, too, since it requires things like removing an item from a room and putting it in the character's inventory.)
This might be an inefficient system, but it's my first game~
Would creating a separate object for each "set" of stats really be less overhead than just using a map? Considering that attacks use these stats, items affect these stats, etc. I didn't really have dynamism in mind when I started using maps, I just thought it was the easiest way to store a base-attribute integer.