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 /menuchoixpersos.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 'menuchoixpersos.c')
-rw-r--r-- | menuchoixpersos.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/menuchoixpersos.c b/menuchoixpersos.c index ef8b8a1..91e0c7d 100644 --- a/menuchoixpersos.c +++ b/menuchoixpersos.c @@ -60,6 +60,10 @@ struct team_t *new_ally_team(SURFACES *surfaces, chr->defense = base_stats_g[chr->class_].defense; chr->spirit = base_stats_g[chr->class_].spirit; + for (int j = 0; j < countof(chr->affinities); ++j) { + chr->affinities[j] = rand() % AFFINITY_COUNT; + } + /* set its position */ chr->pos.x = 20; chr->pos.y = (YWIN / (cnt + 1)) * (i + 1) - chr->def_surf->h / 2; |