From 108268fa17f1ad40bde9dac1053c04b655b9d9f1 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 1 Sep 2017 22:10:38 +0200 Subject: [PATCH] BUG 2269: Vertraute vergessen ihre Magie nicht. --- scripts/tests/economy.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/tests/economy.lua b/scripts/tests/economy.lua index 9289efa2b..719b1f764 100644 --- a/scripts/tests/economy.lua +++ b/scripts/tests/economy.lua @@ -17,15 +17,18 @@ function test_bug_2361_forget_magic() local r = region.create(0, 0, "plain") local f = faction.create("human") local u = unit.create(f, r, 1) + local uf = unit.create(f, r, 1) u:clear_orders() u:add_order("VERGESSE Magie") u:set_skill('magic', 5) - u.race = 'unicorn' - process_orders() - assert_equal(5, u:get_skill('magic')) - u.race = 'human' + uf.race = 'unicorn' + uf:clear_orders() + uf:add_order("VERGESSE Magie") + uf:set_skill('magic', 5) + u.familiar = uf process_orders() assert_equal(0, u:get_skill('magic')) + assert_equal(5, uf:get_skill('magic')) end function test_mine_bonus()