I don't think it's good to call update_spells before the turn.

one should only have the spells that are in the previous week's report.
a few comments wouldn't hurt.
This commit is contained in:
Enno Rehling 2015-08-20 12:10:34 +02:00
parent e6eb53c864
commit ff38d8bf4c
2 changed files with 2 additions and 1 deletions

View File

@ -4531,7 +4531,6 @@ void processorders(void)
init_processor(); init_processor();
init = 1; init = 1;
} }
update_spells();
process(); process();
/*************************************************/ /*************************************************/

View File

@ -464,11 +464,13 @@ void pick_random_spells(faction * f, int level, spellbook * book, int num_spells
spellno = rng_int() % maxspell; spellno = rng_int() % maxspell;
sbe = commonspells[spellno]; sbe = commonspells[spellno];
if (sbe->level > f->max_spelllevel) { if (sbe->level > f->max_spelllevel) {
// not going to pick it in this round, move it to the end for later
commonspells[spellno] = commonspells[--maxspell]; commonspells[spellno] = commonspells[--maxspell];
commonspells[maxspell] = sbe; commonspells[maxspell] = sbe;
sbe = 0; sbe = 0;
} }
else if (f->spellbook && spellbook_get(f->spellbook, sbe->sp)) { else if (f->spellbook && spellbook_get(f->spellbook, sbe->sp)) {
// already have this spell, remove it from the list of candidates
commonspells[spellno] = commonspells[--numspells]; commonspells[spellno] = commonspells[--numspells];
if (maxspell > numspells) { if (maxspell > numspells) {
maxspell = numspells; maxspell = numspells;