I've been thinking about the structure of aan Item class. There are many itemitems which may or may not have effects in gamesthe game.
For example, an item "Herb" has an effect to "Heal HP by 5". but an item "Stone" has no effect.
As per a title, when you design a game, how do you structure the Item class?
The following is the structure I've come up with.
class Item{
String id;
// Status where s = HP, MP, ATK .. etc
// Integer -> value which affects on the Status
Map<Status, Integer> effect;
SignType st; // +, -, *, /
}
class Player{
Map<Status, Integer> status; // Status where s = HP, MP, ATK .. etc
}