forked from github/server
updated seeding algorithm a little
new ship rules building skill for markets=3 herb fixes fixed taxation
This commit is contained in:
parent
b571a2007c
commit
b72333c258
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
<param name="rules.economy.herbrot" value="0"/>
|
||||
<param name="rules.tactics.formula" value="1"/> <!-- 10% per skilldiff -->
|
||||
<param name="rules.help.mask" value="fight guard money"/>
|
||||
<param name="movement.shipspeed.skillbonus" value="7"/>
|
||||
<param name="movement.shipspeed.skillbonus" value="6"/>
|
||||
<param name="alliance.auto" value="fight"/>
|
||||
<param name="alliance.restricted" value="fight"/>
|
||||
</game>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<building name="market" capacity="1" maxsize="10">
|
||||
<maintenance type="money" amount="200" vital="yes"/>
|
||||
<construction skill="building" minskill="2" reqsize="1">
|
||||
<construction skill="building" minskill="3" reqsize="1">
|
||||
<requirement type="log" quantity="1"/>
|
||||
<requirement type="stone" quantity="1"/>
|
||||
</construction>
|
||||
|
|
|
@ -4,18 +4,13 @@
|
|||
<terrain name="ocean" size="100" shallow="no" walk="no" swim="yes" land="no" sea="yes" />
|
||||
<terrain name="plain" size="4000" road="50" shallow="no" forest="yes" cavalry="yes" seed="3">
|
||||
<herb name="h0" />
|
||||
<herb name="h1" />
|
||||
<herb name="h2" />
|
||||
<herb name="h3" />
|
||||
<herb name="h4" />
|
||||
<herb name="h5" />
|
||||
<resource name="iron" chance="0.1" level="2d4-1" base="5d8" div="2d20+10" />
|
||||
<resource name="stone" chance="0.15" level="1d4" base="5d8" div="2d30+20" />
|
||||
<resource name="laen" chance="0.01" level="1d4" base="1d4" div="2d20+50" />
|
||||
</terrain>
|
||||
<terrain name="swamp" size="1200" road="75" seed="2">
|
||||
<herb name="h6" />
|
||||
<herb name="h7" />
|
||||
<herb name="h8" />
|
||||
<resource name="iron" chance="0.02" level="2d4-1" base="5d8" div="2d20+10" />
|
||||
<resource name="stone" chance="0.02" level="1d4" base="5d8" div="2d30+20" />
|
||||
|
@ -23,7 +18,6 @@
|
|||
</terrain>
|
||||
<terrain name="desert" size="400" road="100" cavalry="yes" seed="2">
|
||||
<herb name="h9" />
|
||||
<herb name="h10" />
|
||||
<herb name="h11" />
|
||||
<resource name="iron" chance="0.15" level="2d4-1" base="5d8" div="2d20+10" />
|
||||
<resource name="stone" chance="0.25" level="1d4" base="5d8" div="2d30+20" />
|
||||
|
@ -31,7 +25,6 @@
|
|||
</terrain>
|
||||
<terrain name="highland" size="2300" road="100" cavalry="yes" seed="2">
|
||||
<herb name="h12" />
|
||||
<herb name="h13" />
|
||||
<herb name="h14" />
|
||||
<resource name="iron" chance="0.15" level="2d4-1" base="5d8" div="2d20+10" />
|
||||
<resource name="stone" chance="0.25" level="1d4" base="5d8" div="2d30+20" />
|
||||
|
@ -39,7 +32,6 @@
|
|||
</terrain>
|
||||
<terrain name="mountain" size="600" road="250" seed="2">
|
||||
<herb name="h15" />
|
||||
<herb name="h16" />
|
||||
<herb name="h17" />
|
||||
<resource name="iron" chance="1.0" level="1" base="50" div="50" />
|
||||
<resource name="stone" chance="1.0" level="1" base="100" div="100" />
|
||||
|
@ -47,7 +39,6 @@
|
|||
</terrain>
|
||||
<terrain name="glacier" size="150" road="250" arctic="yes" seed="2">
|
||||
<herb name="h18" />
|
||||
<herb name="h19" />
|
||||
<herb name="h20" />
|
||||
<resource name="iron" chance="1.0" level="1" base="3" div="50" />
|
||||
<resource name="stone" chance="1.0" level="1" base="2" div="100" />
|
||||
|
@ -55,7 +46,6 @@
|
|||
</terrain>
|
||||
<terrain name="iceberg_sleep" size="150" road="250" arctic="yes">
|
||||
<herb name="h18" />
|
||||
<herb name="h19" />
|
||||
<herb name="h20" />
|
||||
<resource name="iron" chance="0.9" level="1" base="3" div="50" />
|
||||
<resource name="stone" chance="0.9" level="1" base="2" div="100" />
|
||||
|
@ -63,7 +53,6 @@
|
|||
</terrain>
|
||||
<terrain name="iceberg" size="150" arctic="yes">
|
||||
<herb name="h18" />
|
||||
<herb name="h19" />
|
||||
<herb name="h20" />
|
||||
<resource name="iron" chance="0.9" level="1" base="3" div="50" />
|
||||
<resource name="stone" chance="0.9" level="1" base="2" div="100" />
|
||||
|
@ -81,8 +70,4 @@
|
|||
<resource name="stone" chance="0.5" level="1" base="100" div="100" />
|
||||
<resource name="laen" chance="0.075" level="1" base="4" div="100" />
|
||||
</terrain>
|
||||
<!-- used for the museum only -->
|
||||
<terrain name="hall1" fly="no" />
|
||||
<terrain name="corridor1" fly="no" />
|
||||
<terrain name="wall1" sail="no" walk="no" fly="no" forbidden="yes" />
|
||||
</terrains>
|
||||
|
|
Loading…
Reference in New Issue