forked from github/server
Merge pull request #250 from badgerman/feature/newplayer-fixes
some fixes for new players
This commit is contained in:
commit
6df1e3eeb0
|
@ -90,7 +90,7 @@
|
|||
<param name="entertain.base" value="0"/>
|
||||
<param name="entertain.perlevel" value="20"/>
|
||||
<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="hunger.long" value="1"/>
|
||||
<param name="init_spells" value="0"/>
|
||||
|
|
|
@ -6,7 +6,7 @@ local function score(r, res)
|
|||
local x, y, rn
|
||||
local peas = r:get_resource(res)
|
||||
for _, rn in pairs(r.adj) do
|
||||
if rn then
|
||||
if rn and not rn.units() then
|
||||
peas = peas + rn:get_resource(res)
|
||||
end
|
||||
end
|
||||
|
@ -16,7 +16,7 @@ end
|
|||
local function select(regions, limit)
|
||||
local sel = {}
|
||||
for r in regions do
|
||||
if r.terrain~="ocean" and r.units()==nil then
|
||||
if r.terrain~="ocean" and not r.units() then
|
||||
s = score(r)
|
||||
if s >= limit then
|
||||
table.insert(sel, r)
|
||||
|
|
|
@ -26,7 +26,6 @@ module("tests.common", package.seeall, lunit.testcase)
|
|||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.settings.set("nmr.removenewbie", "0")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("NewbieImmunity", "0")
|
||||
eressea.settings.set("rules.economy.food", "4")
|
||||
|
@ -961,7 +960,6 @@ module("tests.report", package.seeall, lunit.testcase)
|
|||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.settings.set("nmr.removenewbie", "0")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("rules.economy.food", "4")
|
||||
end
|
||||
|
|
|
@ -4,7 +4,6 @@ module("tests.e2.guard", package.seeall, lunit.testcase)
|
|||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.settings.set("nmr.removenewbie", "0")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("NewbieImmunity", "0")
|
||||
eressea.settings.set("rules.economy.food", "4")
|
||||
|
|
|
@ -4,7 +4,6 @@ module("tests.e2.movement", package.seeall, lunit.testcase)
|
|||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.settings.set("nmr.removenewbie", "0")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("NewbieImmunity", "0")
|
||||
end
|
||||
|
|
|
@ -4,7 +4,6 @@ module("tests.e2.shiplanding", package.seeall, lunit.testcase)
|
|||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.settings.set("nmr.removenewbie", "0")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("NewbieImmunity", "0")
|
||||
end
|
||||
|
|
|
@ -5,7 +5,6 @@ module("tests.e3.spells", package.seeall, lunit.testcase)
|
|||
function setup()
|
||||
eressea.game.reset()
|
||||
eressea.settings.set("magic.fumble.enable", "0")
|
||||
eressea.settings.set("nmr.removenewbie", "0")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("rules.peasants.growth", "0")
|
||||
end
|
||||
|
|
|
@ -4,7 +4,6 @@ module("tests.movement", package.seeall, lunit.testcase)
|
|||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.settings.set("nmr.removenewbie", "0")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("rules.ships.storms", "0")
|
||||
conf = [[{
|
||||
|
|
|
@ -16,7 +16,6 @@ function setup()
|
|||
u = _G.unit.create(f, r, 1)
|
||||
u:clear_orders()
|
||||
eressea.settings.set("rules.economy.food", "4")
|
||||
eressea.settings.set("nmr.removenewbie", "0")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("NewbieImmunity", "0")
|
||||
end
|
||||
|
|
|
@ -6,7 +6,6 @@ function setup()
|
|||
eressea.game.reset()
|
||||
eressea.config.reset()
|
||||
eressea.settings.set("rules.economy.food", "0")
|
||||
eressea.settings.set("nmr.removenewbie", "0")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("rules.magic.playerschools", "")
|
||||
conf = [[{
|
||||
|
|
|
@ -113,7 +113,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
/* - exported global symbols ----------------------------------- */
|
||||
|
||||
static int RemoveNMRNewbie(void)
|
||||
static bool RemoveNMRNewbie(void)
|
||||
{
|
||||
static int value = -1;
|
||||
static int gamecookie = -1;
|
||||
|
@ -122,7 +122,7 @@ static int RemoveNMRNewbie(void)
|
|||
value = get_param_int(global.parameters, "nmr.removenewbie", 0);
|
||||
gamecookie = global.cookie;
|
||||
}
|
||||
return value;
|
||||
return value!=0;
|
||||
}
|
||||
|
||||
static void age_unit(region * r, unit * u)
|
||||
|
|
Loading…
Reference in New Issue