diff --git a/res/core/de/strings.xml b/res/core/de/strings.xml
index 8207e0aec..2be2f04e4 100644
--- a/res/core/de/strings.xml
+++ b/res/core/de/strings.xml
@@ -7100,112 +7100,6 @@
Furious peasants
-
- Söldner
- Mercenaries
-
-
-
- Sumpfbewohner
- Swamp people
-
-
-
- Waldbewohner
- Woodsmen
-
-
-
- Nomaden
- Nomads
-
-
-
- Eisleute
- Ice people
-
-
-
- Bergbewohner
- Mountain people
-
-
-
- Magie der Elemente
- Magic of the Elements
-
-
-
- Schwerter, Armbrüste, Langbögen
- Swords, Crossbows and Longbows
-
-
-
- Gorms Almanach der Rationellen Kriegsführung
- Gorm's Almanach of Rational War
-
-
-
- Katamarane, Koggen, Karavellen
- The dragonship, the caravell and the longboat
-
-
-
- Wege der Sterne
- Ways of the Start
-
-
-
- Nadishahs Kleine Gift- und Kräuterkunde
- Nadishah's collected lore on poisonous and beneficial herbs
-
-
-
- Mandricks Kompendium der Alchemie
- Mandrick's alchemistic compendium
-
-
-
- Die Konstruktion der Burgen und Schlösser von Zentralandune
-
-
-
- Die Esse
-
-
-
- Über die Gewinnung von Erzen
-
-
-
- Barinions Lieder, eine Einführung für Unbedarfte
-
-
-
- die Ruine eines alten Tempels
- the ruins of an ancient temple
-
-
-
- eine alte Burgruine
- the ruins of a castle
-
-
-
- ein zerfallenes Bauernhaus
- a dilapitated farm
-
-
-
- eine Leiche am Wegesrand
- a corpse by the wayside
-
-
-
- eine Leiche am Wegesrand
- a corpse by the wayside
-
-
Feuerdrache
fire dragon
diff --git a/res/core/messages.xml b/res/core/messages.xml
index 5b703589d..371369dbf 100644
--- a/res/core/messages.xml
+++ b/res/core/messages.xml
@@ -7991,23 +7991,6 @@
"A message from $unit($unit): '$message'"
-
-
-
-
-
- "Plötzlich stolpert $unit($unit) über einige $localize($name). Nach kurzem Zögern entschließen die $localize($name), sich Deiner Partei anzuschließen."
- "$unit($unit) stumbles upon $localize($name). After short hesitation, $localize($name) agrees to join your faction."
-
-
-
-
-
-
- "$unit($unit) entdeckt ein kleines Dorf. Die meisten Häuser wurden durch einen über die Ufer getretenen Fluß zerstört. Eine Gruppe der verzweifelten Menschen schließt sich deiner Partei an."
- "$unit($unit) discovers a small village. Most of the houses have been destroyed by flooding, and a group of the distressed villagers join your faction."
-
-
"Ein Bauernmob erhebt sich und macht Jagd auf Schwarzmagier."
"An angry mob forms and hunts practitioners of the dark arts."
diff --git a/res/eressea/equipment.xml b/res/eressea/equipment.xml
index d64a5e3e4..d0f37a404 100644
--- a/res/eressea/equipment.xml
+++ b/res/eressea/equipment.xml
@@ -1,163 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/scripts/eressea/equipment.lua b/scripts/eressea/equipment.lua
index ffe910e7a..d7fa9d43a 100644
--- a/scripts/eressea/equipment.lua
+++ b/scripts/eressea/equipment.lua
@@ -105,7 +105,7 @@ local sets = {
['sailing'] = 1
},
['callback'] = equip_newunits
- }
+ },
}
function equip_unit(u, name, flags)
diff --git a/scripts/run-tests-e2.lua b/scripts/run-tests-e2.lua
index 2672b7ef2..b5f18c7f7 100644
--- a/scripts/run-tests-e2.lua
+++ b/scripts/run-tests-e2.lua
@@ -22,7 +22,6 @@ eressea.settings.set("rules.food.flags", "4")
eressea.settings.set("rules.ship.damage.nocrew", "0")
eressea.settings.set("rules.ship.drifting", "0")
eressea.settings.set("rules.ship.storms", "0")
-eressea.settings.set("rules.encounters", "0")
eressea.settings.set("nmr.timeout", "0")
eressea.settings.set("NewbieImmunity", "0")
rules = require('eressea.' .. config.rules)
diff --git a/scripts/run-tests-e3.lua b/scripts/run-tests-e3.lua
index 9ad78a81f..3332df306 100644
--- a/scripts/run-tests-e3.lua
+++ b/scripts/run-tests-e3.lua
@@ -23,7 +23,6 @@ eressea.settings.set("rules.food.flags", "4")
eressea.settings.set("rules.ship.damage.nocrew", "0")
eressea.settings.set("rules.ship.drifting", "0")
eressea.settings.set("rules.ship.storms", "0")
-eressea.settings.set("rules.encounters", "0")
eressea.settings.set("nmr.timeout", "0")
eressea.settings.set("NewbieImmunity", "0")
rules = require('eressea.' .. config.rules)
diff --git a/scripts/tests/common.lua b/scripts/tests/common.lua
index b77606266..40604d7a9 100644
--- a/scripts/tests/common.lua
+++ b/scripts/tests/common.lua
@@ -33,7 +33,6 @@ function setup()
eressea.settings.set("nmr.timeout", "0")
eressea.settings.set("NewbieImmunity", "0")
eressea.settings.set("rules.food.flags", "4")
- eressea.settings.set("rules.encounters", "0")
eressea.settings.set("rules.peasants.growth", "1")
eressea.settings.set("study.random_progress", "0")
end
@@ -968,7 +967,6 @@ module("tests.parser", package.seeall, lunit.testcase)
function setup()
eressea.free_game()
eressea.settings.set("rules.food.flags", "4") -- FOOD_IS_FREE
- eressea.settings.set("rules.encounters", "0")
eressea.settings.set("rules.move.owner_leave", "0")
end
diff --git a/scripts/tests/e2/adamantium.lua b/scripts/tests/e2/adamantium.lua
index de9a2312f..a893d32d5 100644
--- a/scripts/tests/e2/adamantium.lua
+++ b/scripts/tests/e2/adamantium.lua
@@ -7,7 +7,6 @@ function setup()
eressea.settings.set("nmr.timeout", "0")
eressea.settings.set("rules.food.flags", "4")
eressea.settings.set("rules.ship.storms", "0")
- eressea.settings.set("rules.encounters", "0")
end
local function create_faction(race)
diff --git a/scripts/tests/e2/items.lua b/scripts/tests/e2/items.lua
index 456262342..99b32cc52 100644
--- a/scripts/tests/e2/items.lua
+++ b/scripts/tests/e2/items.lua
@@ -7,7 +7,6 @@ function setup()
eressea.settings.set("nmr.timeout", "0")
eressea.settings.set("rules.food.flags", "4")
eressea.settings.set("rules.ship.storms", "0")
- eressea.settings.set("rules.encounters", "0")
eressea.settings.set("magic.regeneration.enable", "0")
eressea.settings.set("rules.grow.formula", "0")
eressea.settings.set("study.random_progress", "0")
diff --git a/scripts/tests/items.lua b/scripts/tests/items.lua
index 60bbf100f..f4d8657c6 100644
--- a/scripts/tests/items.lua
+++ b/scripts/tests/items.lua
@@ -8,7 +8,6 @@ function setup()
eressea.settings.set("NewbieImmunity", "0")
eressea.settings.set("rules.food.flags", "4")
eressea.settings.set("rules.ship.storms", "0")
- eressea.settings.set("rules.encounters", "0")
eressea.settings.set("magic.regeneration.enable", "0")
end
diff --git a/scripts/tests/study.lua b/scripts/tests/study.lua
index 2a713dd43..14d4ce1d6 100644
--- a/scripts/tests/study.lua
+++ b/scripts/tests/study.lua
@@ -36,7 +36,6 @@ function test_study_expensive()
local f = faction.create("human", "test@example.com", "de")
local u = unit.create(f, r, 1)
eressea.settings.set("skills.cost.alchemy", "50")
- eressea.settings.set("rules.encounters", "0")
u:add_order("LERNEN Alchemie")
u:add_item("money", 50)
process_orders()
diff --git a/scripts/tests/undead.lua b/scripts/tests/undead.lua
index 0c9f609f1..a3c541afa 100644
--- a/scripts/tests/undead.lua
+++ b/scripts/tests/undead.lua
@@ -7,7 +7,6 @@ function setup()
eressea.settings.set("nmr.timeout", "0")
eressea.settings.set("NewbieImmunity", "0")
eressea.settings.set("rules.food.flags", "4")
- eressea.settings.set("rules.encounters", "0")
eressea.settings.set("rules.peasants.growth", "1")
eressea.settings.set("study.random_progress", "0")
eressea.settings.set("GiveRestriction", "0")
diff --git a/src/kernel/region.c b/src/kernel/region.c
index 790a8341c..0709ba761 100644
--- a/src/kernel/region.c
+++ b/src/kernel/region.c
@@ -1091,7 +1091,6 @@ void terraform_region(region * r, const terrain_type * terrain)
rsethorses(r, 0);
rsetpeasants(r, 0);
rsetmoney(r, 0);
- freset(r, RF_ENCOUNTER);
freset(r, RF_MALLORN);
return;
}
@@ -1195,9 +1194,6 @@ void terraform_region(region * r, const terrain_type * terrain)
fset(r, RF_MALLORN);
else
freset(r, RF_MALLORN);
- if (rng_int() % 100 < ENCCHANCE) {
- fset(r, RF_ENCOUNTER);
- }
}
}
diff --git a/src/kernel/region.h b/src/kernel/region.h
index d37da2290..9543658d9 100644
--- a/src/kernel/region.h
+++ b/src/kernel/region.h
@@ -42,7 +42,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define RF_UNUSED_7 (1<<7)
#define RF_UNUSED_8 (1<<8)
-#define RF_ENCOUNTER (1<<9) /* persistent */
#define RF_MAPPER_HIGHLIGHT (1<<10)
#define RF_LIGHTHOUSE (1<<11) /* this region may contain a lighthouse */
#define RF_MIGRATION (1<<13)
@@ -58,7 +57,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define RF_ALL 0xFFFFFF
-#define RF_SAVEMASK (RF_CHAOTIC|RF_MALLORN|RF_BLOCKED|RF_ENCOUNTER|RF_GUARDED|RF_LIGHTHOUSE)
+#define RF_SAVEMASK (RF_CHAOTIC|RF_MALLORN|RF_BLOCKED|RF_GUARDED|RF_LIGHTHOUSE)
struct message;
struct message_list;
struct rawmaterial;
diff --git a/src/laws.c b/src/laws.c
index 9eb3795c6..c8b6e3734 100644
--- a/src/laws.c
+++ b/src/laws.c
@@ -4040,11 +4040,6 @@ void init_processor(void)
p += 10;
add_proc_order(p, K_GUARD, guard_on_cmd, 0, "Bewache (an)");
- if (config_get_int("rules.encounters", 0)) {
- p += 10;
- add_proc_global(p, encounters, "Zufallsbegegnungen");
- }
-
p += 10;
add_proc_unit(p, monster_kills_peasants,
"Monster fressen und vertreiben Bauern");
diff --git a/src/randenc.c b/src/randenc.c
index 709702513..d7184af83 100644
--- a/src/randenc.c
+++ b/src/randenc.c
@@ -168,254 +168,6 @@ static bool improve_all(faction * f, skill_t sk, int by_weeks)
return result;
}
-void find_manual(region * r, unit * u)
-{
- char zLocation[32];
- char zBook[32];
- skill_t skill = NOSKILL;
- message *msg;
-
- switch (rng_int() % 36) {
- case 0:
- skill = SK_MAGIC;
- break;
- case 1:
- case 2:
- case 3:
- case 4:
- skill = SK_WEAPONSMITH;
- break;
- case 5:
- case 6:
- skill = SK_TACTICS;
- break;
- case 7:
- case 8:
- case 9:
- case 10:
- skill = SK_SHIPBUILDING;
- break;
- case 11:
- case 12:
- case 13:
- case 14:
- skill = SK_SAILING;
- break;
- case 15:
- case 16:
- case 17:
- skill = SK_HERBALISM;
- break;
- case 18:
- case 19:
- skill = SK_ALCHEMY;
- break;
- case 20:
- case 21:
- case 22:
- case 23:
- skill = SK_BUILDING;
- break;
- case 24:
- case 25:
- case 26:
- case 27:
- skill = SK_ARMORER;
- break;
- case 28:
- case 29:
- case 30:
- case 31:
- skill = SK_MINING;
- break;
- case 32:
- case 33:
- case 34:
- case 35:
- skill = SK_ENTERTAINMENT;
- break;
- }
-
- snprintf(zLocation, sizeof(zLocation), "manual_location_%d",
- (int)(rng_int() % 4));
- snprintf(zBook, sizeof(zLocation), "manual_title_%s", skillnames[skill]);
-
- msg = msg_message("find_manual", "unit location book", u, zLocation, zBook);
- if (msg) {
- r_addmessage(r, u->faction, msg);
- msg_release(msg);
- }
-
- if (!improve_all(u->faction, skill, 3)) {
- increase_skill(u, skill, 9);
- }
-}
-
-static void get_villagers(region * r, unit * u)
-{
- unit *newunit;
- message *msg = msg_message("encounter_villagers", "unit", u);
- const char *name = LOC(u->faction->locale, "villagers");
-
- r_addmessage(r, u->faction, msg);
- msg_release(msg);
-
- newunit =
- create_unit(r, u->faction, rng_int() % 20 + 3, u->faction->race, 0, name,
- u);
- leave(newunit, true);
- fset(newunit, UFL_ISNEW | UFL_MOVED);
- equip_unit(newunit, "rand_villagers");
-}
-
-static void get_allies(region * r, unit * u)
-{
- unit *newunit = NULL;
- const char *name;
- const char *equip;
- int number;
- message *msg;
-
- assert(u->number);
-
- switch (rterrain(r)) {
- case T_PLAIN:
- if (!r_isforest(r)) {
- if (get_money(u) / u->number < 100 + rng_int() % 200)
- return;
- name = "random_plain_men";
- equip = "rand_plain";
- number = rng_int() % 8 + 2;
- break;
- }
- else {
- if (effskill(u, SK_LONGBOW, r) < 3
- && effskill(u, SK_HERBALISM, r) < 2
- && effskill(u, SK_MAGIC, r) < 2) {
- return;
- }
- name = "random_forest_men";
- equip = "rand_forest";
- number = rng_int() % 6 + 2;
- }
- break;
-
- case T_SWAMP:
- if (effskill(u, SK_MELEE, r) <= 1) {
- return;
- }
- name = "random_swamp_men";
- equip = "rand_swamp";
- number = rng_int() % 6 + 2;
- break;
-
- case T_DESERT:
- if (effskill(u, SK_RIDING, r) <= 2) {
- return;
- }
- name = "random_desert_men";
- equip = "rand_desert";
- number = rng_int() % 12 + 2;
- break;
-
- case T_HIGHLAND:
- if (effskill(u, SK_MELEE, r) <= 1) {
- return;
- }
- name = "random_highland_men";
- equip = "rand_highland";
- number = rng_int() % 8 + 2;
- break;
-
- case T_MOUNTAIN:
- if (effskill(u, SK_MELEE, r) <= 1 || effskill(u, SK_TRADE, r) <= 2) {
- return;
- }
- name = "random_mountain_men";
- equip = "rand_mountain";
- number = rng_int() % 6 + 2;
- break;
-
- case T_GLACIER:
- if (effskill(u, SK_MELEE, r) <= 1 || effskill(u, SK_TRADE, r) <= 1) {
- return;
- }
- name = "random_glacier_men";
- equip = "rand_glacier";
- number = rng_int() % 4 + 2;
- break;
-
- default:
- return;
- }
-
- newunit =
- create_unit(r, u->faction, number, u->faction->race, 0,
- LOC(u->faction->locale, name), u);
- equip_unit(newunit, equip);
-
- u_setfaction(newunit, u->faction);
- set_racename(&newunit->attribs, get_racename(u->attribs));
- if (u_race(u)->flags & RCF_SHAPESHIFT) {
- newunit->irace = u->irace;
- }
- if (fval(u, UFL_ANON_FACTION))
- fset(newunit, UFL_ANON_FACTION);
- fset(newunit, UFL_ISNEW);
-
- msg = msg_message("encounter_allies", "unit name", u, name);
- r_addmessage(r, u->faction, msg);
- msg_release(msg);
-}
-
-static void encounter(region * r, unit * u)
-{
- if (!fval(r, RF_ENCOUNTER))
- return;
- freset(r, RF_ENCOUNTER);
- if (rng_int() % 100 >= ENCCHANCE)
- return;
- switch (rng_int() % 3) {
- case 0:
- find_manual(r, u);
- break;
- case 1:
- get_villagers(r, u);
- break;
- case 2:
- get_allies(r, u);
- break;
- }
-}
-
-void encounters(void)
-{
- region *r;
-
- for (r = regions; r; r = r->next) {
- if (fval(r->terrain, LAND_REGION) && fval(r, RF_ENCOUNTER)) {
- int c = 0;
- unit *u;
- for (u = r->units; u; u = u->next) {
- c += u->number;
- }
-
- if (c > 0) {
- int i = 0;
- int n = rng_int() % c;
-
- for (u = r->units; u; u = u->next) {
- if (i + u->number > n)
- break;
- i += u->number;
- }
- assert(u && u->number);
- encounter(r, u);
- }
- }
- }
-}
-
void drown(region * r)
{
if (fval(r->terrain, SEA_REGION)) {
@@ -611,7 +363,7 @@ static void move_icebergs(void)
}
}
-void create_icebergs(void)
+static void create_icebergs(void)
{
region *r;
const struct terrain_type *t_iceberg, *t_sleep;
diff --git a/src/randenc.h b/src/randenc.h
index cc799db5f..3814a520d 100644
--- a/src/randenc.h
+++ b/src/randenc.h
@@ -30,7 +30,6 @@ extern "C" {
#define PLAGUE_HEALCHANCE 0.25 /* Wahrscheinlichkeit Heilung */
#define PLAGUE_HEALCOST 30 /* Heilkosten */
void plagues(struct region *r);
- void encounters(void);
void randomevents(void);
#ifdef __cplusplus
diff --git a/src/settings.h b/src/settings.h
index 0a017dd7a..57edb1566 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -31,6 +31,5 @@
/* Gebaeudegroesse = Minimalbelagerer */
#define SIEGEFACTOR 2
-#define ENCCHANCE 10 /* %-Chance fuer einmalige Zufallsbegegnung */
#define BAGCAPACITY 20000 /* soviel passt in einen Bag of Holding */
#define PERSON_WEIGHT 1000 /* weight of a "normal" human unit */