diff --git a/src/c/character.c b/src/c/character.c index 075d072..3f52d2d 100644 --- a/src/c/character.c +++ b/src/c/character.c @@ -255,6 +255,14 @@ int getCharacterStatus (Character *character) { return character->status; } +void setCharacterStatusDuration (Character *character, int newStatusDuration) { + character->statusDuration = newStatusDuration; +} + +int getCharacterStatusDuration (Character *character) { + return character->statusDuration; +} + void initializeInventory (Character *character) { for (int i = 0; i < 10; i++) { diff --git a/src/c/character.h b/src/c/character.h index 0380a89..62cc4c7 100644 --- a/src/c/character.h +++ b/src/c/character.h @@ -7,7 +7,7 @@ typedef struct { } Item; typedef struct { int strength,dexterity,intelligence,healthPoints,manaPoints,level,exp,maxExp; - int attack,armor,maxHealthPoints,gold,weaponClass,statPoints,status; + int attack,armor,maxHealthPoints,gold,weaponClass,statPoints,status,statusDuration; char name [50]; Item *inventory[10]; } Character; @@ -130,4 +130,8 @@ Item * getItemInInventory (Character *character, int inventorySlot); void setCharacterStatus (Character *character, int newStatus); int getCharacterStatus (Character *character); + +void setCharacterStatusDuration (Character *character, int newStatusDuration); + +int getCharacterStatusDuration (Character *character); #endif \ No newline at end of file