#pragma once
#include "../Command.h"

class UsePsionicStormCommand : public Command
{
public:
  UsePsionicStormCommand(BehaviorState& state, BWAPI::Position stormPosition)
    : Command(state)
    , m_stormPosition(stormPosition)
  {
    assert(m_stormPosition.isValid());
  }
  virtual bool execute(BWAPI::Unit* unit) const
  {
    assert(unit->getType() == BWAPI::UnitTypes::Protoss_High_Templar);

    return unit->useTech(BWAPI::TechTypes::Psionic_Storm, m_stormPosition);
  }
protected:
  virtual void _output(std::ostream& out) const
  {
    out << "PsionicStorm " << m_stormPosition;
  }

  const BWAPI::Position m_stormPosition;
};
