From 04476b3225158a244269a84f0dcf112cfd0ee05a Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 5 Sep 2025 18:30:05 +0200 Subject: fix that granting effects are considered x effects X effects have to start with the X value or the keyword. --- go/game/cardImplementations_test.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'go/game/cardImplementations_test.go') diff --git a/go/game/cardImplementations_test.go b/go/game/cardImplementations_test.go index 51aab02f..43d69b76 100644 --- a/go/game/cardImplementations_test.go +++ b/go/game/cardImplementations_test.go @@ -394,3 +394,28 @@ func TestReformer(t *testing.T) { t.Fatal("not two cards drawn") } } + +func TestSailor(t *testing.T) { + mapDef := `map: |+1 + HW +symbols: + H: house + W: deep water +` + s, m, p, _ := newMockStateFromDef(mapDef) + sailor := s.addNewUnit(NewCard("nautics/sailor"), Position{0, 0}, p) + fisher := s.addNewUnit(NewCard("nautics/fisher"), Position{1, 0}, p) + + _, err := sailor.XEffect("crew") + if err == nil { + t.Fatal("sailor is crewable") + } + + ma := NewMoveAction(sailor) + ma.Target().AddSelection(m.TileAt(Position{1, 0})) + s.ResolveAction(ma) + + if fisher.Movement.Range != 3 { + t.Fatal("sailor not adding movement to fisher") + } +} -- cgit v1.2.3