forked from github/server
Gralszählung, portal-Reparaturen
This commit is contained in:
parent
f56a7d8ae7
commit
b32890df96
|
@ -1,6 +1,10 @@
|
||||||
C++ = g++ ;
|
C++ = g++ ;
|
||||||
CC = gcc ;
|
CC = gcc ;
|
||||||
|
|
||||||
|
if ! $(HAVE_LUA) {
|
||||||
|
HAVE_LUA = 1 ;
|
||||||
|
}
|
||||||
|
|
||||||
if ! $(DISTCC_HOSTS) {
|
if ! $(DISTCC_HOSTS) {
|
||||||
} else {
|
} else {
|
||||||
CC = distcc $(CC) ;
|
CC = distcc $(CC) ;
|
||||||
|
|
|
@ -1181,7 +1181,7 @@ extern int NMRTimeout(void);
|
||||||
extern int LongHunger(const struct unit * u);
|
extern int LongHunger(const struct unit * u);
|
||||||
extern boolean TradeDisabled(void);
|
extern boolean TradeDisabled(void);
|
||||||
extern int SkillCap(skill_t sk);
|
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 AllianceAuto(void); /* flags that allied factions get automatically */
|
||||||
extern int AllianceRestricted(void); /* flags restricted to allied factions */
|
extern int AllianceRestricted(void); /* flags restricted to allied factions */
|
||||||
extern struct order * default_order(const struct locale * lang);
|
extern struct order * default_order(const struct locale * lang);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<resource name="grail">
|
<resource name="grail">
|
||||||
<!-- LMS reward -->
|
<!-- LMS reward -->
|
||||||
<function name="change" value="changeitem"/>
|
<function name="change" value="changeitem"/>
|
||||||
<item cursed="yes" notlost="yes" weight="0"/>
|
<item notlost="yes" weight="0"/>
|
||||||
</resource>
|
</resource>
|
||||||
|
|
||||||
<resource name="greatbow">
|
<resource name="greatbow">
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
function run_scripts()
|
function run_scripts()
|
||||||
scripts = {
|
scripts = {
|
||||||
"hse05-portals.lua"
|
"hse05-portals.lua",
|
||||||
|
"hse05-grails.lua"
|
||||||
}
|
}
|
||||||
for index in scripts do
|
for index in scripts do
|
||||||
local script = scriptpath .. "/" .. scripts[index]
|
local script = scriptpath .. "/" .. scripts[index]
|
||||||
|
@ -55,6 +56,8 @@ function process(orders)
|
||||||
print("could not write game")
|
print("could not write game")
|
||||||
return -1
|
return -1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
write_grails("grails.txt")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
@ -1,5 +1,5 @@
|
||||||
if gate_travel==nil then
|
if gate_travel==nil then
|
||||||
dofile("gates.lua")
|
dofile(scriptpath .. "/gates.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
buildings = {}
|
buildings = {}
|
||||||
|
|
Loading…
Reference in New Issue