test that adamantium requires a mine

This commit is contained in:
Enno Rehling 2017-03-23 08:29:24 +01:00
parent 0c8a9354db
commit 68e36e9252
1 changed files with 5 additions and 4 deletions

View File

@ -24,19 +24,20 @@ function test_adamantium1()
local r, u1 = _test_create_adamantium() local r, u1 = _test_create_adamantium()
u1:add_item("money", 1000) u1:add_item("money", 1000)
u1:set_skill("mining", 14) u1:set_skill("mining", 8)
u1:clear_orders() u1:clear_orders()
u1:add_order("MACHEN Adamantium") u1:add_order("MACHEN Adamantium")
process_orders() process_orders()
-- adamantium needs a mine, so nothing happens:
assert_equal(0, u1:get_item("adamantium")) assert_equal(0, u1:get_item("adamantium"))
end end
function test_adamantium2() function test_adamantium2()
local r, u1 = _test_create_adamantium() local r, u1 = _test_create_adamantium()
u1.id = 42
u1:add_item("money", 1000) u1:add_item("money", 1000)
u1:set_skill("mining", 15) u1:set_skill("mining", 8)
u1:clear_orders() u1:clear_orders()
u1:add_order("MACHEN Adamantium") u1:add_order("MACHEN Adamantium")