diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index f819242a3..edecf8c4a 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -622,8 +622,10 @@ ShipSpeedBonus(const unit * u) level = get_param_int(global.parameters, "movement.shipspeed.skillbonus", 0); } if (level>0) { + ship * sh = u->ship; int skl = effskill(u, SK_SAILING); - return skl/level; + int minsk = (sh->type->cptskill+1)/2; + return (skl-minsk)/level; } return 0; } diff --git a/src/common/modules/autoseed.c b/src/common/modules/autoseed.c index f4571ee85..e8dd52d18 100644 --- a/src/common/modules/autoseed.c +++ b/src/common/modules/autoseed.c @@ -941,7 +941,6 @@ starting_region(region * r, region * rn[]) } terraform_region(r, newterrain(T_PLAIN)); prepare_starting_region(r); - r->land->money = 50 * 1000; /* 2% = 1000 silver */ u = addplayer(r, addfaction("enno@eressea.de", itoa36(rng_int()), races, default_locale, 0)); } @@ -954,10 +953,12 @@ build_island_e3(int x, int y, int numfactions, int minsize) region_list * rlist = NULL; region_list * island = NULL; plane * pl = findplane(x, y); - region * r = new_region(x, y, pl, 0); + region * r = findregion(x, y); int nsize = 1; int q, maxq = INT_MIN, minq = INT_MAX; + if (!r) r = new_region(x, y, pl, 0); + assert(!r->units); do { terraform_region(r, random_terrain_e3(NODIRECTION)); } while (!r->land); @@ -1009,5 +1010,21 @@ build_island_e3(int x, int y, int numfactions, int minsize) } } } + + for (rlist=island;rlist;rlist=rlist->next) { + r = rlist->data; + if (r->units) { + region *rn[MAXDIRECTIONS]; + get_neighbours(r, rn); + q = region_quality(r, rn); + if (q-minq > (maxq-minq)*2/3) { + terraform_region(r, newterrain(T_HIGHLAND)); + prepare_starting_region(r); + } + r->land->money = 50000; /* 2% = 1000 silver */ + } else { + r->land->money *= 4; + } + } return nfactions; } diff --git a/src/eressea/tolua/helpers.c b/src/eressea/tolua/helpers.c index bf597bc47..8bf467f29 100644 --- a/src/eressea/tolua/helpers.c +++ b/src/eressea/tolua/helpers.c @@ -426,6 +426,7 @@ lua_building_protection(building * b, unit * u) lua_pop(L, 1); } else { result = (int)lua_tonumber(L, -1); + lua_pop(L, 1); } } else { log_error(("building_protection(%s, %s) calling '%s': not a function.\n", @@ -441,9 +442,11 @@ lua_building_taxes(building * b) lua_State * L = (lua_State *)global.vm_state; const char * fname = "building_taxes"; double result = 0.0F; + int type; lua_pushstring(L, fname); lua_rawget(L, LUA_GLOBALSINDEX); + type=lua_type(L, 1); if (lua_isfunction(L, 1)) { tolua_pushusertype(L, (void *)b, "building"); @@ -454,6 +457,7 @@ lua_building_taxes(building * b) lua_pop(L, 1); } else { result = (double)lua_tonumber(L, -1); + lua_pop(L, 1); } } else { log_error(("building_taxes(%s) calling '%s': not a function.\n", diff --git a/src/res/e3a.xml b/src/res/e3a.xml index 40762acd5..adcbb6181 100644 --- a/src/res/e3a.xml +++ b/src/res/e3a.xml @@ -163,7 +163,7 @@ - + diff --git a/src/res/e3a/buildings.xml b/src/res/e3a/buildings.xml index e9121e6fb..015d57fe4 100644 --- a/src/res/e3a/buildings.xml +++ b/src/res/e3a/buildings.xml @@ -20,7 +20,7 @@ - + diff --git a/src/res/e3a/terrains.xml b/src/res/e3a/terrains.xml index 6713d04d4..512536c38 100644 --- a/src/res/e3a/terrains.xml +++ b/src/res/e3a/terrains.xml @@ -4,18 +4,13 @@ - - - - - @@ -23,7 +18,6 @@ - @@ -31,7 +25,6 @@ - @@ -39,7 +32,6 @@ - @@ -47,7 +39,6 @@ - @@ -55,7 +46,6 @@ - @@ -63,7 +53,6 @@ - @@ -81,8 +70,4 @@ - - - -