diff --git a/src/common/gamecode/creport.c b/src/common/gamecode/creport.c index e04154b86..155dea943 100644 --- a/src/common/gamecode/creport.c +++ b/src/common/gamecode/creport.c @@ -852,7 +852,7 @@ cr_find_address(FILE * F, const faction * uf, const faction_list * addresses) fprintf(F, "\"%s\";email\n", f->email); fprintf(F, "\"%s\";banner\n", f->banner); #ifdef ALLIANCES - if (f->alliance!=NULL) { + if (f->alliance!=NULL && f->alliance==uf->alliance) { fprintf(F, "%d;alliance\n", f->alliance->id); fprintf(F, "\"%s\";alliancename\n", f->alliance->name); } diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index 15a853eea..947d775f0 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -2924,15 +2924,23 @@ steal(region * r, unit * u, request ** stealorders) if (u2->faction->age < IMMUN_GEGEN_ANGRIFF) { add_message(&u->faction->msgs, - msg_error(u, findorder(u, u->thisorder), "newbie_immunity_error", "turns", IMMUN_GEGEN_ANGRIFF)); + msg_error(u, findorder(u, u->thisorder), "newbie_immunity_error", + "turns", IMMUN_GEGEN_ANGRIFF)); + return; + } + + if(u->faction->alliance == u2->faction->alliance) { + cmistake(u, findorder(u, u->thisorder), 47, MSG_INCOME); return; } assert(u->region==u2->region); if (!can_contact(r, u, u2)) { - add_message(&u->faction->msgs, msg_error(u, findorder(u, u->thisorder), "error60", "")); + add_message(&u->faction->msgs, msg_error(u, findorder(u, u->thisorder), + "error60", "")); return; } + n = eff_skill(u, SK_STEALTH, r) - wahrnehmung(r, f); if (n == 0) { diff --git a/src/common/gamecode/report.c b/src/common/gamecode/report.c index abef6a749..3464c0f29 100644 --- a/src/common/gamecode/report.c +++ b/src/common/gamecode/report.c @@ -1811,7 +1811,7 @@ list_address(FILE * F, const faction * uf, const faction_list * seenfactions) const faction * f = flist->data; if (f->no!=MONSTER_FACTION) { sprintf(buf, "%s: %s; %s", factionname(f), f->email, f->banner); - rparagraph(F, buf, 4, '*'); + rparagraph(F, buf, 4, (uf->alliance != NULL && f->alliance != NULL && uf->alliance == f->alliance)?'+':'*'); } flist = flist->next; } diff --git a/src/common/kernel/plane.c b/src/common/kernel/plane.c index f5dbbcb31..f1be7194a 100644 --- a/src/common/kernel/plane.c +++ b/src/common/kernel/plane.c @@ -114,7 +114,7 @@ ursprung_x(const faction *f, const plane *pl, const region * rdefault) return ur->x; } if (!rdefault) return 0; - set_ursprung((faction*)f, pl->id, rdefault->x - plane_center_x(pl), rdefault->y - plane_center_y(pl)); + set_ursprung((faction*)f, id, rdefault->x - plane_center_x(pl), rdefault->y - plane_center_y(pl)); return rdefault->x - plane_center_x(pl); } diff --git a/src/common/kernel/reports.c b/src/common/kernel/reports.c index cb2618706..02071b0cb 100644 --- a/src/common/kernel/reports.c +++ b/src/common/kernel/reports.c @@ -857,6 +857,7 @@ faction_list * get_addresses(const faction * f, const seen_region * seenregions) { /* "TODO: travelthru" */ + faction *f2; const seen_region * sr = seenregions; const faction * lastf = NULL; faction_list * flist = calloc(1, sizeof(faction_list)); @@ -866,7 +867,8 @@ get_addresses(const faction * f, const seen_region * seenregions) const unit * u = r->units; while (u!=NULL) { faction * sf = visible_faction(f, u); - if (sf && sf!=f && sf!=lastf && !fval(u, FL_PARTEITARNUNG) && cansee(f, r, u, 0)) { + if (sf && sf!=f && sf!=lastf && ((!fval(u, FL_PARTEITARNUNG) && cansee(f, r, u, 0)) + || (f->alliance != NULL && sf->alliance != NULL && f->alliance == sf->alliance))) { faction_list ** fnew = &flist; while (*fnew && (*fnew)->data->no < sf->no) { fnew =&(*fnew)->next; @@ -883,5 +885,21 @@ get_addresses(const faction * f, const seen_region * seenregions) } sr = sr->next; } + if(f->alliance != NULL) { + for(f2 = factions; f2; f2 = f2->next) { + if(f2->alliance != NULL && f2->alliance == f->alliance) { + faction_list ** fnew = &flist; + while (*fnew && (*fnew)->data->no < f2->no) { + fnew =&(*fnew)->next; + } + if ((*fnew==NULL) || (*fnew)->data!=f2) { + faction_list * finsert = malloc(sizeof(faction_list)); + finsert->next = *fnew; + *fnew = finsert; + finsert->data = f2; + } + } + } + } return flist; }