server/scripts/eressea/xmas2004.lua
Enno Rehling d9457a2488 rewrite of the Lua module system.
At this time, only E2 is working.
Fixing a lot of old code (monster is no longer id 0).
package.paths configured from eressea.ini
install directory configured from eressea.ini
moving building_action into a seaprate module (it's deprecated)
2014-07-26 22:52:25 +02:00

25 lines
544 B
Lua

function use_snowman(u, amount)
if u.region.terrain == "glacier" then
local man = unit.create(u.faction, u.region)
man.race = "snowman"
man.number = amount
u:add_item("snowman", -amount)
return 0
end
return -4
end
local self = {}
function self.update()
if not get_key("xm04") then
eressea.log.debug("Es weihnachtet sehr (2004)")
set_key("xm04", true)
for f in factions() do
f:add_item("speedsail", 1)
f:add_notice("santa2004")
end
end
end
return self