forked from github/server
Merge branch 'develop' of https://github.com/ennorehling/eressea.git
This commit is contained in:
commit
1b13f6119b
2 changed files with 21 additions and 0 deletions
|
@ -1160,3 +1160,19 @@ function test_bug_2393_cart()
|
|||
process_orders()
|
||||
assert_equal(r1, u.region)
|
||||
end
|
||||
|
||||
function test_immunity_stops_guard()
|
||||
eressea.settings.set("NewbieImmunity", 2)
|
||||
local f = faction.create('human')
|
||||
local r = region.create(0, 0, 'plain')
|
||||
local u = unit.create(f, r)
|
||||
u:set_skill('polearm', 2)
|
||||
u:add_item('lance', 1)
|
||||
u:add_order('BEWACHE')
|
||||
process_orders()
|
||||
assert_equal(f.age, 1)
|
||||
assert_true(not u.guard)
|
||||
process_orders()
|
||||
assert_equal(f.age, 2)
|
||||
assert_true(u.guard)
|
||||
end
|
||||
|
|
|
@ -1011,6 +1011,7 @@ end
|
|||
function test_demons_using_mallornlance()
|
||||
-- bug 2392
|
||||
set_rule("skillchange.demon.up", "0")
|
||||
set_rule("NewbieImmunity", "0")
|
||||
local r = region.create(0, 0, "plain")
|
||||
local f = faction.create('goblin')
|
||||
local u = unit.create(f, r, 1, 'demon')
|
||||
|
@ -1019,5 +1020,9 @@ function test_demons_using_mallornlance()
|
|||
u:add_item('mallornlance', 1)
|
||||
u:add_order('BEWACHE')
|
||||
process_orders()
|
||||
if not u.guard then
|
||||
init_reports()
|
||||
write_report(f)
|
||||
end
|
||||
assert_true(u.guard)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue