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

struct HasRangedAttack : Condition
{
  HasRangedAttack(BWAPI::Unit* unit)
  {
    m_value = unit->getType().groundWeapon().maxRange() >= TILE_SIZE ||
              unit->getType().airWeapon().maxRange()    >= TILE_SIZE;
  }

  bool evaluate() const
  {
    return m_value;
  }

private:
  bool m_value;
};