forked from github/server
christmas 2009
This commit is contained in:
parent
672b4391c6
commit
bb125e6c08
|
@ -352,10 +352,6 @@
|
||||||
RelativePath=".\kernel\karma.h"
|
RelativePath=".\kernel\karma.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\external\lunit\lunit.lua"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\kernel\magic.c"
|
RelativePath=".\kernel\magic.c"
|
||||||
>
|
>
|
||||||
|
|
|
@ -277,6 +277,14 @@
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\scripts\init-e3a.lua"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\external\lunit\lunit.lua"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\scripts\run-e3a.lua"
|
RelativePath=".\scripts\run-e3a.lua"
|
||||||
>
|
>
|
||||||
|
|
|
@ -80,4 +80,11 @@
|
||||||
</item>
|
</item>
|
||||||
</resource>
|
</resource>
|
||||||
|
|
||||||
</resources>
|
<!-- xmas 2009
|
||||||
|
<resource name="xmastree">
|
||||||
|
<item weight="0">
|
||||||
|
<function name="use" value="lua_useitem"/>
|
||||||
|
</item>
|
||||||
|
</resource> -->
|
||||||
|
|
||||||
|
</resources>
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
_p: plural (13 /Trolle/)
|
_p: plural (13 /Trolle/)
|
||||||
_x: preposition (15 /Troll/schwerter)
|
_x: preposition (15 /Troll/schwerter)
|
||||||
_a: including article (ein Troll, a troll)
|
_a: including article (ein Troll, a troll)
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!--Fort-Ausbaustufen -->
|
<!--Fort-Ausbaustufen -->
|
||||||
<string name="calendar::thirdage">
|
<string name="calendar::thirdage">
|
||||||
<text locale="de">des dritten Zeitalters</text>
|
<text locale="de">des dritten Zeitalters</text>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
require "e3a.xmas2009"
|
||||||
require "e3a.rules"
|
require "e3a.rules"
|
||||||
require "e3a.multi"
|
require "e3a.multi"
|
||||||
require "default"
|
require "default"
|
||||||
|
|
|
@ -166,6 +166,9 @@ function process(orders, confirmed_multis, suspected_multis, locales)
|
||||||
print (nmrs .. " Factions with 1 NMR")
|
print (nmrs .. " Factions with 1 NMR")
|
||||||
|
|
||||||
process_orders()
|
process_orders()
|
||||||
|
if xmas2009~=nil then
|
||||||
|
xmas2009()
|
||||||
|
end
|
||||||
|
|
||||||
-- create new monsters:
|
-- create new monsters:
|
||||||
spawn_dragons()
|
spawn_dragons()
|
||||||
|
|
|
@ -6,6 +6,27 @@ function setup()
|
||||||
free_game()
|
free_game()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function use_tree(terrain)
|
||||||
|
local r = region.create(0,0, terrain)
|
||||||
|
local f = faction.create("noreply@eressea.de", "human", "de")
|
||||||
|
local u1 = unit.create(f, r, 5)
|
||||||
|
r:set_resource("tree", 0)
|
||||||
|
u1:add_item("xmastree", 1)
|
||||||
|
u1:clear_orders()
|
||||||
|
u1:add_order("BENUTZEN 1 Weihnachtsbaum")
|
||||||
|
process_orders()
|
||||||
|
return r
|
||||||
|
end
|
||||||
|
|
||||||
|
function test_xmastree()
|
||||||
|
local r
|
||||||
|
r = use_tree("ocean")
|
||||||
|
assert_equal(0, r:get_resource("tree"))
|
||||||
|
free_game()
|
||||||
|
r = use_tree("plain")
|
||||||
|
assert_equal(10, r:get_resource("tree"))
|
||||||
|
end
|
||||||
|
|
||||||
function test_capacity()
|
function test_capacity()
|
||||||
local r = region.create(0,0, "ocean")
|
local r = region.create(0,0, "ocean")
|
||||||
region.create(1,0, "ocean")
|
region.create(1,0, "ocean")
|
||||||
|
|
Loading…
Reference in New Issue