forked from github/server
return to old mechanism of equipping the first unit, and give some basic necessities to special races.
This commit is contained in:
parent
6672251b2d
commit
7906d4469d
|
@ -33,10 +33,13 @@
|
|||
<xi:include href="config:///default/adamantium.xml"/>
|
||||
<equipment>
|
||||
<set name="first_unit">
|
||||
<item name="conquesttoken" amount="1"/>
|
||||
<item name="log" amount="30"/>
|
||||
<item name="stone" amount="30"/>
|
||||
<item name="money" amount="4200"/>
|
||||
<item name="log" amount="50"/>
|
||||
<item name="stone" amount="50"/>
|
||||
<item name="iron" amount="50"/>
|
||||
<item name="laen" amount="10"/>
|
||||
<item name="mallorn" amount="10"/>
|
||||
<item name="skillpotion" amount="5"/>
|
||||
<item name="money" amount="20000"/>
|
||||
</set>
|
||||
<set name="new_faction">
|
||||
<item name="adamantium" amount="1"/>
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
<equipment>
|
||||
<set name="first_unit">
|
||||
<item name="conquesttoken" amount="1"/>
|
||||
<item name="log" amount="10"/>
|
||||
<item name="stone" amount="10"/>
|
||||
<item name="money" amount="5000"/>
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
<equipment>
|
||||
<set name="first_unit">
|
||||
<item name="conquesttoken" amount="1"/>
|
||||
<item name="log" amount="10"/>
|
||||
<item name="stone" amount="10"/>
|
||||
<item name="money" amount="5000"/>
|
||||
|
|
|
@ -17,19 +17,10 @@ end
|
|||
local function seed(r, email, race, lang)
|
||||
local f = faction.create(email, race, lang)
|
||||
local u = unit.create(f, r)
|
||||
equip_unit(u, "new_faction")
|
||||
equip_unit(u, "first_unit")
|
||||
equip_unit(u, "first_" .. race, 7) -- disable old callbacks
|
||||
u:set_skill("perception", 30)
|
||||
u:add_item("money", 20000)
|
||||
items = {
|
||||
log = 50,
|
||||
stone = 50,
|
||||
iron = 50,
|
||||
laen = 10,
|
||||
mallorn = 10,
|
||||
skillpotion = 5
|
||||
}
|
||||
for it, num in pairs(items) do
|
||||
u:add_item(it, num)
|
||||
end
|
||||
unit.create(f, r, 5):set_skill("mining", 30)
|
||||
unit.create(f, r, 5):set_skill("quarrying", 30)
|
||||
return f
|
||||
|
|
|
@ -16,7 +16,7 @@ end
|
|||
local function select(regions, limit)
|
||||
local sel = {}
|
||||
for r in regions do
|
||||
if r.terrain~="ocean" and not r.units() then
|
||||
if not r.plane and r.terrain~="ocean" and not r.units() then
|
||||
s = score(r)
|
||||
if s >= limit then
|
||||
table.insert(sel, r)
|
||||
|
|
|
@ -434,7 +434,9 @@ static int tolua_equipunit(lua_State * L)
|
|||
{
|
||||
unit *u = (unit *)tolua_tousertype(L, 1, 0);
|
||||
const char *eqname = tolua_tostring(L, 2, 0);
|
||||
equip_unit(u, get_equipment(eqname));
|
||||
int mask = (int)tolua_tonumber(L, 3, EQUIP_ALL);
|
||||
assert(mask > 0);
|
||||
equip_unit_mask(u, get_equipment(eqname), mask);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue