#ifndef EQUIPMENT_H
#define EQUIPMENT_H

#include "Item.h"

#include <stdint.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>

#include <vector>
using namespace std;

//Equipment, child of Item.

class Equipment : public Item {
 public:
  Equipment ();
  virtual ~Equipment ();

  uint8_t getAccuracyBoost ();
  uint8_t getDamageBoost ();
  uint8_t getHealthBoost ();
  uint8_t getPierceBoost ();
  uint8_t getArmorBoost ();
  uint8_t getLuckBoost ();
  uint8_t getEvadeBoost ();
  uint8_t getRechargeBoost ();

  void setAccuracyBoost (uint8_t x);
  void setDamageBoost (uint8_t x);
  void setHealthBoost (uint8_t x);
  void setPierceBoost (uint8_t x);
  void setArmorBoost (uint8_t x);
  void setLuckBoost (uint8_t x);
  void setEvadeBoost (uint8_t x);
  void setRechargeBoost (uint8_t x);

  uint8_t getLevelRequirement (uint8_t classID);
  void setLevelRequirement (uint8_t x, uint8_t classID);

  uint8_t loadEquipment (const string &);
  bool loadEquipmentHelper (xmlDocPtr doc, xmlXPathContextPtr xpathCtx, const string & xpath);

  bool getEquipped();
  void setEquipped(bool);

 private:
  vector <uint8_t> levelRequirements;
  uint8_t accuracyBoost;
  uint8_t damageBoost;
  uint8_t hpBoost;
  uint8_t pierceBoost;
  uint8_t armorBoost;
  uint8_t luckBoost;
  uint8_t evadeBoost;
  uint8_t rechargeBoost;
  bool isEquipped;
};

#endif
