From 38721e20464d9d14620fd5d771e263f969901253 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 7 Oct 2016 19:33:50 +0200 Subject: [PATCH] remove all mention of centaurs from the code and configuration --- res/eressea/equipment.xml | 5 ----- res/races/zombie.xml | 2 +- src/economy.c | 35 +---------------------------------- src/kernel/faction.c | 11 +++-------- src/kernel/race.h | 1 - src/kernel/unit.c | 12 +++--------- src/kernel/xmlreader.c | 2 -- 7 files changed, 8 insertions(+), 60 deletions(-) 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/src/economy.c b/src/economy.c index 8f6a1afa1..b17ef1cad 100644 --- a/src/economy.c +++ b/src/economy.c @@ -258,10 +258,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 +274,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 +385,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 +506,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/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 ab3bd294c..b499705a4 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))