french fixes

conquest rules
This commit is contained in:
Enno Rehling 2003-05-27 19:49:19 +00:00
parent 167d80957c
commit d85506b680
10 changed files with 124 additions and 70 deletions

View File

@ -1913,57 +1913,6 @@ use_birthdayamulet(region * r, unit * magician, strlist * cmdstrings)
addmessage(r, 0, "Miiauuuuuu...", MSG_MESSAGE, ML_IMPORTANT);
}
typedef struct t_umlaut {
const char *txt;
int id;
int typ;
} t_umlaut;
/* Hier sind zum einen Umlaut-Versionen von Schlüsselworten, aber auch
* oftmals Umlaut-umschriebene Worte, weil im "normalen" Source die
* Umlaut-Version steht, damit die im Report erscheint.
* WICHTIG: "setenv LANG en_US" sonst ist ä != Ä
*/
#if 0
static const t_umlaut umlaut[] = {
/* Parameter */
{ "Straßen", P_ROAD, UT_PARAM },
/* Gegenstände - alternative Namen */
{ "Eisenbarren", I_IRON, UT_ITEM },
{ "Holzstamm", I_WOOD, UT_ITEM },
{ "Holzstämme", I_WOOD, UT_ITEM },
{ "Stämme", I_WOOD, UT_ITEM },
{ "Stamm", I_WOOD, UT_ITEM },
{ "Quader", I_STONE, UT_ITEM },
{ "Steinquader", I_STONE, UT_ITEM },
{ "Langbogen", I_LONGBOW, UT_ITEM },
{ "Langbögen", I_LONGBOW, UT_ITEM },
{ "Hemden", I_CHAIN_MAIL, UT_ITEM },
{ "Panzer", I_PLATE_ARMOR, UT_ITEM },
{ "Gewürze", I_SPICES, UT_ITEM },
{ "Öle", I_OIL, UT_ITEM },
{ "Sehens", I_AMULET_OF_TRUE_SEEING, UT_ITEM },
{ "Heilung", I_AMULET_OF_HEALING, UT_ITEM },
{ "Unsichtbarkeit", I_RING_OF_INVISIBILITY, UT_ITEM },
{ "Macht", I_RING_OF_POWER, UT_ITEM },
#ifdef COMPATIBILITY
{ "Einhornaugen", I_EYE_OF_HORAX, UT_ITEM },
{ "Reisekristall", I_TELEPORTCRYSTAL, UT_ITEM },
{ "Dunkelheit", I_AMULET_OF_DARKNESS, UT_ITEM },
#endif
{ "Kopf", I_DRAGONHEAD, UT_ITEM },
{ "Köpfe", I_DRAGONHEAD, UT_ITEM },
{ "Keuschheitsamulett", I_CHASTITY_BELT, UT_ITEM },
{ "Zweihänder", I_GREATSWORD, UT_ITEM },
{ "Axt", I_AXE, UT_ITEM },
{ "Äxte", I_AXE, UT_ITEM },
{ "Treffens", I_AMULETT_DES_TREFFENS, UT_ITEM },
{ "Flinkfingerring", I_RING_OF_NIMBLEFINGER, UT_ITEM },
{ NULL, 0, 0 }
};
#endif
static void
init_directions(tnode * root, const struct locale * lang)
{

View File

@ -1382,6 +1382,7 @@ static translate_t translation[] = {
{ "Balsam", "balm", "balm_p", "balm", "balm_p" },
{ "Gewürz", "spice", "spice_p", "spice", "spice_p" },
{ "Myrrhe", "myrrh", "myrrh_p", "myrrh", "myrrh_p" },
{ "Stein", "stone", "stone_p", "stone", "stone_p" },
{ "Öl", "oil", "oil_p", "oil", "oil_p" },
{ "Seide", "silk", "silk_p", "silk", "silk_p" },
{ "Weihrauch", "incense", "incense_p", "incense", "incense_p" },

View File

@ -195,8 +195,11 @@ set_show_item(faction *f, item_t i)
void
give_starting_equipment(struct region *r, struct unit *u)
{
const item_type * token = it_find("conquesttoken");
if (token!=NULL) {
i_add(&u->items, i_new(token, 1));
}
set_item(u, I_WOOD, 30);
set_item(u, I_STONE, 30);

View File

@ -274,6 +274,7 @@ score(void)
#ifdef ALLIANCES
{
alliance *a;
const item_type * token = it_find("conquesttoken");
sprintf(buf, "%s/score.alliances", basepath());
scoreFP = fopen(buf, "w");
@ -281,6 +282,7 @@ score(void)
for (a = alliances; a; a = a->next) {
int alliance_score = 0, alliance_number = 0, alliance_factions = 0;
int grails = 0;
for (f = factions; f; f = f->next) {
if(f->alliance && f->alliance->id == a->id) {
@ -288,9 +290,21 @@ score(void)
alliance_score += f->score;
alliance_number += f->number;
}
if (token!=NULL) {
unit * u = f->units;
while (u!=NULL) {
const item ** iitem = i_find(&u->items, token);
if (iitem!=NULL && *iitem!=NULL) {
grails += (*iitem)->number;
}
u=u->nextF;
}
}
}
fprintf(scoreFP, "%d:%d:%d:%d\n", a->id, alliance_factions, alliance_number, alliance_score);
fprintf(scoreFP, "%d:%d:%d:%d", a->id, alliance_factions, alliance_number, alliance_score);
if (token!=NULL) fprintf(scoreFP, ":%d", grails);
fputc('\n', scoreFP);
}
fclose(scoreFP);
}

View File

@ -0,0 +1,54 @@
/* vi: set ts=2:
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
| | Enno Rehling <enno@eressea-pbem.de>
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
| (c) 1998 - 2002 | Henning Peters <faroul@beyond.kn-bremen.de>
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
+-------------------+ Stefan Reich <reich@halbling.de>
This program may not be used, modified or distributed
without prior permission by the authors of Eressea.
*/
/*
* Contains defines for the "conquest" vinyambar game (Speedgame).
* Include this file from settings.h to make eressea work.
*/
#define CATAPULT_AMMUNITION 1 /* Gebaut werden kann sie auch mit 0! */
#define CHANGED_CROSSBOWS 1
#define COMBAT_TURNS 5
#define ENTERTAINBASE 15
#define ENTERTAINPERLEVEL 5
#define ENTERTAINFRACTION 20
#define GAME_ID 3
#define GROWING_TREES 1
#define GUARD_DISABLES_PRODUCTION 1
#define GUARD_DISABLES_RECRUIT 1
#define HUNGER_DISABLES_LONGORDERS 1
#define IMMUN_GEGEN_ANGRIFF 8
#define LARGE_CASTLES 1
#define NEW_MIGRATION 1
#define NEW_RESOURCEGROWTH 1
#define NMRTIMEOUT 5
#define PEASANTS_DO_NOT_STARVE 0
#define PEASANT_ADJUSTMENT 1
#define RACE_ADJUSTMENTS 1
#define RECRUITFRACTION 40 /* 100/RECRUITFRACTION% */
#define REDUCED_PEASANTGROWTH 1
#define REMOVENMRNEWBIE 0
#define RESOURCE_CONVERSION 1
#define RESOURCE_QUANTITY 0.5
#define TEACHDIFFERENCE 2
#define GIVERESTRICTION 0
#define NEWATSROI 0
#if NEWATSROI == 1
#define ATSBONUS 2
#define ROIBONUS 4
#endif
#define ENHANCED_QUIT
#define ALLIANCES
#undef ALLIANCEJOIN
#define AUTOALLIANCE (HELP_FIGHT)
#define MAILITPATH "/usr/sbin:$HOME/bin:/bin:/usr/bin:/usr/local/bin"

View File

@ -157,14 +157,17 @@ reverse_lookup(const locale * lang, const char * str)
{
int i;
assert(lang);
if (lang!=NULL) {
for (i=0;i!=SMAXHASH;++i) {
struct locale_string * ls;
for (ls=lang->strings[i];ls;ls=ls->nexthash) {
if (strcasecmp(ls->key, str)==0) return ls->key;
if (strcasecmp(ls->str, str)==0) return ls->key;
if (strlen(str)) {
if (lang!=NULL) {
for (i=0;i!=SMAXHASH;++i) {
struct locale_string * ls;
for (ls=lang->strings[i];ls;ls=ls->nexthash) {
if (strcasecmp(ls->key, str)==0) return ls->key;
if (strcasecmp(ls->str, str)==0) return ls->key;
}
}
}
log_warning(("could not do a reverse_lookup for \"%s\" in locale %s\n", str, lang->name));
}
return str;
}

View File

@ -13,6 +13,7 @@
#include <config.h>
#include "nrmessage.h"
#include "nrmessage_struct.h"
/* util includes */
#include "log.h"
@ -25,18 +26,12 @@
#include <string.h>
#include <stdlib.h>
typedef struct nrmessage_type {
const struct message_type * mtype;
const struct locale * lang;
const char * string;
const char * vars;
struct nrmessage_type * next;
int level;
const char * section;
} nrmessage_type;
static nrmessage_type * messagetypes;
nrmessage_type * get_nrmessagetypes(void) {
return messagetypes;
}
const char *
nrt_string(const struct nrmessage_type *type)
{

View File

@ -2840,7 +2840,7 @@ korrektur(void)
do_once("fsee", fix_seeds());
do_once("orc2", orc_conversion2());
do_once("witm", warn_items());
do_once("guac", guard_conversion());
do_once("guaf", guard_conversion());
do_once("qpoi", questportal_init());
do_once("xini", xe_init());
do_once("rest", fix_restart_flag());

21
src/res/conquest.xml Normal file
View File

@ -0,0 +1,21 @@
<eressea>
<include file="messages.xml"></include>
<comment>Localization</comment>
<include file="de/strings.xml"></include>
<include file="en/strings.xml"></include>
<include file="races.xml"></include>
<include file="resources.xml"></include>
<include file="ships.xml"></include>
<include file="buildings.xml"></include>
<game name="Kreis der Macht" units="250" welcome="vinyambar">
<comment>Game specific</comment>
<order name="ARBEITEN" disable></order>
<order name="MEINUNG" disable></order>
<order name="MAGIEGEBIET" disable></order>
</game>
<include file="vinyambar/de/strings.xml"></include>
<include file="vinyambar/conquest.xml"></include>
</eressea>

View File

@ -0,0 +1,14 @@
<resource name="conquesttoken">
<item cursed notlost weight="0">
</item>
</resource>
<strings>
<string name="conquesttoken">
<text locale="de">Gral</text>
<text locale="en">grail</text>
</string>
<string name="conquesttoken_p">
<text locale="de">Grale</text>
<text locale="en">grails</text>
</string>
</strings>