diff --git a/src/c/character.c b/src/c/character.c index 3ccf7ba..fe3a73e 100644 --- a/src/c/character.c +++ b/src/c/character.c @@ -172,4 +172,12 @@ int calculateDamage (Character *character,Weapon *weapon) { default: return 1; } +} + +void setCharacterStatPoints (Character* character, int newStatPoints) { + character->statPoints = newStatPoints; +} + +int getCharacterStatPoints (Character* character) { + return character->statPoints; } \ No newline at end of file diff --git a/src/c/character.h b/src/c/character.h index dff4d81..c7b8056 100644 --- a/src/c/character.h +++ b/src/c/character.h @@ -3,7 +3,7 @@ typedef struct { int strength,dexterity,intelligence,healthPoints,manaPoints,level,exp,maxExp; - int attack,armor,maxHealthPoints,gold,items[10],weaponClass; + int attack,armor,maxHealthPoints,gold,items[10],weaponClass,statPoints; char name [50]; } Character; typedef struct { @@ -85,4 +85,8 @@ int getWeaponDurability (Weapon *weapon); int setWeaponDurability (Weapon *weapon, int newDurability); int calculateDamage (Character *character,Weapon *weapon); + +void setCharacterStatPoints (Character *character, int newStatPoints); + +int getCharacterStatPoints (Character *character); #endif \ No newline at end of file