forked from github/server
parent
3ddedb8a0d
commit
ff27aed2fb
|
@ -2820,7 +2820,7 @@ random_region(void)
|
|||
|
||||
/* count the available regions */
|
||||
for(r=regions; r; r=r->next) {
|
||||
if(rplane(r) == NULL) c++;
|
||||
if(rplane(r) == NULL && landregion(r)) c++;
|
||||
}
|
||||
|
||||
/* choose one */
|
||||
|
@ -2828,8 +2828,10 @@ random_region(void)
|
|||
|
||||
/* this is a bit obfuscated, but should be correct */
|
||||
for(r=regions; c > 0; r=r->next) {
|
||||
if(rplane(r) == NULL && landregion(r)) {
|
||||
--c;
|
||||
}
|
||||
}
|
||||
|
||||
return(r);
|
||||
}
|
||||
|
@ -2854,7 +2856,7 @@ check_phoenix(void)
|
|||
}
|
||||
|
||||
/* it is not, so we create it */
|
||||
r = random_region();
|
||||
r = random_land_region();
|
||||
phoenix = createunit(r, findfaction(MONSTER_FACTION), 1, phoenix_race);
|
||||
|
||||
/* generate an appropriate region message */
|
||||
|
|
|
@ -643,9 +643,9 @@ modify_block(void)
|
|||
int mal = 0;
|
||||
struct rawmaterial *res;
|
||||
|
||||
win = openwin(70, 4, "< Tag-Regionen modifizieren >");
|
||||
win = openwin(90, 4, "< Tag-Regionen modifizieren >");
|
||||
wmove(win, 1, 2);
|
||||
wAddstr("Name, Peasants, Horses, Silver, Chaos, noResources, Mallorn (n/p/h/s/c/r/m,q)?");
|
||||
wAddstr("Empty, Name, Peasants, Horses, Silver, Chaos, noResources, Mallorn (e/n/p/h/s/c/r/m,q)?");
|
||||
wrefresh(win);
|
||||
c = getch();
|
||||
if (c == 'q') {
|
||||
|
@ -686,6 +686,29 @@ modify_block(void)
|
|||
r=t->r;
|
||||
if (production(r)) {
|
||||
switch (c) {
|
||||
case 'e':
|
||||
rsetpeasants(r, 0);
|
||||
rsetmoney(r, 0);
|
||||
rsethorses(r, 0);
|
||||
rsettrees(r,2,0);
|
||||
rsettrees(r,1,0);
|
||||
rsettrees(r,0,0);
|
||||
|
||||
for (res=r->resources;res;res=res->next) {
|
||||
const item_type * itype = resource2item(res->type->rtype);
|
||||
if(itype == olditemtype[I_IRON]) {
|
||||
res->amount = -1;
|
||||
res->level = -1;
|
||||
} else if(itype == olditemtype[I_LAEN]) {
|
||||
res->amount = -1;
|
||||
res->level = -1;
|
||||
} else if(itype == olditemtype[I_STONE]) {
|
||||
res->amount = -1;
|
||||
res->level = -1;
|
||||
}
|
||||
}
|
||||
freset(r, RF_MALLORN);
|
||||
break;
|
||||
case 'n':
|
||||
rsetname(r, name);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue