diff --git a/scripts/tests/e2/guard.lua b/scripts/tests/e2/guard.lua index f5be800c2..8e62a364d 100644 --- a/scripts/tests/e2/guard.lua +++ b/scripts/tests/e2/guard.lua @@ -13,24 +13,24 @@ function test_guard_unarmed() local r1 = region.create(0, 0, "plain") local f1 = faction.create("hodor@eressea.de", "human", "de") local u1 = unit.create(f1, r1, 1) - assert_equal(nil, u1.guard) + assert_equal(false, u1.guard) u1:clear_orders() u1:add_order("BEWACHE") process_orders() - assert_equal(nil, u1.guard) + assert_equal(false, u1.guard) end function test_guard_armed() local r1 = region.create(0, 0, "plain") local f1 = faction.create("hodor@eressea.de", "human", "de") local u1 = unit.create(f1, r1, 1) - assert_equal(nil, u1.guard) + assert_equal(false, u1.guard) u1:add_item("sword", 1) u1:set_skill("melee", 2) u1:clear_orders() u1:add_order("BEWACHE") process_orders() - assert_equal(249, u1.guard) + assert_equal(true, u1.guard) end function test_guard_allows_move_after_combat() -- bug 1493 @@ -47,7 +47,7 @@ function test_guard_allows_move_after_combat() -- bug 1493 u1:clear_orders() u1:add_order("BEWACHE") process_orders() - assert_equal(249, u1.guard) + assert_equal(true, u1.guard) u1:clear_orders() u1:add_order("NACH O") u1:add_order("ATTACKIERE " .. itoa36(u2.id)) @@ -67,7 +67,7 @@ function test_no_guard_no_move_after_combat() -- bug 1493 u1:add_order("BEWACHE") u1:add_item("sword", 10) u1:set_skill("melee", 2) - assert_equal(nil, u1.guard) + assert_equal(false, u1.guard) u1:clear_orders() u1:add_order("NACH O") u1:add_order("ATTACKIERE " .. itoa36(u2.id))