You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.8 KiB

  1. #ifndef CHARACTER_H
  2. #define CHARACTER_H
  3. typedef struct {
  4. int strength,dexterity,intelligence,healthPoints,manaPoints,level,exp,maxExp,attack,armor,maxHealthPoints,gold;
  5. char name [50];
  6. } Character;
  7. enum {
  8. STRENGTH = 1, DEXTERITY = 2, INTELLIGENCE = 3, HEALTHPOINTS = 4, MANAPOINTS = 5, LEVEL = 6, EXP = 7, MAXEXP = 8
  9. };
  10. void setCharacterHealthPoints (Character *character, int newHealthPoints);
  11. int getCharacterHealthPoints (Character *character);
  12. void setCharacterStrength (Character *character, int newStrength);
  13. int getCharacterStrength (Character *character);
  14. void setCharacterDexterity (Character *character, int newDexterity);
  15. int getCharacterDexterity (Character *character);
  16. void setCharacterIntelligence (Character *character, int newIntelligence);
  17. int getCharacterIntelligence (Character *character);
  18. void setCharacterLevel (Character *character, int newLevel);
  19. int getCharacterLevel (Character *character);
  20. void setCharacterExp (Character *character, int newExp);
  21. int getCharacterExp (Character *character);
  22. void setCharacterMaxExp (Character *character, int newMaxExp);
  23. int getCharacterMaxExp (Character *character);
  24. void increaseStat (Character *character, int stat, int amount);
  25. int calculateStatIncrease (Character *character, int amount);
  26. void setCharacterMaxHealthPoints (Character *character, int newMaxHealthPoints);
  27. int getCharacterMaxHealthPoints (Character *character);
  28. void setCharacterAttack (Character *character, int newAttack);
  29. int getCharacterAttack (Character *character);
  30. void setCharacterArmor (Character *character, int newArmor);
  31. int getCharacterArmor (Character *character);
  32. void setCharacterGold (Character *character, int newGold);
  33. int getCharacterGold (Character *character);
  34. void levelUp (Character *character);
  35. #endif