diff --git a/conf/e2/config.json b/conf/e2/config.json index 84265b78f..fb231e2eb 100644 --- a/conf/e2/config.json +++ b/conf/e2/config.json @@ -27,7 +27,7 @@ "rules.reserve.twophase": true, "rules.give.max_men": -1, "rules.check_overload": false, - "rules.limit.faction": 2500, + "rules.limit.faction": 3000, "rules.maxskills.magic": 5, "rules.guard.base_stop_prob": 0.30, "rules.guard.skill_stop_prob": 0.05, diff --git a/conf/e3/config.json b/conf/e3/config.json index adbfa3526..bfd1bd0fc 100644 --- a/conf/e3/config.json +++ b/conf/e3/config.json @@ -88,7 +88,7 @@ "rules.economy.herbrot": 0, "rules.region_owner_pay_building": "market harbour lighthouse", "rules.dwarf_castles": true, - "rules.limit.faction": 250, + "rules.limit.faction": 500, "rules.grow.formula": 1, "rules.tactics.formula": 1, "rules.help.mask": "fight guard money give", diff --git a/etc/report-mail.de.txt b/etc/report-mail.de.txt new file mode 100644 index 000000000..e40d86b53 --- /dev/null +++ b/etc/report-mail.de.txt @@ -0,0 +1,10 @@ +Freust Du Dich, dass es diese Woche wieder einen Eressea-Report gibt? +Möchtest Du dazu beitragen, dass das auch nächste Woche wieder passiert? +Eressea ist ein freiwilliges gratis-Angebot, und die Spielleitung bezahlt +seit Jahren die Entwicklung und das Hosting aus eigener Tasche. Wenn Dir +das etwas wert ist, kannst Du das auf +https://flattr.com/thing/681354/Eressea zum Ausdruck bringen. + +Diese Mail enthält ein Attachment mit Deinem Eressea-Report in +komprimierter Form. Um ihn zu entpacken benötigst Du ein Programm, +das ZIP-Archive öffnen kann, wie z.B. 7-Zip (http://www.7-zip.org/) diff --git a/etc/report-mail.en.txt b/etc/report-mail.en.txt new file mode 100644 index 000000000..58a8e0c19 --- /dev/null +++ b/etc/report-mail.en.txt @@ -0,0 +1,6 @@ +If you feel that getting a report every weekend is worth something to you, +why not flattr Eressea at https://flattr.com/thing/681354/Eressea ? + +This email contains an Attachment with your Eressea report in compressed +form. To open the attachment, you will need a program that can extract +ZIP files, e.g. 7-Zip (http://www.7-zip.org/). diff --git a/etc/report-mail.txt b/etc/report-mail.txt new file mode 100644 index 000000000..4101243e7 --- /dev/null +++ b/etc/report-mail.txt @@ -0,0 +1,14 @@ +Freust Du Dich, dass es diese Woche wieder einen Eressea-Report gibt? +Möchtest Du dazu beitragen, dass das auch nächste Woche wieder passiert? +Eressea ist ein freiwilliges gratis-Angebot, und die Spielleitung bezahlt +seit Jahren die Entwicklung und das Hosting aus eigener Tasche. Wenn Dir +das etwas wert ist, kannst Du das auf +https://flattr.com/thing/681354/Eressea zum Ausdruck bringen. + +Diese Mail enthält ein Attachment mit Deinem Eressea-Report in +komprimierter Form. Um ihn zu entpacken benötigst Du ein Programm, +das ZIP-Archive öffnen kann, wie z.B. 7-Zip (http://www.7-zip.org/) + +This email contains an attachment with your Eressea report in compressed +form. To open the attachment, you will need a program that can extract +ZIP files, e.g. 7-Zip (http://www.7-zip.org/). diff --git a/process/cron/crontab b/process/cron/crontab deleted file mode 100644 index 9d7e155cb..000000000 --- a/process/cron/crontab +++ /dev/null @@ -1,17 +0,0 @@ -# Crontab for Eressea on gruenbaer.kn-bremen.de - -PATH=/home/eressea/bin:/opt/bin:/usr/local/bin:/usr/bin:/bin -ERESSEA=/home/eressea/eressea -ENABLED=yes -PREVIEW=yes -CONFIRM=yes - -# m h dom mon dow command -00 00 * * * $HOME/bin/fetchmail.cron -00 22 * * * $HOME/bin/backup-db.sh - -15 21 * * Sat [ "$ENABLED" = "yes" ] && $ERESSEA/server/bin/run-eressea.cron 3 -25 21 * * Sat [ "$ENABLED" = "yes" ] && $ERESSEA/server/bin/run-eressea.cron 4 -35 21 * * Sat [ "$ENABLED" = "yes" ] && $ERESSEA/server/bin/run-eressea.cron 2 -30 07 * * Sun [ "$PREVIEW" = "yes" ] && $ERESSEA/server/bin/preview.cron -*/5 * * * * [ "$CONFIRM" = "yes" ] && $ERESSEA/server/bin/orders.cron 2 3 4 diff --git a/process/cron/orders.cron b/process/cron/orders.cron index be573fe86..114a870a5 100755 --- a/process/cron/orders.cron +++ b/process/cron/orders.cron @@ -5,6 +5,10 @@ # this here script to make a non-blocking syntax check and reject or # accept the order file. +if [ "yes" != "$CONFIRM" ] ; then + exit +fi + for GAME in $* do if [ "$GAME" == "eressea" ]; then GAME=2 ; fi diff --git a/process/cron/preview.cron b/process/cron/preview.cron index 985ddf40b..71ebd0571 100755 --- a/process/cron/preview.cron +++ b/process/cron/preview.cron @@ -1,6 +1,8 @@ #!/bin/bash -[ -z ${ERESSEA} ] && ERESSEA=~/eressea +[ "$PREVIEW" != "yes" ] && exit +[ -z ${ERESSEA} ] && ERESSEA=$HOME/eressea + branch="develop" if [ -e ${ERESSEA}/build/.preview ]; then branch=`cat ${ERESSEA}/build/.preview` diff --git a/process/cron/run-eressea.cron b/process/cron/run-eressea.cron index 8b506a633..4ea38184c 100755 --- a/process/cron/run-eressea.cron +++ b/process/cron/run-eressea.cron @@ -1,7 +1,11 @@ #!/bin/bash GAME=$1 -BIN=$HOME/bin -export ERESSEA=$HOME/eressea + +[ "$ENABLED" != "yes" ] && exit +[ -z ${ERESSEA} ] && ERESSEA=$HOME/eressea + +export ERESSEA +BIN=$ERESSEA/server/bin TURN=$(cat $ERESSEA/game-$GAME/turn) if [ ! -e $ERESSEA/game-$GAME/data/$TURN.dat ]; then echo "data file $TURN is missing, cannot run turn for game $GAME" @@ -14,6 +18,18 @@ fi mkdir $REPORTS cd $ERESSEA/game-$GAME + +# wait for the queue lock to go away +maxt=5 +to=5 +while [ -e orders.queue.lock ] ; do + echo "waiting for orders to finish processing." + sleep $to + let to=$to+$to + let mast=$maxt-1 + [ $maxt -lt 0 ] && break +done + if [ -d test ]; then touch test/execute.lock fi diff --git a/process/orders.cron b/process/orders.cron deleted file mode 100755 index be573fe86..000000000 --- a/process/orders.cron +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -## this script processes incoming order files. -# files are delivered into an incoming queue by procmail, then cron runs -# this here script to make a non-blocking syntax check and reject or -# accept the order file. - -for GAME in $* -do - if [ "$GAME" == "eressea" ]; then GAME=2 ; fi - if [ "$GAME" == "e3a" ]; then GAME=3 ; fi - if [ -e $HOME/eressea/game-$GAME/orders.queue ] - then - $HOME/bin/orders-process $GAME - fi -done diff --git a/process/run-turn b/process/run-turn index 0c5ee8fd2..c0d0d6a40 100755 --- a/process/run-turn +++ b/process/run-turn @@ -1,3 +1,5 @@ +#!/bin/sh + GAME=$1 TURN=$2 @@ -12,3 +14,4 @@ echo "running turn $TURN, game $GAME" $ERESSEA/server/bin/eressea -v3 -t $TURN run-turn.lua mkdir -p log ln -f eressea.log log/eressea.log.$TURN + diff --git a/process/run-turn.sh b/process/run-turn.sh deleted file mode 100755 index 9cc4e4ffd..000000000 --- a/process/run-turn.sh +++ /dev/null @@ -1,22 +0,0 @@ -GAME=$1 -TURN=$2 - -if [ ! -d $ERESSEA/game-$GAME ] ; then - echo "No such game: $GAME" - exit 1 -fi - -cd $ERESSEA/game-$GAME -if [ -z $TURN ]; then - TURN=$(cat turn) -fi - -echo "running turn $TURN, game $GAME" -if [ -d orders.dir.$TURN ]; then - echo "orders.dir.$TURN already exists" -else - mv orders.dir orders.dir.$TURN - mkdir -p orders.dir -fi -ls -1rt orders.dir.$TURN/turn-* | xargs cat > orders.$TURN -$ERESSEA/bin/eressea -t $TURN run-turn.lua diff --git a/s/install b/s/install index 962961063..27cf185af 100755 --- a/s/install +++ b/s/install @@ -16,8 +16,3 @@ BIN_DIR="Debug" cd $ROOT/$BIN_DIR make install - -# install crontab, but only on the eressea server: -# in fact, never do this, because it overwrites hand-edits -#WHOAMI=`whoami`@`hostname` -#[ "eressea@gruenbaer" = "$WHOAMI" ] && crontab $ROOT/process/cron/crontab diff --git a/src/magic.c b/src/magic.c index a20fbc477..81a797e1c 100644 --- a/src/magic.c +++ b/src/magic.c @@ -1107,7 +1107,7 @@ variant magic_resistance(unit * target) const plane *pl = rplane(target->region); if (rc == get_race(RC_HIRNTOETER) && !pl) { - prob.sa[1] *= 2; + prob = frac_mul(prob, frac_make(1, 2)); } assert(target->number > 0); /* Magier haben einen Resistenzbonus vom Magietalent * 5% */ diff --git a/src/reports.c b/src/reports.c index 9af18c1d2..ba0302c6c 100644 --- a/src/reports.c +++ b/src/reports.c @@ -1221,7 +1221,7 @@ static void add_seen_nb(faction *f, region *r, seen_mode mode) { for (d = 0; d != MAXDIRECTIONS; ++d) { region *rn = next[d]; if (rn && rn->seen.modeseen.mode = seen_neighbour; if (first->index>rn->index) first = rn; if (last->indexindex) last = rn; }