Well, the Player itself consists of the following stats right now:
- HP
- Atk
- Def
- Level
Thats pretty basic and I'll expand it later on with things like Mana, Magic Power etc...
The items should be boosting those stats. The things I'll on the items list will probably look something like this:
Item Number, Index Number (e.g. potions, weapons, etc.), ItemName, HP-Boost, Atk-Boost, Def-Boost, UpgradeTo, SellPrice, BuyCost, LevelRequirement, Atk-Requirement, Def-Requirment.
Its an option that I'll create seperate lists for the diffrent Categeries (Index Numbers) so that I'll be able to set things like duration for potions only. But thats not gonna happen before I've found a good and stable way for the inventory. At first its gonna be very inefficient because many boosts of item will end up as 0.
My idea was to create a class called item and looking somehow like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
class Item
{
private:
int ListNumber;
int IndexNumber; //category
std::string Name;
int HP-Boost;
int Atk-Boost;
int Def-Boost;
std::string UpgradeTo; //could be integer pointing to ListNumber of the upgrade
int SellPrice;
int BuyCost;
int LevelRequirement;
public:
Item();
~Item();
//Setters and getters to all variables above
}
|
I meant derived classes by abstract ^^. I'm sorry, I didnt learn programming in english (shame over me, YEAH IT WAS A MISTAKE) and I kinda end up messing up the words.
Encryption is a nice suggestion :D (Typed from my mobile, be merciful with grammar and syntax)
Thanks for the help :)