feat: one farm feeds a full army: farm production factor 1.25 (level 30 about 19,400 food/h)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fe46b74afa
commit
12a994e91c
|
|
@ -41,7 +41,7 @@ return [
|
|||
'cost' => ['wood' => 45, 'clay' => 40, 'iron' => 30, 'factor' => 1.27],
|
||||
'build_time' => ['base' => 120, 'factor' => 1.2],
|
||||
'workers' => ['base' => 2, 'factor' => 1.1],
|
||||
'production' => ['resource' => 'food', 'base' => 30, 'factor' => 1.17],
|
||||
'production' => ['resource' => 'food', 'base' => 30, 'factor' => 1.25],
|
||||
'instance_cost_factor' => 2.0,
|
||||
'points' => ['base' => 5, 'factor' => 1.2],
|
||||
'requires' => [],
|
||||
|
|
|
|||
|
|
@ -58,15 +58,15 @@ it('brings half the fallen defenders back wounded; they eat meanwhile and stand
|
|||
expect((array) $state['troops'])->toBe(['sword' => 11])
|
||||
->and($state['hospital'])->toMatchArray(['beds' => 20, 'occupied' => 4, 'share' => 0.5, 'heal_seconds' => 14400])
|
||||
->and((array) $state['hospital']['wounded'][0]['units'])->toBe(['sword' => 4])
|
||||
// Farm 10 feeds 0.8 × 123.2 = 98.6 heads: the 11 swordsmen and 4 wounded leave 83 villagers.
|
||||
->and($state['population']['villagers'])->toBe(83);
|
||||
// Farm 10 feeds 0.8 × 223.5 = 178.8 heads: the 11 swordsmen and 4 wounded leave 163 villagers.
|
||||
->and($state['population']['villagers'])->toBe(163);
|
||||
|
||||
$this->travel(4)->hours();
|
||||
$this->artisan('game:events --once')->assertSuccessful();
|
||||
$state = shown($defender);
|
||||
expect((array) $state['troops'])->toBe(['sword' => 15])
|
||||
->and($state['hospital'])->toMatchArray(['occupied' => 0, 'wounded' => []])
|
||||
->and($state['population']['villagers'])->toBe(83);
|
||||
->and($state['population']['villagers'])->toBe(163);
|
||||
});
|
||||
|
||||
it('takes in no more wounded than it has free beds', function () {
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ it('feeds villagers from the share of farm output, leaving a surplus', function
|
|||
$population = new Population(gameConfig());
|
||||
$workforce = $population->workforce([building(1, 'farm'), building(2, 'farm', 2)]);
|
||||
|
||||
// Budget 30 + 35.1 = 65.1 food/h; villagers fill 80% of it.
|
||||
expect($workforce->foodBudget)->toBe(30 + 30 * 1.17)
|
||||
->and($workforce->villagers)->toBe(52)
|
||||
->and($workforce->upkeep)->toEqual(52);
|
||||
// Budget 30 + 37.5 = 67.5 food/h; villagers fill 80% of it.
|
||||
expect($workforce->foodBudget)->toBe(30 + 30 * 1.25)
|
||||
->and($workforce->villagers)->toBe(54)
|
||||
->and($workforce->upkeep)->toEqual(54);
|
||||
});
|
||||
|
||||
it('leaves soldiers upkeep out of the villagers share', function () {
|
||||
|
|
|
|||
Loading…
Reference in New Issue