#ifndef _UNITCREATE_H_
#define _UNITCREATE_H_

#include "allegro.h"
#include "Unit.h"
#include <string>
using namespace std;

//basically a struct telling unitList what unit to make and where.

class UnitCreate {
 public:
  UnitCreate ();
  UnitCreate (string, int, int, int, int, int, fixed, fixed, fixed, int, Unit *);
  ~UnitCreate ();

  void setAngle (fixed a);
  fixed getAngle ();
  bool angleSet ();

  string * unitType;
  int affiliation;
  int numToCreate;
  int side; //1-11. 1 starts in the upper left corner and rotates clockwise. 9 is the center. 10 means exact positioning, and posX and posY should have meaningful values. 11 means random distribution.
  int unitCreateRule; //remember to use ^ operators for the rules
  int timeToCreate; //create this unit when time == 0
  int enemiesToCreate; //create this unit when there are fewer than these enemies
  int sub; //subunitTypes

  fixed posX, posY;

  Unit * own;

 protected:
  bool anglSet;
  fixed angl;
};

#endif
