#ifndef _UNITTEMPLATE_H_
#define _UNITTEMPLATE_H_

#include "allegro.h"
#include "AddUnitTemplate.h"
#include "UnitInput.h"

#include <vector>
#include <string>
using namespace std;

//UnitTemplate stores information on a Unit.
//It also handles the animation of the sprite. (usually called on by unit.)
class UnitTemplate {
 public:
  UnitTemplate ();
  ~UnitTemplate ();
  void deleteBitmaps ();

  void setStatus (vector <string>, int);
  vector <vector <BITMAP *> *> * getVecPics ();

  //animation
  vector <vector <BITMAP *> *> * vecPics;
  int holdFrameForCurrent;
  vector <vector <int> *> * holdFrameFor;
  int numLoopsCurrent;
  vector <int> * numLoops;
  vector <int> * loopAfterFrame;
  vector <int> * loopToFrame;
  vector <AddUnitTemplate *> * addedUnits;

  string unitType;
  int affiliation;

  //unit's properties (ethereal, bounces, outofbounds, etc)
  int unitPropertyHitbox;
  int unitPropertyDefense;
  int unitPropertyStatus;
  int unitPropertyPlayer;

  int maxHP;
  int timeToLive;
  int costOfAttack;
  int juiceForPlayer;

  fixed walkMag;

  //damage
  fixed hitkbDir;
  fixed hitkbMag;
  int hitkbDur;
  int damageDealt;
  vector <int> * goodStatusDamage;
  vector <int> * badStatusDamage;

  vector <SAMPLE *> * soundsToPlay;

  //AI for UnitInput
  UnitInput * uI;

  bool isThePC;

  int alignStyle;
  fixed alignDist;
  fixed alignAngleMin;
  fixed alignAngleMax;

 protected:
};

#endif
