This is a followup to the question I asked here:
http://stackoverflow.com/questions/3445398/class-hierarchy-data-design-in-an-rpg-game-vb-net
I understand the answer in the post above, which is absolutely amazing, by the way. It's about implementing interfaces with a class. However, what if a class needs to share features with another class?
Yes, that class can an Interface. However, let's use this sample definition.
An ITEM can be USED or EQUIPPED
An EQUIPPED ITEM can be either ARMOR or a WEAPON
A USED ITEM either heals the team, casts MAGIC, or damage the opposing team.
Certain EQUIPPED ITEMS can function as a USED ITEM.
Certain EQUIPPED ITEMS can cast magic.
Or, in other words:
An equippable item can perform acts outside of its typical usage of a shield or weapon. But not all items can act as a sheid or weapon.
I mean, I could create a class that implements IWeapon, IShield, IMagic, IUseableItem, etc. But there should be a better way than returning NULL when those interfaces are called.