Skip to content

Commit

Permalink
fix old tests for migration spell
Browse files Browse the repository at this point in the history
  • Loading branch information
ennorehling committed Apr 7, 2024
1 parent 41ea4c5 commit 3735620
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions scripts/tests/e2/migration.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ end

function test_migration_success()
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u:add_order('ZAUBERE STUFE 1 "Ritual der Aufnahme" ' .. itoa36(u2.id))
u.aura = 9
Expand All @@ -40,9 +40,9 @@ end

function test_migration_no_familiars()
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local f2 = faction.create('human')
local f2 = faction.create('dwarf')
local u2 = setup_mage(f2, r)
local u3 = unit.create(f2, r)
u3.race = 'goblin'
Expand All @@ -60,9 +60,9 @@ end

function test_migration_no_contact()
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u:add_order('ZAUBERE STUFE 1 "Ritual der Aufnahme" ' .. itoa36(u2.id))
u.aura = 9
u.aura_max = 9
Expand All @@ -74,9 +74,9 @@ end

function test_migration_too_many()
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u2.number = 2
u:add_order('ZAUBERE STUFE 1 "Ritual der Aufnahme" ' .. itoa36(u2.id))
Expand All @@ -90,9 +90,9 @@ end

function test_migration_with_ring()
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u2.number = 2
u:add_item('rop', 1)
Expand All @@ -109,9 +109,9 @@ end
function test_migration_insufficient_aura()
-- if unit cannot pay full costs, it casts at a lower level.
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u2.number = 2
u:add_order('ZAUBERE STUFE 2 "Ritual der Aufnahme" ' .. itoa36(u2.id))
Expand All @@ -127,9 +127,9 @@ end
function test_migration_insufficient_max_aura()
-- if unit cannot pay full costs, it casts at a lower level.
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u2.number = 2
u:add_order('ZAUBERE STUFE 2 "Ritual der Aufnahme" ' .. itoa36(u2.id))
Expand All @@ -145,9 +145,9 @@ end
function test_migration_reduced_cost()
-- if unit cannot pay full costs, it casts at a lower level.
local r = region.create(0, 0, "plain")
local f = faction.create('human')
local f = faction.create('elf')
local u = setup_mage(f, r)
local u2 = unit.create(faction.create('human'), r)
local u2 = unit.create(faction.create('dwarf'), r)
u2:add_order('KONTAKTIERE ' .. itoa36(u.id))
u:add_order('ZAUBERE STUFE 2 "Ritual der Aufnahme" ' .. itoa36(u2.id))
u.aura = 3
Expand Down

0 comments on commit 3735620

Please sign in to comment.