From 92dc9315b9bb8576373b1f2325a049dd5490a9f6 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Wed, 7 Jan 2015 23:06:43 +0100 Subject: 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 --- menuchoixpersos.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'menuchoixpersos.c') 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; -- cgit v1.2.3