diff --git a/.travis.yml b/.travis.yml index df0e62c84..78aaf3648 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,12 @@ script: s/travis-build addons: apt: packages: - - liblua5.2-dev + - liblua5.1-dev + - libtolua-dev - libncurses5-dev - libsqlite3-dev - libxml2-dev - valgrind - - libtolua-dev os: - linux notifications: diff --git a/process/sendreport.sh b/process/sendreport.sh index 003026f4a..1b9af1d35 100755 --- a/process/sendreport.sh +++ b/process/sendreport.sh @@ -14,7 +14,7 @@ GAME=$1 EMAIL=$2 FACTION=$3 PASSWD=$4 -echo "$GAME $EMAIL $FACTION $PASSWD" >> /tmp/report.log +#echo "$GAME $EMAIL $FACTION $PASSWD" >> /tmp/report.log function reply() { echo $@ | mutt -s "Reportnachforderung Partei ${FACTION}" $EMAIL diff --git a/res/eressea/equipment.xml b/res/eressea/equipment.xml index f35505bc0..bf7e38376 100644 --- a/res/eressea/equipment.xml +++ b/res/eressea/equipment.xml @@ -269,11 +269,6 @@ - - - - - diff --git a/res/races/zombie.xml b/res/races/zombie.xml index faecf021d..8c23aea83 100644 --- a/res/races/zombie.xml +++ b/res/races/zombie.xml @@ -3,7 +3,7 @@ recruitcost="-1" maintenance="0" weight="1000" capacity="440" speed="1.000000" hp="20" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="no" walk="yes" shapeshift="no" giveperson="no" giveunit="no" - getitem="no" recruitethereal="no" equipment="yes" scarepeasants="yes" + getitem="no" equipment="yes" scarepeasants="yes" cansteal="no" unarmedguard="yes" absorbpeasants="yes" noheal="yes" undead="yes" resistpierce="yes"> diff --git a/s/preview b/s/preview index 79411aea6..86a4f8918 100755 --- a/s/preview +++ b/s/preview @@ -22,6 +22,7 @@ exit $2 # otherwise function build() { assert_dir $SOURCE cd $SOURCE +rm -rf crypto tolua git fetch || abort "failed to update source. do you have local changes?" [ -z $1 ] || git checkout $1 git pull diff --git a/src/economy.c b/src/economy.c index 8f6a1afa1..6ec5d9191 100644 --- a/src/economy.c +++ b/src/economy.c @@ -180,15 +180,6 @@ static void expandorders(region * r, request * requests) /* ------------------------------------------------------------- */ -static void change_level(unit * u, skill_t sk, int bylevel) -{ - skill *sv = unit_skill(u, sk); - assert(bylevel > 0); - if (sv == 0) - sv = add_skill(u, sk); - sk_set(sv, sv->level + bylevel); -} - typedef struct recruitment { struct recruitment *next; faction *f; @@ -258,10 +249,6 @@ void add_recruits(unit * u, int number, int wanted) strlcat(equipment, "_unit", sizeof(equipment)); equip_unit(unew, get_equipment(equipment)); - if (u_race(unew)->ec_flags & ECF_REC_HORSES) { - change_level(unew, SK_RIDING, 1); - } - if (unew != u) { transfermen(unew, u, unew->number); remove_unit(&r->units, unew); @@ -278,24 +265,6 @@ static int any_recruiters(const struct race *rc, int qty) return (int)(qty * 2 * rc->recruit_multi); } -/*static int peasant_recruiters(const struct race *rc, int qty) -{ -if (rc->ec_flags & ECF_REC_ETHEREAL) -return -1; -if (rc->ec_flags & ECF_REC_HORSES) -return -1; -return (int)(qty * 2 * rc->recruit_multi); -}*/ - -static int horse_recruiters(const struct race *rc, int qty) -{ - if (rc->ec_flags & ECF_REC_ETHEREAL) - return -1; - if (rc->ec_flags & ECF_REC_HORSES) - return (int)(qty * 2.0 * rc->recruit_multi); - return -1; -} - static int do_recruiting(recruitment * recruits, int available) { recruitment *rec; @@ -407,17 +376,6 @@ static void expandrecruit(region * r, request * recruitorders) int orc_total = 0; - /* centaurs: */ - recruits = select_recruitment(&recruitorders, horse_recruiters, &orc_total); - if (recruits) { - int recruited, horses = rhorses(r) * 2; - if (orc_total < horses) - horses = orc_total; - recruited = do_recruiting(recruits, horses); - rsethorses(r, (horses - recruited) / 2); - free_recruitments(recruits); - } - /* peasant limited: */ recruits = select_recruitment(&recruitorders, any_recruiters, &orc_total); if (recruits) { @@ -539,7 +497,7 @@ static void recruit(unit * u, struct order *ord, request ** recruitorders) return; } - if (!(rc->ec_flags & ECF_REC_HORSES) && fval(r, RF_ORCIFIED)) { + if (fval(r, RF_ORCIFIED)) { if (rc != get_race(RC_ORC)) { cmistake(u, ord, 238, MSG_EVENT); return; diff --git a/src/kernel/config.c b/src/kernel/config.c index 17ac32643..7c58d7766 100644 --- a/src/kernel/config.c +++ b/src/kernel/config.c @@ -679,7 +679,7 @@ static const char * relpath(char *buf, size_t sz, const char *path) { static const char *g_datadir; const char *datapath(void) { - static char zText[MAX_PATH]; // FIXME: static return value + static char zText[MAX_PATH]; if (g_datadir) return g_datadir; return relpath(zText, sizeof(zText), "data"); @@ -693,7 +693,7 @@ void set_datapath(const char *path) static const char *g_reportdir; const char *reportpath(void) { - static char zText[MAX_PATH]; // FIXME: static return value + static char zText[MAX_PATH]; if (g_reportdir) return g_reportdir; return relpath(zText, sizeof(zText), "reports"); diff --git a/src/kernel/faction.c b/src/kernel/faction.c index f97142e45..774a6aec8 100755 --- a/src/kernel/faction.c +++ b/src/kernel/faction.c @@ -386,19 +386,14 @@ void destroyfaction(faction ** fp) const race *rc = u_race(u); int m = rmoney(r); + /* Personen gehen nur an die Bauern, wenn sie auch von dort + * stammen */ if ((rc->ec_flags & ECF_REC_ETHEREAL) == 0) { int p = rpeasants(u->region); int h = rhorses(u->region); item *itm; - /* Personen gehen nur an die Bauern, wenn sie auch von dort - * stammen */ - if (rc->ec_flags & ECF_REC_HORSES) { /* Zentauren an die Pferde */ - h += u->number; - } - else { /* Orks zählen nur zur Hälfte */ - p += (int)(u->number * rc->recruit_multi); - } + p += (int)(u->number * rc->recruit_multi); for (itm = u->items; itm; itm = itm->next) { if (itm->type->flags & ITF_ANIMAL) { h += itm->number; diff --git a/src/kernel/race.h b/src/kernel/race.h index 214f2738d..dc3becabb 100644 --- a/src/kernel/race.h +++ b/src/kernel/race.h @@ -217,7 +217,6 @@ extern "C" { #define GIVEPERSON (1<<2) /* übergibt Personen */ #define GIVEUNIT (1<<3) /* Einheiten an andere Partei übergeben */ #define GETITEM (1<<4) /* nimmt Gegenstände an */ -#define ECF_REC_HORSES (1<<6) /* Rekrutiert aus Pferden */ #define ECF_REC_ETHEREAL (1<<7) /* Rekrutiert aus dem Nichts */ #define ECF_REC_UNLIMITED (1<<8) /* Rekrutiert ohne Limit */ diff --git a/src/kernel/unit.c b/src/kernel/unit.c index d95096484..201153663 100644 --- a/src/kernel/unit.c +++ b/src/kernel/unit.c @@ -1084,15 +1084,9 @@ void transfermen(unit * u, unit * dst, int n) else if (r->land) { if ((u_race(u)->ec_flags & ECF_REC_ETHEREAL) == 0) { const race *rc = u_race(u); - if (rc->ec_flags & ECF_REC_HORSES) { /* Zentauren an die Pferde */ - int h = rhorses(r) + n; - rsethorses(r, h); - } - else { - int p = rpeasants(r); - p += (int)(n * rc->recruit_multi); - rsetpeasants(r, p); - } + int p = rpeasants(r); + p += (int)(n * rc->recruit_multi); + rsetpeasants(r, p); } } } diff --git a/src/kernel/xmlreader.c b/src/kernel/xmlreader.c index 894647f89..e022effaf 100644 --- a/src/kernel/xmlreader.c +++ b/src/kernel/xmlreader.c @@ -1730,8 +1730,6 @@ static int parse_races(xmlDocPtr doc) rc->ec_flags |= GIVEUNIT; if (xml_bvalue(node, "getitem", false)) rc->ec_flags |= GETITEM; - if (xml_bvalue(node, "recruithorses", false)) - rc->ec_flags |= ECF_REC_HORSES; if (xml_bvalue(node, "recruitethereal", false)) rc->ec_flags |= ECF_REC_ETHEREAL; if (xml_bvalue(node, "recruitunlimited", false)) diff --git a/src/util/unicode.test.c b/src/util/unicode.test.c index f485808cb..410e8e68a 100644 --- a/src/util/unicode.test.c +++ b/src/util/unicode.test.c @@ -23,42 +23,42 @@ static void test_unicode_utf8_to_other(CuTest *tc) unsigned char ch; size_t sz; CuAssertIntEquals(tc, 0, unicode_utf8_to_cp437(&ch, utf8_str, &sz)); - CuAssertIntEquals(tc, 2, sz); + CuAssertIntEquals(tc, 2, (int)sz); CuAssertIntEquals(tc, '?', ch); CuAssertIntEquals(tc, 0, unicode_utf8_to_cp437(&ch, utf8_str+2, &sz)); - CuAssertIntEquals(tc, 2, sz); + CuAssertIntEquals(tc, 2, (int)sz); CuAssertIntEquals(tc, '?', ch); CuAssertIntEquals(tc, 0, unicode_utf8_to_cp437(&ch, utf8_str+4, &sz)); - CuAssertIntEquals(tc, 2, sz); + CuAssertIntEquals(tc, 2, (int)sz); CuAssertIntEquals(tc, '?', ch); CuAssertIntEquals(tc, 0, unicode_utf8_to_cp437(&ch, utf8_str + 6, &sz)); - CuAssertIntEquals(tc, 1, sz); + CuAssertIntEquals(tc, 1, (int)sz); CuAssertIntEquals(tc, 'l', ch); CuAssertIntEquals(tc, 0, unicode_utf8_to_cp1252(&ch, utf8_str, &sz)); - CuAssertIntEquals(tc, 2, sz); + CuAssertIntEquals(tc, 2, (int)sz); CuAssertIntEquals(tc, 216, ch); CuAssertIntEquals(tc, 0, unicode_utf8_to_cp1252(&ch, utf8_str+2, &sz)); - CuAssertIntEquals(tc, 2, sz); + CuAssertIntEquals(tc, 2, (int)sz); CuAssertIntEquals(tc, 120, ch); CuAssertIntEquals(tc, 0, unicode_utf8_to_cp1252(&ch, utf8_str + 4, &sz)); - CuAssertIntEquals(tc, 2, sz); + CuAssertIntEquals(tc, 2, (int)sz); CuAssertIntEquals(tc, 0x9d, ch); CuAssertIntEquals(tc, 0, unicode_utf8_to_cp1252(&ch, utf8_str + 6, &sz)); - CuAssertIntEquals(tc, 1, sz); + CuAssertIntEquals(tc, 1, (int)sz); CuAssertIntEquals(tc, 'l', ch); CuAssertIntEquals(tc, 0, unicode_utf8_to_ascii(&ch, utf8_str, &sz)); - CuAssertIntEquals(tc, 2, sz); + CuAssertIntEquals(tc, 2, (int)sz); CuAssertIntEquals(tc, '?', ch); CuAssertIntEquals(tc, 0, unicode_utf8_to_ascii(&ch, utf8_str + 2, &sz)); - CuAssertIntEquals(tc, 2, sz); + CuAssertIntEquals(tc, 2, (int)sz); CuAssertIntEquals(tc, '?', ch); CuAssertIntEquals(tc, 0, unicode_utf8_to_ascii(&ch, utf8_str + 4, &sz)); - CuAssertIntEquals(tc, 2, sz); + CuAssertIntEquals(tc, 2, (int)sz); CuAssertIntEquals(tc, '?', ch); CuAssertIntEquals(tc, 0, unicode_utf8_to_ascii(&ch, utf8_str + 6, &sz)); - CuAssertIntEquals(tc, 1, sz); + CuAssertIntEquals(tc, 1, (int)sz); CuAssertIntEquals(tc, 'l', ch); }