Effekt von Weihnachtsbaum, Regionsmeldungen.

This commit is contained in:
Enno Rehling 2007-01-13 21:55:11 +00:00
parent e0f05aa9fd
commit 97a2cbe5b0
2 changed files with 11 additions and 1 deletions

View File

@ -1563,6 +1563,10 @@
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Der Magier verfängt sich in seinem eigenen Zauber."</text>
</message>
<message name="xmastree_effect" section="magic">
<text locale="de">"In der Region erstrahlen des Nachts bunte Lichter, Gloeckchen klingeln und frohes Kindergelaechter klingt durch den Wald."</text>
<text locale="en">"At night, colourful lights can be seen in this region, bells are a-ringing and the laughter of happy children seems to be everywhere in the forests."</text>
</message>
<message name="weakmagic" section="magic">
<type>
<arg name="unit" type="unit"/>

View File

@ -1,16 +1,22 @@
function use_xmastree(u, amount)
u.region:set_key("xm06", true)
u:use_pooled("xmastree", amount)
return -1
msg = message("usepotion")
msg:set_unit("unit", u)
msg:set_resource("potion", "xmastree")
msg:send_region(u.region)
return 0
end
function update_xmas2006()
if get_season == "winter" then
msg = message("xmastree_effect")
for r in regions() do
if r:get_key("xm06") then
trees = r:get_resource("tree")
if trees>0 then
r:set_resource("tree", trees * 1.1)
msg:send_region(r)
end
end
end