Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 29.2 #1071

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b746acf
start work on release 29.2
ennorehling Mar 3, 2024
8ef2e03
rewrite equip_weapons
ennorehling Sep 1, 2023
12e57da
fix Linux compilation
ennorehling Sep 1, 2023
778a0d0
fix a crash caused by new weapons code
ennorehling Sep 9, 2023
ed15287
ex unused variables
ennorehling Sep 9, 2023
bca7bae
Katapultmeldung repariert
ennorehling Sep 10, 2023
00d45cd
Python3 (#1024)
stm2 Sep 17, 2023
bc64c32
front-loading get_transporters
ennorehling Sep 26, 2023
71bbada
flying ships (#1048)
ennorehling Jan 7, 2024
14ca2ce
refactor: expandselling without expandorders
ennorehling Feb 27, 2024
b63535a
fix rebase problems
ennorehling Mar 2, 2024
7d00025
pay local taxes on combined sales, not each individual item.
ennorehling Mar 2, 2024
617f531
check harbormaster taxes
ennorehling Mar 2, 2024
59a0015
compilation fixes
ennorehling Mar 2, 2024
a463a8a
refactor tests that use castles
ennorehling Mar 3, 2024
b24ee03
refactor building stages
ennorehling Mar 3, 2024
f231142
add a clarifying comment to a hack
ennorehling Mar 3, 2024
afebb27
Test für "gerechte" Verteilung bei UNTERHALTE Limit
ennorehling Mar 7, 2024
81f1292
merge error
ennorehling Mar 9, 2024
e0b3c73
warpgate message
ennorehling Mar 11, 2024
e6ed6ca
fix multiple buyers interfering with each other
ennorehling Mar 13, 2024
1d82bf9
failed ship departure tests
ennorehling Mar 16, 2024
e211fe6
new rule: landing in a harbor grants free departure direction.
ennorehling Apr 3, 2023
902defe
lua test for the new harbor behavior
ennorehling Mar 17, 2024
33a8ce8
add skill_level and skill_weeks accessors
ennorehling Mar 21, 2024
4e1629a
skill_set can be static, nothing uses it.
ennorehling Jan 5, 2024
3dc39bc
rename increase_skill_weeks and reduce_skill_weeks
ennorehling Mar 21, 2024
4f01808
fix bad test with invalid skill values
ennorehling Mar 24, 2024
ef194b6
extreme test values were too extreme
ennorehling Mar 26, 2024
6c3e91e
Bug 3017: Fix message text when movement is blocked (#1062)
ennorehling Mar 31, 2024
5202a86
disable unused fogtrap curse
ennorehling Mar 31, 2024
6e94117
make spell parameters use stb_ds, not custom dynamic arrays (#1063)
ennorehling Apr 3, 2024
33303ad
Merge branch 'master' into develop
ennorehling Apr 3, 2024
4ea6324
Bug 2991 illusions and race changes (#1064)
ennorehling Apr 6, 2024
662d056
fix existing units for bug 2991
ennorehling Apr 6, 2024
d14da8d
Bugfixes Ritual der Aufnahme / Migrantenwerben (#1065)
ennorehling Apr 7, 2024
4fb115a
PDCURSES Problems
ennorehling Apr 24, 2024
399edb6
add tests for stealing from "dead" units
ennorehling May 4, 2024
0f14a92
find dead units using a hashmap (#1067)
ennorehling May 4, 2024
a58b8f9
Make tree growth follow the calendar correctly (#1068)
ennorehling May 5, 2024
16f6897
Tactics refactoring (#1070)
ennorehling May 18, 2024
78a6494
onedrive backup (WIP)
ennorehling Apr 7, 2024
f511535
fix the backups quickly, needs some cleanup
ennorehling Apr 14, 2024
bde9398
backup script fix, again
ennorehling Apr 21, 2024
52998c2
Merge branch 'master' into develop
ennorehling May 19, 2024
a16b80a
Update greatbow.xml (#1069)
Xolgrim May 19, 2024
7aad3df
verify that no herbs grow in winter
ennorehling May 19, 2024
9030425
start work on version 29.3
ennorehling May 19, 2024
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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/"
if (MSVC)
find_package (PDCurses)
set (CURSES_FOUND ${PDCURSES_FOUND})
set (CURSES_LIBRARY ${PDCURSES_LIBRARY})
set (CURSES_LIBRARIES ${PDCURSES_LIBRARIES})
set (CURSES_INCLUDE_DIRS ${PDCURSES_INCLUDE_DIR})
endif(MSVC)
Expand Down
3 changes: 0 additions & 3 deletions cmake/Modules/FindPDCurses.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ FIND_LIBRARY(PDCURSES_PANEL_LIBRARY
PATH_SUFFIXES lib64 lib)

IF(PDCURSES_LIBRARY)
SET(PDCURSES_LIBRARIES ${PDCURSES_LIBRARY})
IF(PDCURSES_PANEL_LIBRARY)
SET(PDCURSES_LIBRARIES ${PDCURSES_LIBRARIES} ${PDCURSES_PANEL_LIBRARY})
ENDIF(PDCURSES_PANEL_LIBRARY)
Expand All @@ -32,7 +31,5 @@ SET(PDCURSES_FOUND "NO")
IF(PDCURSES_INCLUDE_DIR AND PDCURSES_LIBRARY)
# message(STATUS "Found PDCurses library: ${PDCURSES_LIBRARIES}")
# Set the final string here so the GUI reflects the final state.
SET(PDCURSES_LIBRARIES PDCURSES_LIBRARY} CACHE STRING "Where the PDCurses Library can be found")

SET(PDCURSES_FOUND "YES")
ENDIF(PDCURSES_INCLUDE_DIR AND PDCURSES_LIBRARY)
Empty file modified process/accept-orders.py
100755 → 100644
Empty file.
10 changes: 9 additions & 1 deletion res/core/messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2191,7 +2191,7 @@
<arg name="target" type="region"/>
</type>
</message>
<message name="leavefail" section="errors">
<message name="enterfail" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
Expand Down Expand Up @@ -6013,6 +6013,14 @@
</type>
</message>

<message name="warpgate" section="events">
<type>
<arg name="from" type="region"/>
<arg name="to" type="region"/>
<arg name="unit" type="unit"/>
</type>
</message>

<message name="tidalwave_kill" section="events">
<type>
<arg name="region" type="region"/>
Expand Down
2 changes: 1 addition & 1 deletion res/core/weapons/greatbow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<construction skill="weaponsmithing" minskill="5">
<requirement type="mallorn" quantity="2"/>
</construction>
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.0">
<weapon pierce="true" missile="true" skill="bow" offmod="0" defmod="0" reload="0" magres="0.15">
<damage type="rider" value="2d6+4"/>
<damage type="footman" value="2d6+4"/>
<modifier type="missile_target" value="2"/>
Expand Down
13 changes: 8 additions & 5 deletions res/translations/messages.de.po
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ msgid "victory_murder_cfulfilled"
msgstr "\"Achtung: $faction($faction) hat die Siegbedingungen erfüllt und wird in $if($eq($remain,1),\"einer Woche\",\"$int($remain) Wochen\") zum Sieger erklärt werden.\""

msgid "hangover_effect_1"
msgstr "\"$unit($unit) hat höllische Kopfschmerzen und kann sich an die vergangene Woche nicht mehr erinnern. Nur noch daran, wie alles mit einer fröhlichen Feier in irgendeiner Taverne anfing....\""
msgstr "\"$unit($unit) hat höllische Kopfschmerzen und kann sich an die vergangene Woche nicht mehr erinnern. Nur noch daran, wie alles mit einer fröhlichen Feier in irgendeiner Taverne anfing ...\""

msgid "feedback_no_contact"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - $unit($target) hat keinen Kontakt mit uns aufgenommen.\""
Expand Down Expand Up @@ -761,6 +761,9 @@ msgstr "\"$unit($mage) ruft $int($amount) $race($race, $amount) zu Hilfe.\""
msgid "tidalwave"
msgstr "\"Eine gewaltige Flutwelle verschlingt $region($region) und alle Bewohner.\""

msgid "warpgate"
msgstr "\"$unit($unit) wird von $region($from) nach $region($to) teleportiert.\""

msgid "cast_hero_effect"
msgstr "\"$unit($mage) zaubert $spell($spell): $int($amount) Krieger wurden moralisch gestärkt.\""

Expand Down Expand Up @@ -951,7 +954,7 @@ msgid "error_cannotmake"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - So etwas kann man nicht machen.\""

msgid "meow"
msgstr "\"Miiauuuuuu...\""
msgstr "\"Miiauuuuuu ...\""

msgid "spelltargetnotfound"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Es wurde kein Ziel gefunden.\""
Expand Down Expand Up @@ -1732,7 +1735,7 @@ msgid "santa_m"
msgstr "'Ho ho ho!' Ein dicker Gnom fliegt auf einem von 8 Jungdrachen gezogenen Schlitten durch die Nacht und vermacht Deiner Partei einen $resource($item,1). (Um diesen Gegenstand einer Einheit zu geben, gib ihr den Befehl 'BEANSPRUCHE 1 $resource($item,1)')."

msgid "error234"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Die Einheit ist mit Ausschiffen beschäftigt..\""
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Die Einheit ist mit Ausschiffen beschäftigt.\""

msgid "spellfail::nolevel"
msgstr "\"$unit($mage) in $region($region): '$order($command)' - Dieser Zauber kann nicht mit Stufenangabe gezaubert werden.\""
Expand Down Expand Up @@ -2548,8 +2551,8 @@ msgctxt "curseinfo"
msgid "maelstrom"
msgstr "Der Mahlstrom in dieser Region wird alle Schiffe, die in seinen Sog geraten, schwer beschädigen. ($int36($id))"

msgid "leavefail"
msgstr "\"$unit($unit) konnte aus $region($region) nicht ausreisen.\""
msgid "enterfail"
msgstr "\"$unit($unit) konnte nach $region($region) nicht einreisen.\""

msgid "reduced_production"
msgstr "Die Region ist verwüstet, der Boden karg."
Expand Down
7 changes: 5 additions & 2 deletions res/translations/messages.en.po
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,9 @@ msgstr "\"$unit($mage) calls for the help of $int($amount) $race($race, $amount)
msgid "tidalwave"
msgstr "\"A tidal wave wipes out $region($region) and all who lived there.\""

msgid "warpgate"
msgstr "\"$unit($unit) is teleported from from $region($from) to $region($to).\""

msgid "cast_hero_effect"
msgstr "\"$unit($mage) casts $spell($spell): $int($amount) fighters had their moral boosted.\""

Expand Down Expand Up @@ -2548,8 +2551,8 @@ msgctxt "curseinfo"
msgid "maelstrom"
msgstr "The maelstrom in this area will heavily damage all ships coming into its wake. ($int36($id))"

msgid "leavefail"
msgstr "\"$unit($unit) could not leave $region($region).\""
msgid "enterfail"
msgstr "\"$unit($unit) could not enter $region($region).\""

msgid "reduced_production"
msgstr "The region is ravaged, the ground infertile."
Expand Down
5 changes: 5 additions & 0 deletions scripts/eressea/warpgate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ function move_all(from, to)
local units = {}
for u in s.units do
table.insert(units, u)
local msg = message.create('warpgate')
msg:set_region('from', from)
msg:set_region('to', to)
msg:set_unit('unit', u)
msg:send_faction(u.faction)
end
s.region = to
moved = true
Expand Down
32 changes: 16 additions & 16 deletions scripts/tests/e2/migration.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ end

function test_migration_success()
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u:add_order('ZAUBERE STUFE 1 "Ritual der Aufnahme" ' .. itoa36(u2.id))
u.aura = 9
Expand All @@ -40,9 +40,9 @@ end

function test_migration_no_familiars()
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local f2 = faction.create('human')
local f2 = faction.create('dwarf')
local u2 = setup_mage(f2, r)
local u3 = unit.create(f2, r)
u3.race = 'goblin'
Expand All @@ -60,9 +60,9 @@ end

function test_migration_no_contact()
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u:add_order('ZAUBERE STUFE 1 "Ritual der Aufnahme" ' .. itoa36(u2.id))
u.aura = 9
u.aura_max = 9
Expand All @@ -74,9 +74,9 @@ end

function test_migration_too_many()
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u2.number = 2
u:add_order('ZAUBERE STUFE 1 "Ritual der Aufnahme" ' .. itoa36(u2.id))
Expand All @@ -90,9 +90,9 @@ end

function test_migration_with_ring()
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u2.number = 2
u:add_item('rop', 1)
Expand All @@ -109,9 +109,9 @@ end
function test_migration_insufficient_aura()
-- if unit cannot pay full costs, it casts at a lower level.
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u2.number = 2
u:add_order('ZAUBERE STUFE 2 "Ritual der Aufnahme" ' .. itoa36(u2.id))
Expand All @@ -127,9 +127,9 @@ end
function test_migration_insufficient_max_aura()
-- if unit cannot pay full costs, it casts at a lower level.
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u2.number = 2
u:add_order('ZAUBERE STUFE 2 "Ritual der Aufnahme" ' .. itoa36(u2.id))
Expand All @@ -145,9 +145,9 @@ end
function test_migration_reduced_cost()
-- if unit cannot pay full costs, it casts at a lower level.
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u:add_order('ZAUBERE STUFE 2 "Ritual der Aufnahme" ' .. itoa36(u2.id))
u.aura = 3
Expand Down
20 changes: 19 additions & 1 deletion scripts/tests/e2/spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,29 @@ function test_shapeshift()
u1:add_spell("shapeshift")
u1:add_order("ZAUBERE STUFE 1 Gestaltwandlung " .. itoa36(u2.id) .. " Goblin")
process_orders()
assert_equal(f.race, u2.race)
assert_equal(f.race, u2.race) -- it's just an illusion
s = u2:show()
assert_equal("1 Goblin", string.sub(s, string.find(s, "1 Goblin")))
end

function test_shapeshift_bad_race()
local r = region.create(42, 0, "plain")
local f = faction.create("human", "[email protected]", "de")
local u1 = unit.create(f, r, 1)
local u2 = unit.create(f, r, 1)
u1:clear_orders()
u1.magic = "gray"
u1:set_skill("magic", 2)
u1.aura = 1
u1:add_spell("shapeshift")
u1:add_order("ZAUBERE STUFE 1 Gestaltwandlung " .. itoa36(u2.id) .. " Schlumpf")
process_orders()
assert_equal(f.race, u2.race) -- it's just an illusion
s = u2:show()
assert_equal("1 Mensch", string.sub(s, string.find(s, "1 Mensch")))
assert_nil(string.find(s, "Schlumpf"))
end

function test_raindance()
local r = region.create(0, 0, "plain")
local f = faction.create("halfling", "[email protected]", "de")
Expand Down
47 changes: 44 additions & 3 deletions scripts/tests/harbor.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local tcname = 'tests.e2.harbor'
local tcname = 'tests.harbor'
local lunit = require('lunit')
if _VERSION >= 'Lua 5.2' then
_ENV = module(tcname, 'seeall')
Expand All @@ -9,6 +9,10 @@ end
function setup()
eressea.free_game()
eressea.settings.set("rules.ship.damage.nocrewocean", "0")
eressea.settings.set("rules.ship.damage.nocrew", "0")
eressea.settings.set("nmr.timeout", "0")
eressea.settings.set("rules.ship.drifting", "0")
eressea.settings.set("rules.ship.storms", "0")
eressea.config.parse([[
{
"keywords": {
Expand Down Expand Up @@ -42,13 +46,15 @@ function setup()
}
},
"races": {
"human": {},
"human": {
"maintenance": 0
},
"insect": {}
},
"buildings" : {
"harbour" : {
"maintenance": [
{ "amount" : 500, "type": "money" }
{ "amount" : 250, "type": "money" }
],
"maxcapacity" : 25,
"maxsize" : 25
Expand Down Expand Up @@ -190,6 +196,41 @@ function test_sail_into_harbor()
assert_equal(r, u.region)
end

function test_leave_harbour()
local f = faction.create('human')
local r1 = region.create(1, 0, 'ocean')
local r2 = region.create(-1, 0, 'ocean')
local r = region.create(0, 0, 'glacier')
local b = building.create(r, 'harbour', 25)
local sh = ship.create(r1, 'longboat')
local u = unit.create(f, r1, 1)
local u2 = unit.create(f, r, 1)
u2.building = b
u.name = 'Xolgrim'
u.ship = sh
u:set_skill('sailing', 10)

-- kein Hafenunterhalt, keine Einreise
u:set_orders('NACH W')
process_orders()
assert_false(b.working)
assert_equal(r1, sh.region)

-- Hafenunterhalt, Einreise erlaubt
u2:add_item('money', 250)
u:set_orders('NACH W')
process_orders()
assert_true(b.working)
assert_equal(r, sh.region)
assert_equal(0, u2:get_item('money'))

-- Kein Unterhalt, Abreise in "falsche" Richtung
u:set_orders('NACH W')
process_orders()
assert_false(b.working)
assert_equal(r2, sh.region)
end

function test_landing_insects()
local ocean = region.create(1, 0, "ocean")
local r = region.create(0, 0, "glacier")
Expand Down
Loading