Beginn einer Implementation von Schneemännern für Eressea

This commit is contained in:
Enno Rehling 2005-12-26 23:49:16 +00:00
parent 3372e17530
commit 619a3f5387
7 changed files with 43 additions and 16 deletions

View File

@ -1,5 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<strings>
<namespace name="race">
<string name="snowman">
<text locale="de">Schneemann</text>
<text locale="en">snowman</text>
</string>
<string name="snowman_p">
<text locale="de">Schneemänner</text>
<text locale="en">snowmen</text>
</string>
</namespace>
<namespace name="iteminfo">
<string name="seashell">
<text locale="en">

View File

@ -1,6 +1,19 @@
<?xml version="1.0"?>
<resources>
<!-- xmas gimmicks -->
<resource name="snowball">
<item notlost="yes" weight="0">
<function name="use" value="lua_useitem"/>
</item>
</resource>
<resource name="snowman">
<item notlost="yes" weight="1">
<function name="use" value="lua_useitem"/>
</item>
</resource>
<!-- ambassador rewards -->
<resource name="seashell">
<item cursed="true" weight="0">

View File

@ -1,2 +1,10 @@
<races>
<race name="snowman" magres="0.800000" maxaura="0.000000"
regaura="0.000000" weight="500" capacity="200" equipment="no"
speed="1.000000" hp="20" ac="4" damage="2d4" unarmedattack="10"
unarmeddefense="10" attackmodifier="8" defensemodifier="8"
fly="no" walk="no" teach="no" getitem="no">
<attack type="4" damage="2d6+2"/>
<attack type="3" damage="2d6+2"/>
</race>
</races>

View File

@ -53,18 +53,6 @@
</item>
</resource>
<resource name="snowball">
<!-- xmas gimmik -->
<item notlost="yes" weight="0">
<function name="use" value="usesnowball"/>
</item>
</resource>
<resource name="snowman">
<!-- xmas gimmik -->
<item notlost="yes" weight="1"/>
</resource>
<!-- items -->
<resource name="seed" limited="yes">
<item weight="10" score="50">

View File

@ -29,6 +29,7 @@ function run_scripts()
"eressea/eternath.lua",
"eressea/wedding-jadee.lua",
"eressea/ponnuki.lua",
"eressea/xmas2004.lua",
"eressea/xmas2005.lua",
"eressea/embassy.lua"
}

View File

@ -1,8 +1,17 @@
function use_snomwan(u, amount)
if u.region.terrain == "glacier" then
local man = add_unit(u.faction, u.region)
u.race = "snowman"
u.number = amount
u:add_item("snowman", -amount)
end
end
function xmas2004()
print(get_gamename())
if get_gamename() == "Eressea" then
if not get_flag("xm04") then
print("Es weihnachtet sehr")
print("Es weihnachtet sehr (2004)")
set_flag("xm04", true)
for f in factions() do
f:add_item("speedsail", 1)
@ -12,5 +21,4 @@ function xmas2004()
end
end
print("Ja, ist denn schon Weihnachten?")
xmas2004()

View File

@ -17,7 +17,7 @@ function xmas2005()
print(get_gamename())
if get_gamename() == "Eressea" then
if not get_flag("xm05") then
print("Es weihnachtet sehr")
print("Es weihnachtet sehr (2005)")
set_flag("xm05", true)
for f in factions() do
f:add_item("stardust", 1)
@ -27,5 +27,4 @@ function xmas2005()
end
end
print("Ja, ist denn schon wieder Weihnachten?")
xmas2005()