fairland: Tweak sea oil & mountain gold for simplicity

The functions mapping elevation to resources are piecewise linear,
except for set_oil(), which randomly adds 1 to sea oil, and
set_gold(), which is isn't linear for mountains, but very close.

Drop the random oil bit, and replace the non-liner gold function by a
linear one.  Both resources decrease at most by one point.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2020-08-21 08:18:49 +02:00
parent fdd55428c3
commit 39ef156f00
5 changed files with 1084 additions and 1084 deletions

View file

@ -1378,7 +1378,7 @@ set_oil(int e)
{
int oil = 0;
if (e < LANDMIN)
oil = (LANDMIN - e) * 2 + roll0(2);
oil = (LANDMIN - e) * 2;
else if (e <= OIL_MAX)
oil = (120 * (OIL_MAX - e + 1)) / (OIL_MAX - LANDMIN + 1);
if (oil > 100)
@ -1405,7 +1405,7 @@ set_gold(int e)
if (e < HIGHMIN)
gold = (80 * (e - GOLD_MIN + 1)) / (HIGHMIN - GOLD_MIN);
else
gold = 100 - 20 * HIGHMIN / e;
gold = 80 + 5 * (e - HIGHMIN) / (127 - HIGHMIN);
}
if (gold > 100)
gold = 100;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff