diff --git a/src/c/character.c b/src/c/character.c index 148ed4f..075d072 100644 --- a/src/c/character.c +++ b/src/c/character.c @@ -247,6 +247,14 @@ char* getItemName (Item *item) { return item->name; } +void setCharacterStatus (Character *character, int newStatus) { + character->status = newStatus; +} + +int getCharacterStatus (Character *character) { + return character->status; +} + void initializeInventory (Character *character) { for (int i = 0; i < 10; i++) { diff --git a/src/c/character.h b/src/c/character.h index d7fb70f..0380a89 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; + int attack,armor,maxHealthPoints,gold,weaponClass,statPoints,status; char name [50]; Item *inventory[10]; } Character; @@ -126,4 +126,8 @@ void putItemInInventory (Character *character, Item *item, int inventorySlot); void initializeInventory (Character *character); Item * getItemInInventory (Character *character, int inventorySlot); + +void setCharacterStatus (Character *character, int newStatus); + +int getCharacterStatus (Character *character); #endif \ No newline at end of file diff --git a/src/c/spell.h b/src/c/spell.h index 6b94b8e..b5d65f0 100644 --- a/src/c/spell.h +++ b/src/c/spell.h @@ -15,4 +15,6 @@ enum { SpellEffect spellFireball(Character *character); SpellEffect spellHeal(Character *character); + + #endif \ No newline at end of file