forked from github/server
Bugfix: Exoten-familiars ohne init-routine
This commit is contained in:
parent
c0a7762932
commit
d65c158e4f
|
@ -677,7 +677,8 @@ enum {
|
||||||
RC_DOLPHIN,
|
RC_DOLPHIN,
|
||||||
RC_OCEANTURTLE,
|
RC_OCEANTURTLE,
|
||||||
RC_KRAKEN,
|
RC_KRAKEN,
|
||||||
RC_SEASERPENT,
|
|
||||||
|
RC_SEASERPENT,
|
||||||
RC_SHADOWKNIGHT, /* 51 */
|
RC_SHADOWKNIGHT, /* 51 */
|
||||||
|
|
||||||
RC_CENTAUR,
|
RC_CENTAUR,
|
||||||
|
|
|
@ -535,16 +535,22 @@ report_effect(region * r, unit * mage, message * seen, message * unseen)
|
||||||
static const race *
|
static const race *
|
||||||
select_familiar(const race * magerace, magic_t magiegebiet)
|
select_familiar(const race * magerace, magic_t magiegebiet)
|
||||||
{
|
{
|
||||||
|
const race * retval = NULL;
|
||||||
int rnd = rand()%100;
|
int rnd = rand()%100;
|
||||||
assert(magerace->familiars[0]);
|
assert(magerace->familiars[0]);
|
||||||
|
|
||||||
if (rnd < 3) {
|
do {
|
||||||
/* RC_KRAKEN muß letzter Vertraute sein */
|
if (rnd < 3) {
|
||||||
return new_race[(race_t)(RC_HOUSECAT + rand()%(RC_KRAKEN+1-RC_HOUSECAT))];
|
/* RC_KRAKEN muß letzter Vertraute sein */
|
||||||
} else if (rnd < 80) {
|
int rc = RC_HOUSECAT + rand()%(RC_KRAKEN+1-RC_HOUSECAT);
|
||||||
return magerace->familiars[0];
|
retval = new_race[rc];
|
||||||
}
|
} else if (rnd < 80) {
|
||||||
return magerace->familiars[magiegebiet];
|
retval = magerace->familiars[0];
|
||||||
|
}
|
||||||
|
retval = magerace->familiars[magiegebiet];
|
||||||
|
}
|
||||||
|
while (retval->init_familiar==NULL);
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
|
Loading…
Reference in New Issue