#pragma once
#include "../../Interface/Actions/Attack.h"
#include "L2GroupTacticalAction.h"

class L2Attack : public virtual Attack, public L2GroupTacticalAction
{
public:
  L2Attack(const Process* parent, unsigned int priority, const PersistentUnitGroup* initialGroup/*, target */) 
    : Attack(parent, priority, initialGroup)
    , L2GroupTacticalAction(parent, priority, initialGroup)
    , GroupTacticalAction(parent, priority, initialGroup)
    , TacticalAction(parent, priority)
    , Process(parent)
  {
  }

protected:
  virtual void onStartImplementation();
  virtual void onCancelImplementation();
  virtual void onEndImplementation();

  virtual void _output(std::ostream& out) const
  {
    Attack::_output(out);

    out << "Attack(" << getGroup()->getName() << ")";
  }

  virtual void onUnitAddedToGroup(void*, BWAPI::Unit* unit);
  virtual void onUnitRemovedFromGroup(void*, BWAPI::Unit* unit);
};

