/* ==================== map_specials.h ==================== version 0.0.1 ==================== map specials CHANGELOG: ---------------------- 0.0.1 - TO-DO & EXPANSION LIST ---------------------- copy constructors ERROR: no map set - time tick function(s) - a million other things :-) - gravity wells? (go faster/slower around them) - teleporters ? =============================================================== */ #ifndef MAP_SPECIALS_H #define MAP_SPECIALS_H // defined elsewhere: class Map; class Pod; enum special_type { WELL=0, TBOMB, ETAB, PTAB, MINE, FLAG }; // SPECIAL - base class for all specials --------\/---------- class Special { public: // *structors Special(); virtual ~Special(); // call derived class destructor first, then base class // functions special_type GetType(); // returns the type of special int GetXPos(); int GetYPos(); bool Place(); // (TODO) puts the special on the map. 1=success, 0=not placed // TODO bool IsVis(int a); // if visable on the map to your axis; a=axis# - 1=yes, 0=no // TODO int GetTime(); // TODO void Collect(Pod* pod); // collects the special for the owning pod. virtual void Tick(); // increases time for special by one. // some specials have time-sensitive actions to be independently triggered in the derived class static void SetMapPointer(Map &incoming_map); protected: // stats special_stype s_type; // type of special int x; // X map coord int y; // Y map coord int t; // time in existence / number of turns since placed, not including the placing turn //functions // TODO: void Remove(); // removes special from off the map - kept in the game though // TODO: void Destroy(); // completely destroys the special from the game and memory }; //------------------/\------------------------------------ /* WELL ------------------\/---------------------------- Wells are specials that are sparingly sprinkled throughout the map and provide continueous regeneration of energy tabs (etabs). Etabs "grow" around a well. That is, the well places etabs in the general vicinity around itself. The rate and amount it produces varies by well. Also varying are the relative strengths of the etabs it produces, the distance from the well etabs can fall into, consistency of etab strengths produced, and the lifespan of the well, after which it dies and stops producing any more etabs. */ class Well: public Special { public: // *structors // -1 below indicates RANDOM default Well(int x=-1, int y=-1, int s=-1, int r=-1, int v=-1, int ls=75, rad=-1); // X,Y map coords, Strength (1-10), Rate (1-10), Volume (1-10), lifespan (10-200 turns), radius around well ~Well(); private: //stats: int s; // Strength. the relative strength of the etabs that the well produces int r; // Rate. how often the well produces in turns int v; // volume. how many etabs the well will produce in a fruiting int ls; // lifespan. wells die after so many turns; int rad; // radius around well. int timer; // fruit cycle timer //functions // TODO: void PutOut(); // places a number of tabs on the map around the well // TODO: bool PlaceTab(); // plunks an individual etab down on the map. 0=failed, 1=success }; //------------------/\------------------------------------ /* E-TAB ------------------\/---------------------------- Energy Tabs are collected by pods as they walk over the map tile containing the etab. Etabs go towards "purchasing" new shapes to place into pods and put on the map. They act as the currency of AXIS economics. Collecting an etab puts the value of the tab into the axis' energy reserve and the etab is removed from the map. Etabs vary in strength (value) and will disappear if not collected within a certain lifespan, also varying by individual tab. */ class Etab: public Special { public: // *structors // -1 below indicates RANDOM default Etab(int x, int y, int s, int ls=10); // X,Y map coords, Strength (1-10), lifespan (2-20 turns) ~Etab(); private: //stats: int s; // Strength. int ls; // lifespan. etabs die after so many turns; }; //------------------/\------------------------------------ /* MINE ------------------\/---------------------------- Mines are purposely laid by enemy pods on the map. They are not visible to you unless you possess the special ability to see or disarm the mine. If you run over a mine, it has "adverse effects" :-) to be determined */ class Mine: public Special { public: // *structors Mine(int x, int y); // X,Y map coords ~Mine(); private: Pod* owner; }; //------------------/\------------------------------------ /* TBOMB ------------------\/---------------------------- Time Bomb. Like mines, they explode and have "adverse effects". The difference is that they do not detonate on contact. Time Bombs have a charge delay set by the user. They are hidden from view to all enemy pods unless they possess the ability to see or disarm the bomb. When time bombs explode, they cause damage in a larger surrounding area than a mine which only effects the pod that runs over it. Once laid, time bombs can not be reset. On exploding, time bombs effect *all* pods in the area, not just the enemy, so be careful where you put them things. */ class Tbomb: public Special { public: // *structors Tbomb(int x, int y, int d); // X,Y map coords, time delay ~Tbomb(); private: int delay; // time delay before bomb goes off including the turn it was set. Pod* owner; }; //------------------/\------------------------------------ /* P-TAB (powerup) ------------------\/---------------------------- PowerUp Tabs are pod-level powerups, although they could also have axis-wide or shape benefits as well - left to the imagination. There are many different kinds of specials with varying effects. PTabs are collected much like energy tabs are. Simply run over them and the bonus takes effect for the owning pod. */ class Ptab: public Special { public: enum powerup_type { ATT, DEF, OPAC, ACU, SPD, STEALTH, INVINCE, //(able) // + many more } // *structors Ptab(int x, int y, powerup_type p); // X,Y map coords, type of bonus ~Ptab(); private: Pod* owner; }; //------------------/\------------------------------------ /* FLAG ------------------\/---------------------------- */ class Flag: public Special { public: // *structors Flag(int x, int y, int axis); // X,Y map coords, owning axis ~Flag(); private: int axis; }; //------------------/\------------------------------------ #endif