forked from github/server
Effekt von Weihnachtsbaum, Regionsmeldungen.
This commit is contained in:
parent
e0f05aa9fd
commit
97a2cbe5b0
|
@ -1563,6 +1563,10 @@
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Der Magier verfängt sich in seinem eigenen Zauber."</text>
|
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Der Magier verfängt sich in seinem eigenen Zauber."</text>
|
||||||
</message>
|
</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">
|
<message name="weakmagic" section="magic">
|
||||||
<type>
|
<type>
|
||||||
<arg name="unit" type="unit"/>
|
<arg name="unit" type="unit"/>
|
||||||
|
|
|
@ -1,16 +1,22 @@
|
||||||
function use_xmastree(u, amount)
|
function use_xmastree(u, amount)
|
||||||
u.region:set_key("xm06", true)
|
u.region:set_key("xm06", true)
|
||||||
u:use_pooled("xmastree", amount)
|
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
|
end
|
||||||
|
|
||||||
function update_xmas2006()
|
function update_xmas2006()
|
||||||
if get_season == "winter" then
|
if get_season == "winter" then
|
||||||
|
msg = message("xmastree_effect")
|
||||||
for r in regions() do
|
for r in regions() do
|
||||||
if r:get_key("xm06") then
|
if r:get_key("xm06") then
|
||||||
trees = r:get_resource("tree")
|
trees = r:get_resource("tree")
|
||||||
if trees>0 then
|
if trees>0 then
|
||||||
r:set_resource("tree", trees * 1.1)
|
r:set_resource("tree", trees * 1.1)
|
||||||
|
msg:send_region(r)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue