new lua-test for castle-stages

(Messed up the previous commit)
New lua-test for the behaviour concerning the castle-stages and their
min-skills. (Bug 1859)
This commit is contained in:
Philipp Dreher 2015-11-06 20:59:45 +01:00
parent b0a986e155
commit 4f5a02a1a3

View file

@ -50,3 +50,26 @@ function test_build_packice()
process_orders()
assert_equal(nil, u.building)
end
function test_build_castle_stages()
local r = region.create(0,0, "plain")
local f = faction.create("castle@eressea.de", "human", "de")
local u = unit.create(f, r, 1000)
local b = building.create(r, "castle")
u:add_item("stone", 1000)
u:set_skill("building", 1)
u:clear_orders()
u:add_order("MACHE BURG " .. itoa36(b.id))
process_orders()
assert_equal(10, b.size)
u:set_skill("building", 3)
u:clear_orders()
u:add_order("MACHE BURG " .. itoa36(b.id))
process_orders()
assert_equal(250, b.size)
end