Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
80dd93d
Steal some unrelated fixes from the "study" branch (#1146)
ennorehling Jun 13, 2026
57ebfd6
paused factions don't have NMR
ennorehling Jun 20, 2026
3d37ca8
Zufall beim Lernen eliminineren (#1133)
ennorehling Jun 25, 2026
fc7eb9a
Bug 3107: Nciht gleichzeitig bewachen und fliehen (#1149)
ennorehling Jun 28, 2026
017657f
Adapt for newer IWYU on Ubuntu
ennorehling Jun 28, 2026
4164749
Crash in sp_speed (#1148)
ennorehling Jun 28, 2026
e208470
No LLM code, please
ennorehling Jun 28, 2026
813419c
replace os.system with subprocess
ennorehling Jun 28, 2026
6c96207
try fixing intermittent test
ennorehling Jul 4, 2026
eac1280
Bug 3103: Privatbeschreibungen bei Parteiwechsel löschen
ennorehling Jul 12, 2026
64d6aed
Bug 3108: AMK löst keine eigene Antimagie auf.
ennorehling Jul 12, 2026
3f8715b
unused variable
ennorehling Jul 12, 2026
011700a
Bug 3061: Wölfe am Kampfende verschwinden lassen
ennorehling Jul 14, 2026
66c8087
forward-declared structs
ennorehling Jul 14, 2026
01f620c
Bug 3106: Detect moving ships when captain FOLLOWs.
ennorehling Jul 15, 2026
1d984ab
Docker Fortschritt: Eressea Auswertung (#1152)
ennorehling Jul 18, 2026
1e3e599
fix illegal access in demon_skillchange
ennorehling Jul 19, 2026
73c948d
Bug 3112: Hafen als Kanal (#1153)
ennorehling Jul 22, 2026
bc682ed
include variant.h to make old IWYU version happy
ennorehling Jul 26, 2026
28e68a1
build without pkg-config
ennorehling Jul 26, 2026
6a34846
fix shells cript errors
ennorehling Aug 8, 2026
f27e809
Bug 3113: Antimagic crystals (#1154)
ennorehling Aug 11, 2026
86c094c
additional antimagic testing
ennorehling Aug 11, 2026
c374d97
No NMR dropout warning (#1156)
ennorehling Aug 21, 2026
9f41966
version merge conflict
ennorehling Aug 25, 2026
b2cfd57
fix bad merge resolution
ennorehling Aug 25, 2026
4512280
tests and refactorings for drifting_ships (#1158)
ennorehling Aug 25, 2026
232046a
Bug 3119: Firewall does not protect from storms (#1159)
ennorehling Aug 25, 2026
2812c42
New github action (#1160)
ennorehling Aug 26, 2026
6e6d9d9
validate mutually exclusive terrain flags
ennorehling Aug 27, 2026
1bd68eb
Impriove message visibility
ennorehling Sep 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, develop ]
branches: [ master, develop, gh ]
pull_request:
branches: [ master, develop ]

Expand Down Expand Up @@ -45,3 +45,8 @@ jobs:
with:
args: "-DCMAKE_BUILD_TYPE=Debug"
run-test: true
- name: Integration Test
run: |
cd tests
./run-turn.sh

2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.13)

include_directories (${CMAKE_CURRENT_SOURCE_DIR})

set(CMAKE_C_STANDARD 99)
if (WIN32)
file(TO_CMAKE_PATH "${CMAKE_MODULE_PATH}" CMAKE_MODULE_PATH )
Expand Down
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Contributing to Eressea

Since Eressea is for the most part a one-person show run by
[me](https://enno.horse/), contributions that fix bugs,
add features or improve usability are always welcome. Due to the
one-person thing however, my time to work on this project and review
PRs is fairly limited.

## Use of large language models / generative "AI"

Eressea is something I do for fun, and to relax. I love programming,
games, communities, and everything else that's involved in running
online games.

Receiving a LLM-generated PR however takes the joy out of this and makes
reviewing the PR a wasted effort. If you didn't bother writing and
thinking about it, I won't bother reading it.

Therefore, LLM-generated pull requests will not be accepted in this
project.

2 changes: 1 addition & 1 deletion conf/e2/terrains.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
"flags": [ "land", "walk", "sail" ]
},
"wall1": {
"flags": [ "forbidden", "land" ]
"flags": [ "forbidden" ]
}
}
}
2 changes: 1 addition & 1 deletion docker/start-container
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ fi

export LUA_PATH="/usr/local/share/eressea/scripts/?.lua;/usr/local/share/eressea/scripts/?/init.lua;$LUA_PATH"
export ERESSEA_INSTALL=/usr/local/share/eressea
exec eressea -i "$ERESSEA_INSTALL" "$@"
exec eressea "$@"
8 changes: 5 additions & 3 deletions process/compress.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env python3


from sys import argv, exit
import os
import os, subprocess, shlex
import io
import os.path

Expand Down Expand Up @@ -63,7 +64,8 @@
filename = "%s%s" % (prefix, extension)
if os.path.isfile(filename):
parameters = parameters + [ filename ]
os.system("zip %s -q -m -j %s" % (output, ' '.join(parameters)))
subprocess.run(["zip", shlex.quote(output), "-q", "-m", "-j",
' '.join(shlex.quote(p) for p in parameters)], check=True)
else:
files = []
for extension in reports:
Expand All @@ -74,7 +76,7 @@
if os.path.isfile(filename):
if os.path.isfile(output):
continue
os.system("bzip2 %s" % filename)
subprocess.run(["bzip2", shlex.quote(filename)], check=True)
for extra in extras:
if os.path.isfile(extra):
files = files + [extra]
Expand Down
2 changes: 1 addition & 1 deletion process/cron/run-eressea.cron
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ backup()

export ERESSEA
eval "$(luarocks path)"
export LUA_PATH="${ERESSEA}/server/scripts/?.lua;${ERESSEA}/git/scripts/?/init.lua;$LUA_PATH"
export LUA_PATH="${ERESSEA}/server/scripts/?.lua;$LUA_PATH"
BIN="$ERESSEA/server/bin"
TURN=$(cat "$ERESSEA/game-$GAME/turn")
if [ ! -e "$ERESSEA/game-$GAME/data/$TURN.dat" ]; then
Expand Down
24 changes: 19 additions & 5 deletions res/core/messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2639,7 +2639,7 @@
<arg name="ship" type="ship"/>
</type>
</message>
<message name="shipnoshore" section="movement">
<message name="shipnoshore" section="errors">
<type>
<arg name="ship" type="ship"/>
<arg name="region" type="region"/>
Expand Down Expand Up @@ -5863,18 +5863,32 @@
</type>
</message>

<message name="block_spell" section="magic">
<message name="spell_blocked" section="magic">
<type>
<arg name="target" type="unit"/>
<arg name="region" type="region"/>
</type>
</message>

<message name="spell_blocked_by" section="magic">
<type>
<arg name="self" type="unit"/>
<arg name="mage" type="unit"/>
<arg name="target" type="unit"/>
<arg name="region" type="region"/>
</type>
</message>

<message name="reduce_spell" section="magic">
<message name="spell_reduced" section="magic">
<type>
<arg name="target" type="unit"/>
<arg name="region" type="region"/>
</type>
</message>

<message name="spell_reduced_by" section="magic">
<type>
<arg name="self" type="unit"/>
<arg name="mage" type="unit"/>
<arg name="target" type="unit"/>
<arg name="region" type="region"/>
</type>
</message>
Expand Down
2 changes: 1 addition & 1 deletion res/e3a/races.xml
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@
<skill name="building" modifier="-99"/>
<skill name="forestry" modifier="-99"/>
<skill name="catapult" modifier="-99"/>
<skill name="magic" modifier="-99"/>
<skill name="magic" modifier="-99"/>
<skill name="training" modifier="-99"/>
<skill name="riding" modifier="-99"/>
<skill name="armorer" modifier="-99"/>
Expand Down
14 changes: 10 additions & 4 deletions res/translations/messages.de.po
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ msgstr "\"$unit($unit) hat Schwierigkeiten seine magischen Energien zu sammeln.
msgid "harbor_trade"
msgstr "\"$unit($unit) erhielt $resources($items) von der $ship($ship).\""

msgid "reduce_spell"
msgstr "\"$unit($self) schwächt in $region($region) einen Zauber von $unit.dative($mage) durch Antimagie ab.\""
msgid "spell_reduced_by"
msgstr "\"$unit($mage) schwächt in $region($region) einen Zauber von $unit.dative($target) durch Antimagie ab.\""

msgid "spell_reduced"
msgstr "In $region($region) wird ein Zauber von $unit.dative($target) durch Antimagie abgeschwächt.\""

msgid "raised"
msgstr "\"$unit($unit) züchtet $int($amount) Pferde.\""
Expand Down Expand Up @@ -338,8 +341,11 @@ msgstr "\"Moral der Bauern: $int($morale)\""
msgid "changemail_invalid"
msgstr "\"Die Reportadresse wurde nicht geändert, '${value}' ist keine gültige email.\""

msgid "block_spell"
msgstr "\"Antimagie von $unit.dative($self) blockiert in $region($region) einen Zauber von $unit.dative($mage).\""
msgid "spell_blocked_by"
msgstr "\"Antimagie von $unit.dative($mage) blockiert in $region($region) einen Zauber von $unit.dative($target).\""

msgid "spell_blocked"
msgstr "\"In $region($region) wird ein Zauber von $unit.dative($target) durch Antimagie blockiert.\""

msgid "enter_overload"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Die Einheit darf nicht an Bord kommen, da sie das Schiff überladen würde.\""
Expand Down
14 changes: 10 additions & 4 deletions res/translations/messages.en.po
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ msgstr "\"$unit($unit) finds it difficult to gather its magical energies. ($int3
msgid "harbor_trade"
msgstr "\"$unit($unit) received $resources($items) from the $ship($ship).\""

msgid "reduce_spell"
msgstr "\"In $region($region), anti-magic from $unit($self) reduces the effect of $unit($mage)'s spell.\""
msgid "spell_reduced_by"
msgstr "\"In $region($region), anti-magic from $unit($mage) reduces the effect of $unit($target)'s spell.\""

msgid "spell_reduced"
msgstr "\"In $region($region), anti-magic reduces the effect of $unit($target)'s spell.\""

msgid "raised"
msgstr "\"$unit($unit) breeds $int($amount) horses.\""
Expand Down Expand Up @@ -338,8 +341,11 @@ msgstr "\"peasant morale: $int($morale)\""
msgid "changemail_invalid"
msgstr "\"Address not changed, '$value' is an invalid email.\""

msgid "block_spell"
msgstr "\"In $region($region), anti-magic from $unit($self) blocks the spell of $unit($mage).\""
msgid "spell_blocked"
msgstr "\"In $region($region), anti-magic blocks a spell by $unit($target).\""

msgid "spell_blocked_by"
msgstr "\"In $region($region), anti-magic from $unit($mage) blocks a spell by $unit($target).\""

msgid "enter_overload"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - The unit cannot go aboard, the ship would be overloaded.\""
Expand Down
3 changes: 2 additions & 1 deletion s/cmake-init
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

WITHOUT_LUA=OFF
ERESSEA_DB=memory
if [ -n "$(which pkg-config)" ]; then
pkg-config --exists sqlite3 && ERESSEA_DB=sqlite

fi
usage()
{
echo "usage: $0 --help --db=DB"
Expand Down
11 changes: 6 additions & 5 deletions s/install
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ done
if [ "$FORCE" != "yes" ] ; then
DESCRIBE=$(git describe --tags)
VERSION=$(build/eressea/eressea --version | sed -e 's/Eressea version \([^,]*\),.*/\1/')
if [ "v$VERSION" != "$DESCRIBE" ] ; then
echo "You must buld the server before installing it"
echo "Current build is $VERSION, source is $DESCRIBE"
exit
fi
BRANCH=$(git status -s -b | head -1 | cut -d\ -f 2 | sed 's/\..*//')
if [ "$BRANCH" != "master" ] ; then
echo "You should only install stable versions from the master branch. Use -f to override."
exit
elseif [ "v$VERSION" != "$DESCRIBE" ]
echo "You must build the server before installing it"
echo "Current build is $VERSION, source is $DESCRIBE"
exit
fi
fi
[ -z "$CC" ] && [ -n "$(which clang)" ] && CC="clang"
Expand All @@ -31,7 +30,9 @@ fi
BIN_DIR="build"

ROOT=$(git rev-parse --show-toplevel)
if [ -z "$PREFIX" ]; then
PREFIX=$(dirname "$ROOT")/server
fi
cd "$ROOT" || exit
cmake --install "$BIN_DIR" --prefix "$PREFIX"
if [ ! -e "$PREFIX/bin/backup-eressea" ] ; then
Expand Down
3 changes: 1 addition & 2 deletions s/preview
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ cat >| eressea.ini <<HEREDOC
[lua]
dbname = eressea.db
dbswap = :memory:
install = $SOURCE
rules = e$game
HEREDOC
}
Expand All @@ -81,7 +80,7 @@ VALGRIND="$(which valgrind)"
if [ -n "$VALGRIND" ]; then
SERVER="$VALGRIND --quiet --suppressions=$SUPP --error-exitcode=1 --leak-check=no $SERVER"
fi
$SERVER -v "$verbose" -t "$turn" "$SOURCE/scripts/run-turn.lua"
ERESSEA_INSTALL="$SOURCE" $SERVER -v "$verbose" -t "$turn" "$SOURCE/scripts/run-turn.lua"
(( turn=turn+1 ))
[ -e "data/$turn.dat" ] || abort "no data file created"
}
Expand Down
6 changes: 3 additions & 3 deletions s/release
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python

import os
import subprocess
import sys

def new_version(ver):
os.system("git tag -f v%s" % ver)
os.system("git push --tags -f")
subprocess.run(["git", "tag", "-f", "v" + ver], check=True)
subprocess.run(["git", "push", "--tags", "-f"], check=True)

new_version(sys.argv[1])
5 changes: 0 additions & 5 deletions s/setup
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,9 @@ ini_start
ini_sec game
ini_add game locales de,en
ini_add game id "$game"
ini_add game start 1
ini_sec lua
ini_add lua install "$SOURCE"
ini_add lua rules "$rules"

echo 0 > turn
touch newfactions
ln -sf "$SOURCE/bin/eressea" .
ln -sf "$SOURCE/scripts/run-turn.lua" .
ln -sf "$SOURCE/scripts/reports.lua" .
ln -sf "$SOURCE/scripts/config.lua" .
13 changes: 0 additions & 13 deletions scripts/debug.lua

This file was deleted.

13 changes: 6 additions & 7 deletions scripts/eressea/embassy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ function use_ring_of_levitation(u, amount, token, ord)
return 0
end

-- Muschelplateau

if not config.embassy or config.embassy==0 then return nil end

local embassy = {}
local home = nil

-- global exports (use item)
function use_seashell(u, amount)
-- Muschelplateau...
Expand All @@ -50,6 +43,12 @@ function use_seashell(u, amount)
return -4
end

-- Muschelplateau
if not config.embassy or config.embassy==0 then return nil end

local embassy = {}
local home = nil

function embassy.init()
home = get_region(165,30)
if home==nil then
Expand Down
4 changes: 2 additions & 2 deletions scripts/eressea/path.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local install = os.getenv("ERESSEA_INSTALL") or config.install
local install = config.install
if install then
eressea.config.add_authority("conf", install .. '/conf')
eressea.config.add_authority("res", install .. '/res')
else
print("eressea.ini does not set an install directory")
print("no install directory set")
end
1 change: 1 addition & 0 deletions scripts/run-turn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,5 @@ if config.rules then
elseif not config.config then
eressea.log.warning('no rule modules loaded, specify a game in eressea.ini or with -r')
end
assert(use_seashell)
run_turn(rules)
22 changes: 22 additions & 0 deletions scripts/tests/e2/guard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,25 @@ function test_move_to_same_region_stops_guarding()
assert_equal(r1, u.region)
assert_false(u.guard)
end

function test_flee_guard()
local r1 = region.create(0, 0, "plain")

local f1 = faction.create("human", "[email protected]", "de")

local u11 = unit.create(f1, r1, 1)

u11:add_item("sword", 1)
u11:set_skill("melee", 1)
u11.guard = true
u11:add_order("BEWACHE")
process_orders()
assert_equal(true, u11.guard)

u11:clear_orders()
u11:add_order("K�MPFE FLIEHE")

process_orders()
-- write_reports()
assert_equal(false, u11.guard)
end
Loading