variable-based monster spawns

This commit is contained in:
Enno Rehling 2020-10-03 15:54:41 +02:00
parent d9eb88134d
commit 53fac9ab58
4 changed files with 24 additions and 12 deletions

View file

@ -50,6 +50,8 @@
"rules.reserve.twophase": true, "rules.reserve.twophase": true,
"rules.give.max_men": -1, "rules.give.max_men": -1,
"rules.check_overload": false, "rules.check_overload": false,
"rules.wage.function": 2,
"monsters.spawn.chance" : 0,
"rules.limit.faction": 2500, "rules.limit.faction": 2500,
"rules.maxskills.magic": 5, "rules.maxskills.magic": 5,
"rules.guard.base_stop_prob": 0.30, "rules.guard.base_stop_prob": 0.30,

6
conf/ex/readme.txt Normal file
View file

@ -0,0 +1,6 @@
# Änderungen gegenüber E2
- ARBEITE produziert nur genug Silber für den Unterhalt der Einheit
- NUMMER Befehl abgeschafft.
- Ebene und Hochland haben 20%, alle anderen Regionen 10% der Arbeitsplätze von E2.
- Keine Zufallsmonster

View file

@ -1,11 +1,11 @@
{ {
"terrains": { "terrains": {
"ocean": { "ocean": {
"size": 100, "size": 10,
"flags": [ "swim", "sea", "sail", "fly" ] "flags": [ "swim", "sea", "sail", "fly" ]
}, },
"plain": { "plain": {
"size": 10000, "size": 2000,
"herbs": [ "h0", "h1", "h2", "h3", "h4", "h5" ], "herbs": [ "h0", "h1", "h2", "h3", "h4", "h5" ],
"seed": 3, "seed": 3,
"road": 50, "road": 50,
@ -32,7 +32,7 @@
} }
}, },
"swamp": { "swamp": {
"size": 2000, "size": 200,
"herbs": [ "h6", "h7", "h8" ], "herbs": [ "h6", "h7", "h8" ],
"seed": 2, "seed": 2,
"road": 75, "road": 75,
@ -59,7 +59,7 @@
} }
}, },
"desert": { "desert": {
"size": 500, "size": 50,
"herbs": [ "h9", "h10", "h11" ], "herbs": [ "h9", "h10", "h11" ],
"seed": 2, "seed": 2,
"road": 100, "road": 100,
@ -86,7 +86,7 @@
} }
}, },
"highland": { "highland": {
"size": 4000, "size": 800,
"herbs": [ "h12", "h13", "h14" ], "herbs": [ "h12", "h13", "h14" ],
"seed": 2, "seed": 2,
"road": 100, "road": 100,
@ -113,7 +113,7 @@
} }
}, },
"mountain": { "mountain": {
"size": 1000, "size": 100,
"herbs": [ "h15", "h16", "h17" ], "herbs": [ "h15", "h16", "h17" ],
"seed": 2, "seed": 2,
"road": 250, "road": 250,
@ -140,7 +140,7 @@
} }
}, },
"glacier": { "glacier": {
"size": 100, "size": 10,
"herbs": [ "h18", "h19", "h20" ], "herbs": [ "h18", "h19", "h20" ],
"seed": 2, "seed": 2,
"road": 250, "road": 250,
@ -167,7 +167,7 @@
} }
}, },
"iceberg": { "iceberg": {
"size": 100, "size": 10,
"herbs": [ "h18", "h19", "h20" ], "herbs": [ "h18", "h19", "h20" ],
"flags": [ "arctic", "land", "walk", "sail", "fly" ], "flags": [ "arctic", "land", "walk", "sail", "fly" ],
"production": { "production": {
@ -186,7 +186,7 @@
} }
}, },
"iceberg_sleep": { "iceberg_sleep": {
"size": 100, "size": 10,
"herbs": [ "h18", "h19", "h20" ], "herbs": [ "h18", "h19", "h20" ],
"flags": [ "arctic", "land", "walk", "sail", "fly" ], "flags": [ "arctic", "land", "walk", "sail", "fly" ],
"production": { "production": {
@ -220,7 +220,7 @@
"flags": [ "forbidden" ] "flags": [ "forbidden" ]
}, },
"volcano": { "volcano": {
"size": 500, "size": 50,
"road": 250, "road": 250,
"seed": 1, "seed": 1,
"flags": [ "land", "walk", "sail", "fly" ], "flags": [ "land", "walk", "sail", "fly" ],
@ -246,7 +246,7 @@
} }
}, },
"activevolcano": { "activevolcano": {
"size": 500, "size": 50,
"road": 250, "road": 250,
"flags": [ "land", "walk", "sail", "fly" ], "flags": [ "land", "walk", "sail", "fly" ],
"production": { "production": {

View file

@ -974,7 +974,11 @@ void spawn_undead(void)
{ {
region *r; region *r;
faction *monsters = get_monsters(); faction *monsters = get_monsters();
int spawn_chance = config_get_int("monsters.spawn.chance", 100) * 10;
if (spawn_chance <= 0) {
return;
}
for (r = regions; r; r = r->next) { for (r = regions; r; r = r->next) {
int unburied = deathcount(r); int unburied = deathcount(r);
@ -985,7 +989,7 @@ void spawn_undead(void)
} }
if (r->land && unburied > rpeasants(r) / 20 if (r->land && unburied > rpeasants(r) / 20
&& rng_int() % 10000 < 100) { && rng_int() % spawn_chance < 100) {
message *msg; message *msg;
unit *u; unit *u;
/* es ist sinnfrei, wenn irgendwo im Wald 3er-Einheiten Untote entstehen. /* es ist sinnfrei, wenn irgendwo im Wald 3er-Einheiten Untote entstehen.