Pokemon Class library

Dependents:   2645_Game_Project_2

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Pokemon.h Source File

Pokemon.h

00001 /** Pokemon Class
00002 @brief Used for containing Pokemon Stats within the game, and doing the some of the calculations for the battles
00003 @brief Also uses xp to determine wether your pokeon should level up or not
00004 
00005 @brief Revision 2
00006 
00007 @author Aaron Lad
00008 @date   3rd May 2017
00009 */
00010 
00011 #include <string>
00012 #include "N5110.h"
00013 
00014 typedef signed int uns;
00015 
00016 extern std::string TypeString[3];
00017 extern std::string name[3];
00018 typedef enum Type {Fire, Grass, Water} PokeType; //3 different pokemon types in the game
00019 
00020 class Pokemon
00021 {
00022 
00023 public:
00024     Pokemon();
00025     
00026     /* Pokemon Class for the chosen pokemon.
00027      * @param uns - A signed variable used for the Level and HP of the Pokemon
00028      * @param PokeType - The typing for the chosen pokemon
00029     */
00030     Pokemon(uns, uns, PokeType); 
00031     
00032     /* set Type used to update the Typing for a Pokemon within the class
00033      * @param PokeType - variable of either Grass, Fire or Water
00034     */
00035     void setType(PokeType);
00036     
00037     /* level up used to incrememnt the level of the Players pokemon
00038     */
00039     void levelUp();
00040     
00041     /* win, used to increase the exp of the players pokemon, and to check if a level up is needed
00042      * @param N5110 &lcd - allows the function the use of the N5110 class
00043      */
00044     void win(N5110 &lcd);
00045     
00046     // String to define the Name of the Players Pokemons Name
00047     std::string Name(void);
00048     
00049     //String to define the Name of the Players Pokemons Type
00050     std::string Type(void);
00051     
00052     //String to define the Name of the Players Pokemons HealthPoints
00053     std::string HP(void);
00054     
00055     //String to define the Name of the Players Pokemons level
00056     std::string Level(void);
00057     
00058     /* Determines the damage done by your pokemon
00059      * @param Pokemon e - The stats of the opposing pokemon
00060      * @returns
00061      *
00062      *      damage2    -    pokemons damage
00063     */
00064     int YourTurn(Pokemon e);
00065     
00066     /* Determines the damage done by the opposing Pokemon
00067      * @param Pokemon e - The stats of the opposing pokemon
00068      * @returns
00069      *
00070      *      damage1    -    pokemons damage
00071      */
00072     int OpponentTurn(Pokemon e);//battle simulation
00073     
00074     /* Gives the max Healthpoints for the opposing pokemon 
00075      * @param Pokemon e - The stats of the opposing pokemon
00076      * @returns
00077      *
00078      *      uns e.healthPoints;
00079      */
00080     int HPO(Pokemon e);
00081     
00082     /* Gives the max HP for your Pokemon
00083      * @returns 
00084      *      
00085      *      uns healthPoints;
00086     */
00087     int HPA();
00088 
00089 
00090 private:                //stats for pokemon
00091 
00092 //--------vairables-----------
00093     PokeType typing;
00094     uns level;
00095     uns healthPoints;
00096     uns exp;
00097     uns lvlUp;
00098 };
00099 
00100 
00101