#ifndef _ADDUNITTEMPLATE_H_
#define _ADDUNITTEMPLATE_H_

#include "allegro.h"
#include "gameConstants.h"

#include <string>
using namespace std;

struct AddUnitTemplate {
  string * unitType;

  fixed offsetDist;
  fixed offsetAngle;
  int numToMake;
  fixed angleSpread;
  fixed randomSpread;

  int attackNum;
  int cantAttackTime1;
  int cantAttackTime2;
  int cantAttackTime4;
  int cantMoveTime;
  int attackDelay;
  int costOfAttack;
  int moveForward;
  bool clickToUse;

  int subType;

  AddUnitTemplate (AddUnitTemplate * aut)
  {unitType = new string (*aut -> unitType); offsetDist = aut -> offsetDist; offsetAngle = aut -> offsetAngle; numToMake = aut -> numToMake; angleSpread = aut -> angleSpread; randomSpread = aut -> randomSpread; cantAttackTime1 = aut -> cantAttackTime1; cantAttackTime2 = aut -> cantAttackTime2; cantAttackTime4 = aut -> cantAttackTime4; cantMoveTime = aut -> cantMoveTime; attackNum = aut -> attackNum; moveForward = aut -> moveForward; clickToUse = aut -> clickToUse; costOfAttack = aut -> costOfAttack; subType = aut -> subType; attackDelay = aut -> attackDelay;}

  AddUnitTemplate (string * uT, fixed od, fixed oa, int ntm, fixed as, fixed rs, int aN, int cat1, int cat2, int cat4, int cmt, int mf, int ad, bool ctu, int coa)
  {unitType = new string (*uT); offsetDist = od; offsetAngle = oa; numToMake = ntm; angleSpread = as; randomSpread = rs; cantAttackTime1 = cat1; cantAttackTime2 = cat2; cantAttackTime4 = cat4; cantMoveTime = cmt; attackNum = aN; moveForward = mf; clickToUse = ctu; costOfAttack = coa; subType = subUnitNone; attackDelay = ad;}

  void setSubtype (int s)
  {subType = s;}
};

#endif
