game-village-politics-backend/config/game/combat.php

37 lines
1.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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],
// The winner loses (loser strength / winner strength) ^ exponent of every unit; the loser loses all.
'loss_exponent' => 1.5,
// Wall at level L: defenders get basic_defense × L extra, then everything × factor^L.
'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'],
// 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,
];