- Hack in Mapper zum 'Verarmen' von Regionen: Tag->Modify->Peasants

This commit is contained in:
Christian Schlittchen 2001-12-15 11:54:33 +00:00
parent 28b566a8a1
commit 9e183e4393
3 changed files with 20 additions and 3 deletions

View File

@ -563,6 +563,18 @@ r_isforest(const region * r)
return false;
}
boolean
r_issea(const region * r)
{
direction_t d;
for(d=0; d < MAXDIRECTIONS; d++) {
region *rc = rconnect(r,d);
if(rc && rterrain(rc) == T_OCEAN) return false;
}
return true;
}
boolean
r_isglacier(const region * r)
{

View File

@ -192,7 +192,7 @@ void rsetlaen(struct region * r, int value);
#define rsetherbs(r, value) ((r)->land?((r)->land->herbs=(short)(value)):(value),0)
extern boolean r_isforest(const struct region * r);
extern boolean r_issea(const struct region * r);
extern boolean r_isglacier(const struct region * r);
#define rterrain(r) (terrain_t)((r)?(r)->terrain:T_FIREWALL)

View File

@ -494,6 +494,7 @@ modify_block(void)
region *r;
tagregion *t;
char *name;
int div;
win = openwin(70, 4, "< Tag-Regionen modifizieren >");
wmove(win, 1, 2);
@ -517,7 +518,10 @@ modify_block(void)
}
break;
case 'n':
name = my_input(win, 2, 2, "Name: ", NULL);
name = my_input(win, 2, 2, "Name: ", NULL);
break;
case 'p':
div = atoi(my_input(win, 2, 2, "Divisor: ", "1"));
break;
}
@ -529,7 +533,8 @@ modify_block(void)
rsetname(r, name);
break;
case 'p':
rsetpeasants(r, production(r)*3+rand()%(production(r)*3));
rsetpeasants(r, (production(r)*3+rand()%(production(r)*3))/div);
rsetmoney(r, (production(r)*10+rand()%(production(r)*10))/div);
break;
case 'h':
rsethorses(r, rand()%(production(r) / 10));