RESERVIERE PERSONEN geht nicht mehr

Magiegebiete haben englische NAmen (gleicher Name, bis auf "Kein Gebiet")
This commit is contained in:
Enno Rehling 2004-07-03 08:55:41 +00:00
parent 11bff85cff
commit 6bec8beb75
11 changed files with 76 additions and 65 deletions

View File

@ -1990,7 +1990,8 @@ report(FILE *F, faction * f, const faction_list * addresses,
centre(F, gamedate_season(f->locale), true); centre(F, gamedate_season(f->locale), true);
rnl(F); rnl(F);
sprintf(buf, "%s, %s/%s (%s)", factionname(f), sprintf(buf, "%s, %s/%s (%s)", factionname(f),
LOC(f->locale, rc_name(f->race, 1)), neue_gebiete[f->magiegebiet], LOC(f->locale, rc_name(f->race, 1)),
LOC(f->locale, mkname("school", neue_gebiete[f->magiegebiet])),
f->email); f->email);
centre(F, buf, true); centre(F, buf, true);
if (f->alliance!=NULL) { if (f->alliance!=NULL) {

View File

@ -254,7 +254,17 @@ givemen(int n, unit * u, unit * u2, struct order * ord)
} }
} }
} }
addgive(u, u2, n, R_PERSON, ord, error); if (error) {
cmistake(u, ord, error, MSG_COMMERCE);
}
else if (!u2 || u2->faction!=u->faction) {
ADDMSG(&u->faction->msgs, msg_message("give_person", "unit target amount",
u, u2?ucansee(u->faction, u2, u_unknown()):u_peasants(), n));
if (u2) {
ADDMSG(&u2->faction->msgs, msg_message("give_person", "unit target amount",
ucansee(u2->faction, u, u_unknown()), u2, n));
}
}
} }
void void

View File

@ -2149,7 +2149,6 @@ resource_type * r_permaura;
resource_type * r_peasants; resource_type * r_peasants;
resource_type * r_unit; resource_type * r_unit;
resource_type * r_hp; resource_type * r_hp;
resource_type * r_person;
resource_type * r_silver; resource_type * r_silver;
item_type * i_silver; item_type * i_silver;
@ -2175,9 +2174,6 @@ init_resources(void)
i_silver = new_itemtype(r_silver, ITF_NONE, 1/*weight*/, 0); i_silver = new_itemtype(r_silver, ITF_NONE, 1/*weight*/, 0);
r_silver->uchange = res_changeitem; r_silver->uchange = res_changeitem;
r_person = new_resourcetype(&names[2], NULL, RTF_NONE);
r_person->uchange = res_changeperson;
r_permaura = new_resourcetype(&names[4], NULL, RTF_NONE); r_permaura = new_resourcetype(&names[4], NULL, RTF_NONE);
r_permaura->uchange = res_changepermaura; r_permaura->uchange = res_changepermaura;
@ -2198,7 +2194,6 @@ init_resources(void)
oldresourcetype[R_PERMAURA] = r_permaura; oldresourcetype[R_PERMAURA] = r_permaura;
oldresourcetype[R_HITPOINTS] = r_hp; oldresourcetype[R_HITPOINTS] = r_hp;
oldresourcetype[R_PEASANTS] = r_peasants; oldresourcetype[R_PEASANTS] = r_peasants;
oldresourcetype[R_PERSON] = r_person;
oldresourcetype[R_UNIT] = r_unit; oldresourcetype[R_UNIT] = r_unit;
/* alte typen registrieren: */ /* alte typen registrieren: */
@ -2372,8 +2367,6 @@ resname(resource_t res, int index)
return index==1?"peasant":"peasant_p"; return index==1?"peasant":"peasant_p";
} else if (res == R_UNIT) { } else if (res == R_UNIT) {
return index==1?"unit":"unit_p"; return index==1?"unit":"unit_p";
} else if (res == R_PERSON) {
return index==1?"person":"person_p";
} else if (res == R_HITPOINTS) { } else if (res == R_HITPOINTS) {
return index==1?"hp":"hp_p"; return index==1?"hp":"hp_p";
} }

View File

@ -264,7 +264,6 @@ extern resource_type * r_permaura;
extern resource_type * r_peasants; extern resource_type * r_peasants;
extern resource_type * r_unit; extern resource_type * r_unit;
extern resource_type * r_hp; extern resource_type * r_hp;
extern resource_type * r_person;
typedef struct t_item { typedef struct t_item {
const char *name[4]; const char *name[4];
@ -519,7 +518,6 @@ enum {
R_UNIT, /* Einheit (gib x einheit) */ R_UNIT, /* Einheit (gib x einheit) */
R_PERSON,
MAX_RESOURCES, /* do not use outside item.c ! */ MAX_RESOURCES, /* do not use outside item.c ! */
NORESOURCE = (resource_t) - 1 NORESOURCE = (resource_t) - 1

View File

@ -71,8 +71,6 @@ new_get_resource(const unit * u, const resource_type * rtype)
return u->hp; return u->hp;
if (rtype == oldresourcetype[R_PEASANTS]) if (rtype == oldresourcetype[R_PEASANTS])
return rpeasants(u->region); return rpeasants(u->region);
if (rtype == oldresourcetype[R_PERSON])
return u->number;
assert(!"unbekannte ressource entdeckt"); assert(!"unbekannte ressource entdeckt");
return 0; return 0;
} }

View File

@ -59,12 +59,12 @@
const char * g_reportdir; const char * g_reportdir;
const char *neue_gebiete[] = { const char *neue_gebiete[] = {
"Kein Magiegebiet", "none",
"Illaun", "illaun",
"Tybied", "tybied",
"Cerddor", "cerddor",
"Gwyrrd", "gwyrrd",
"Draig" "draig"
}; };
const char *coasts[MAXDIRECTIONS] = const char *coasts[MAXDIRECTIONS] =

View File

@ -32,6 +32,7 @@ extern "C" {
extern const char *directions[]; extern const char *directions[];
extern const char *neue_gebiete[]; extern const char *neue_gebiete[];
extern const char *coasts[];
/* kann_finden speedups */ /* kann_finden speedups */
extern boolean kann_finden(struct faction * f1, struct faction * f2); extern boolean kann_finden(struct faction * f1, struct faction * f2);
@ -104,8 +105,6 @@ extern int bufunit(const struct faction * f, const struct unit * u, int indent,
extern int bufunit_ugroupleader(const struct faction * f, const struct unit * u, int indent, int mode); extern int bufunit_ugroupleader(const struct faction * f, const struct unit * u, int indent, int mode);
#endif #endif
extern const char *neue_gebiete[];
extern const char *coasts[];
extern const char * reportpath(void); extern const char * reportpath(void);
extern struct faction * visible_faction(const struct faction *f, const struct unit * u); extern struct faction * visible_faction(const struct faction *f, const struct unit * u);
extern struct faction_list * get_addresses(struct faction * f); extern struct faction_list * get_addresses(struct faction * f);

View File

@ -308,17 +308,20 @@ tower_init(void)
int i, first = newarena; int i, first = newarena;
for (i=0;i!=6;++i) { for (i=0;i!=6;++i) {
region * r = tower_region[i] = findregion(arena_center->x+delta_x[i]*3, arena_center->y+delta_y[i]*3); region * r = tower_region[i] = findregion(arena_center->x+delta_x[i]*3, arena_center->y+delta_y[i]*3);
if (r) { if (r) {
start_region[i] = findregion(arena_center->x+delta_x[i]*2, arena_center->y+delta_y[i]*2); start_region[i] = findregion(arena_center->x+delta_x[i]*2, arena_center->y+delta_y[i]*2);
if (r->terrain!=T_DESERT) terraform(r, T_DESERT); if (r->terrain!=T_DESERT) terraform(r, T_DESERT);
if (!r->buildings) { if (!r->buildings) {
building * b = new_building(bt_find("castle"), r, NULL); building * b = new_building(bt_find("castle"), r, NULL);
b->size = 10; b->size = 10;
if (i!=0) sprintf(buf, "Turm des %s", neue_gebiete[i]); if (i!=0) {
else sprintf(buf, "Turm der Ahnungslosen"); sprintf(buf, "Turm des %s",
set_string(&b->name, buf); LOC(default_locale, mkname("school", neue_gebiete[i])));
} }
} else sprintf(buf, "Turm der Ahnungslosen");
set_string(&b->name, buf);
}
}
} }
if (first && !arena_center->buildings) { if (first && !arena_center->buildings) {
building * b = new_building(bt_find("castle"), arena_center, NULL); building * b = new_building(bt_find("castle"), arena_center, NULL);

View File

@ -239,34 +239,6 @@ getgarbage(void)
#endif #endif
} }
#if 0
static void
writefactiondata(void)
{
FILE *F;
char zText[128];
sprintf(zText, "%s/faction-data.xml", basepath());
F = cfopen(zText, "w");
if(F) {
faction *f;
for(f = factions; f; f=f->next) {
fprintf(F,"<faction>\n");
fprintf(F,"\t<id>%s</id>\n",itoa36(f->no));
fprintf(F,"\t<name>%s</name>\n",f->name);
fprintf(F,"\t<email>%s</email>\n",f->email);
fprintf(F,"\t<password>%s</password>\n",f->passw);
fprintf(F,"\t<race>%s</race>\n",rc_name(f->race,1));
fprintf(F,"\t<magic>%s</magic>\n",neue_gebiete[f->magiegebiet]);
fprintf(F,"\t<nmrs>%d</nmrs>\n",turn-f->lastorders);
fprintf(F,"\t<score>%d</score>\n",f->score);
fprintf(F,"</faction>\n");
}
}
fclose(F);
}
#endif
#ifdef SHORTPWDS #ifdef SHORTPWDS
static void static void
readshortpwds() readshortpwds()

View File

@ -7,6 +7,33 @@
_a: including article (ein Troll, a troll) _a: including article (ein Troll, a troll)
--> -->
<name="school">
<string name="none">
<text locale="de">Kein Magiegebiet</text>
<text locale="en">no magic school</text>
</string>
<string name="illaun">
<text locale="de">Illaun</text>
<text locale="en">Illaun</text>
</string>
<string name="tybied">
<text locale="de">Tybied</text>
<text locale="en">Tybied</text>
</string>
<string name="cerddor">
<text locale="de">Cerddor</text>
<text locale="en">Cerddor</text>
</string>
<string name="gwyrrd">
<text locale="de">Gwyrrd</text>
<text locale="en">Gwyrrd</text>
</string>
<string name="draig">
<text locale="de">Draig</text>
<text locale="en">Draig</text>
</string>
</namespace>
<string name="Tresen"> <string name="Tresen">
<text locale="de">Tresen</text> <text locale="de">Tresen</text>
<text locale="en">counter </text> <text locale="en">counter </text>
@ -4153,10 +4180,10 @@
und sein überlegtes Verhalten wird ihm manch Vorteil in und sein überlegtes Verhalten wird ihm manch Vorteil in
der Verteidigung geben.</text> der Verteidigung geben.</text>
<text locale="en">This ancient battle chant lifts the <text locale="en">This ancient battle chant lifts the
spirit of your troops and helps them withstand even the spirit of your troops and helps them withstand even the
fear-inspiring aura of demonic and undead beings. A fear-inspiring aura of demonic and undead beings. A
fighter thus fortified against evil will not flee even fighter thus fortified against evil will not flee even
in the face of terror, and his defenses will be strengthened.</text> in the face of terror, and his defenses will be strengthened.</text>
</string> </string>
<string name="transfer_aura_song"> <string name="transfer_aura_song">
<text locale="de">Mit Hilfe dieses Zaubers kann der <text locale="de">Mit Hilfe dieses Zaubers kann der

View File

@ -5509,6 +5509,16 @@
</type> </type>
<text locale="de">"$string"</text> <text locale="de">"$string"</text>
</message> </message>
<message name="give_person" section="economy">
<type>
<arg name="unit" type="unit"/>
<arg name="amount" type="int"/>
<arg name="target" type="unit"/>
</type>
<text locale="de">"$unit($unit) übergibt $int($amount) Person$if($eq($amount,1),"","en") an $unit($target)."</text>
<text locale="fr">"$unit($unit) transfers $int($amount) person$if($eq($amount,1),"","s") to $unit($target)."</text>
<text locale="en">"$unit($unit) transfers $int($amount) person$if($eq($amount,1),"","s") to $unit($target)."</text>
</message>
<message name="give" section="economy"> <message name="give" section="economy">
<type> <type>
<arg name="unit" type="unit"/> <arg name="unit" type="unit"/>
@ -5517,8 +5527,8 @@
<arg name="target" type="unit"/> <arg name="target" type="unit"/>
</type> </type>
<text locale="de">"$unit($unit) übergibt $int($amount) $resource($resource,$amount) an $unit($target)."</text> <text locale="de">"$unit($unit) übergibt $int($amount) $resource($resource,$amount) an $unit($target)."</text>
<text locale="fr">"$unit($unit) gave $int($amount) $resource($resource,$amount) to $unit($target)."</text> <text locale="fr">"$unit($unit) gives $int($amount) $resource($resource,$amount) to $unit($target)."</text>
<text locale="en">"$unit($unit) gave $int($amount) $resource($resource,$amount) to $unit($target)."</text> <text locale="en">"$unit($unit) gives $int($amount) $resource($resource,$amount) to $unit($target)."</text>
</message> </message>
<message name="maintenance" section="economy"> <message name="maintenance" section="economy">
<type> <type>