|
@ -10,6 +10,7 @@ typedef struct enemy{ |
|
|
int maxHealth; |
|
|
int maxHealth; |
|
|
int healPotions; |
|
|
int healPotions; |
|
|
int exp; |
|
|
int exp; |
|
|
|
|
|
int gold; |
|
|
} enemy; |
|
|
} enemy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -22,23 +23,21 @@ bool enemyChoosesHeal(enemy* enemy); |
|
|
int switchTurns(int currentTurn); |
|
|
int switchTurns(int currentTurn); |
|
|
int fight(Character *character, enemy* enemy); |
|
|
int fight(Character *character, enemy* enemy); |
|
|
|
|
|
|
|
|
//Funktionen die Mathematische Berechnungen durchführen |
|
|
|
|
|
int map(int x, int in_min, int in_max, int out_min, int out_max); |
|
|
|
|
|
int randomIntRange(int min, int max); |
|
|
|
|
|
//Getter/Setter Funktionen |
|
|
|
|
|
|
|
|
|
|
|
//setEnemyHealth(&enemy, health); |
|
|
|
|
|
void setEnemyHealth(enemy* enemy, int newhealth); |
|
|
|
|
|
|
|
|
|
|
|
//setEnemyDamage(&enemy.damage, damage); |
|
|
|
|
|
void setEnemyDamage(enemy* enemy, int newdamage); |
|
|
|
|
|
//setEnemyArmor(&enemy.armor, armor); |
|
|
|
|
|
void setEnemyArmor(enemy* enemy, int newarmor); |
|
|
|
|
|
//Function to get the value of Data in a struct, needs a pointer to the struct |
|
|
|
|
|
|
|
|
//Getter/Setter Funktionen |
|
|
int getEnemyMaxHealth(enemy* enemy); |
|
|
int getEnemyMaxHealth(enemy* enemy); |
|
|
|
|
|
|
|
|
|
|
|
int getEnemyGold(enemy* enemy); |
|
|
|
|
|
|
|
|
int getEnemyHealth(enemy* enemy); |
|
|
int getEnemyHealth(enemy* enemy); |
|
|
|
|
|
void setEnemyHealth(enemy* enemy, int newhealth); |
|
|
|
|
|
|
|
|
int getEnemyArmor(enemy* enemy); |
|
|
int getEnemyArmor(enemy* enemy); |
|
|
|
|
|
void setEnemyArmor(enemy* enemy, int newarmor); |
|
|
|
|
|
|
|
|
int getEnemyDamage(enemy* enemy); |
|
|
int getEnemyDamage(enemy* enemy); |
|
|
|
|
|
void setEnemyDamage(enemy* enemy, int newdamage); |
|
|
|
|
|
|
|
|
int getEnemyHealPotions(enemy* enemy); |
|
|
int getEnemyHealPotions(enemy* enemy); |
|
|
void setEnemyHealPotions(enemy* enemy, int newPotions); |
|
|
void setEnemyHealPotions(enemy* enemy, int newPotions); |
|
|