forked from github/server
BUG 2269: Vertraute vergessen ihre Magie nicht.
This commit is contained in:
parent
eabf72e60e
commit
108268fa17
1 changed files with 7 additions and 4 deletions
|
@ -17,15 +17,18 @@ function test_bug_2361_forget_magic()
|
||||||
local r = region.create(0, 0, "plain")
|
local r = region.create(0, 0, "plain")
|
||||||
local f = faction.create("human")
|
local f = faction.create("human")
|
||||||
local u = unit.create(f, r, 1)
|
local u = unit.create(f, r, 1)
|
||||||
|
local uf = unit.create(f, r, 1)
|
||||||
u:clear_orders()
|
u:clear_orders()
|
||||||
u:add_order("VERGESSE Magie")
|
u:add_order("VERGESSE Magie")
|
||||||
u:set_skill('magic', 5)
|
u:set_skill('magic', 5)
|
||||||
u.race = 'unicorn'
|
uf.race = 'unicorn'
|
||||||
process_orders()
|
uf:clear_orders()
|
||||||
assert_equal(5, u:get_skill('magic'))
|
uf:add_order("VERGESSE Magie")
|
||||||
u.race = 'human'
|
uf:set_skill('magic', 5)
|
||||||
|
u.familiar = uf
|
||||||
process_orders()
|
process_orders()
|
||||||
assert_equal(0, u:get_skill('magic'))
|
assert_equal(0, u:get_skill('magic'))
|
||||||
|
assert_equal(5, uf:get_skill('magic'))
|
||||||
end
|
end
|
||||||
|
|
||||||
function test_mine_bonus()
|
function test_mine_bonus()
|
||||||
|
|
Loading…
Reference in a new issue