diff --git a/conf/e3/locales.xml b/conf/e3/locales.xml
index 2d94bf202..bb7245fa3 100644
--- a/conf/e3/locales.xml
+++ b/conf/e3/locales.xml
@@ -4,7 +4,6 @@
-
diff --git a/res/core/messages.xml b/res/core/messages.xml
index 5d8a60ef0..5bb36e345 100644
--- a/res/core/messages.xml
+++ b/res/core/messages.xml
@@ -2033,6 +2033,13 @@
$if($isnull($mage),"Ein unentdeckter Magier",$unit($mage)) erschuf einen heiligen Hain von $int($amount) Schößlingen.
$if($isnull($mage),"An unknown magician",$unit($mage)) created a holy forest of $int($amount) young trees.
+
+
+
+
+ "$if($isnull($mage),"Ein unentdeckter Magier",$unit($mage)) führt einen sonderbaren Tanz auf. Kurz darauf beginnt es zu regnen."
+ "$if($isnull($mage),"an unseen magician",$unit($mage)) dances a strange dance. Shortly after, rain begins to fall on the fields."
+
diff --git a/res/e3a/messages.xml b/res/e3a/messages.xml
deleted file mode 100644
index 03e5b6eb4..000000000
--- a/res/e3a/messages.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
- "$if($isnull($mage),"Ein unentdeckter Magier",$unit($mage)) führt einen sonderbaren Tanz auf. Kurz darauf beginnt es zu regnen."
- "$if($isnull($mage),"an unseen magician",$unit($mage)) dances a strange dance. Shortly after, rain begins to fall on the fields."
-
-
diff --git a/scripts/run-turn.lua b/scripts/run-turn.lua
index 9118ed8ee..3ec87c045 100644
--- a/scripts/run-turn.lua
+++ b/scripts/run-turn.lua
@@ -142,8 +142,9 @@ function process(rules, orders)
return -1
end
- callbacks(rules, 'init')
+ turn_begin()
init_summary()
+ callbacks(rules, 'init')
-- run the turn:
if eressea.read_orders(orders) ~= 0 then
@@ -157,12 +158,13 @@ function process(rules, orders)
return -1
end
- process_orders()
callbacks(rules, 'update')
+ turn_process()
write_files(config.locales)
dbupdate()
+ turn_end()
file = '' .. get_turn() .. '.dat'
if eressea.write_game(file)~=0 then
eressea.log.error("could not write game")
diff --git a/src/kernel/config.c b/src/kernel/config.c
index 37765914b..566b9fc88 100644
--- a/src/kernel/config.c
+++ b/src/kernel/config.c
@@ -869,6 +869,7 @@ const char * game_mailcmd(void)
}
*r = '\0';
log_warning("game.mailcmd configuration is not set, using %s from game.name", result);
+ config_set("game.mailcmd", result);
return result;
}
return param;
diff --git a/src/kernel/config.test.c b/src/kernel/config.test.c
index 40adaa364..ac35b85a3 100644
--- a/src/kernel/config.test.c
+++ b/src/kernel/config.test.c
@@ -278,6 +278,7 @@ static void test_game_mailcmd(CuTest *tc) {
CuAssertStrEquals(tc, "Eressea", game_name());
CuAssertStrEquals(tc, "ERESSEA", game_mailcmd());
config_set("game.name", "Hodor");
+ config_set("game.mailcmd", NULL);
CuAssertStrEquals(tc, "Hodor", game_name());
CuAssertStrEquals(tc, "HODOR", game_mailcmd());
config_set("game.mailcmd", "ERESSEA");
diff --git a/src/kernel/save.c b/src/kernel/save.c
index 83a218622..58144d283 100644
--- a/src/kernel/save.c
+++ b/src/kernel/save.c
@@ -240,10 +240,7 @@ static faction *factionorders(void)
}
/* Die Partei hat sich zumindest gemeldet, so dass sie noch
* nicht als untätig gilt */
-
- /* TODO: +1 ist ein Workaround, weil cturn erst in process_orders
- * incrementiert wird. */
- f->lastorders = turn + 1;
+ f->lastorders = turn;
}
else {
diff --git a/src/magic.c b/src/magic.c
index 93c5009f5..ad6248ae1 100644
--- a/src/magic.c
+++ b/src/magic.c
@@ -3010,6 +3010,7 @@ int cast_spell(struct castorder *co)
fun = get_spellcast(sp->sname);
if (!fun) {
+ log_debug("no spell function for %s, try callback", sp->sname);
return callbacks.cast_spell(co, fname);
}
return fun(co);
diff --git a/src/summary.c b/src/summary.c
index 90cab98c0..916124815 100644
--- a/src/summary.c
+++ b/src/summary.c
@@ -92,7 +92,7 @@ int update_nmrs(void)
++newplayers;
}
else if (!fval(f, FFL_NOIDLEOUT|FFL_CURSED)) {
- int nmr = turn - f->lastorders + 1;
+ int nmr = turn - f->lastorders;
if (timeout>0) {
if (nmr < 0 || nmr > timeout) {
log_error("faction %s has %d NMR", itoa36(f->no), nmr);