diff options
Diffstat (limited to 'go/game/unit.go')
| -rw-r--r-- | go/game/unit.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/go/game/unit.go b/go/game/unit.go index c875fa50..9f823a0d 100644 --- a/go/game/unit.go +++ b/go/game/unit.go @@ -172,7 +172,10 @@ func (u *Unit) AvailSlowActions() (actions []Action) { } for _, t := range TilesInRange(m, u, 1) { - if t.Permanent != nil && t.Permanent.Card().Type.IsArtifact() { + // Only generate a ArtifactSwitchAction if the tiles are current + // tiles are suitable for both permanents + if t.Permanent != nil && t.Permanent.Card().Type.IsArtifact() && + t.IsSuitableForCard(u.Card()) && u.Tile().IsSuitableForCard(t.Permanent.Card()) { actions = append(actions, newArtifactSwitchAction(u, t.Permanent)) } } |
