diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-09-05 18:30:05 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-09-05 18:33:35 +0200 |
| commit | 04476b3225158a244269a84f0dcf112cfd0ee05a (patch) | |
| tree | ae75061a5e87b6389e1c562f2a8066e998fdc385 /go/game/cardImplementations_test.go | |
| parent | 034e176110cc0a27cd20bdfe8522fd0dc73d2346 (diff) | |
| download | muhqs-game-04476b3225158a244269a84f0dcf112cfd0ee05a.tar.gz muhqs-game-04476b3225158a244269a84f0dcf112cfd0ee05a.zip | |
fix that granting effects are considered x effects
X effects have to start with the X value or the keyword.
Diffstat (limited to 'go/game/cardImplementations_test.go')
| -rw-r--r-- | go/game/cardImplementations_test.go | 25 |
1 files changed, 25 insertions, 0 deletions
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") + } +} |
