forked from github/server
have I bollocksed up the deny/allow rules? looks like it
This commit is contained in:
parent
c276b5a43c
commit
2eb88c472c
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<resource name="towershield">
|
<resource name="towershield">
|
||||||
<item weight="200" score="60">
|
<item weight="200" score="60" allow="1">
|
||||||
<function name="canuse" value="lua_canuse_item"/>
|
<function name="canuse" value="lua_canuse_item"/>
|
||||||
<construction skill="armorer" minskill="4">
|
<construction skill="armorer" minskill="4">
|
||||||
<modifier function="mod_dwarves_only"/>
|
<modifier function="mod_dwarves_only"/>
|
||||||
|
|
|
@ -71,7 +71,11 @@
|
||||||
<familiar race="ghost"/>
|
<familiar race="ghost"/>
|
||||||
</race>
|
</race>
|
||||||
|
|
||||||
<race name="halfling" defensemodifier="1" magres="5" maxaura="1.0" regaura="1.0" recruitcost="100" maintenance="10" weight="1000" capacity="540" speed="1.0" hp="20" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
<race name="halfling" defensemodifier="1" magres="5" maxaura="1.0"
|
||||||
|
regaura="1.0" recruitcost="100" maintenance="10" weight="1000"
|
||||||
|
capacity="540" speed="1.0" hp="20" damage="1d5" unarmedattack="-2"
|
||||||
|
unarmeddefense="-2" playerrace="yes" walk="yes" giveperson="yes"
|
||||||
|
giveunit="yes" getitem="yes" equipment="yes" items="8">
|
||||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
<param name="other_race" value="dwarf"/>
|
<param name="other_race" value="dwarf"/>
|
||||||
<param name="luxury_trade" value="600"/>
|
<param name="luxury_trade" value="600"/>
|
||||||
|
@ -116,7 +120,11 @@
|
||||||
<familiar race="ghost"/>
|
<familiar race="ghost"/>
|
||||||
</race>
|
</race>
|
||||||
|
|
||||||
<race name="elf" magres="10" maxaura="1.0" regaura="1.1" recruitcost="200" maintenance="10" weight="1000" capacity="540" speed="1.0" hp="20" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
<race name="elf" magres="10" maxaura="1.0" regaura="1.1"
|
||||||
|
recruitcost="200" maintenance="10" weight="1000" capacity="540"
|
||||||
|
speed="1.0" hp="20" damage="1d5" unarmedattack="-2"
|
||||||
|
unarmeddefense="-2" playerrace="yes" walk="yes" giveperson="yes"
|
||||||
|
giveunit="yes" getitem="yes" equipment="yes" items="2">
|
||||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
<skill name="armorer" modifier="-1"/>
|
<skill name="armorer" modifier="-1"/>
|
||||||
<skill name="bow" modifier="2"/>
|
<skill name="bow" modifier="2"/>
|
||||||
|
@ -156,7 +164,11 @@
|
||||||
<familiar race="rat"/>
|
<familiar race="rat"/>
|
||||||
</race>
|
</race>
|
||||||
|
|
||||||
<race name="dwarf" magres="5" maxaura="1.0" regaura="0.9" recruitcost="240" maintenance="10" weight="1000" capacity="540" speed="1.0" hp="20" damage="1d5" unarmedattack="-2" unarmeddefense="-2" playerrace="yes" walk="yes" giveperson="yes" giveunit="yes" getitem="yes" equipment="yes">
|
<race name="dwarf" magres="5" maxaura="1.0" regaura="0.9"
|
||||||
|
recruitcost="240" maintenance="10" weight="1000" capacity="540"
|
||||||
|
speed="1.0" hp="20" damage="1d5" unarmedattack="-2"
|
||||||
|
unarmeddefense="-2" playerrace="yes" walk="yes" giveperson="yes"
|
||||||
|
giveunit="yes" getitem="yes" equipment="yes" items="1">
|
||||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
<skill name="armorer" modifier="2"/>
|
<skill name="armorer" modifier="2"/>
|
||||||
<skill name="bow" modifier="-1"/>
|
<skill name="bow" modifier="-1"/>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
recruitcost="60" maintenance="6" weight="600" capacity="440"
|
recruitcost="60" maintenance="6" weight="600" capacity="440"
|
||||||
speed="1.0" hp="16" damage="1d5" unarmedattack="-2" unarmeddefense="0"
|
speed="1.0" hp="16" damage="1d5" unarmedattack="-2" unarmeddefense="0"
|
||||||
playerrace="yes" walk="yes" giveperson="yes" giveunit="yes"
|
playerrace="yes" walk="yes" giveperson="yes" giveunit="yes"
|
||||||
getitem="yes" equipment="yes" healing="2.0">
|
getitem="yes" equipment="yes" healing="2.0" items="4">
|
||||||
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
<ai splitsize="10000" moverandom="yes" learn="yes"/>
|
||||||
<param name="hunger.damage" value="1d8+7"/>
|
<param name="hunger.damage" value="1d8+7"/>
|
||||||
<param name="other_race" value="demon"/>
|
<param name="other_race" value="demon"/>
|
||||||
|
|
|
@ -14,7 +14,9 @@ function test_goblins()
|
||||||
local f1 = faction.create("goblin@eressea.de", "goblin", "de")
|
local f1 = faction.create("goblin@eressea.de", "goblin", "de")
|
||||||
local f2 = faction.create("dwarf@eressea.de", "dwarf", "de")
|
local f2 = faction.create("dwarf@eressea.de", "dwarf", "de")
|
||||||
local f3 = faction.create("elf@eressea.de", "elf", "de")
|
local f3 = faction.create("elf@eressea.de", "elf", "de")
|
||||||
local u1 = unit.create(f1, r, 1)
|
local ud = unit.create(f1, r, 1)
|
||||||
|
local uh = unit.create(f1, r, 1)
|
||||||
|
uh.race = "halfling"
|
||||||
local u2 = unit.create(f2, r, 1)
|
local u2 = unit.create(f2, r, 1)
|
||||||
local u3 = unit.create(f3, r, 1)
|
local u3 = unit.create(f3, r, 1)
|
||||||
|
|
||||||
|
@ -24,12 +26,15 @@ function test_goblins()
|
||||||
"plate", "rustyhalberd", "halberd", "greatsword"
|
"plate", "rustyhalberd", "halberd", "greatsword"
|
||||||
}
|
}
|
||||||
for k, v in ipairs(restricted) do
|
for k, v in ipairs(restricted) do
|
||||||
u1:add_item(v, 1)
|
ud:add_item(v, 1)
|
||||||
|
uh:add_item(v, 1)
|
||||||
u2:add_item(v, 1)
|
u2:add_item(v, 1)
|
||||||
u3:add_item(v, 1)
|
u3:add_item(v, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
u1:add_order("ATTACKIERE " .. itoa36(u2.id))
|
uh:add_order("ATTACKIERE " .. itoa36(u2.id))
|
||||||
u1:add_order("ATTACKIERE " .. itoa36(u3.id))
|
uh:add_order("ATTACKIERE " .. itoa36(u3.id))
|
||||||
|
ud:add_order("ATTACKIERE " .. itoa36(u2.id))
|
||||||
|
ud:add_order("ATTACKIERE " .. itoa36(u3.id))
|
||||||
process_orders()
|
process_orders()
|
||||||
end
|
end
|
||||||
|
|
|
@ -782,6 +782,8 @@ static item_type *xml_readitem(xmlXPathContextPtr xpath, resource_type * rtype)
|
||||||
itype = rtype->itype ? rtype->itype : it_get_or_create(rtype);
|
itype = rtype->itype ? rtype->itype : it_get_or_create(rtype);
|
||||||
itype->weight = xml_ivalue(node, "weight", 0);
|
itype->weight = xml_ivalue(node, "weight", 0);
|
||||||
itype->capacity = xml_ivalue(node, "capacity", 0);
|
itype->capacity = xml_ivalue(node, "capacity", 0);
|
||||||
|
itype->mask_allow = xml_ivalue(node, "allow", 0);
|
||||||
|
itype->mask_deny = xml_ivalue(node, "deny", 0);
|
||||||
itype->flags |= flags;
|
itype->flags |= flags;
|
||||||
|
|
||||||
/* reading item/construction */
|
/* reading item/construction */
|
||||||
|
@ -1575,6 +1577,7 @@ static int parse_races(xmlDocPtr doc)
|
||||||
rc->speed = (float)xml_fvalue(node, "speed", rc->speed);
|
rc->speed = (float)xml_fvalue(node, "speed", rc->speed);
|
||||||
rc->hitpoints = xml_ivalue(node, "hp", rc->hitpoints);
|
rc->hitpoints = xml_ivalue(node, "hp", rc->hitpoints);
|
||||||
rc->armor = (char)xml_ivalue(node, "ac", rc->armor);
|
rc->armor = (char)xml_ivalue(node, "ac", rc->armor);
|
||||||
|
rc->mask_item = (char)xml_ivalue(node, "items", rc->mask_item);
|
||||||
study_speed_base = xml_ivalue(node, "studyspeed", 0);
|
study_speed_base = xml_ivalue(node, "studyspeed", 0);
|
||||||
|
|
||||||
rc->at_default = (char)xml_ivalue(node, "unarmedattack", -2);
|
rc->at_default = (char)xml_ivalue(node, "unarmedattack", -2);
|
||||||
|
|
Loading…
Reference in New Issue