diff --git a/app/Engine/Rally.php b/app/Engine/Rally.php index 0d1c389..638e8e2 100644 --- a/app/Engine/Rally.php +++ b/app/Engine/Rally.php @@ -432,12 +432,14 @@ final class Rally private function scatter(Movement $movement, CarbonImmutable $at): void { $origin = Village::with('player')->find($movement->origin_id); - Report::write($this->village->player_id, Report::DEFENSE, [ - 'raid' => true, - 'scattered' => true, - 'attacker' => ['village' => $origin ? self::summary($origin) : null, 'units' => null, 'lost' => null], - 'defender' => ['village' => self::summary($this->village), 'units' => null, 'lost' => null], - ], $at); + if ($origin) { + Report::write($this->village->player_id, Report::DEFENSE, [ + 'raid' => true, + 'scattered' => true, + 'attacker' => ['village' => self::summary($origin), 'units' => null, 'lost' => null], + 'defender' => ['village' => self::summary($this->village), 'units' => null, 'lost' => null], + ], $at); + } $movement->delete(); } diff --git a/docs/roadmap.md b/docs/roadmap.md index d26101a..2f39351 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -66,7 +66,7 @@ What Die Stämme has at this stage that the game still lacks. The world pushes back, so a world with few players is a game too: something threatens the village, raiding costs a decision, building space forces a choice of what a village is for, and a world has an end. - [x] Barbarian garrisons: troops from the village's points in one of four profiles (spearmen, swordsmen, archers, riders), capped by its food, regrowing after a hit; their stock grows from their own buildings -- [ ] Raiders: the nearest barbarian camp sends a band at every player village about once a day, announced hours ahead and sized by the village's points, with rams against a wall; hitting the camp first shrinks or scatters the band; loot goes back to the camp, a beaten band pays a bounty +- [x] Raiders: the nearest barbarian camp sends a band at every player village about once a day, announced hours ahead and sized by the village's points, with rams against a wall; hitting the camp first shrinks or scatters the band; loot goes back to the camp, a beaten band pays a bounty - [ ] Scarce building space (5 per headquarters level instead of 20) and specialisation: a resource village produces more, a military village trains faster and defends better - [ ] Seasons: crown villages appear around 0|0 after some weeks; a player who holds most of them long enough wins the world, and the next world opens