#ifndef BATTLEABILITY_H
#define BATTLEABILITY_H

#include <stdint.h>

#include <string>
using namespace std;

//Battle Abilities store data for abilties only useful during battle.
class BattleAbility {
 public:
  BattleAbility ();
  ~BattleAbility ();

  //set the recharge time as if the battle started.
  //Optional parameter indicates if there is a one-time recharge boost at the start of battle.
  void resetRechargeTime (uint8_t rt, uint8_t startTime=0);

  //adds to the timeSpentRecharging
  void addTime (uint8_t amount);

  //returns true if the ability has recharged
  bool abilityIsRecharged();

  //call when power has been used to reset the timeSpentRecharging and oneTimeRechargeBoost
  void useRecharge();

  //Recharges the fraction the power is recharged, rounded to the nearest 16th.
  uint8_t getRechargeFraction ();

  //returns the amount of time left to recharge
  uint8_t getRechargeTimeRemaining();

 private:
  bool oneTimeRechargeBoost;
  uint8_t rechargeTime;
  uint8_t timeSpentRecharging;
};

#endif
