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

56 lines
2.8 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'],
// 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],
// 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,
// 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,
// Coins minted at the academy. Noble slots grow with coins: the n-th slot needs n
// more coins (1, 3, 6, 10, …). Each nobleman alive and each village beyond the
// first takes a slot.
'coin_cost' => ['wood' => 28000, 'clay' => 30000, 'iron' => 25000],
],
];