feat: copies cost double: instance_cost_factor 2.0 for every type that allows copies
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
13c509f919
commit
fe46b74afa
|
|
@ -30,7 +30,7 @@ return [
|
|||
'workers' => ['base' => 1, 'factor' => 1.1],
|
||||
'production' => null,
|
||||
'capacity' => ['base' => 1000, 'factor' => 1.23],
|
||||
'instance_cost_factor' => 1.5,
|
||||
'instance_cost_factor' => 2.0,
|
||||
'points' => ['base' => 6, 'factor' => 1.2],
|
||||
'requires' => [],
|
||||
],
|
||||
|
|
@ -42,7 +42,7 @@ return [
|
|||
'build_time' => ['base' => 120, 'factor' => 1.2],
|
||||
'workers' => ['base' => 2, 'factor' => 1.1],
|
||||
'production' => ['resource' => 'food', 'base' => 30, 'factor' => 1.17],
|
||||
'instance_cost_factor' => 1.5,
|
||||
'instance_cost_factor' => 2.0,
|
||||
'points' => ['base' => 5, 'factor' => 1.2],
|
||||
'requires' => [],
|
||||
],
|
||||
|
|
@ -54,7 +54,7 @@ return [
|
|||
'build_time' => ['base' => 90, 'factor' => 1.2],
|
||||
'workers' => ['base' => 2, 'factor' => 1.12],
|
||||
'production' => ['resource' => 'wood', 'base' => 30, 'factor' => 1.163],
|
||||
'instance_cost_factor' => 1.5,
|
||||
'instance_cost_factor' => 2.0,
|
||||
'points' => ['base' => 6, 'factor' => 1.2],
|
||||
'requires' => [],
|
||||
],
|
||||
|
|
@ -66,7 +66,7 @@ return [
|
|||
'build_time' => ['base' => 90, 'factor' => 1.2],
|
||||
'workers' => ['base' => 2, 'factor' => 1.12],
|
||||
'production' => ['resource' => 'clay', 'base' => 30, 'factor' => 1.163],
|
||||
'instance_cost_factor' => 1.5,
|
||||
'instance_cost_factor' => 2.0,
|
||||
'points' => ['base' => 6, 'factor' => 1.2],
|
||||
'requires' => [],
|
||||
],
|
||||
|
|
@ -78,7 +78,7 @@ return [
|
|||
'build_time' => ['base' => 110, 'factor' => 1.2],
|
||||
'workers' => ['base' => 2, 'factor' => 1.12],
|
||||
'production' => ['resource' => 'iron', 'base' => 30, 'factor' => 1.163],
|
||||
'instance_cost_factor' => 1.5,
|
||||
'instance_cost_factor' => 2.0,
|
||||
'points' => ['base' => 6, 'factor' => 1.2],
|
||||
'requires' => [],
|
||||
],
|
||||
|
|
@ -92,7 +92,7 @@ return [
|
|||
'production' => null,
|
||||
// Wood, clay and iron each that raiders can't take; instances add up.
|
||||
'hides' => ['base' => 150, 'factor' => 1.3335],
|
||||
'instance_cost_factor' => 1.5,
|
||||
'instance_cost_factor' => 2.0,
|
||||
'points' => ['base' => 5, 'factor' => 1.2],
|
||||
'requires' => [],
|
||||
],
|
||||
|
|
@ -146,7 +146,7 @@ return [
|
|||
'build_time' => ['base' => 600, 'factor' => 1.2],
|
||||
'workers' => ['base' => 3, 'factor' => 1.1],
|
||||
'production' => null,
|
||||
'instance_cost_factor' => 1.5,
|
||||
'instance_cost_factor' => 2.0,
|
||||
'points' => ['base' => 16, 'factor' => 1.2],
|
||||
'requires' => [],
|
||||
],
|
||||
|
|
@ -158,7 +158,7 @@ return [
|
|||
'build_time' => ['base' => 1200, 'factor' => 1.2],
|
||||
'workers' => ['base' => 3, 'factor' => 1.1],
|
||||
'production' => null,
|
||||
'instance_cost_factor' => 1.5,
|
||||
'instance_cost_factor' => 2.0,
|
||||
'points' => ['base' => 20, 'factor' => 1.2],
|
||||
'requires' => ['barracks' => 3],
|
||||
],
|
||||
|
|
@ -170,7 +170,7 @@ return [
|
|||
'build_time' => ['base' => 1800, 'factor' => 1.2],
|
||||
'workers' => ['base' => 4, 'factor' => 1.1],
|
||||
'production' => null,
|
||||
'instance_cost_factor' => 1.5,
|
||||
'instance_cost_factor' => 2.0,
|
||||
'points' => ['base' => 24, 'factor' => 1.2],
|
||||
'requires' => ['barracks' => 5],
|
||||
],
|
||||
|
|
@ -199,7 +199,7 @@ return [
|
|||
'workers' => ['base' => 2, 'factor' => 1.1],
|
||||
'production' => null,
|
||||
'beds' => ['base' => 20, 'factor' => 1.2],
|
||||
'instance_cost_factor' => 1.5,
|
||||
'instance_cost_factor' => 2.0,
|
||||
'points' => ['base' => 12, 'factor' => 1.2],
|
||||
'requires' => ['barracks' => 1],
|
||||
],
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ it('makes a later instance of a type cost more', function () {
|
|||
$village = startVillage();
|
||||
|
||||
$farms = collect(shown($village)['buildable'])->firstWhere('type', 'farm');
|
||||
expect($farms['cost'])->toBe(['wood' => 68, 'clay' => 60, 'iron' => 45]);
|
||||
expect($farms['cost'])->toBe(['wood' => 90, 'clay' => 80, 'iron' => 60]);
|
||||
});
|
||||
|
||||
it('keeps a third order waiting and starts it when a builder frees up', function () {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@ it('costs the base at level 1 and grows by the factor per level', function () {
|
|||
it('makes later instances of a type more expensive', function () {
|
||||
$rules = new BuildingRules(gameConfig());
|
||||
|
||||
expect($rules->cost('farm', 1, 1))->toBe(['wood' => 68, 'clay' => 60, 'iron' => 45])
|
||||
// The n-th copy costs 2^n as much, at every level.
|
||||
expect($rules->cost('farm', 1, 1))->toBe(['wood' => 90, 'clay' => 80, 'iron' => 60])
|
||||
->and($rules->cost('farm', 1, 2))->toBe(['wood' => 180, 'clay' => 160, 'iron' => 120])
|
||||
->and($rules->cost('timber_camp', 3, 1))->toBe(['wood' => 156, 'clay' => 188, 'iron' => 125])
|
||||
->and($rules->cost('headquarters', 1, 3))->toBe($rules->cost('headquarters', 1));
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue