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.
SeasonI/item.h

50 lines
1.2 KiB

#ifndef ITEM_H
#define ITEM_H
#include "pixelGameEngine.h"
using namespace olc;
#include "battle.h"
enum class ItemName{
COOKIE,
EGG,
PIZZA,
CRACKED_BAT,
TEE_BALL_BAT,
LIGHT_JACKET,
HEAVY_JACKET,
COPPER_BRACELET,
KEY_TO_THE_PALACE,
};
namespace EquipSlot{
enum Equip{
WEAPON,
ARMOR,
ACCESSORY,
NONE
};
}
struct ItemStatsStruct{
int hpRecovery=0;
int ppRecovery=0;
int atkIncrease=0;
int spdIncrease=0;
int hpIncrease=0;
Battle::Move*learnAbility=nullptr;
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={hpRecovery:0,ppRecovery:0,atkIncrease:0,spdIncrease:0,hpIncrease:0,learnAbility:nullptr,attack:0,defense:0,equip:EquipSlot::NONE,important:false,consumable:false},Battle::Move*battlemove=nullptr)
:name(name),description(desc),stats(stats),battlemove(battlemove){}
};
#endif