2010-08-08 09:40:42 +02:00
|
|
|
function use_snowman(u, amount)
|
|
|
|
if u.region.terrain == "glacier" then
|
2010-11-21 03:01:46 +01:00
|
|
|
local man = unit.create(u.faction, u.region)
|
2010-08-08 09:40:42 +02:00
|
|
|
man.race = "snowman"
|
|
|
|
man.number = amount
|
|
|
|
u:add_item("snowman", -amount)
|
|
|
|
return 0
|
|
|
|
end
|
|
|
|
return -4
|
|
|
|
end
|
|
|
|
|
2014-07-26 22:52:25 +02:00
|
|
|
local self = {}
|
|
|
|
|
|
|
|
function self.update()
|
2010-08-08 09:40:42 +02:00
|
|
|
if not get_key("xm04") then
|
2014-07-26 22:52:25 +02:00
|
|
|
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
|
2010-08-08 09:40:42 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-07-26 22:52:25 +02:00
|
|
|
return self
|