feat(combat): water traversal costs 3 and ends the turn
This commit is contained in:
@@ -229,12 +229,32 @@ final class UnitStateTest extends TestCase
|
||||
self::assertFalse($started->hasUsedAbility);
|
||||
}
|
||||
|
||||
public function testStartTurnResetsWadedFlag(): void
|
||||
{
|
||||
$unit = $this->unit(wadedThisTurn: true);
|
||||
$started = $unit->startTurn();
|
||||
self::assertFalse($started->wadedThisTurn);
|
||||
}
|
||||
|
||||
public function testWithWadedSetsAndClearsFlag(): void
|
||||
{
|
||||
$unit = $this->unit();
|
||||
self::assertFalse($unit->wadedThisTurn);
|
||||
|
||||
$wading = $unit->withWaded(true);
|
||||
self::assertTrue($wading->wadedThisTurn);
|
||||
|
||||
$dry = $wading->withWaded(false);
|
||||
self::assertFalse($dry->wadedThisTurn);
|
||||
}
|
||||
|
||||
private function unit(
|
||||
int $health = 10,
|
||||
int $actionsRemaining = 2,
|
||||
bool $hasAttacked = false,
|
||||
int $attackBonus = 0,
|
||||
bool $hasUsedAbility = false,
|
||||
bool $wadedThisTurn = false,
|
||||
): UnitState {
|
||||
return new UnitState(
|
||||
'unit-1',
|
||||
|
||||
Reference in New Issue
Block a user