diff --git a/src/Jamrules b/src/Jamrules
index 0d5ec48b5..2707f2919 100644
--- a/src/Jamrules
+++ b/src/Jamrules
@@ -1,6 +1,10 @@
C++ = g++ ;
CC = gcc ;
+if ! $(HAVE_LUA) {
+ HAVE_LUA = 1 ;
+}
+
if ! $(DISTCC_HOSTS) {
} else {
CC = distcc $(CC) ;
diff --git a/src/common/kernel/eressea.h b/src/common/kernel/eressea.h
index 306186888..0e44b8927 100644
--- a/src/common/kernel/eressea.h
+++ b/src/common/kernel/eressea.h
@@ -1181,7 +1181,7 @@ extern int NMRTimeout(void);
extern int LongHunger(const struct unit * u);
extern boolean TradeDisabled(void);
extern int SkillCap(skill_t sk);
-extern int NewbieImmunity();
+extern int NewbieImmunity(void);
extern int AllianceAuto(void); /* flags that allied factions get automatically */
extern int AllianceRestricted(void); /* flags restricted to allied factions */
extern struct order * default_order(const struct locale * lang);
diff --git a/src/res/eressea/items-hse05.xml b/src/res/eressea/items-hse05.xml
index 04cf6dc2c..875166e51 100644
--- a/src/res/eressea/items-hse05.xml
+++ b/src/res/eressea/items-hse05.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/src/scripts/hse05-01.lua b/src/scripts/hse05-01.lua
index b3c5ae048..2fc02c028 100644
--- a/src/scripts/hse05-01.lua
+++ b/src/scripts/hse05-01.lua
@@ -1,6 +1,7 @@
function run_scripts()
scripts = {
- "hse05-portals.lua"
+ "hse05-portals.lua",
+ "hse05-grails.lua"
}
for index in scripts do
local script = scriptpath .. "/" .. scripts[index]
@@ -55,6 +56,8 @@ function process(orders)
print("could not write game")
return -1
end
+
+ write_grails("grails.txt")
end
diff --git a/src/scripts/hse05-grails.lua b/src/scripts/hse05-grails.lua
new file mode 100644
index 000000000..be4f78220
--- /dev/null
+++ b/src/scripts/hse05-grails.lua
@@ -0,0 +1,25 @@
+function write_grails(filename)
+ grails = {}
+ for f in factions() do
+ if f.id ~= 0 then
+ for u in f.units do
+ if u:get_item("grail") > 0 then
+ if grails[f] == nil then
+ grails[f] = u:get_item("grail")
+ else
+ grails[f] = grails[f] + u:get_item("grail")
+ end
+ end
+ end
+ end
+ end
+
+ local file = io.open(reportpath .. "/" .. filename, "w")
+ file:write("Parteien mit mehr oder weniger als einem Gral:\n")
+ for k, v in grails do
+ if v ~= 1 then
+ file:write("- " .. v .. " Grale: " .. k.name .. " (" .. itoa36(k.id) .. ")\n")
+ end
+ end
+ file:close()
+end
diff --git a/src/scripts/hse05-portals.lua b/src/scripts/hse05-portals.lua
index e22a6ca3f..857ea36f5 100644
--- a/src/scripts/hse05-portals.lua
+++ b/src/scripts/hse05-portals.lua
@@ -1,5 +1,5 @@
if gate_travel==nil then
- dofile("gates.lua")
+ dofile(scriptpath .. "/gates.lua")
end
buildings = {}