forked from github/server
replace old_race calls with get_race.
This commit is contained in:
parent
e6677806b6
commit
1f100a1b6c
|
@ -380,20 +380,15 @@ static order *monster_move(region * r, unit * u)
|
||||||
if (monster_is_waiting(u)) {
|
if (monster_is_waiting(u)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
switch (old_race(u_race(u))) {
|
if (fval(u_race(u), RCF_DRAGON)) {
|
||||||
case RC_FIREDRAGON:
|
|
||||||
case RC_DRAGON:
|
|
||||||
case RC_WYRM:
|
|
||||||
d = richest_neighbour(r, u->faction, 1);
|
d = richest_neighbour(r, u->faction, 1);
|
||||||
break;
|
|
||||||
case RC_TREEMAN:
|
|
||||||
d = treeman_neighbour(r);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
d = random_neighbour(r, u);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
else if (get_race(RC_TREEMAN)==u_race(u)) {
|
||||||
|
d = treeman_neighbour(r);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
d = random_neighbour(r, u);
|
||||||
|
}
|
||||||
/* falls kein geld gefunden wird, zufaellig verreisen, aber nicht in
|
/* falls kein geld gefunden wird, zufaellig verreisen, aber nicht in
|
||||||
* den ozean */
|
* den ozean */
|
||||||
|
|
||||||
|
|
|
@ -2742,6 +2742,8 @@ static race *unholy_race(const race *rc) {
|
||||||
case RC_GHOUL:
|
case RC_GHOUL:
|
||||||
target_race = get_race(RC_GHOUL_LORD);
|
target_race = get_race(RC_GHOUL_LORD);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
target_race = NULL;
|
||||||
}
|
}
|
||||||
return target_race;
|
return target_race;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue