2026-10-28 22:56:55 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
// Battles in the Die Stämme model (architecture.md, "Combat").
|
|
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
// Attack strength × (1 + luck), luck drawn evenly from [−luck, +luck] per battle. 0 turns it off.
|
|
|
|
|
|
'luck' => 0.25,
|
|
|
|
|
|
|
|
|
|
|
|
// Attacks on smaller players hit with less strength:
|
|
|
|
|
|
// min(1, floor + points_factor × defender points / attacker points). Barbarians always take 100%.
|
|
|
|
|
|
'morale' => ['enabled' => true, 'floor' => 0.3, 'points_factor' => 3],
|
|
|
|
|
|
|
2026-10-31 09:56:05 +00:00
|
|
|
|
// With r = loser strength / winner strength, the winner loses
|
|
|
|
|
|
// max(0, (r − loss_threshold) / (1 − loss_threshold)) ^ loss_exponent of every unit; the
|
|
|
|
|
|
// loser loses all. A side ten times stronger (r ≤ 0.1) loses nobody.
|
2026-10-28 22:56:55 +00:00
|
|
|
|
'loss_exponent' => 1.5,
|
2026-10-31 09:56:05 +00:00
|
|
|
|
'loss_threshold' => 0.1,
|
2026-10-28 22:56:55 +00:00
|
|
|
|
|
|
|
|
|
|
// Wall at level L: defenders get basic_defense × L extra, then everything × factor^L.
|
2026-10-31 09:59:32 +00:00
|
|
|
|
// Before the melee both sides shoot at once (units.*.volley): the defenders' volley
|
|
|
|
|
|
// × factor^L, the attackers' ÷ factor^L. A volley kills min(1, volley / the other side's
|
|
|
|
|
|
// food upkeep) of every unit but scouts; the melee runs with who is left.
|
2026-10-28 22:56:55 +00:00
|
|
|
|
'wall' => ['basic_defense' => 20, 'factor' => 1.037],
|
|
|
|
|
|
|
|
|
|
|
|
// Rams hit the wall before the battle, surviving catapults the chosen building after
|
|
|
|
|
|
// a won one. Taking a building from level L to L − 1 needs base × factor^(L − 1)
|
|
|
|
|
|
// of them; buildings never drop below level 1.
|
|
|
|
|
|
'siege' => [
|
|
|
|
|
|
'ram' => ['base' => 2, 'factor' => 1.09],
|
|
|
|
|
|
'catapult' => ['base' => 2, 'factor' => 1.09],
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
// Defence × factor while the defender's clock is between start and end (hours).
|
|
|
|
|
|
'night' => ['enabled' => false, 'start' => 0, 'end' => 8, 'factor' => 2.0, 'timezone' => 'Europe/Berlin'],
|
|
|
|
|
|
|
2026-10-28 23:10:49 +00:00
|
|
|
|
// Scouts meet scouts before the battle: the attacking ones get through when they
|
|
|
|
|
|
// outnumber defence × the defending scouts, losing (defence / attack)^loss_exponent of
|
|
|
|
|
|
// themselves; otherwise all of them die. Defending scouts never die in this.
|
|
|
|
|
|
'scouting' => ['defense' => 1.0],
|
|
|
|
|
|
|
2026-10-28 22:56:55 +00:00
|
|
|
|
// Levied villagers defend with these values per head.
|
|
|
|
|
|
'militia' => ['defense' => ['infantry' => 5, 'cavalry' => 5, 'archer' => 5]],
|
|
|
|
|
|
|
|
|
|
|
|
// New players can't be attacked by players for this long after joining (seconds at
|
|
|
|
|
|
// world speed 1), and can't attack players themselves meanwhile; barbarians are fine.
|
|
|
|
|
|
'beginner_protection' => 3 * 86400,
|
2026-10-29 09:28:20 +00:00
|
|
|
|
|
2026-10-30 12:45:02 +00:00
|
|
|
|
// Lazarett: of the own units that fall defending their village, `share` (rounded down)
|
|
|
|
|
|
// come back wounded, as far as its hospitals have free beds. The wounded eat like
|
|
|
|
|
|
// soldiers and stand again heal_time (seconds at world speed 1) after the battle.
|
|
|
|
|
|
'hospital' => ['share' => 0.5, 'heal_time' => 4 * 3600],
|
|
|
|
|
|
|
2026-10-29 09:28:20 +00:00
|
|
|
|
// Taking villages, like Die Stämme. Loyalty runs from 0 to max and grows back
|
|
|
|
|
|
// regen_per_hour × world speed. Every surviving nobleman of a won attack lowers it by
|
|
|
|
|
|
// an even draw between drop[0] and drop[1]; at 0 or below the village changes hands,
|
|
|
|
|
|
// one nobleman settles there, and loyalty starts again at after_conquest.
|
|
|
|
|
|
'conquest' => [
|
|
|
|
|
|
'loyalty' => ['max' => 100, 'regen_per_hour' => 1.0, 'drop' => [20, 35], 'after_conquest' => 25],
|
|
|
|
|
|
// Noblemen don't march further than this many fields (0: no limit).
|
|
|
|
|
|
'max_distance' => 100,
|
2026-10-31 09:53:30 +00:00
|
|
|
|
// Coins minted at the academy pay for villages, not noblemen. Each village beyond
|
|
|
|
|
|
// the first takes a slot, and the n-th slot needs n more coins (1, 3, 6, 10, …).
|
|
|
|
|
|
// A conquest without a free slot leaves loyalty at 0 and the noblemen go home.
|
2026-10-29 09:28:20 +00:00
|
|
|
|
'coin_cost' => ['wood' => 28000, 'clay' => 30000, 'iron' => 25000],
|
|
|
|
|
|
],
|
2026-10-28 22:56:55 +00:00
|
|
|
|
];
|