#pragma once
#include "../../../../Utils/Process/FSM/Condition.h"

static const double MIN_SHIELD_PCT = 0.5;

class ShieldRecharged : public Condition
{
public:
  ShieldRecharged(BWAPI::Unit* unit)
    : m_unit(unit)
  {
  }

  bool evaluate() const
  {
    if(m_unit->getType().maxShields() > 0)
      return (m_unit->getShields()/m_unit->getType().maxShields()) > MIN_SHIELD_PCT;	
	  return true;
  }

protected:
  BWAPI::Unit* const m_unit;
private:
  ShieldRecharged & operator=(const ShieldRecharged &);
};