generated from sigonasr2/CPlusPlusProjectTemplate
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
937 B
43 lines
937 B
#ifndef ITEM_H
|
|
#define ITEM_H
|
|
#include "pixelGameEngine.h"
|
|
using namespace olc;
|
|
#include "battle.h"
|
|
enum class ItemName{
|
|
COOKIE,
|
|
EGG,
|
|
PIZZA,
|
|
CRACKED_BAT,
|
|
LIGHT_JACKET,
|
|
KEY_TO_THE_PALACE,
|
|
};
|
|
|
|
namespace EquipSlot{
|
|
enum Equip{
|
|
WEAPON,
|
|
ARMOR,
|
|
ACCESSORY,
|
|
NONE
|
|
};
|
|
}
|
|
|
|
struct ItemStatsStruct{
|
|
int hpRecovery=0;
|
|
int ppRecovery=0;
|
|
int attack=0;
|
|
int defense=0;
|
|
EquipSlot::Equip equip=EquipSlot::NONE; //Whether or not this is equipment.
|
|
bool important=false; //If an item's important it can't be discarded.
|
|
bool consumable=false; //Whether or not this item is consumed when used.
|
|
};
|
|
|
|
class Item{
|
|
public:
|
|
std::string name;
|
|
std::string description;
|
|
Battle::Move*battlemove=nullptr;
|
|
ItemStatsStruct stats;
|
|
Item(std::string name,std::string desc,ItemStatsStruct stats={0,0,0,0,EquipSlot::NONE,false,false},Battle::Move*battlemove=nullptr)
|
|
:name(name),description(desc),stats(stats),battlemove(battlemove){}
|
|
};
|
|
#endif |