diff --git a/koboldsim/cardtypes.go b/koboldsim/cardtypes.go index d81a412..f4e7f4f 100644 --- a/koboldsim/cardtypes.go +++ b/koboldsim/cardtypes.go @@ -83,7 +83,7 @@ func (s *SwitchingCard) Options(*Player) ([]CardOption, error) { func (s *SwitchingCard) Then(p *Player, o CardOption) error { newPolicy := o.(Policy) var errs cardsim.ErrorCollector - if !newPolicy.Is(s.lastPolicy) { + if s.lastPolicy != nil && !newPolicy.Is(s.lastPolicy) { err := s.lastPolicy.Unenact(p) if cardsim.IsSeriousError(err) { return err