#include "stdafx.h"
#include "PsionicStorm.h"

void PsionicStormScenario::onSparStarted(void*)
{
  const std::set<BWAPI::Unit*>& units = BWAPI::Broodwar->self()->getUnits();
  BWAPI::Unit* unit = NULL;
  for (std::set<BWAPI::Unit*>::const_iterator it = units.begin(); it != units.end(); ++it)
  {
    if((*it)->getType() == BWAPI::UnitTypes::Protoss_High_Templar)
    {
      unit = *it;
      break;
    }
  }

  m_templarBehavior = new HighTemplarUnitAttackBehavior(this, 150, unit);
  m_templarBehavior->start();
}

void PsionicStormScenario::onSparEnded(void* data)
{
  Scenario::onSparEnded(data);
}