diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index b81a6acc5..1f4fa4524 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -543,7 +543,7 @@ recruit(unit * u, struct order * ord, request ** recruitorders) } if (has_skill(u, SK_ALCHEMY) && count_skill(u->faction, SK_ALCHEMY) + n > - max_skill(u->faction, SK_ALCHEMY)) + skill_limit(u->faction, SK_ALCHEMY)) { cmistake(u, ord, 156, MSG_EVENT); return; @@ -565,7 +565,11 @@ recruit(unit * u, struct order * ord, request ** recruitorders) o->ord = copy_order(ord); addlist(recruitorders, o); } -/* ------------------------------------------------------------- */ + +#define GIVE_SELF 1 +#define GIVE_PEASANTS 2 +#define GIVE_OTHERS 4 +#define GIVE_ANY (GIVE_SELF|GIVE_PEASANTS|GIVE_OTHERS) static void give_cmd(unit * u, order * ord) @@ -573,7 +577,7 @@ give_cmd(unit * u, order * ord) region * r = u->region; unit *u2; const char *s; - int i, n; + int i, n, rule; const item_type * itype; param_t p; @@ -586,6 +590,15 @@ give_cmd(unit * u, order * ord) return; } + rule = get_param_int(global.parameters, "rules.give", 7); + if (getunitpeasants && (rule & GIVE_PEASANTS)==0) { + ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "feedback_give_forbidden", "")); + return; + } else if (u2 && u2->faction!=u->faction && (rule & GIVE_OTHERS)==0) { + ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "feedback_give_forbidden", "")); + return; + } + /* Damit Tarner nicht durch die Fehlermeldung enttarnt werden können */ if (u2 && !alliedunit(u2, u->faction, HELP_GIVE) && !cansee(u->faction,r,u2,0) && !ucontact(u2, u) && !fval(u2, UFL_TAKEALL)) { ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "feedback_unit_not_found", "")); @@ -2741,15 +2754,15 @@ research_cmd(unit *u, struct order * ord) } static int -wahrnehmung(region * r, faction * f) +max_skill(region * r, faction * f, skill_t sk) { unit *u; int w = 0; for (u = r->units; u; u = u->next) { if (u->faction == f) { - if (eff_skill(u, SK_PERCEPTION, r) > w) { - w = eff_skill(u, SK_PERCEPTION, r); + if (eff_skill(u, sk, r) > w) { + w = eff_skill(u, sk, r); } } } @@ -2820,7 +2833,7 @@ steal_cmd(unit * u, struct order * ord, request ** stealorders) return; } - n = eff_skill(u, SK_STEALTH, r) - wahrnehmung(r, f); + n = eff_skill(u, SK_STEALTH, r) - max_skill(r, f, SK_PERCEPTION); if (n <= 0) { /* Wahrnehmung == Tarnung */ diff --git a/src/common/gamecode/give.c b/src/common/gamecode/give.c index 9620c19dc..37bddcfa4 100644 --- a/src/common/gamecode/give.c +++ b/src/common/gamecode/give.c @@ -223,7 +223,7 @@ give_men(int n, unit * u, unit * u2, struct order * ord) /* wird das Alchemistenmaximum ueberschritten ? */ - if (k > max_skill(u2->faction, SK_ALCHEMY)) { + if (k > skill_limit(u2->faction, SK_ALCHEMY)) { error = 156; } } @@ -371,7 +371,7 @@ give_unit(unit * u, unit * u2, order * ord) } if (has_skill(u, SK_MAGIC)) { if (count_skill(u2->faction, SK_MAGIC) + u->number > - max_skill(u2->faction, SK_MAGIC)) + skill_limit(u2->faction, SK_MAGIC)) { cmistake(u, ord, 155, MSG_COMMERCE); return; @@ -383,7 +383,7 @@ give_unit(unit * u, unit * u2, order * ord) } if (has_skill(u, SK_ALCHEMY) && count_skill(u2->faction, SK_ALCHEMY) + u->number > - max_skill(u2->faction, SK_ALCHEMY)) + skill_limit(u2->faction, SK_ALCHEMY)) { cmistake(u, ord, 156, MSG_COMMERCE); return; diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index 66f198bdb..36dfeffa5 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -3735,7 +3735,7 @@ init_processor(void) add_proc_order(p, K_WEREWOLF, &setwere_cmd, 0, NULL); #endif /* KARMA_MODULE */ - if (alliances!=NULL) { + if (get_param_int(global.parameters, "alliance-vinyambar", 0)==1) { p+=10; add_proc_global(p, &alliancekick, NULL); } @@ -3748,7 +3748,7 @@ init_processor(void) add_proc_region(p, &enter_1, "Kontaktieren & Betreten (1. Versuch)"); add_proc_order(p, K_USE, &use_cmd, 0, "Benutzen"); - if (alliances!=NULL) { + if (get_param_int(global.parameters, "alliance-vinyambar", 0)==1) { p+=10; /* in case USE changes it */ add_proc_global(p, &alliancevictory, "Testen der Allianzbedingungen"); } @@ -3875,7 +3875,6 @@ void processorders (void) { static int init = 0; - const char * str; if (!init) { init_processor(); @@ -3888,8 +3887,7 @@ processorders (void) ageing(); remove_empty_units(); - str = get_param(global.parameters, "modules.wormholes"); - if (str && atoi(str)) { + if (get_param_int(global.parameters, "modules.wormholes", 0)) { create_wormholes(); } diff --git a/src/common/gamecode/study.c b/src/common/gamecode/study.c index 8e76f7878..63d6be830 100644 --- a/src/common/gamecode/study.c +++ b/src/common/gamecode/study.c @@ -548,7 +548,7 @@ learn_cmd(unit * u, order * ord) mtyp = M_GRAU; if (!is_mage(u)) create_mage(u, mtyp); } else if (!has_skill(u, SK_MAGIC)) { - int mmax = max_skill(u->faction, SK_MAGIC); + int mmax = skill_limit(u->faction, SK_MAGIC); /* Die Einheit ist noch kein Magier */ if (count_skill(u->faction, SK_MAGIC) + u->number > mmax) { @@ -599,7 +599,7 @@ learn_cmd(unit * u, order * ord) if (sk == SK_ALCHEMY) { maxalchemy = eff_skill(u, SK_ALCHEMY, r); if (!has_skill(u, SK_ALCHEMY)) { - int amax = max_skill(u->faction, SK_ALCHEMY); + int amax = skill_limit(u->faction, SK_ALCHEMY); if (count_skill(u->faction, SK_ALCHEMY) + u->number > amax) { ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "error_max_alchemists", "amount", amax)); return 0; diff --git a/src/common/kernel/border.c b/src/common/kernel/border.c index cb94951d1..3bcb9a51d 100644 --- a/src/common/kernel/border.c +++ b/src/common/kernel/border.c @@ -341,6 +341,7 @@ b_blockfogwall(const border * b, const unit * u, const region * r) return (boolean)(effskill(u, SK_PERCEPTION) > 4); /* Das ist die alte Nebelwand */ } +/** Legacy type used in old Eressea games, no longer in use. */ border_type bt_fogwall = { "fogwall", VAR_INT, b_transparent, /* transparent */ diff --git a/src/common/kernel/build.c b/src/common/kernel/build.c index b539f233d..1f3c7df0c 100644 --- a/src/common/kernel/build.c +++ b/src/common/kernel/build.c @@ -82,6 +82,10 @@ CheckOverload(void) return value; } +/* test if the unit can slip through a siege undetected. + * returns 0 if siege is successful, or 1 if the building is either + * not besieged or the unit can slip through the siege due to better stealth. + */ static int slipthru(const region * r, const unit * u, const building * b) { @@ -89,28 +93,26 @@ slipthru(const region * r, const unit * u, const building * b) int n, o; /* b ist die burg, in die man hinein oder aus der man heraus will. */ + if (b==NULL || b->besieged < b->size * SIEGEFACTOR) { + return 1; + } - if (!b) { - return 1; - } - if (b->besieged < b->size * SIEGEFACTOR) { - return 1; - } /* u wird am hinein- oder herausschluepfen gehindert, wenn STEALTH <= * OBSERVATION +2 der belagerer u2 ist */ - n = eff_skill(u, SK_STEALTH, r); - for (u2 = r->units; u2; u2 = u2->next) + for (u2 = r->units; u2; u2 = u2->next) { if (usiege(u2) == b) { if (invisible(u, u2) >= u->number) continue; o = eff_skill(u2, SK_PERCEPTION, r); - if (o + 2 >= n) + if (o + 2 >= n) { return 0; /* entdeckt! */ + } } + } return 1; } @@ -683,7 +685,7 @@ build(unit * u, const construction * ctype, int completed, int want) } /* Flinkfingerring wirkt nicht auf Mengenbegrenzte (magische) * Talente */ - if (max_skill(u->faction, type->skill)==INT_MAX) { + if (skill_limit(u->faction, type->skill)==INT_MAX) { int i = 0; item * itm = *i_find(&u->items, olditemtype[I_RING_OF_NIMBLEFINGER]); if (itm!=NULL) i = itm->number; diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index 2b78654eb..86b921d58 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -388,8 +388,6 @@ const char *keywords[MAXKEYWORDS] = "DEFAULT", "URSPRUNG", "EMAIL", - "MEINUNG", - "MAGIEGEBIET", "PIRATERIE", "NEUSTART", "GRUPPE", @@ -522,7 +520,7 @@ max_magicians(const faction * f) } int -max_skill(faction * f, skill_t sk) +skill_limit(faction * f, skill_t sk) { int m = INT_MAX; int al = allied_skilllimit(f, sk); diff --git a/src/common/kernel/eressea.h b/src/common/kernel/eressea.h index aae12bd6a..b20ff2fca 100644 --- a/src/common/kernel/eressea.h +++ b/src/common/kernel/eressea.h @@ -155,7 +155,7 @@ extern struct unit_list * get_lighthouses(const struct region * r); extern int lighthouse_range(const struct building * b, const struct faction * f); /* skills */ -extern int max_skill(struct faction * f, skill_t sk); +extern int skill_limit(struct faction * f, skill_t sk); extern int count_skill(struct faction * f, skill_t sk); /* direction, geography */ diff --git a/src/common/kernel/types.h b/src/common/kernel/types.h index 2ef3c2c97..8dde92b42 100644 --- a/src/common/kernel/types.h +++ b/src/common/kernel/types.h @@ -133,8 +133,6 @@ enum { K_DEFAULT, K_URSPRUNG, K_EMAIL, - K_VOTE, /* not in use */ - K_MAGIEGEBIET, /* not in use */ K_PIRACY, K_RESTART, K_GROUP, diff --git a/src/common/kernel/xmlreader.c b/src/common/kernel/xmlreader.c index b22027400..84658dff4 100644 --- a/src/common/kernel/xmlreader.c +++ b/src/common/kernel/xmlreader.c @@ -581,8 +581,6 @@ race_compat(void) if (rc == new_race[RC_TROLL]) { a_add(&rc->attribs, make_skillmod(NOSKILL, SMF_RIDING, NULL, 0.0, -1)); } - } else { - log_warning(("could not find old race %s\n", oldracenames[i])); } } } diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index 7dc62b0c9..485e11e64 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -660,7 +660,7 @@ check_mages(void) if (!is_monsters(f)) { unit * u; int mages = 0; - int maxmages = max_skill(f, SK_MAGIC); + int maxmages = skill_limit(f, SK_MAGIC); for (u = f->units;u!=NULL;u=u->nextF) { if (is_mage(u)) { diff --git a/src/res/asgard.xml b/src/res/asgard.xml index f6b44c4ed..fd8b58a91 100644 --- a/src/res/asgard.xml +++ b/src/res/asgard.xml @@ -52,8 +52,6 @@ - - diff --git a/src/res/changes.txt b/src/res/changes.txt new file mode 100644 index 000000000..612fa08c2 --- /dev/null +++ b/src/res/changes.txt @@ -0,0 +1,44 @@ +Konzepte: +- Astralraum abschaffen +- Regionsbesitz und Moral +- Allianzen +- GIB abstellen + = done + +Talente: +- Talentlimit 10 + Rassenbonus + = done +- Ausdauer wirkt sich nicht auf Trefferpunkte aus +- Wahrnehmung und Tarnung abschalten + = done + +Kampf: +- Regionen belagern +- Allianz ersetzt HELFE KAEMPFE +- Reduktion auf 1 Kampfrunde +- neue Trefferchanceberechnung +- neue Beuteregelung + +Gegenstände: +- Waffen mit höherem Schaden. +- RdU und AdwS überarbeiten + +Diverse: +- neue Terraintypen (weniger Bauern, knappere Ressourcen) +- limitierte Rekrutieren von Migranten erlauben +- Parteitarnung fällt weg + = done (disable TARNEN) +- Monster entfernen + +Ökonomie: +- UNTERHALTEN abstellen + = done (Befehl & Skill) +- TREIBEN abstellen + = done (Befehl & Skill) +- ARBEITEN abstellen + = done (Befehl) +- LEHREN abstellen + = done (Befehl) +- VERKAUFEN abstellen. + = done (Befehl) +- Steuern für den Regionsbesitzer diff --git a/src/res/conquest.xml b/src/res/conquest.xml index 437727e91..d3e8d2304 100644 --- a/src/res/conquest.xml +++ b/src/res/conquest.xml @@ -19,8 +19,6 @@ Game specific - - diff --git a/src/res/de/strings.xml b/src/res/de/strings.xml index a47a962a1..db2ac6cf4 100644 --- a/src/res/de/strings.xml +++ b/src/res/de/strings.xml @@ -2296,12 +2296,6 @@ EMAIL - - MEINUNG - - - MAGIEGEBIET - PIRATERIE diff --git a/src/res/en/strings.xml b/src/res/en/strings.xml index c7b9f517b..37d80e02d 100644 --- a/src/res/en/strings.xml +++ b/src/res/en/strings.xml @@ -1474,12 +1474,6 @@ MAKE - - SCHOOL - - - OPINION - MOVE diff --git a/src/res/eressea.xml b/src/res/eressea.xml index e21623f50..5d434d531 100644 --- a/src/res/eressea.xml +++ b/src/res/eressea.xml @@ -44,8 +44,6 @@ - - diff --git a/src/res/eressea2.xml b/src/res/eressea2.xml new file mode 100644 index 000000000..abe64d619 --- /dev/null +++ b/src/res/eressea2.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + eressea-server@eressea.de + eressea-server@eressea.de + + + Bitte denke daran, deine Befehle mit dem Betreff + ERESSEA BEFEHLE an eressea-server@eressea.de zu senden. + Remember to send your orders to + eressea-server@eressea.de with the subject ERESSEA ORDERS. + + + ERESSEA BEFEHLE + ERESSEA ORDERS + + + diff --git a/src/res/eressea2/races.xml b/src/res/eressea2/races.xml new file mode 100644 index 000000000..cf02a0675 --- /dev/null +++ b/src/res/eressea2/races.xml @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/res/eressea2/terrains.xml b/src/res/eressea2/terrains.xml new file mode 100644 index 000000000..79dab6956 --- /dev/null +++ b/src/res/eressea2/terrains.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/res/fr/strings.xml b/src/res/fr/strings.xml index 702eb4c29..cbbac545b 100644 --- a/src/res/fr/strings.xml +++ b/src/res/fr/strings.xml @@ -1488,12 +1488,6 @@ FAIRE - - SPHERE - - - OPINION - ALLER diff --git a/src/res/hse-05-01.xml b/src/res/hse-05-01.xml index d63a6328d..1d9ca103d 100644 --- a/src/res/hse-05-01.xml +++ b/src/res/hse-05-01.xml @@ -29,8 +29,6 @@ Game specific - - diff --git a/src/res/hse4.xml b/src/res/hse4.xml index 76eabee98..053339f92 100644 --- a/src/res/hse4.xml +++ b/src/res/hse4.xml @@ -32,9 +32,7 @@ Game specific - - diff --git a/src/res/kingdoms.xml b/src/res/kingdoms.xml index 7ef0f07d2..901feae81 100644 --- a/src/res/kingdoms.xml +++ b/src/res/kingdoms.xml @@ -50,8 +50,6 @@ - - diff --git a/src/res/messages.xml b/src/res/messages.xml index 35077471f..769a13d03 100644 --- a/src/res/messages.xml +++ b/src/res/messages.xml @@ -6242,6 +6242,16 @@ "$unit($unit) in $region($region): '$order($command)' - The unit could not be found." + + + + + + + "$unit($unit) in $region($region): '$order($command)' - Dieser Einheit kann nichts gegeben werden." + "$unit($unit) in $region($region): '$order($command)' - You cannot give anything to this unit." + + diff --git a/src/res/rts.xml b/src/res/rts.xml index d44df58a5..55e531d03 100644 --- a/src/res/rts.xml +++ b/src/res/rts.xml @@ -28,8 +28,6 @@ - - diff --git a/src/res/tutorial.xml b/src/res/tutorial.xml index 01f87c9bc..a94fbb72f 100644 --- a/src/res/tutorial.xml +++ b/src/res/tutorial.xml @@ -34,8 +34,6 @@ - - diff --git a/src/res/vinyambar-3.xml b/src/res/vinyambar-3.xml index 5bd628ca0..9f65798f9 100644 --- a/src/res/vinyambar-3.xml +++ b/src/res/vinyambar-3.xml @@ -13,8 +13,6 @@ Game specific - - diff --git a/src/res/vinyambar-classic.xml b/src/res/vinyambar-classic.xml index fd73b3924..30991f2f6 100644 --- a/src/res/vinyambar-classic.xml +++ b/src/res/vinyambar-classic.xml @@ -11,8 +11,6 @@ Game specific - - diff --git a/src/res/vinyambar-wdw.xml b/src/res/vinyambar-wdw.xml index 71c242a66..44850e920 100644 --- a/src/res/vinyambar-wdw.xml +++ b/src/res/vinyambar-wdw.xml @@ -25,8 +25,6 @@ - - diff --git a/src/res/vinyambar.xml b/src/res/vinyambar.xml index f0cc02759..25f93d2ae 100644 --- a/src/res/vinyambar.xml +++ b/src/res/vinyambar.xml @@ -12,8 +12,6 @@ Game specific - -