Storing different actor classes in a variable

Hello!

You may create a base class , for example “item” class, with all the functionalities for inventory system, pick up , market etc…

This will be the mother class of all your items, they will inherit those functionalities , you’ll have to create specific children classes from this class and add extra functionalities inside the derived class…

For example :
Weapons with attack behaviour
Armour with defense
Food with healing features