forked from github/server
- NEUSTART war völlig kaputt, geändert.
Neustart mit anderer Rasse jetzt ab 81ter Runde, Neustart mit gleicher Rasse ab neunter Runde. FL_RESTARTED rausgenommen, war ohnehin kaputt.
This commit is contained in:
parent
9d0550da35
commit
0d76ceabb9
2 changed files with 26 additions and 14 deletions
|
@ -224,7 +224,6 @@ restart(unit *u, const race * rc)
|
|||
strlist ** o=&u->orders;
|
||||
|
||||
f->magiegebiet = u->faction->magiegebiet;
|
||||
fset(f, FL_RESTARTED);
|
||||
f->options = u->faction->options;
|
||||
freestrlist(nu->orders);
|
||||
nu->orders = u->orders;
|
||||
|
@ -1072,28 +1071,40 @@ quit(void)
|
|||
factionid(u->faction), S->s);
|
||||
}
|
||||
} else if(igetkeyword(S->s, u->faction->locale) == K_RESTART && u->number > 0) {
|
||||
char *s_race,*s_pass;
|
||||
|
||||
if (!landregion(rterrain(r))) {
|
||||
cmistake(u, S->s, 242, MSG_EVENT);
|
||||
continue;
|
||||
}
|
||||
if (fval(u->faction, FL_RESTARTED)) {
|
||||
/* schon einmal neustart gemacht */
|
||||
return;
|
||||
}
|
||||
frace = findrace(getstrtoken(), u->faction->locale);
|
||||
if (!frace && u->faction->age < 100) {
|
||||
s_race = getstrtoken();
|
||||
frace = findrace(s_race, u->faction->locale);
|
||||
|
||||
if (!frace) {
|
||||
frace = u->faction->race;
|
||||
} else if (frace == NULL || !playerrace(frace)) {
|
||||
s_pass = s_race;
|
||||
} else {
|
||||
s_pass = getstrtoken();
|
||||
}
|
||||
|
||||
if(frace != u->faction->race) {
|
||||
if(u->faction->age < 81) {
|
||||
cmistake(u, S->s, 241, MSG_EVENT);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if(u->faction->age < 9) {
|
||||
cmistake(u, S->s, 305, MSG_EVENT);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!playerrace(frace)) {
|
||||
cmistake(u, S->s, 243, MSG_EVENT);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (frace == NULL || !playerrace(frace)) {
|
||||
cmistake(u, S->s, 243, MSG_EVENT);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcasecmp(getstrtoken(), u->faction->passw)) {
|
||||
if (strcasecmp(s_pass, u->faction->passw)) {
|
||||
cmistake(u, S->s, 86, MSG_EVENT);
|
||||
printf(" Warnung: NEUSTART mit falschem Passwort für Partei %s: %s\n",
|
||||
factionid(u->faction), S->s);
|
||||
|
|
|
@ -891,6 +891,7 @@ typedef struct skillvalue {
|
|||
#define FL_TAKEALL (1<<25) /* Einheit nimmt alle Gegenstände an */
|
||||
#define FL_UNNAMED (1<<26) /* Partei/Einheit/Gebäude/Schiff ist unbenannt */
|
||||
#define FL_RESTARTED (1<<27) /* Partei hat schon einen Neustart gemacht */
|
||||
/* no longer used, may contain old data! */
|
||||
|
||||
/* Flags, die gespeichert werden sollen: */
|
||||
#ifdef NOAID
|
||||
|
|
Loading…
Reference in a new issue