forked from github/server
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:
parent
e6eb53c864
commit
ff38d8bf4c
|
@ -4531,7 +4531,6 @@ void processorders(void)
|
|||
init_processor();
|
||||
init = 1;
|
||||
}
|
||||
update_spells();
|
||||
process();
|
||||
/*************************************************/
|
||||
|
||||
|
|
|
@ -464,11 +464,13 @@ void pick_random_spells(faction * f, int level, spellbook * book, int num_spells
|
|||
spellno = rng_int() % maxspell;
|
||||
sbe = commonspells[spellno];
|
||||
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[maxspell] = sbe;
|
||||
sbe = 0;
|
||||
}
|
||||
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];
|
||||
if (maxspell > numspells) {
|
||||
maxspell = numspells;
|
||||
|
|
Loading…
Reference in New Issue