Mercurial > molko
comparison libmlk-rpg/mlk/rpg/battle.c @ 474:ca30ff96bbe0
core: util -> mlk_util
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 27 Feb 2023 12:41:53 +0100 |
parents | 02b16dd49b54 |
children | 3ff1fe64d0cd |
comparison
equal
deleted
inserted
replaced
473:02b16dd49b54 | 474:ca30ff96bbe0 |
---|---|
99 random_select(struct battle_entity **group, size_t groupsz) | 99 random_select(struct battle_entity **group, size_t groupsz) |
100 { | 100 { |
101 struct battle_entity *ret = NULL, *et = NULL; | 101 struct battle_entity *ret = NULL, *et = NULL; |
102 | 102 |
103 do { | 103 do { |
104 et = group[util_nrand(0, groupsz - 1)]; | 104 et = group[mlk_util_nrand(0, groupsz - 1)]; |
105 | 105 |
106 if (et && et->ch) | 106 if (et && et->ch) |
107 ret = et; | 107 ret = et; |
108 } while (!ret); | 108 } while (!ret); |
109 | 109 |