#include <stdint.h>

#include "Player.h"
#include "PlayerDuringBattle.h"

#include <vector>
using namespace std;

PlayerDuringBattle :: PlayerDuringBattle ()
{
}

PlayerDuringBattle :: ~PlayerDuringBattle ()
{
}

void PlayerDuringBattle :: initialize (Player & pp)
{
  status.resize (AILMENT_TOTAL);
  status.assign (AILMENT_TOTAL, 0);

  //copy health from Player
  currentHealth = pp.getHealth ();
}

uint8_t PlayerDuringBattle :: getCurrentHealth ()
{
  return currentHealth;
}

void PlayerDuringBattle :: setCurrentHealth (uint8_t x)
{
  currentHealth = x;
}

void PlayerDuringBattle :: loseCurrentHealth (uint8_t x)
{
  if (x >= currentHealth)
    currentHealth = 0;
  else
    currentHealth -= x;
}

bool PlayerDuringBattle :: isDead ()
{
  if (currentHealth == 0)
    return true;
  return false;
}
