forked from github/server
Merge branch 'hotfix-3-5-3'
This commit is contained in:
commit
12d7862c51
|
@ -33,10 +33,13 @@
|
||||||
<xi:include href="config:///default/adamantium.xml"/>
|
<xi:include href="config:///default/adamantium.xml"/>
|
||||||
<equipment>
|
<equipment>
|
||||||
<set name="first_unit">
|
<set name="first_unit">
|
||||||
<item name="conquesttoken" amount="1"/>
|
<item name="log" amount="50"/>
|
||||||
<item name="log" amount="30"/>
|
<item name="stone" amount="50"/>
|
||||||
<item name="stone" amount="30"/>
|
<item name="iron" amount="50"/>
|
||||||
<item name="money" amount="4200"/>
|
<item name="laen" amount="10"/>
|
||||||
|
<item name="mallorn" amount="10"/>
|
||||||
|
<item name="skillpotion" amount="5"/>
|
||||||
|
<item name="money" amount="20000"/>
|
||||||
</set>
|
</set>
|
||||||
<set name="new_faction">
|
<set name="new_faction">
|
||||||
<item name="adamantium" amount="1"/>
|
<item name="adamantium" amount="1"/>
|
||||||
|
@ -89,7 +92,7 @@
|
||||||
<param name="entertain.base" value="0"/>
|
<param name="entertain.base" value="0"/>
|
||||||
<param name="entertain.perlevel" value="20"/>
|
<param name="entertain.perlevel" value="20"/>
|
||||||
<param name="nmr.timeout" value="5"/>
|
<param name="nmr.timeout" value="5"/>
|
||||||
<param name="nmr.removenewbie" value="10"/>
|
<param name="nmr.removenewbie" value="0"/>
|
||||||
<param name="GiveRestriction" value="3"/>
|
<param name="GiveRestriction" value="3"/>
|
||||||
<param name="hunger.long" value="1"/>
|
<param name="hunger.long" value="1"/>
|
||||||
<param name="init_spells" value="0"/>
|
<param name="init_spells" value="0"/>
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
|
|
||||||
<equipment>
|
<equipment>
|
||||||
<set name="first_unit">
|
<set name="first_unit">
|
||||||
<item name="conquesttoken" amount="1"/>
|
|
||||||
<item name="log" amount="10"/>
|
<item name="log" amount="10"/>
|
||||||
<item name="stone" amount="10"/>
|
<item name="stone" amount="10"/>
|
||||||
<item name="money" amount="5000"/>
|
<item name="money" amount="5000"/>
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
|
|
||||||
<equipment>
|
<equipment>
|
||||||
<set name="first_unit">
|
<set name="first_unit">
|
||||||
<item name="conquesttoken" amount="1"/>
|
|
||||||
<item name="log" amount="10"/>
|
<item name="log" amount="10"/>
|
||||||
<item name="stone" amount="10"/>
|
<item name="stone" amount="10"/>
|
||||||
<item name="money" amount="5000"/>
|
<item name="money" amount="5000"/>
|
||||||
|
|
|
@ -26,7 +26,6 @@ module("tests.eressea.common", package.seeall, lunit.testcase)
|
||||||
|
|
||||||
function setup()
|
function setup()
|
||||||
eressea.free_game()
|
eressea.free_game()
|
||||||
eressea.settings.set("nmr.removenewbie", "0")
|
|
||||||
eressea.settings.set("nmr.timeout", "0")
|
eressea.settings.set("nmr.timeout", "0")
|
||||||
eressea.settings.set("NewbieImmunity", "0")
|
eressea.settings.set("NewbieImmunity", "0")
|
||||||
eressea.settings.set("rules.economy.food", "4")
|
eressea.settings.set("rules.economy.food", "4")
|
||||||
|
@ -981,7 +980,6 @@ module("tests.report", package.seeall, lunit.testcase)
|
||||||
|
|
||||||
function setup()
|
function setup()
|
||||||
eressea.free_game()
|
eressea.free_game()
|
||||||
eressea.settings.set("nmr.removenewbie", "0")
|
|
||||||
eressea.settings.set("nmr.timeout", "0")
|
eressea.settings.set("nmr.timeout", "0")
|
||||||
eressea.settings.set("rules.economy.food", "4")
|
eressea.settings.set("rules.economy.food", "4")
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,6 @@ function setup()
|
||||||
u = _G.unit.create(f, r, 1)
|
u = _G.unit.create(f, r, 1)
|
||||||
u:clear_orders()
|
u:clear_orders()
|
||||||
eressea.settings.set("rules.economy.food", "4")
|
eressea.settings.set("rules.economy.food", "4")
|
||||||
eressea.settings.set("nmr.removenewbie", "0")
|
|
||||||
eressea.settings.set("nmr.timeout", "0")
|
eressea.settings.set("nmr.timeout", "0")
|
||||||
eressea.settings.set("NewbieImmunity", "0")
|
eressea.settings.set("NewbieImmunity", "0")
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,51 +17,12 @@ end
|
||||||
local function seed(r, email, race, lang)
|
local function seed(r, email, race, lang)
|
||||||
local f = faction.create(email, race, lang)
|
local f = faction.create(email, race, lang)
|
||||||
local u = unit.create(f, r)
|
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: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
|
|
||||||
u = nil
|
|
||||||
skills ={
|
|
||||||
"crossbow",
|
|
||||||
"bow",
|
|
||||||
"building",
|
|
||||||
"trade",
|
|
||||||
"forestry",
|
|
||||||
"catapult",
|
|
||||||
"herbalism",
|
|
||||||
"training",
|
|
||||||
"riding",
|
|
||||||
"armorer",
|
|
||||||
"shipcraft",
|
|
||||||
"melee",
|
|
||||||
"sailing",
|
|
||||||
"polearm",
|
|
||||||
"espionage",
|
|
||||||
"roadwork",
|
|
||||||
"tactics",
|
|
||||||
"stealth",
|
|
||||||
"weaponsmithing",
|
|
||||||
"cartmaking",
|
|
||||||
"taxation",
|
|
||||||
"stamina"
|
|
||||||
}
|
|
||||||
unit.create(f, r, 50):set_skill("entertainment", 15)
|
|
||||||
unit.create(f, r, 5):set_skill("mining", 30)
|
unit.create(f, r, 5):set_skill("mining", 30)
|
||||||
unit.create(f, r, 5):set_skill("quarrying", 30)
|
unit.create(f, r, 5):set_skill("quarrying", 30)
|
||||||
for _, sk in ipairs(skills) do
|
|
||||||
u = u or unit.create(f, r, 5)
|
|
||||||
if u:set_skill(sk, 15)>0 then u=nil end
|
|
||||||
end
|
|
||||||
return f
|
return f
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -94,11 +55,17 @@ end
|
||||||
math.randomseed(os.time())
|
math.randomseed(os.time())
|
||||||
|
|
||||||
local newbs = {}
|
local newbs = {}
|
||||||
|
local per_region = 2
|
||||||
|
local num_seeded = 2
|
||||||
|
local start = nil
|
||||||
for _, p in ipairs(players) do
|
for _, p in ipairs(players) do
|
||||||
local index = math.random(#sel)
|
if num_seeded == per_region then
|
||||||
local start = nil
|
while not start or start.units() do
|
||||||
while not start or start.units() do
|
local index = math.random(#sel)
|
||||||
start = sel[index]
|
start = sel[index]
|
||||||
|
end
|
||||||
|
create_curse(nil, r, 'holyground', 1, 52)
|
||||||
|
num_seeded = 0
|
||||||
end
|
end
|
||||||
local dupe = false
|
local dupe = false
|
||||||
for f in factions() do
|
for f in factions() do
|
||||||
|
@ -109,6 +76,7 @@ for _, p in ipairs(players) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not dupe then
|
if not dupe then
|
||||||
|
num_seeded = num_seeded + 1
|
||||||
f = seed(start, p.email, p.race or "human", p.lang or "de")
|
f = seed(start, p.email, p.race or "human", p.lang or "de")
|
||||||
print("new faction ".. tostring(f) .. " starts in ".. tostring(start))
|
print("new faction ".. tostring(f) .. " starts in ".. tostring(start))
|
||||||
table.insert(newbs, f)
|
table.insert(newbs, f)
|
||||||
|
|
|
@ -6,7 +6,7 @@ local function score(r, res)
|
||||||
local x, y, rn
|
local x, y, rn
|
||||||
local peas = r:get_resource(res)
|
local peas = r:get_resource(res)
|
||||||
for _, rn in pairs(r.adj) do
|
for _, rn in pairs(r.adj) do
|
||||||
if rn then
|
if rn and not rn.units() then
|
||||||
peas = peas + rn:get_resource(res)
|
peas = peas + rn:get_resource(res)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -16,7 +16,7 @@ end
|
||||||
local function select(regions, limit)
|
local function select(regions, limit)
|
||||||
local sel = {}
|
local sel = {}
|
||||||
for r in regions do
|
for r in regions do
|
||||||
if r.terrain~="ocean" and r.units()==nil then
|
if not r.plane and r.terrain~="ocean" and not r.units() then
|
||||||
s = score(r)
|
s = score(r)
|
||||||
if s >= limit then
|
if s >= limit then
|
||||||
table.insert(sel, r)
|
table.insert(sel, r)
|
||||||
|
|
|
@ -4,7 +4,6 @@ module("tests.e2.guard", package.seeall, lunit.testcase)
|
||||||
|
|
||||||
function setup()
|
function setup()
|
||||||
eressea.free_game()
|
eressea.free_game()
|
||||||
eressea.settings.set("nmr.removenewbie", "0")
|
|
||||||
eressea.settings.set("nmr.timeout", "0")
|
eressea.settings.set("nmr.timeout", "0")
|
||||||
eressea.settings.set("NewbieImmunity", "0")
|
eressea.settings.set("NewbieImmunity", "0")
|
||||||
eressea.settings.set("rules.economy.food", "4")
|
eressea.settings.set("rules.economy.food", "4")
|
||||||
|
|
|
@ -4,7 +4,6 @@ module("tests.e2.movement", package.seeall, lunit.testcase)
|
||||||
|
|
||||||
function setup()
|
function setup()
|
||||||
eressea.free_game()
|
eressea.free_game()
|
||||||
eressea.settings.set("nmr.removenewbie", "0")
|
|
||||||
eressea.settings.set("nmr.timeout", "0")
|
eressea.settings.set("nmr.timeout", "0")
|
||||||
eressea.settings.set("NewbieImmunity", "0")
|
eressea.settings.set("NewbieImmunity", "0")
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ module("tests.e2.shiplanding", package.seeall, lunit.testcase)
|
||||||
|
|
||||||
function setup()
|
function setup()
|
||||||
eressea.free_game()
|
eressea.free_game()
|
||||||
eressea.settings.set("nmr.removenewbie", "0")
|
|
||||||
eressea.settings.set("nmr.timeout", "0")
|
eressea.settings.set("nmr.timeout", "0")
|
||||||
eressea.settings.set("NewbieImmunity", "0")
|
eressea.settings.set("NewbieImmunity", "0")
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,6 @@ module("tests.e3.spells", package.seeall, lunit.testcase)
|
||||||
function setup()
|
function setup()
|
||||||
eressea.game.reset()
|
eressea.game.reset()
|
||||||
eressea.settings.set("magic.fumble.enable", "0")
|
eressea.settings.set("magic.fumble.enable", "0")
|
||||||
eressea.settings.set("nmr.removenewbie", "0")
|
|
||||||
eressea.settings.set("nmr.timeout", "0")
|
eressea.settings.set("nmr.timeout", "0")
|
||||||
eressea.settings.set("rules.peasants.growth", "0")
|
eressea.settings.set("rules.peasants.growth", "0")
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,6 @@ module("tests.movement", package.seeall, lunit.testcase)
|
||||||
|
|
||||||
function setup()
|
function setup()
|
||||||
eressea.free_game()
|
eressea.free_game()
|
||||||
eressea.settings.set("nmr.removenewbie", "0")
|
|
||||||
eressea.settings.set("nmr.timeout", "0")
|
eressea.settings.set("nmr.timeout", "0")
|
||||||
eressea.settings.set("rules.ships.storms", "0")
|
eressea.settings.set("rules.ships.storms", "0")
|
||||||
conf = [[{
|
conf = [[{
|
||||||
|
|
|
@ -6,7 +6,6 @@ function setup()
|
||||||
eressea.game.reset()
|
eressea.game.reset()
|
||||||
eressea.config.reset()
|
eressea.config.reset()
|
||||||
eressea.settings.set("rules.economy.food", "0")
|
eressea.settings.set("rules.economy.food", "0")
|
||||||
eressea.settings.set("nmr.removenewbie", "0")
|
|
||||||
eressea.settings.set("nmr.timeout", "0")
|
eressea.settings.set("nmr.timeout", "0")
|
||||||
eressea.settings.set("rules.magic.playerschools", "")
|
eressea.settings.set("rules.magic.playerschools", "")
|
||||||
conf = [[{
|
conf = [[{
|
||||||
|
|
|
@ -434,7 +434,9 @@ static int tolua_equipunit(lua_State * L)
|
||||||
{
|
{
|
||||||
unit *u = (unit *)tolua_tousertype(L, 1, 0);
|
unit *u = (unit *)tolua_tousertype(L, 1, 0);
|
||||||
const char *eqname = tolua_tostring(L, 2, 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#define VERSION_MAJOR 3
|
#define VERSION_MAJOR 3
|
||||||
#define VERSION_MINOR 5
|
#define VERSION_MINOR 5
|
||||||
#define VERSION_BUILD 2
|
#define VERSION_BUILD 3
|
||||||
|
|
|
@ -113,7 +113,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
/* - exported global symbols ----------------------------------- */
|
/* - exported global symbols ----------------------------------- */
|
||||||
|
|
||||||
static int RemoveNMRNewbie(void)
|
static bool RemoveNMRNewbie(void)
|
||||||
{
|
{
|
||||||
static int value = -1;
|
static int value = -1;
|
||||||
static int gamecookie = -1;
|
static int gamecookie = -1;
|
||||||
|
@ -122,7 +122,7 @@ static int RemoveNMRNewbie(void)
|
||||||
value = get_param_int(global.parameters, "nmr.removenewbie", 0);
|
value = get_param_int(global.parameters, "nmr.removenewbie", 0);
|
||||||
gamecookie = global.cookie;
|
gamecookie = global.cookie;
|
||||||
}
|
}
|
||||||
return value;
|
return value!=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void checkorders(void)
|
static void checkorders(void)
|
||||||
|
|
Loading…
Reference in New Issue