diff --git a/app/Game/Quests/Facts.php b/app/Game/Quests/Facts.php index ed280f6..a05da24 100644 --- a/app/Game/Quests/Facts.php +++ b/app/Game/Quests/Facts.php @@ -8,7 +8,7 @@ final class Facts /** * @param array $levels highest level per building type * @param array $instances most buildings of a type in one village - * @param array $counters action counters (Counters::bump keys) + * @param array $counters action counters (Quests::bump keys) */ public function __construct( public readonly array $levels = [], diff --git a/config/game/quests.php b/config/game/quests.php index 509743f..f5e947b 100644 --- a/config/game/quests.php +++ b/config/game/quests.php @@ -8,8 +8,8 @@ * Goals: * ['building', type, level] a building of that type at that level in any village * ['instances', type, count] that many buildings of one type in one village - * ['counter', key, count, hint] something done that often (Counters::bump keys); - * hint names the screen the client points at + * ['counter', key, count, hint] something done that often (Quests::bump keys); + * hint names the client screen it points at: overview, recruit, rally, workforce, map, reports * * Titles and story texts live in the client's i18n (quests..title|text). */ @@ -61,7 +61,7 @@ return [ 'reward' => ['wood' => 250, 'clay' => 220, 'iron' => 120], ], 'first_spears' => [ - 'goals' => [['counter', 'recruited.spear', 5, 'barracks']], + 'goals' => [['counter', 'recruited.spear', 5, 'recruit']], 'reward' => ['wood' => 250, 'clay' => 150, 'iron' => 50], ], 'rally_point' => [ @@ -69,7 +69,7 @@ return [ 'reward' => ['wood' => 100, 'clay' => 100, 'iron' => 100], ], 'first_raid' => [ - 'goals' => [['counter', 'attacks.barbarian', 1, 'rally_point']], + 'goals' => [['counter', 'attacks.barbarian', 1, 'rally']], 'reward' => ['wood' => 300, 'clay' => 300, 'iron' => 300], ], 'wall_3' => [ @@ -85,7 +85,7 @@ return [ 'reward' => ['wood' => 700, 'clay' => 600, 'iron' => 600], ], 'first_scouts' => [ - 'goals' => [['counter', 'scouts.sent', 1, 'rally_point']], + 'goals' => [['counter', 'scouts.sent', 1, 'rally']], 'reward' => ['wood' => 500, 'clay' => 500, 'iron' => 500], ], ], @@ -94,11 +94,11 @@ return [ // instance of a building, the levy. 'village' => [ 'rename' => [ - 'goals' => [['counter', 'village.renamed', 1, 'village']], + 'goals' => [['counter', 'village.renamed', 1, 'overview']], 'reward' => ['wood' => 60, 'clay' => 60, 'iron' => 60], ], 'priority' => [ - 'goals' => [['counter', 'priority.set', 1, 'headquarters']], + 'goals' => [['counter', 'priority.set', 1, 'workforce']], 'reward' => ['wood' => 100, 'clay' => 100, 'iron' => 100], ], 'look_around' => [ @@ -118,7 +118,7 @@ return [ 'reward' => ['wood' => 150, 'clay' => 150, 'iron' => 150], ], 'levy' => [ - 'goals' => [['counter', 'levy.called', 1, 'village']], + 'goals' => [['counter', 'levy.called', 1, 'recruit']], 'reward' => ['wood' => 200, 'clay' => 200, 'iron' => 200], ], 'second_farm' => [ diff --git a/tests/Unit/Game/QuestBookTest.php b/tests/Unit/Game/QuestBookTest.php index 22251b9..1b4aef9 100644 --- a/tests/Unit/Game/QuestBookTest.php +++ b/tests/Unit/Game/QuestBookTest.php @@ -40,7 +40,7 @@ it('measures counters and instances, capping progress at the goal', function () $army = line(book()->progress(['barracks'], $facts), 'army'); $village = line(book()->progress(['rename', 'priority', 'look_around', 'hiding_place'], $facts), 'village'); - expect($army['quest']['goals'][0])->toMatchArray(['have' => 5, 'need' => 5, 'met' => true, 'hint' => 'barracks']) + expect($army['quest']['goals'][0])->toMatchArray(['have' => 5, 'need' => 5, 'met' => true, 'hint' => 'recruit']) ->and($village['quest']['goals'][0])->toMatchArray(['kind' => 'instances', 'have' => 1, 'need' => 2, 'met' => false]); });