From 0f014153c06937c3173c533134673df52d6f7234 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 16 Dec 2017 20:41:03 +0100 Subject: [PATCH] add a test that proves bug 2392 to be user error. --- scripts/tests/e3/rules.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/tests/e3/rules.lua b/scripts/tests/e3/rules.lua index 92e02f29b..8669dc465 100644 --- a/scripts/tests/e3/rules.lua +++ b/scripts/tests/e3/rules.lua @@ -1008,3 +1008,16 @@ function test_give_to_other_fails() assert_equal(2, u1.number) assert_equal(1, u2.number) end + +function test_demons_using_mallornlance() + -- bug 2392 + local r = region.create(0, 0, "plain") + local f = faction.create('goblin') + local u = unit.create(f, r, 1, 'demon') + u:set_skill('taxation', 1) + u:set_skill('polearm', 4) -- demon has +1 + u:add_item('mallornlance', 1) + u:add_order('BEWACHE') + process_orders() + assert_true(u.guard) +end