forked from github/server
allow GIVE PERSON for undead race, too
This commit is contained in:
parent
572073f084
commit
3445e376e0
|
@ -700,7 +700,11 @@
|
|||
<attack type="4" damage="2d12"/>
|
||||
</race>
|
||||
|
||||
<race name="undead" maxaura="1.0" regaura="1.0" weight="1000" capacity="540" speed="1.0" hp="20" damage="1d7" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes" undead="yes" equipment="yes">
|
||||
<race name="undead" maxaura="1.0" regaura="1.0" weight="1000"
|
||||
capacity="540" speed="1.0" hp="20" damage="1d7" unarmedattack="0"
|
||||
unarmeddefense="0" attackmodifier="1" defensemodifier="1"
|
||||
scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes"
|
||||
undead="yes" equipment="yes" giveperson="yes">
|
||||
<ai splitsize="20000" moverandom="yes"/>
|
||||
<attack type="4" damage="1d7"/>
|
||||
<attack type="5"/>
|
||||
|
|
|
@ -732,7 +732,7 @@
|
|||
<attack type="4" damage="1d30"/>
|
||||
<attack type="6" spell="fiery_dragonbreath" level="3" />
|
||||
</race>
|
||||
<race name="undead" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="540" speed="1.000000" hp="20" damage="1d7" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes" undead="yes" equipment="yes">
|
||||
<race name="undead" maxaura="1.000000" regaura="1.000000" weight="1000" capacity="540" speed="1.000000" hp="20" damage="1d7" unarmedattack="0" unarmeddefense="0" attackmodifier="1" defensemodifier="1" scarepeasants="yes" walk="yes" canlearn="no" teach="no" noheal="yes" undead="yes" equipment="yes" giveperson="yes">
|
||||
<ai splitsize="20000" moverandom="yes"/>
|
||||
<attack type="4" damage="1d7"/>
|
||||
<attack type="5"/>
|
||||
|
|
|
@ -18,11 +18,11 @@ function test_undead_give_item()
|
|||
assert_equal(0, u1:get_item("log"))
|
||||
end
|
||||
|
||||
function test_undead_dont_give_person()
|
||||
function test_clones_dont_give_person()
|
||||
local r1 = region.create(0, 0, "plain")
|
||||
local f1 = faction.create("human", "hodor@eressea.de", "de")
|
||||
local u1 = unit.create(f1, r1, 2)
|
||||
u1.race = "undead"
|
||||
u1.race = "clone"
|
||||
u1:clear_orders()
|
||||
u1:add_item("log", 1)
|
||||
u1:add_order("GIB 0 1 Person")
|
||||
|
|
|
@ -21,16 +21,16 @@ function test_give_undead_to_self()
|
|||
local u2 = unit.create(f, r, 1, "undead")
|
||||
u1:add_order("GIB " .. itoa36(u2.id) .. " 1 PERSON")
|
||||
process_orders()
|
||||
assert_equal(2, u1.number)
|
||||
assert_equal(1, u2.number)
|
||||
assert_equal(1, u1.number)
|
||||
assert_equal(2, u2.number)
|
||||
end
|
||||
|
||||
function test_give_self_undead_fail()
|
||||
function test_give_self_clone_fail()
|
||||
-- disallow giving basic undead units
|
||||
local r = region.create(0, 0, "plain")
|
||||
local f = faction.create("human")
|
||||
local u1 = unit.create(f, r, 2, "undead")
|
||||
local u2 = unit.create(f, r, 1, "undead")
|
||||
local u1 = unit.create(f, r, 2, "clone")
|
||||
local u2 = unit.create(f, r, 1, "clone")
|
||||
u1:add_order("GIB " .. itoa36(u2.id) .. " 1 PERSON")
|
||||
process_orders()
|
||||
assert_equal(2, u1.number)
|
||||
|
|
Loading…
Reference in New Issue