diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-01-07 23:06:43 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-01-07 23:32:29 +0100 |
commit | 92dc9315b9bb8576373b1f2325a049dd5490a9f6 (patch) | |
tree | bfcf7ed35d786444a035f33904d817e041311913 /competences.c | |
parent | 8218792cbbd00da3530826330270a20906fefad5 (diff) |
generate the affinities during the creation of the characters
do not differenciate between the players and the enemies as well
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'competences.c')
-rw-r--r-- | competences.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/competences.c b/competences.c deleted file mode 100644 index 7acd8b9..0000000 --- a/competences.c +++ /dev/null @@ -1,68 +0,0 @@ -#include <stdlib.h> -#include <stdio.h> -#include <SDL/SDL.h> -#include "structures.h" -#include "constantes.h" -#include "prototypes.h" - -void Fremplircompetencesennemis (ENNEMIS ennemis[],int Vnbennemis) -{ - int i, y; - unsigned int sensibilite; - unsigned int max = 8, min = 0; - - for (i=0;i<=Vnbennemis;i++) - { - if(ennemis[i].classe==GUERRIER_GOBELIN) - { - ennemis[i].force = 15; - ennemis[i].magie = 0; - ennemis[i].defense = 10; - ennemis[i].defensemagique = 5; - ennemis[i].pv = 1000; - ennemis[i].pm = 0; - ennemis[i].pminitiaux = 0; - ennemis[i].pvinitiaux = 1000; - ennemis[i].etat = VIE; - for (y=0;y<4;y++) - { - sensibilite = (rand() % (max - min + 1)) + min; - if (sensibilite == SENSIBILITE) - { - ennemis[i].sensibilite[y] = ACTIVE; - ennemis[i].resistance[y] = DESACTIVE; - ennemis[i].invulnerabilite[y] = DESACTIVE; - ennemis[i].absorbtion[y] = DESACTIVE; - } - else if (sensibilite == RESISTANCE) - { - ennemis[i].resistance[y] = ACTIVE; - ennemis[i].sensibilite[y] = DESACTIVE; - ennemis[i].invulnerabilite[y] = DESACTIVE; - ennemis[i].absorbtion[y] = DESACTIVE; - } - else if (sensibilite == INVULNERABILITE) - { - ennemis[i].resistance[y] = DESACTIVE; - ennemis[i].sensibilite[y] = DESACTIVE; - ennemis[i].invulnerabilite[y] = ACTIVE; - ennemis[i].absorbtion[y] = DESACTIVE; - } - else if (sensibilite == ABSORBTION) - { - ennemis[i].sensibilite[y] = DESACTIVE; - ennemis[i].resistance[y] = DESACTIVE; - ennemis[i].invulnerabilite[y] = DESACTIVE; - ennemis[i].absorbtion[y] = ACTIVE; - } - else - { - ennemis[i].sensibilite[y] = DESACTIVE; - ennemis[i].resistance[y] = DESACTIVE; - ennemis[i].invulnerabilite[y] = DESACTIVE; - ennemis[i].absorbtion[y] = DESACTIVE; - } - } - } - } -} |