This commit is contained in:
Alberto Xamin 2024-11-12 17:15:56 +03:00 committed by GitHub
commit e08e84e438
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -178,7 +178,7 @@ class Sventagliata(
player.available_cards = [
dict(p, **{"original_target": against})
for p in player.game.get_visible_players(t)
if p["name"] != player.name and p["name"] != t.name and p["dist"]
if p["name"] != player.name and p["name"] != t.name and p["dist"] == 1
]
if len(player.available_cards) > 0:
player.pending_action = PendingAction.CHOOSE

View File

@ -353,6 +353,12 @@ def test_sventagliata():
assert p.pending_action == PendingAction.PLAY
assert len(p.hand) == 1
# Ensure the secondary target is at a distance from the first target
assert any(
target["name"] == secondary_target and target["dist"] > 1
for target in g.get_visible_players(p1)
)
def test_mira():
g = started_game(['the_valley_of_shadows'])