Commit 01cb0755 by gerann

Update Header.h

parent dac372a4
Showing with 33 additions and 4 deletions
...@@ -7,9 +7,33 @@ ...@@ -7,9 +7,33 @@
#include <string.h> #include <string.h>
#define NUM_HENCHMEN 5 #define NUM_HENCHMEN 5
#define LOSE_HP -10 #define LOSE_HP 10
#define POTION 25
#define INPUT_MIN 0
#define INPUT_MAX 3
//Players base values
#define PLAYER_BASE_HEALTH 100
#define PLAYER_BASE_DAMAGE 10
#define POT_COUNT 10
//Players level up macros
#define LEVEL_UP_HP 20
#define LEVEL_UP_ATTACK 5
//Different enemies base values
#define ELF_BASE_DAMAGE 10
#define ORK_BASE_DAMAGE 15
#define SMURF_BASE_DAMAGE 20
#define DEEMON_BASE_DAMAGE 25
#define BANDIIT_BASE_DAMAGE 30
#define SPECIAL_DAMAGE 40 #define SPECIAL_DAMAGE 40
#define BOSS_HEALTH 100
#define BOSS_DAMAGE 20
//Game save value
#define SAVE_GAME 2
#define STATS_ROW_LEN 2
typedef struct typedef struct
{ {
int health; int health;
...@@ -31,16 +55,21 @@ typedef struct ...@@ -31,16 +55,21 @@ typedef struct
char type[20]; char type[20];
} FinalBoss; } FinalBoss;
void PrintWelcomeMessage(void); void PrintWelcomeMessage(void);
void DisplayGameRules(void); void DisplayGameRules(void);
Player CreatePlayer(); Player CreatePlayer();
int Move(int defeated_enemies); int Move(int defeated_enemies);
void handleTrap(Player *player);
int fight(Player *p, Enemy *e); int fight(Player *p, Enemy *e);
int bossFight(Player *p, Enemy *boss); int bossFight(Player *p, FinalBoss *boss);
void usePotion(Player *p, int initialHealth, int currentHealth); int usePotion(Player *p, int initialHealth, int currentHealth);
void levelUp(Player *p); void levelUp(Player *p);
Enemy CreateEnemy(int defeated_enemies); Enemy CreateEnemy(int defeated_enemies);
FinalBoss CreateFinalBoss(int defeated_enemies); FinalBoss CreateFinalBoss(int defeated_enemies);
int Menu(void);
int GetIntInRange(int min, int max);
int SaveGame(char *file, Player *p, int enemiesDefeated);
void LoadGame(char *file, Player *p, int *enemies);
#endif //GAME_HEADER_H #endif //GAME_HEADER_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment