Test: Heiltrank heilt mehrere Einheiten.

This commit is contained in:
Enno Rehling 2018-02-17 12:52:58 +01:00
parent 96062f6f85
commit a2d23d01fa
1 changed files with 21 additions and 0 deletions

View File

@ -152,6 +152,27 @@ function test_use_healing_potion()
turn_end() turn_end()
end end
function test_use_healing_potion_multi_units()
-- Heiltrank kann mehrere Einheiten heilen
local r = region.create(0, 0, "plain")
local f = faction.create("human")
local u1 = unit.create(f, r, 30)
local u = unit.create(f, r, 30)
assert_equal(600, u1.hp)
assert_equal(600, u.hp)
u.hp = 400
u1.hp = 400
turn_begin()
u:add_item("p14", 1)
u:clear_orders()
u:add_order("BENUTZEN 1 Heiltrank")
turn_process()
assert_equal(600, u.hp)
assert_equal(600, u1.hp)
assert_equal(0, u:get_item("p14"))
turn_end()
end
function test_speedsail() function test_speedsail()
local r = region.create(0, 0, "plain") local r = region.create(0, 0, "plain")
local f = faction.create("human") local f = faction.create("human")