test of GIVE 0

This commit is contained in:
Enno Rehling 2009-10-16 17:13:34 +00:00
parent 2efe55c285
commit 1fe4710cab
1 changed files with 4 additions and 0 deletions

View File

@ -744,7 +744,11 @@ function test_give()
u1:add_order("GIB " .. itoa36(u2.id) .. " 332 Silber")
u2:clear_orders()
u2:add_order("HELFE " .. itoa36(u1.faction.id) .. " GIB")
u2:add_item("horse", 100)
u2:add_order("GIB 0 ALLES PFERD")
local h = r:get_resource("horse")
process_orders()
assert(r:get_resource("horse")>=h+100)
assert(u1:get_item("money")==m1-332-10*u1.number)
assert(u2:get_item("money")==m2+110-10*u2.number)
end