2005-01-13 13:42:36 +01:00
|
|
|
function write_grails(file)
|
2005-01-08 12:40:14 +01:00
|
|
|
grails = {}
|
|
|
|
for f in factions() do
|
2005-01-13 13:42:36 +01:00
|
|
|
for u in f.units do
|
|
|
|
if u:get_item("grail") > 0 then
|
|
|
|
if grails[f.id] == nil then
|
|
|
|
grails[f.id] = u:get_item("grail")
|
|
|
|
else
|
|
|
|
grails[f.id] = grails[f.id] + u:get_item("grail")
|
2005-01-08 12:40:14 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
file:write("Parteien mit mehr oder weniger als einem Gral:\n")
|
2005-01-13 13:42:36 +01:00
|
|
|
|
|
|
|
for k in factions() do
|
|
|
|
v = 0
|
|
|
|
if grails[k.id] ~= nil then
|
|
|
|
v = grails[k.id]
|
|
|
|
end
|
|
|
|
if v~= 1 then
|
2005-01-08 12:40:14 +01:00
|
|
|
file:write("- " .. v .. " Grale: " .. k.name .. " (" .. itoa36(k.id) .. ")\n")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|